Skip to content

Commit f53efc3

Browse files
committed
Merge pull request #1341 from arrayfire/hotfix-3.3.1
Hotfix 3.3.1
2 parents 5842ed2 + 1a5f265 commit f53efc3

36 files changed

+689
-451
lines changed

.github/CITATION.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
If you redistribute ArrayFire, please follow the terms established in
2+
[the license](../LICENSE). If you wish to cite ArrayFire in an academic
3+
publication, please use the following reference:
4+
5+
Formatted:
6+
```
7+
Yalamanchili, P., Arshad, U., Mohammed, Z., Garigipati, P., Entschev, P.,
8+
Kloppenborg, B., Malcolm, J. and Melonakos, J. (2015).
9+
ArrayFire - A high performance software library for parallel computing with an
10+
easy-to-use API. Atlanta: AccelerEyes. Retrieved from https://github.com/arrayfire/arrayfire
11+
```
12+
13+
BibTeX:
14+
```bibtex
15+
@misc{Yalamanchili2015,
16+
abstract = {ArrayFire is a high performance software library for parallel computing with an easy-to-use API. Its array based function set makes parallel programming simple. ArrayFire's multiple backends (CUDA, OpenCL and native CPU) make it platform independent and highly portable. A few lines of code in ArrayFire can replace dozens of lines of parallel computing code, saving you valuable time and lowering development costs.},
17+
address = {Atlanta},
18+
author = {Yalamanchili, Pavan and Arshad, Umar and Mohammed, Zakiuddin and Garigipati, Pradeep and Entschev, Peter and Kloppenborg, Brian and Malcolm, James and Melonakos, John},
19+
publisher = {AccelerEyes},
20+
title = {{ArrayFire - A high performance software library for parallel computing with an easy-to-use API}},
21+
url = {https://github.com/arrayfire/arrayfire},
22+
year = {2015}
23+
}
24+
```

CMakeModules/FindCBLAS.cmake

