Skip to content

Commit be22316

Browse files
committed
Merge pull request #1393 from shehzan10/hotfix-3.3.2
Release 3.3.2 Updates
2 parents 6cacb59 + 98cbd9c commit be22316

File tree

7 files changed

+204
-79
lines changed

7 files changed

+204
-79
lines changed

CMakeModules/osx_install/OSXInstaller.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ PKG_BUILD( PKG_NAME ArrayFireOPENCL
158158
DEPENDS OSX_INSTALL_SETUP_OpenCL
159159
TARGETS opencl_package
160160
INSTALL_LOCATION /usr/local
161+
SCRIPT_DIR ${OSX_INSTALL_DIR}/opencl_scripts
161162
IDENTIFIER com.arrayfire.pkg.arrayfire.opencl.lib
162163
PATH_TO_FILES ${OSX_TEMP}/OpenCL
163164
FILTERS cpu cuda unified)

CMakeModules/osx_install/cpu_scripts/postinstall

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ set -o pipefail
66
err_file=/tmp/AFInstallerCPU.err
77
brew=/usr/local/bin/brew
88

9+
echo $(date) > $err_file
10+
911
if [ ! -f $brew ]; then
10-
osascript -e 'tell app "Finder" to display dialog "Brew not installed. Please install brew at http://brew.sh"'
12+
osascript -e 'tell app "Installer" to display dialog "Brew not installed. Please install brew at http://brew.sh"'
1113
open http://brew.sh
1214
echo "Brew not found" >> $err_file
1315
exit 1
@@ -20,5 +22,14 @@ if [ -z $user ]; then
2022
exit 1
2123
fi
2224

23-
su $user -c "$brew tap homebrew/versions" 2> $err_file
24-
su $user -c "$brew install fftw glfw3 fontconfig" 2> $err_file
25+
function deps_err
26+
{
27+
osascript -e 'tell app "Installer" to display dialog "ArrayFire files installed but failed to install ArrayFire dependencies using Brew."'
28+
osascript -e 'tell app "Installer" to display dialog "Visit https://github.com/arrayfire/arrayfire/wiki/Fixing-Common-OS-X-Installer-Failures to fix errors manually."'
29+
open https://github.com/arrayfire/arrayfire/wiki/Fixing-Common-OS-X-Installer-Failures
30+
echo "Dependencies failed to install" >> $err_file
31+
exit 1
32+
}
33+
34+
su $user -c "$brew tap homebrew/versions" >> $err_file 2>&1
35+
su $user -c "$brew install fftw glfw3 fontconfig" >> $err_file 2>&1 || deps_err

CMakeModules/osx_install/cuda_scripts/postinstall

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ set -o pipefail
66
err_file=/tmp/AFInstallerCUDA.err
77
brew=/usr/local/bin/brew
88

9+
echo $(date) > $err_file
10+
911
if [ ! -f $brew ]; then
10-
osascript -e 'tell app "Finder" to display dialog "Brew not installed. Please install brew at brew.sh"'
12+
osascript -e 'tell app "Installer" to display dialog "Brew not installed. Please install brew at brew.sh"'
1113
echo "Brew not found" >> $err_file
1214
exit 1
1315
fi
@@ -19,5 +21,14 @@ if [ -z $user ]; then
1921
exit 1
2022
fi
2123

22-
su $user -c "$brew tap homebrew/versions" 2> $err_file
23-
su $user -c "$brew install glfw3 fontconfig" 2> $err_file
24+
function deps_err
25+
{
26+
osascript -e 'tell app "Installer" to display dialog "ArrayFire files installed but failed to install ArrayFire dependencies using Brew."'
27+
osascript -e 'tell app "Installer" to display dialog "Visit https://github.com/arrayfire/arrayfire/wiki/Fixing-Common-OS-X-Installer-Failures to fix errors manually."'
28+
open https://github.com/arrayfire/arrayfire/wiki/Fixing-Common-OS-X-Installer-Failures
29+
echo "Dependencies failed to install" >> $err_file
30+
exit 1
31+
}
32+
33+
su $user -c "$brew tap homebrew/versions" >> $err_file 2>&1
34+
su $user -c "$brew install glfw3 fontconfig" >> $err_file 2>&1 || deps_err

CMakeModules/osx_install/opencl_scripts/postinstall

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ set -o pipefail
66
err_file=/tmp/AFInstallerOpenCL.err
77
brew=/usr/local/bin/brew
88

9+
echo $(date) > $err_file
10+
911
if [ ! -f $brew ]; then
10-
osascript -e 'tell app "Finder" to display dialog "Brew not installed. Please install brew at brew.sh"'
12+
osascript -e 'tell app "Installer" to display dialog "Brew not installed. Please install brew at brew.sh"'
1113
echo "Brew not found" >> $err_file
1214
exit 1
1315
fi
@@ -19,5 +21,14 @@ if [ -z $user ]; then
1921
exit 1
2022
fi
2123

