Skip to content

Commit

Permalink
Merge pull request #974 from arrayfire/devel
Browse files Browse the repository at this point in the history
Release 3.1.0
  • Loading branch information
pavanky committed Aug 27, 2015
2 parents 93427f0 + 1a52ee1 commit e6acad6
Show file tree
Hide file tree
Showing 504 changed files with 31,480 additions and 9,460 deletions.
6 changes: 3 additions & 3 deletions ArrayFireConfigVersion.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@
# but only if the requested major version is the same as the current one.


set(PACKAGE_VERSION "@AF_VERSION@@AF_VERSION_MINOR@")
set(PACKAGE_VERSION "@AF_VERSION_MAJOR@@AF_VERSION_MINOR@")

if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()

if("@AF_VERSION@@AF_VERSION_MINOR@" MATCHES "^([0-9]+)\\.")
if("@AF_VERSION_MAJOR@@AF_VERSION_MINOR@" MATCHES "^([0-9]+)\\.")
set(ArrayFire_VERSION_MAJOR "${CMAKE_MATCH_1}")
else()
set(ArrayFire_VERSION_MAJOR "@AF_VERSION@@AF_VERSION_MINOR@")
set(ArrayFire_VERSION_MAJOR "@AF_VERSION_MAJOR@@AF_VERSION_MINOR@")
endif()

if("${PACKAGE_FIND_VERSION_MAJOR}" STREQUAL "${ArrayFire_VERSION_MAJOR}")
Expand Down
44 changes: 40 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,38 @@ PROJECT(ARRAYFIRE)

SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON)

SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
INCLUDE(${CMAKE_MODULE_PATH}/UploadCoveralls.cmake)
INCLUDE(AFInstallDirs)

OPTION(BUILD_TEST "Build Tests" ON)
OPTION(BUILD_EXAMPLES "Build Examples" ON)
OPTION(BUILD_GTEST "Download gtest and check for updates. Necessary if you change compilers" ON)

OPTION(BUILD_CPU "Build ArrayFire with a CPU backend" ON)

FIND_PACKAGE(CUDA QUIET)
IF(${CUDA_FOUND})
SET(BUILD_CUDA ON CACHE BOOL "")
ENDIF(${CUDA_FOUND})
OPTION(BUILD_CUDA "Build ArrayFire with a CUDA backend" OFF)

FIND_PACKAGE(OpenCL QUIET)
IF(${OpenCL_FOUND})
SET(BUILD_OPENCL ON CACHE BOOL "")
ENDIF(${OpenCL_FOUND})
OPTION(BUILD_OPENCL "Build ArrayFire with a OpenCL backend" OFF)

OPTION(BUILD_GRAPHICS "Build ArrayFire with Forge Graphics" ON)

OPTION(BUILD_DOCS "Create ArrayFire Documentation" OFF)
OPTION(WITH_COVERAGE "Added code coverage flags" OFF)

OPTION(BUILD_NONFREE "Build ArrayFire nonfree algorithms" OFF)
OPTION(BUILD_SIFT "Build ArrayFire nonfree algorithms" OFF)

MARK_AS_ADVANCED(BUILD_SIFT)

# Set a default build type if none was specified
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
Expand All @@ -24,10 +43,6 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
"MinSizeRel" "RelWithDebInfo")
endif()

SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
INCLUDE(${CMAKE_MODULE_PATH}/UploadCoveralls.cmake)
INCLUDE(AFInstallDirs)

FIND_PACKAGE(FreeImage)
IF(FREEIMAGE_FOUND)
ADD_DEFINITIONS(-DWITH_FREEIMAGE)
Expand Down Expand Up @@ -71,6 +86,27 @@ IF(BUILD_GRAPHICS)

ENDIF(BUILD_GRAPHICS)

IF(BUILD_NONFREE)
MESSAGE(WARNING "Building With NONFREE ON requires the following patents")
SET(BUILD_SIFT ON)
ENDIF(BUILD_NONFREE)

