Installing ArrayFire couldn't be easier. We ship installers for Windows, OSX, and several variants of Linux. In general the installation procedure proceeds like this:
Below you will find instructions for
Simply download and run the installer. If you wish to use CUDA or OpenCL please ensure that you have also installed support for these technologies from your video card vendor's website.
First download ArrayFire. Then, using the gdebi
package manager, you can install ArrayFire and all dependencies as follows:
gdebi arrayfire*.deb
If you prefer to use the .sh
installer, it and all prerequisite packages may be installed as follows:
# Prerequisite packages: apt-get install libfreeimage-dev libatlas3gf-base libfftw3-dev cmake # Enable GPU support (OpenCL): apt-get install ocl-icd-libopencl1 # Run Installer ./arrayfire_3.0.0_Linux_x86_64.sh --exclude-subdir --prefix=/usr/local
To enable CUDA support, edit /etc/apt/sources.list
and append non-free
to the line containing deb http://.../debian jessie main
. Then, as root, run
apt-get update apt-get install nvidia-cuda-dev
First download ArrayFire. Then, using the yum
package manager, you can install ArrayFire and all dependencies as follows:
yum --nogpgcheck localinstall arrayfire*.rpm
Or with the self-extracting installer
# Install prerequiste packages yum install freeimage atlas fftw cmake # Run Installer ./arrayfire_3.0.0_Linux_x86_64.sh --exclude-subdir --prefix=/usr/local
First download ArrayFire. Then, using the gdebi
package manager, you can install ArrayFire and all dependencies as follows:
sudo apt-get install gdebi gdebi arrayfire*.deb
If you prefer to use the .sh
installer, it and all prerequisite packages may be installed as follows:
# Prerequisite packages: sudo apt-get install libfreeimage-dev libatlas3gf-base libfftw3-dev cmake # Enable GPU support (OpenCL and/or CUDA): sudo apt-get install ocl-icd-libopencl1 sudo apt-get install nvidia-cuda-dev # Run Installer sudo ./arrayfire_3.0.0_Linux_x86_64.sh --exclude-subdir --prefix=/usr/local
On OSX there are several dependencies that are not integrated into the operating system. It is easiest to install these using Homebrew, but you can also build them yourself if you prefer.
First download ArrayFire. You may install ArrayFire to /usr/local
from XTerm using the following commands:
brew install boost fftw cmake freeimage sudo ./arrayfire_3.0.0_Linux_x86_64.sh --exclude-subdir --prefix=/usr/local
GitHub user sutoiku has been kind enough to write a brew installation script for ArrayFire. This installation method will download and compile ArrayFire and all prerequisites. Please remember to register on the ArrayFire website so we can keep you up to date about new versions of our software!
brew install arrayfire
After ArrayFire is installed, you can build the example programs as follows:
cp -r /usr/local/share/doc/arrayfire/examples . cd examples mkdir build cd build cmake .. make