22-
su $user -c "$brew tap homebrew/versions" 2> $err_file
23-
su $user -c "$brew install glfw3 fontconfig" 2> $err_file
24+
function deps_err
25+
{
26+
osascript -e 'tell app "Installer" to display dialog "ArrayFire files installed but failed to install ArrayFire dependencies using Brew."'
27+
osascript -e 'tell app "Installer" to display dialog "Visit https://github.com/arrayfire/arrayfire/wiki/Fixing-Common-OS-X-Installer-Failures to fix errors manually."'
28+
open https://github.com/arrayfire/arrayfire/wiki/Fixing-Common-OS-X-Installer-Failures
29+
echo "Dependencies failed to install" >> $err_file
30+
exit 1
31+
}
32+
33+
su $user -c "$brew tap homebrew/versions" >> $err_file 2>&1
34+
su $user -c "$brew install fftw glfw3 fontconfig" >> $err_file 2>&1 || deps_err

CMakeModules/osx_install/readme.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ <h2>Install Directories</h2>
99
</ul>
1010
<p> For complete list of updates, visit <a href="http://www.arrayfire.com/docs/releasenotes.htm">ArrayFire Release Notes</a></p>
1111

12+
<p> For questions about ArrayFire or this installer, visit <a href="https://groups.google.com/forum/#!forum/arrayfire-users"> ArrayFire User Forums</a> </p>
1213
</body>
1314
</html>