IF(BUILD_SIFT)
ADD_DEFINITIONS(-DAF_BUILD_SIFT)

IF (NOT BUILD_NONFREE)
MESSAGE(WARNING "Building with SIFT requires the following patents")
ENDIF()

MESSAGE("Method and apparatus for identifying scale invariant features"
"in an image and use of same for locating an object in an image,\" David"
"G. Lowe, US Patent 6,711,293 (March 23, 2004). Provisional application"
"filed March 8, 1999. Asignee: The University of British Columbia. For"
"further details, contact David Lowe (lowe@cs.ubc.ca) or the"
"University-Industry Liaison Office of the University of British"
"Columbia.")
ENDIF(BUILD_SIFT)

INCLUDE_DIRECTORIES(
"${CMAKE_CURRENT_SOURCE_DIR}/include"
"${CMAKE_CURRENT_SOURCE_DIR}/src/backend"
Expand Down
23 changes: 21 additions & 2 deletions CMakeModules/Version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,29 @@
# Make a version file that includes the ArrayFire version and git revision
#
SET(AF_VERSION_MAJOR "3")
SET(AF_VERSION_MINOR "0")
SET(AF_VERSION_PATCH "2")
SET(AF_VERSION_MINOR "1")
SET(AF_VERSION_PATCH "0")

SET(AF_VERSION "${AF_VERSION_MAJOR}.${AF_VERSION_MINOR}.${AF_VERSION_PATCH}")
SET(AF_API_VERSION_CURRENT ${AF_VERSION_MAJOR}${AF_VERSION_MINOR})

# From CMake 3.0.0 CMAKE_<LANG>_COMPILER_ID is AppleClang for OSX machines
# that use clang for compilations
IF("${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang")
SET(COMPILER_NAME "AppleClang")
ELSEIF("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
SET(COMPILER_NAME "LLVM Clang")
ELSEIF("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
SET(COMPILER_NAME "GNU Compiler Collection(GCC/G++)")
ELSEIF("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel")
SET(COMPILER_NAME "Intel Compiler")
ELSEIF("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
SET(COMPILER_NAME "Microsoft Visual Studio")
ENDIF()

SET(COMPILER_VERSION "${CMAKE_C_COMPILER_VERSION}")
SET(AF_COMPILER_STRING "${COMPILER_NAME} ${COMPILER_VERSION}")

EXECUTE_PROCESS(
COMMAND git log -1 --format=%h
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
Expand Down
1 change: 1 addition & 0 deletions CMakeModules/build_clFFT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ ExternalProject_Add(
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
-DBUILD_SHARED_LIBS:BOOL=OFF
-DBUILD_EXAMPLES:BOOL=OFF
-DBUILD_CLIENT:BOOL=OFF
-DBUILD_TEST:BOOL=OFF
-DSUFFIX_LIB:STRING=
Expand Down
18 changes: 15 additions & 3 deletions CMakeModules/build_forge.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
INCLUDE(ExternalProject)

SET(prefix ${CMAKE_BINARY_DIR}/third_party/forge)
SET(forge_location "${prefix}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}forge${CMAKE_SHARED_LIBRARY_SUFFIX}")

IF(WIN32)
SET(forge_lib_prefix "${prefix}/lib")
ELSE(WIN32)
SET(forge_lib_prefix "${prefix}/src/forge-ext-build/src")
ENDIF(WIN32)

SET(forge_location "${forge_lib_prefix}/${CMAKE_SHARED_LIBRARY_PREFIX}forge${CMAKE_SHARED_LIBRARY_SUFFIX}")
IF(CMAKE_VERSION VERSION_LESS 3.2)
IF(CMAKE_GENERATOR MATCHES "Ninja")
MESSAGE(WARNING "Building forge with Ninja has known issues with CMake older than 3.2")
Expand All @@ -16,7 +22,7 @@ ENDIF()
ExternalProject_Add(
forge-ext
GIT_REPOSITORY https://github.com/arrayfire/forge.git
GIT_TAG af3.0.1
GIT_TAG 79fac0b7ed35c96f25c8006075ec934729cf9dc4
PREFIX "${prefix}"
INSTALL_DIR "${prefix}"
UPDATE_COMMAND ""
Expand All @@ -33,11 +39,17 @@ ExternalProject_Add(
${byproducts}
)

ExternalProject_Get_Property(forge-ext binary_dir)
ExternalProject_Get_Property(forge-ext install_dir)
ADD_LIBRARY(forge SHARED IMPORTED)
SET_TARGET_PROPERTIES(forge PROPERTIES IMPORTED_LOCATION ${forge_location})
IF(WIN32)
SET_TARGET_PROPERTIES(forge PROPERTIES IMPORTED_IMPLIB ${prefix}/lib/forge.lib)
SET_TARGET_PROPERTIES(forge PROPERTIES IMPORTED_IMPLIB ${forge_lib_prefix}/forge.lib)
ELSE(WIN32)
SET(forge_bindir_location ${binary_dir}/src/${CMAKE_SHARED_LIBRARY_PREFIX}forge${CMAKE_SHARED_LIBRARY_SUFFIX})
IF(NOT (${forge_bindir_location} STREQUAL ${forge_location}))
MESSAGE(WARNING "Did the forge binary location move? (Have ${forge_bindir_location} vs ${forge_location})")
ENDIF()
ENDIF(WIN32)
ADD_DEPENDENCIES(forge forge-ext)
SET(FORGE_INCLUDE_DIRECTORIES ${install_dir}/include)
Expand Down
2 changes: 2 additions & 0 deletions CMakeModules/version.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@
#define AF_VERSION_MAJOR @AF_VERSION_MAJOR@
#define AF_VERSION_MINOR @AF_VERSION_MINOR@
#define AF_VERSION_PATCH @AF_VERSION_PATCH@
#define AF_API_VERSION_CURRENT @AF_API_VERSION_CURRENT@
#define AF_REVISION "@GIT_COMMIT_HASH@"
#define AF_CMPLR_STR "@AF_COMPILER_STRING@"
40 changes: 34 additions & 6 deletions COPYRIGHT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Copyrights
==========================================
##Index
* [ArrayFire](#arrayfire)
* [ArrayFire: SIFT](#arrayfire-sift)
* [FreeImage](#freeimage)
* [clBLAS](#clblas)
* [clFFT](#clfft)
Expand All @@ -11,7 +12,7 @@ Copyrights
* [Magma](#magma)

### Introduction
ArrayFire uses software written by the following parties. Each software is listed with it's copyright, license and home page.
ArrayFire uses software written by the following parties. Each software is listed with its copyright, license and home page.

All the licenses can be found in the LICENSES directory.

Expand All @@ -22,56 +23,79 @@ ArrayFire is distributed under the BSD 3-Clause License. A copy of this license

See ArrayFire home page https://github.com/arrayfire/arrayfire for details and links to the source code.

### ArrayFire: SIFT
Copyright (C) 2014-2015, ArrayFire.

Copyright (c) 2006-2012, Rob Hess <rob@iqengines.com>

ArrayFire SIFT is based on the OpenSIFT project by Rob Hess, licensed and distributed under the BSD 3-Clause License. A full copy of the license is present in the LICENSES directory.

SIFT is an algorithm patented and protected by US Law under the US Patent 6,711,293 (March 23, 2004) assigned to the University of British Columbia. before using this code or any binary forms generated from it, please verify that you have permission to do so.

### FreeImage
Copyright (C) 2014-2015, FreeImage.

FreeImage is distributed under the FreeImage Public License (FIPL) version 1.0. A copy of this license is present in the LICENSES directory.

See FreeImage home page http://freeimage.sourceforge.net/ for details and links to the source code.

**How ArrayFire uses FreeImage:** The ArrayFire source code does not contain any source code from FreeImage. FreeImage can be optionally linked with or disabled during build time. The binary installers of ArrayFire may come packaged with FreeImage.

### clBLAS
Copyright (C) 2013-2015 Advanced Micro Devices, Inc.
This product includes software developed atAdvanced Micro Devices, Inc. (http://www.amd.com).
This product includes software developed at Advanced Micro Devices, Inc. (http://www.amd.com).

clBLAS is distributed under the Apache License Version 2.0 License. A copy of this license is present in the LICENSES directory.

See clBLAS home page https://github.com/clMathLibraries/clBLAS for details and links to the source code.

**How ArrayFire uses clBLAS:** The ArrayFire source code does not contain any source code from clBLAS. clBLAS is statically linked during build time when building OpenCL backend.

### clFFT
Copyright (C) 2013-2015 Advanced Micro Devices, Inc.
This product includes software developed atAdvanced Micro Devices, Inc. (http://www.amd.com).
This product includes software developed at Advanced Micro Devices, Inc. (http://www.amd.com).

clFFT is distributed under the Apache License Version 2.0 License. A copy of this license is present in the LICENSES directory.

See clFFT home page https://github.com/clMathLibraries/clBLAS for details and links to the source code.

**How ArrayFire uses clFFT:** The ArrayFire source code does not contain any source code from clFFT. clFFT is statically linked during build time when building OpenCL backend.

### Random123
Copyright (C) 2010-2015, D. E. Shaw Research.

Random123 is distributed under the BSD 3-Clause License. A copy of this license is present in the LICENSES directory.

See Random123 home page https://www.deshawresearch.com/resources_random123.html for details and links to the source code.

**How ArrayFire uses Random123:** ArrayFire uses a modified and stripped down version of Random123 in the OpenCL backend. Each of the source files using the modified version of Random123 contain the original copyright.

### Boost Compute
Copyright (C) 2013-2015 Kyle Lutz

Boost Compute is distributed under the Boost Software License, Version 1.0 License. A copy of this license is present in the LICENSES directory.

See Boost Compute home page https://github.com/boostorg/compute for details and links to the source code.

**How ArrayFire uses Boost Compute:** The ArrayFire source code does not contain any source code from Boost Compute. Boost Compute header files are optionally required to build the OpenCL backend.

### Thrust
Copyright (C) 2011-2015 NVIDIA Corporation.

Thrust is distributed under the Apache License Version 2.0 License. A copy of this license is present in the LICENSES directory.

See Thrust home page https://github.com/thrust/thrust for details and links to the source code.

### Magma
**How ArrayFire uses Thrust:** The ArrayFire source code does not contain any source code from Thrust. Thrust header files are optionally required to build the CUDA backend.

### clMagma
Copyright (C) 2015 The University of Tennessee.

Magma is distributed under the BSD 3-Clause License. A copy of this license is present in the LICENSES directory.
clMagma is distributed under the BSD 3-Clause License. A copy of this license is present in the LICENSES directory.

See Magma home page http://icl.cs.utk.edu/magma/index.html for details and links to the source code.
See clMagma home page http://icl.cs.utk.edu/magma/index.html for details and links to the source code.

**How ArrayFire uses clMagma:** ArrayFire uses a modified and stripped down version of clMagma in the OpenCL backend. Each of the source files using the modified version of clMagma contain the original copyright.

### GLEW
The OpenGL Extension Wrangler Library
Expand All @@ -84,10 +108,14 @@ A copy of these licenses is present in the LICENSES directory.

See GLEW home page http://glew.sourceforge.net for details and links to the source code.

**How ArrayFire uses GLEW:** The ArrayFire source code does not contain any source code from GLEW. GLEW can be optionally linked with during build time. The binary installers of ArrayFire may come packaged with GLEW.

### GLFW
Copyright (C) 2002-2006 Marcus Geelnard
Copyright (C) 2006-2011 Camilla Berglund

GLFW is distributed under the zlib/libpng License. A copy of this license is present in the LICENSES directory.

See GLFW home page http://www.glfw.org for details and links to the source code.

**How ArrayFire uses GLFW:** The ArrayFire source code does not contain any source code from GLFW. GLFW can be optionally linked with or disabled during build time. The binary installers of ArrayFire may come packaged with GLFW.
57 changes: 57 additions & 0 deletions LICENSES/OpenSIFT License.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Copyright (c) 2006-2012, Rob Hess <rob@iqengines.com>
All rights reserved.

The following patent has been issued for methods embodied in this
software: "Method and apparatus for identifying scale invariant features
in an image and use of same for locating an object in an image," David
G. Lowe, US Patent 6,711,293 (March 23, 2004). Provisional application
filed March 8, 1999. Asignee: The University of British Columbia. For
further details, contact David Lowe (lowe@cs.ubc.ca) or the
University-Industry Liaison Office of the University of British
Columbia.

Note that restrictions imposed by this patent (and possibly others)
exist independently of and may be in conflict with the freedoms granted
in this license, which refers to copyright of the program, not patents
for any methods that it implements. Both copyright and patent law must
be obeyed to legally use and redistribute this program and it is not the
purpose of this license to induce you to infringe any patents or other
property right claims or to contest validity of any such claims. If you
redistribute or use the program, then this license merely protects you
from committing copyright infringement. It does not protect you from
committing patent infringement. So, before you do anything with this
program, make sure that you have permission to do so not merely in terms
of copyright, but also in terms of patent law.

Please note that this license is not to be understood as a guarantee
either. If you use the program according to this license, but in
conflict with patent law, it does not mean that the licensor will refund
you for any losses that you incur if you are sued for your patent
infringement.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright and
patent notices, this list of conditions and the following
disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of Oregon State University nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ We currently have binary tar balls and installers available for the beta version
### Build Status
| | Build | Tests |
|-----------------|-----------------|-----------------|
| Linux x86 | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-linux/master)](http://ci.arrayfire.org/job/arrayfire-linux/branch/master/) | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-linux-test/master)](http://ci.arrayfire.org/job/arrayfire-linux-test/branch/master/) |
| Linux Tegra | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-tegra/master)](http://ci.arrayfire.org/job/arrayfire-tegra/branch/master/) | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-tegra-test/master)](http://ci.arrayfire.org/job/arrayfire-tegra-test/branch/master/) |
| Windows | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-windows/master)](http://ci.arrayfire.org/job/arrayfire-windows/branch/master/) | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-windows-test/master)](http://ci.arrayfire.org/job/arrayfire-windows-test/branch/master/) |
| OSX | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-osx/master)](http://ci.arrayfire.org/job/arrayfire-osx/branch/master/) | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-osx-test/master)](http://ci.arrayfire.org/job/arrayfire-osx-test/branch/master/) |
| Linux x86 | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-linux/devel)](http://ci.arrayfire.org/job/arrayfire-linux/branch/devel/) | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-linux-test/devel)](http://ci.arrayfire.org/job/arrayfire-linux-test/branch/devel/) |
| Linux Tegra | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-tegra/devel)](http://ci.arrayfire.org/job/arrayfire-tegra/branch/devel/) | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-tegra-test/devel)](http://ci.arrayfire.org/job/arrayfire-tegra-test/branch/devel/) |
| Windows | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-windows/devel)](http://ci.arrayfire.org/job/arrayfire-windows/branch/devel/) | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-windows-test/devel)](http://ci.arrayfire.org/job/arrayfire-windows-test/branch/devel/) |
| OSX | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-osx/devel)](http://ci.arrayfire.org/job/arrayfire-osx/branch/devel/) | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-osx-test/devel)](http://ci.arrayfire.org/job/arrayfire-osx-test/branch/devel/) |

Test coverage: [![Coverage Status](https://coveralls.io/repos/arrayfire/arrayfire/badge.svg?branch=HEAD)](https://coveralls.io/r/arrayfire/arrayfire?branch=HEAD)

Expand Down

0 comments on commit e6acad6

Please sign in to comment.