+12-7
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ MACRO(CHECK_ALL_LIBRARIES
109109
_flags
110110
_list
111111
_include
112-
_search_include,
112+
_search_include
113113
_libraries_work_check)
114114
# This macro checks for the existence of the combination of fortran libraries
115115
# given by _list. If the combination is found, this macro checks (using the
@@ -168,11 +168,6 @@ MACRO(CHECK_ALL_LIBRARIES
168168
ENDIF(APPLE)
169169
MARK_AS_ADVANCED(${_prefix}_${_library}_LIBRARY)
170170

171-
IF(${_prefix}_${_library}_LIBRARY)
172-
GET_FILENAME_COMPONENT(_path ${${_prefix}_${_library}_LIBRARY} PATH)
173-
LIST(APPEND _paths ${_path}/../include ${_path}/../../include ${CBLAS_ROOT_DIR}/include)
174-
ENDIF(${_prefix}_${_library}_LIBRARY)
175-
176171
SET(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY})
177172
SET(_libraries_work ${${_prefix}_${_library}_LIBRARY})
178173
ENDIF(_libraries_work)
@@ -183,8 +178,17 @@ MACRO(CHECK_ALL_LIBRARIES
183178
SET(_bug_libraries_work_check ${_libraries_work_check}) #CMAKE BUG!!! SHOULD NOT BE THAT
184179

185180
IF(_bug_search_include)
186-
FIND_PATH(${_prefix}${_combined_name}_INCLUDE ${_include} ${_paths})
181+
FIND_PATH(${_prefix}${_combined_name}_INCLUDE ${_include}
182+
/opt/intel/mkl/include
183+
/usr/include
184+
/usr/local/include
185+
/sw/include
186+
/opt/local/include
187+
PATH_SUFFIXES
188+
openblas
189+
)
187190
MARK_AS_ADVANCED(${_prefix}${_combined_name}_INCLUDE)
191+
188192
IF(${_prefix}${_combined_name}_INCLUDE)
189193
IF (_verbose)
190194
MESSAGE(STATUS "Includes found")
@@ -194,6 +198,7 @@ MACRO(CHECK_ALL_LIBRARIES
194198
ELSE(${_prefix}${_combined_name}_INCLUDE)
195199
SET(_libraries_work FALSE)
196200
ENDIF(${_prefix}${_combined_name}_INCLUDE)
201+
197202
ELSE(_bug_search_include)
198203
SET(${_prefix}_INCLUDE_DIR)
199204
SET(${_prefix}_INCLUDE_FILE ${_include})

CMakeModules/FindLAPACKE.cmake

+2
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ ELSE(PC_LAPACKE_FOUND)
137137
/sw/include
138138
/opt/local/include
139139
DOC "LAPACKE Include Directory"
140+
PATH_SUFFIXES
141+
lapacke
140142
)
141143
ENDIF(LAPACKE_ROOT_DIR)
142144
ENDIF(PC_LAPACKE_FOUND)

CMakeModules/Version.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
SET(AF_VERSION_MAJOR "3")
55
SET(AF_VERSION_MINOR "3")
6-
SET(AF_VERSION_PATCH "0")
6+
SET(AF_VERSION_PATCH "1")
77

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

CMakeModules/build_clBLAS.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ENDIF()
1414
ExternalProject_Add(
1515
clBLAS-ext
1616
GIT_REPOSITORY https://github.com/arrayfire/clBLAS.git
17-
GIT_TAG af3.3.0
17+
GIT_TAG af3.3.1
1818
PREFIX "${prefix}"
1919
INSTALL_DIR "${prefix}"
2020
UPDATE_COMMAND ""

CMakeModules/build_clFFT.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ENDIF()
1414
ExternalProject_Add(
1515
clFFT-ext
1616
GIT_REPOSITORY https://github.com/arrayfire/clFFT.git
17-
GIT_TAG af3.3.0
17+
GIT_TAG af3.3.1
1818
PREFIX "${prefix}"
1919
INSTALL_DIR "${prefix}"
2020
UPDATE_COMMAND ""

README.md

+87-98
Original file line numberDiff line numberDiff line change
@@ -1,139 +1,128 @@
11
<a href="http://arrayfire.com/"><img src="http://arrayfire.com/logos/arrayfire_logo_whitebkgnd.png" width="300"></a>
22

3-
ArrayFire is a high performance software library for parallel computing with an easy-to-use API. Its **array** based function set makes parallel programming simple.
3+
ArrayFire is a high performance software library for parallel computing with an
4+
easy-to-use API. Its **array** based function set makes parallel programming
5+
simple.
46

5-
ArrayFire's multiple backends (**CUDA**, **OpenCL** and native **CPU**) make it platform independent and highly portable.
7+
ArrayFire's multiple backends (**CUDA**, **OpenCL** and native **CPU**) make it
8+
platform independent and highly portable. ArrayFire provides visualization
9+
capabilities using our OpenGL-based,
10+
[high performance visualization library](https://github.com/arrayfire/forge).
611

7-
A few lines of code in ArrayFire can replace dozens of lines of parallel computing code, saving you valuable time and lowering development costs.
12+
A few lines of code in ArrayFire can replace dozens of lines of parallel
13+
computing code, saving you valuable time and lowering development costs.
814

9-
### Build ArrayFire from source
10-
To build ArrayFire from source, please follow the instructions on our [wiki](https://github.com/arrayfire/arrayfire/wiki).
11-
12-
### Download ArrayFire Installers
13-
ArrayFire binary installers can be downloaded at the [ArrayFire Downloads](http://go.arrayfire.com/l/37882/2015-03-31/mmhqy) page.
14-
15-
### Support and Contact Info [![Join the chat at https://gitter.im/arrayfire/arrayfire](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/arrayfire/arrayfire?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
16-
17-
* Google Groups: https://groups.google.com/forum/#!forum/arrayfire-users
18-
* ArrayFire Services: [Consulting](http://arrayfire.com/consulting/) | [Support](http://arrayfire.com/support/) | [Training](http://arrayfire.com/training/)
19-
* ArrayFire Blogs: http://arrayfire.com/blog/
20-
* Email: <mailto:[email protected]>
21-
22-
### Build Status
23-
| | Linux x86 | Linux armv7l | Linux aarch64 | Windows | OSX |
24-
|:-------:|:---------:|:------------:|:-------------:|:-------:|:---:|
15+
| | Linux x86_64 | Linux armv7l | Linux aarch64 | Windows | OSX |
16+
|:-------:|:------------:|:------------:|:-------------:|:-------:|:---:|
2517
| Build | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-linux/build/devel)](http://ci.arrayfire.org/job/arrayfire-linux/job/build/branch/devel/) | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-tegrak1/build/devel)](http://ci.arrayfire.org/job/arrayfire-tegrak1/job/build/branch/devel/) | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-tegrax1/build/devel)](http://ci.arrayfire.org/job/arrayfire-tegrax1/job/build/branch/devel/) | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-windows/build/devel)](http://ci.arrayfire.org/job/arrayfire-windows/job/build/branch/devel/) | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-osx/build/devel)](http://ci.arrayfire.org/job/arrayfire-osx/job/build/branch/devel/) |
2618
| Test | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-linux/test/devel)](http://ci.arrayfire.org/job/arrayfire-linux/job/test/branch/devel/) | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-tegrak1/test/devel)](http://ci.arrayfire.org/job/arrayfire-tegrak1/job/test/branch/devel/) | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-tegrax1/test/devel)](http://ci.arrayfire.org/job/arrayfire-tegrax1/job/test/branch/devel/) | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-windows/test/devel)](http://ci.arrayfire.org/job/arrayfire-windows/job/test/branch/devel/) | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-osx/test/devel)](http://ci.arrayfire.org/job/arrayfire-osx/job/test/branch/devel/) |
2719

28-
Test coverage: [![Coverage Status](https://coveralls.io/repos/arrayfire/arrayfire/badge.svg?branch=HEAD)](https://coveralls.io/r/arrayfire/arrayfire?branch=HEAD)
20+
### Installation
2921

30-
### Example
22+
You can install the ArrayFire library from one of the following ways:
3123

32-
``` C++
24+
#### Official installers
3325

34-
#include <arrayfire.h>
35-
#include <cstdio>
26+
Execute one of our [official binary installers](https://arrayfire.com/download)
27+
for Linux, OSX, and Windows platforms.
3628

37-
using namespace af;
29+
#### Build from source
3830

39-
int main(int argc, char *argv[])
40-
{
41-
try {
31+
Build from source by following instructions on our
32+
[wiki](https://github.com/arrayfire/arrayfire/wiki).
4233

43-
// Select a device and display arrayfire info
44-
int device = argc > 1 ? atoi(argv[1]) : 0;
45-
af::setDevice(device);
46-
af::info();
34+
### Examples
4735

48-
printf("Create a 5-by-3 matrix of random floats on the GPU\n");
49-
array A = randu(5,3, f32);
50-
af_print(A);
36+
The following examples are simplified versions of
37+
[`helloworld.cpp`](https://github.com/arrayfire/arrayfire/tree/devel/examples/helloworld/helloworld.cpp)
38+
and
39+
[`conway_pretty.cpp`](https://github.com/arrayfire/arrayfire/tree/devel/examples/graphics/conway_pretty.cpp),
40+
respectively. For more code examples, visit the
41+
[`examples/`](https://github.com/arrayfire/arrayfire/tree/devel/examples)
42+
directory.
5143

52-
printf("Element-wise arithmetic\n");
53-
array B = sin(A) + 1.5;
54-
af_print(B);
44+
#### Hello, world!
5545

56-
printf("Negate the first three elements of second column\n");
57-
B(seq(0, 2), 1) = B(seq(0, 2), 1) * -1;
58-
af_print(B);
46+
```cpp
47+
array A = randu(5, 3, f32); // Create 5x3 matrix of random floats on the GPU
48+
array B = sin(A) + 1.5; // Element-wise arithmetic
49+
array C = fft(B); // Fourier transform the result
5950

60-
printf("Fourier transform the result\n");
61-
array C = fft(B);
62-
af_print(C);
51+
float d[] = { 1, 2, 3, 4, 5, 6 };
52+
array D(2, 3, d, afHost); // Create 2x3 matrix from host data
53+
D.col(0) = D.col(end); // Copy last column onto first
6354

64-
printf("Grab last row\n");
65-
array c = C.row(end);
66-
af_print(c);
55+
array vals, inds;
56+
sort(vals, inds, A); // Sort A and print sorted array and corresponding indices
57+
af_print(vals);
58+
af_print(inds);
59+
```
6760
68-
printf("Create 2-by-3 matrix from host data\n");
69-
float d[] = { 1, 2, 3, 4, 5, 6 };
70-
array D(2, 3, d, af::afHost);
71-
af_print(D);
61+
#### Conway's Game of Life
7262
73-
printf("Copy last column onto first\n");
74-
D.col(0) = D.col(end);
75-
af_print(D);
63+
Visit the
64+
[Wikipedia page](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life) for a
65+
description of Conway's Game of Life.
7666
77-
// Sort A
78-
printf("Sort A and print sorted array and corresponding indices\n");
79-
array vals, inds;
80-
sort(vals, inds, A);
81-
af_print(vals);
82-
af_print(inds);
67+
```cpp
68+
static const float h_kernel[] = {1, 1, 1, 1, 0, 1, 1, 1, 1};
69+
static const array kernel(3, 3, h_kernel, afHost);
8370
84-
} catch (af::exception& e) {
85-
fprintf(stderr, "%s\n", e.what());
86-
throw;
87-
}
71+
array state = (randu(128, 128, f32) > 0.5).as(f32); // Generate starting state
72+
Window myWindow(256, 256);
73+
while(!myWindow.close()) {
74+
array nHood = convolve(state, kernel); // Obtain neighbors
75+
array C0 = (nHood == 2); // Generate conditions for life
76+
array C1 = (nHood == 3);
77+
state = state * C0 + C1; // Update state
78+
myWindow.image(state); // Display
8879
}
8980
9081
```
9182

83+
<p align="center">
84+
<img src="https://github.com/arrayfire/assets/blob/master/gifs/conway.gif" alt="Conway's Game of Life" height="256" width="256">
85+
</p>
86+
9287
### Documentation
9388

94-
You can find our complete documentation over [here](http://www.arrayfire.com/docs/index.htm).
89+
You can find our complete documentation [here](http://www.arrayfire.com/docs/index.htm).
9590

9691
Quick links:
9792

98-
- [Download Binaries](http://www.arrayfire.com/download/)
99-
- [List of functions](http://www.arrayfire.com/docs/group__arrayfire__func.htm)
100-
- [Tutorials](http://www.arrayfire.com/docs/gettingstarted.htm)
101-
- [Examples](http://www.arrayfire.com/docs/examples.htm)
93+
* [List of functions](http://www.arrayfire.org/docs/group__arrayfire__func.htm)
94+
* [Tutorials](http://www.arrayfire.org/docs/usergroup0.htm)
95+
* [Examples](http://www.arrayfire.org/docs/examples.htm)
96+
* [Blog](http://arrayfire.com/blog/)
10297

103-
### Contribute
98+
### Language wrappers
10499

105-
Contributions of any kind are welcome! Please refer to
106-
[this document](https://github.com/arrayfire/arrayfire/blob/master/CONTRIBUTING.md)
107-
to learn more about how you can get involved with ArrayFire.
100+
We currently support the following language wrappers for ArrayFire:
108101

109-
## Citations and Acknowledgements
102+
* [`arrayfire-python`](https://github.com/arrayfire/arrayfire-python)
103+
* [`arrayfire-rust`](https://github.com/arrayfire/arrayfire-rust)
110104

111-
If you redistribute ArrayFire, please follow the terms established in
112-
[the license](LICENSE).
113-
If you wish to cite ArrayFire in an academic publication, please use the
114-
following reference:
105+
Wrappers for other languages are a work in progress:
115106

116-
Formatted:
117-
```
118-
Yalamanchili, P., Arshad, U., Mohammed, Z., Garigipati, P., Entschev, P.,
119-
Kloppenborg, B., Malcolm, J. and Melonakos, J. (2015).
120-
ArrayFire - A high performance software library for parallel computing with an
121-
easy-to-use API. Atlanta: AccelerEyes. Retrieved from https://github.com/arrayfire/arrayfire
122-
```
107+
[`arrayfire-dotnet`](https://github.com/arrayfire/arrayfire-dotnet), [`arrayfire-fortran`](https://github.com/arrayfire/arrayfire-fortran), [`arrayfire-go`](https://github.com/arrayfire/arrayfire-go), [`arrayfire-java`](https://github.com/arrayfire/arrayfire-java), [`arrayfire-lua`](https://github.com/arrayfire/arrayfire-lua), [`arrayfire-nodejs`](https://github.com/arrayfire/arrayfire-js), [`arrayfire-r`](https://github.com/arrayfire/arrayfire-r)
123108

124-
BibTeX:
125-
```bibtex
126-
@misc{Yalamanchili2015,
127-
abstract = {ArrayFire is a high performance software library for parallel computing with an easy-to-use API. Its array based function set makes parallel programming simple. ArrayFire's multiple backends (CUDA, OpenCL and native CPU) make it platform independent and highly portable. A few lines of code in ArrayFire can replace dozens of lines of parallel computing code, saving you valuable time and lowering development costs.},
128-
address = {Atlanta},
129-
author = {Yalamanchili, Pavan and Arshad, Umar and Mohammed, Zakiuddin and Garigipati, Pradeep and Entschev, Peter and Kloppenborg, Brian and Malcolm, James and Melonakos, John},
130-
publisher = {AccelerEyes},
131-
title = {{ArrayFire - A high performance software library for parallel computing with an easy-to-use API}},
132-
url = {https://github.com/arrayfire/arrayfire},
133-
year = {2015}
134-
}
135-
```
109+
### Contributing
110+
111+
Contributions of any kind are welcome! Please refer to
112+
[CONTRIBUTING.md](https://github.com/arrayfire/arrayfire/blob/master/CONTRIBUTING.md)
113+
to learn more about how you can get involved with ArrayFire.
114+
115+
### Citations and Acknowledgements
116+
117+
If you redistribute ArrayFire, please follow the terms established in
118+
[the license](LICENSE). If you wish to cite ArrayFire in an academic
119+
publication, please use the following [citation document](.github/CITATION.md).
136120

137121
ArrayFire development is funded by ArrayFire LLC and several third parties,
138-
please see the list of [acknowledgements](https://github.com/arrayfire/arrayfire/blob/master/ACKNOWLEDGEMENTS.md) for further details.
122+
please see the list of [acknowledgements](ACKNOWLEDGEMENTS.md) for further
123+
details.
139124

125+
### Support and Contact Info [![Join the chat at https://gitter.im/arrayfire/arrayfire](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/arrayfire/arrayfire?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
126+
127+
* [Google Groups](https://groups.google.com/forum/#!forum/arrayfire-users)
128+
* ArrayFire Services: [Consulting](http://arrayfire.com/consulting/) | [Support](http://arrayfire.com/support/) | [Training](http://arrayfire.com/training/)

assets

Submodule assets updated 1 file

docs/pages/release_notes.md

+39
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,45 @@
11
Release Notes {#releasenotes}
22
==============
33

4+
v3.3.1
5+
==============
6+
7+
Bug Fixes
8+
--------------
9+
10+
* Fixes to \ref af::array::device()
11+
* CPU Backend: [evaluate arrays](https://github.com/arrayfire/arrayfire/issues/1316)
12+
before returning pointer with asynchronous calls in CPU backend.
13+
* OpenCL Backend: [fix segfaults](https://github.com/arrayfire/arrayfire/issues/1324)
14+
when requested for device pointers on empty arrays.
15+
* Fixed \ref af::array::operator%() from using [rem to mod](https://github.com/arrayfire/arrayfire/issues/1318).
16+
* Fixed [array destruction](https://github.com/arrayfire/arrayfire/issues/1321)
17+
when backends are switched in Unified API.
18+
* Fixed [indexing](https://github.com/arrayfire/arrayfire/issues/1331) after
19+
\ref af::moddims() is called.
20+
* Fixes FFT calls for CUDA and OpenCL backends when used on
21+
[multiple devices](https://github.com/arrayfire/arrayfire/issues/1332).
22+
* Fixed [unresolved external](https://github.com/arrayfire/arrayfire/commit/32965ef)
23+
for some functions from \ref af::array::array_proxy class.
24+
25+
Build
26+
------
27+
* CMake compiles files in alphabetical order.
28+
* CMake fixes for BLAS and LAPACK on some Linux distributions.
29+
30+
Improvements
31+
------------
32+
* Fixed [OpenCL FFT performance](https://github.com/arrayfire/arrayfire/issues/1323) regression.
33+
* \ref af::array::device() on OpenCL backend [returns](https://github.com/arrayfire/arrayfire/issues/1311)
34+
`cl_mem` instead of `(void*)cl::Buffer*`.
35+
* In Unified backend, [load versioned libraries](https://github.com/arrayfire/arrayfire/issues/1312)
36+
at runtime.
37+
38+
Documentation
39+
------
40+
* Reorganized, cleaner README file.
41+
* Replaced non-free lena image in assets with free-to-distribute lena image.
42+
443
v3.3.0
544
==============
645

examples/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ ENDMACRO()
7676

7777
# Collect the source
7878
FILE(GLOB FILES "*/*.cpp")
79+
LIST(SORT FILES)
7980
ADD_DEFINITIONS("-DASSETS_DIR=\"${ASSETS_DIR}\"")
8081

8182
# Next we build each example using every backend.

0 commit comments

Comments
 (0)