docs/pages/release_notes.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,49 @@
11
Release Notes {#releasenotes}
22
==============
33

4+
v3.3.2
5+
==============
6+
7+
Improvements
8+
------------
9+
* Family of [Sort](\ref sort_mat) functions now support
10+
[higher order dimensions](https://github.com/arrayfire/arrayfire/pull/1373).
11+
* Improved performance of batched sort on dim 0 for all [Sort](\ref sort_mat) functions.
12+
* [Median](\ref stat_func_median) now also supports higher order dimensions.
13+
14+
Bug Fixes
15+
--------------
16+
17+
* Fixes to [error handling](https://github.com/arrayfire/arrayfire/issues/1352) in C++ API for binary functions.
18+
* Fixes to [external OpenCL context management](https://github.com/arrayfire/arrayfire/issues/1350).
19+
* Fixes to [JPEG_GREYSCALE](https://github.com/arrayfire/arrayfire/issues/1360) for FreeImage versions <= 3.154.
20+
* Fixed for [non-float inputs](https://github.com/arrayfire/arrayfire/issues/1386) to \ref af::rgb2gray().
21+
22+
Build
23+
------
24+
* [Disable CPU Async](https://github.com/arrayfire/arrayfire/issues/1378) when building with GCC < 4.8.4.
25+
* Add option to [disable CPUID](https://github.com/arrayfire/arrayfire/issues/1369) from CMake.
26+
* More verbose message when [CUDA Compute Detection fails](https://github.com/arrayfire/arrayfire/issues/1362).
27+
* Print message to use [CUDA library stub](https://github.com/arrayfire/arrayfire/issues/1363)
28+
from CUDA Toolkit if CUDA Library is not found from default paths.
29+
* [Build Fixes](https://github.com/arrayfire/arrayfire/pull/1385) on Windows.
30+
* For compiling tests our of source.
31+
* For compiling ArrayFire with static MKL.
32+
* [Exclude <sys/sysctl.h>](https://github.com/arrayfire/arrayfire/pull/1368) when building on GNU Hurd.
33+
* Add [manual CMake options](https://github.com/arrayfire/arrayfire/pull/1389) to build DEB and RPM packages.
34+
35+
Documentation
36+
-------------
37+
* Fixed documentation for \ref af::replace().
38+
* Fixed images in [Using on OSX](\ref using_on_osx) page.
39+
40+
Installer
41+
---------
42+
* Linux x64 installers will now be compiled with GCC 4.9.2.
43+
* OSX installer gives better error messages on brew failures and
44+
now includes link to [Fixing OS X Installer Failures] (https://github.com/arrayfire/arrayfire/wiki/Fixing-Common-OS-X-Installer-Failures)
45+
for brew installation failures.
46+
447
v3.3.1
548
==============
649

@@ -361,7 +404,7 @@ Bug Fixes
361404
Documentation Updates
362405
---------------------
363406
* Improved tutorials documentation
364-
* More detailed Using on [Linux](\ref using_on_windows), [OSX](\ref using_on_windows),
407+
* More detailed Using on [Linux](\ref using_on_linux), [OSX](\ref using_on_osx),
365408
[Windows](\ref using_on_windows) pages.
366409
* Added return type information for functions that return different type
367410
arrays

docs/pages/using_on_osx.md

Lines changed: 116 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -27,75 +27,12 @@ any build system to create and compile projects that use ArrayFire.
2727
Among the many possible build systems on Linux we suggest using ArrayFire with
2828
either CMake or Makefiles with CMake being our preferred build system.
2929

30-
## XCode
30+
## Build Instructions:
31+
* [CMake](#CMake)
32+
* [MakeFiles](#MakeFiles)
33+
* [XCode](#XCode)
3134

32-
Although we recommend using CMake to build ArrayFire projects on OSX, you can
33-
use XCode if this is your preferred development platform.
34-
To save some time, we have created an sample XCode project in our
35-
[ArrayFire Project Templates repository](https://github.com/arrayfire/arrayfire-project-templates).
36-
37-
To set up a basic C/C++ project in XCode do the following:
38-
39-
1. Start up XCode. Choose OSX -> Application, Command Line Tool for the project:
40-
<img src="xcode-setup/xcode-startup.png" alt="Create a command line too XCode Project" width="100%" />
41-
42-
2. Fill in the details for your project and choose either C or C++ for the project:
43-
<img src="xcode-setup/project-options.png" alt="Create a C/C++ project" width="100%" />
44-
45-
3. Next we need to configure the build settings. In the left-hand pane, click
46-
on the project. In the center pane, click on "Build Settings" followed by
47-
the "All" button:
48-
<img src="xcode-setup/build-settings.png" alt="Configure build settings" width="100%" />
49-
50-
4. Now search for "Header Search Paths" and add `/usr/local/include` to the list:
51-
<img src="xcode-setup/header-search-paths.png" alt="Configure build settings" width="100%" />
52-
53-
5. Then search for "Library Search Paths" and add `/usr/local/lib` to the list:
54-
<img src="xcode-setup/library-search-paths.png" alt="Configure build settings" width="100%" />
55-
56-
6. Next, we need to make sure the executable is linked with an ArrayFire library:
57-
To do this, click the "Build Phases" tab and expand the "Link with Binary Library"
58-
menu:
59-
<img src="xcode-setup/build-phases.png" alt="Configure build settings" width="100%" />
60-
61-
7. In the search dialog that pops up, choose the "Add Other" button from the
62-
lower right. Specify the `/usr/local/lib` folder:
63-
<img src="xcode-setup/library-folder-path.png" alt="Configure build settings" width="100%" />
64-
65-
8. Lastly, select the ArrayFire library with which you wish to link your program.
66-
Your options will be:
67-
68-
~~~~~
69-
libafcuda.*.dylib - CUDA backend
70-
libafopencl.*.dylib - OpenCL backend
71-
libafcpu.*.dylib - CPU backend
72-
libaf.*.dylib - Unified backend
73-
~~~~~
74-
75-
In the picture below, we have elected to link with the OpenCL backend:
76-
77-
<img src="xcode-setup/pick-arrayfire-library.png" alt="Configure build settings" width="100%" />
78-
79-
9. Lastly, lets test ArrayFire's functionality. In the left hand pane open
80-
the main.cpp` file and insert the following code:
81-
82-
~~~~~
83-
// Include the ArrayFire header file
84-
#include <arrayfire.h>
85-
86-
int main(int argc, const char * argv[]) {
87-
// Gather some information about the ArrayFire device
88-
af::info();
89-
return 0;
90-
}
91-
~~~~~
92-
93-
Finally, click the build button and you should see some information about your
94-
graphics card in the lower-section of your screen:
95-
96-
<img src="xcode-setup/afinfo-result.png" alt="Configure build settings" width="100%" />
97-
98-
## CMake
35+
## <a name="CMake"></a>CMake
9936

10037
We recommend that the CMake build system be used to create ArrayFire projects.
10138
If you are writing a new ArrayFire project in C/C++ from scratch, we suggest
@@ -193,7 +130,7 @@ would modify the `cmake` command above to contain the following definition:
193130

194131
You can also specify this information in the ccmake command-line interface.
195132

196-
## MakeFiles
133+
## <a name="MakeFiles"></a> MakeFiles
197134

198135
Building ArrayFire projects with Makefiles is fairly similar to CMake except
199136
you must specify all paths and libraries manually.
@@ -217,3 +154,113 @@ Here is a minimial example MakeFile which uses ArrayFire's CPU backend:
217154

218155
all: main.cpp Makefile
219156
$(CC) main.cpp -o test $(INCLUDES) $(LIBS) $(LIB_PATHS)
157+
158+
## <a name="XCode"></a> XCode
159+
160+
Although we recommend using CMake to build ArrayFire projects on OSX, you can
161+
use XCode if this is your preferred development platform.
162+
To save some time, we have created an sample XCode project in our
163+
[ArrayFire Project Templates repository](https://github.com/arrayfire/arrayfire-project-templates).
164+
165+
To set up a basic C/C++ project in XCode do the following:
166+
167+
1. Start up XCode. Choose OSX -> Application, Command Line Tool for the project:
168+
\htmlonly
169+
<br />
170+
<a href="xcode-setup/xcode-startup.png">
171+
<img src="xcode-setup/xcode-startup.png" alt="Create a command line too XCode Project" align="middle" width="50%" />
172+
</a>
173+
\endhtmlonly
174+
175+
2. Fill in the details for your project and choose either C or C++ for the project:
176+
\htmlonly
177+
<br />
178+
<a href="xcode-setup/project-options.png">
179+
<img src="xcode-setup/project-options.png" alt="Create a C/C++ project" align="middle" width="50%" />
180+
</a>
181+
\endhtmlonly
182+
183+
3. Next we need to configure the build settings. In the left-hand pane, click
184+
on the project. In the center pane, click on "Build Settings" followed by
185+
the "All" button:
186+
\htmlonly
187+
<br />
188+
<a href="xcode-setup/build-settings.png">
189+
<img src="xcode-setup/build-settings.png" alt="Configure build settings" align="middle" width="50%" />
190+
</a>
191+
\endhtmlonly
192+
193+
4. Now search for "Header Search Paths" and add `/usr/local/include` to the list:
194+
\htmlonly
195+
<br />
196+
<a href="xcode-setup/header-search-paths.png">
197+
<img src="xcode-setup/header-search-paths.png" alt="Configure build settings" align="middle" width="50%" />
198+
</a>
199+
\endhtmlonly
200+
201+
5. Then search for "Library Search Paths" and add `/usr/local/lib` to the list:
202+
\htmlonly
203+
<br />
204+
<a href="xcode-setup/library-search-paths.png">
205+
<img src="xcode-setup/library-search-paths.png" alt="Configure build settings" align="middle" width="50%" />
206+
</a>
207+
\endhtmlonly
208+
209+
6. Next, we need to make sure the executable is linked with an ArrayFire library:
210+
To do this, click the "Build Phases" tab and expand the "Link with Binary Library"
211+
menu:
212+
\htmlonly
213+
<br />
214+
<a href="xcode-setup/build-phases.png">
215+
<img src="xcode-setup/build-phases.png" alt="Configure build settings" align="middle" width="50%" />
216+
</a>
217+
\endhtmlonly
218+
219+
7. In the search dialog that pops up, choose the "Add Other" button from the
220+
lower right. Specify the `/usr/local/lib` folder:
221+
\htmlonly
222+
<br />
223+
<a href="xcode-setup/library-folder-path.png">
224+
<img src="xcode-setup/library-folder-path.png" alt="Configure build settings" align="middle" width="50%" />
225+
</a>
226+
\endhtmlonly
227+
228+
8. Lastly, select the ArrayFire library with which you wish to link your program.
229+
Your options will be:
230+
~~~~~
231+
libafcuda.*.dylib - CUDA backend
232+
libafopencl.*.dylib - OpenCL backend
233+
libafcpu.*.dylib - CPU backend
234+
libaf.*.dylib - Unified backend
235+
~~~~~
236+
In the picture below, we have elected to link with the OpenCL backend:
237+
\htmlonly
238+
<br />
239+
<a href="xcode-setup/pick-arrayfire-library.png">
240+
<img src="xcode-setup/pick-arrayfire-library.png" alt="Configure build settings" align="middle" width="50%" />
241+
</a>
242+
\endhtmlonly
243+
244+
9. Lastly, lets test ArrayFire's functionality. In the left hand pane open
245+
the main.cpp` file and insert the following code:
246+
247+
~~~~~
248+
// Include the ArrayFire header file
249+
#include <arrayfire.h>
250+
251+
int main(int argc, const char * argv[]) {
252+
// Gather some information about the ArrayFire device
253+
af::info();
254+
return 0;
255+
}
256+
~~~~~
257+
258+
Finally, click the build button and you should see some information about your
259+
graphics card in the lower-section of your screen:
260+
261+
\htmlonly
262+
<br />
263+
<a href="xcode-setup/afinfo-result.png">
264+
<img src="xcode-setup/afinfo-result.png" alt="Configure build settings" align="middle" width="50%" />
265+
</a>
266+
\endhtmlonly

0 commit comments

Comments
 (0)