8 ArrayFire is a high performance software library for parallel computing with
9 an easy-to-use API. Its array based function set makes parallel programming
12 ## Installing ArrayFire
14 Install ArrayFire using either a binary installer for Windows, OSX, or Linux
15 or download it from source:
17 * [Binary installers for Windows, OSX, and Linux](\ref installing)
18 * [Build from source](https://github.com/arrayfire/arrayfire)
22 The [array](\ref af::array) object is beautifully simple.
24 Array-based notation effectively expresses computational algorithms in
25 readable math-resembling notation. Expertise in parallel programming _is not_
26 required to use ArrayFire.
28 A few lines of ArrayFire code accomplishes what can take 100s of complicated
29 lines in CUDA, oneAPI, or OpenCL kernels.
31 ## ArrayFire is extensive!
33 #### Support for multiple domains
35 ArrayFire contains [hundreds of functions](\ref arrayfire_func) across various
37 - [Vector Algorithms](\ref vector_mat)
38 - [Image Processing](\ref image_mat)
39 - [Computer Vision](\ref cv_mat)
40 - [Signal Processing](\ref signal_mat)
41 - [Linear Algebra](\ref linalg_mat)
42 - [Statistics](\ref stats_mat)
45 Each function is hand-tuned by ArrayFire developers with all possible
46 low-level optimizations.
48 #### Support for various data types and sizes
50 ArrayFire operates on common [data shapes and sizes](\ref indexing), including
51 vectors, matrices, volumes, and
53 It supports common [data types](\ref gettingstarted_datatypes), including
54 single and double precision floating point values, complex numbers, booleans,
55 and 32-bit signed and unsigned integers.
57 #### Extending ArrayFire
59 ArrayFire can be used as a stand-alone application or integrated with existing
60 CUDA, oneAPI, or OpenCL code.
62 ## Code once, run anywhere!
64 With support for x86, ARM, CUDA, oneAPI, and OpenCL devices, ArrayFire
65 supports for a comprehensive list of devices.
67 Each ArrayFire installation comes with:
68 - a CUDA backend (named 'libafcuda') for [NVIDIA
69 GPUs](https://developer.nvidia.com/cuda-gpus),
70 - a oneAPI backend (named 'libafoneapi') for [oneAPI
71 devices](https://www.intel.com/content/www/us/en/developer/articles/system-requirements/intel-oneapi-base-toolkit-system-requirements.html),
72 - an OpenCL backend (named 'libafopencl') for [OpenCL
73 devices](http://www.khronos.org/conformance/adopters/conformant-products#opencl),
74 - a CPU backend (named 'libafcpu') to fall back to when CUDA, oneAPI, or
75 OpenCL devices are unavailable.
77 ## ArrayFire is highly efficient
79 #### Vectorized and Batched Operations
81 ArrayFire supports batched operations on N-dimensional arrays. Batch
82 operations in ArrayFire are run in parallel ensuring an optimal usage of CUDA,
83 oneAPI, or OpenCL devices.
85 Best performance with ArrayFire is achieved using
86 [vectorization techniques](\ref vectorization).
88 ArrayFire can also execute loop iterations in parallel with
89 [the gfor function](\ref gfor).
91 #### Just in Time compilation
93 ArrayFire performs run-time analysis of code to increase arithmetic intensity
94 and memory throughput, while avoiding unnecessary temporary allocations. It
95 has an awesome internal JIT compiler to make important optimizations.
97 Read more about how [ArrayFire JIT](\ref jit). can improve the performance in
102 Here is an example of ArrayFire code that performs a Monte Carlo estimation of
105 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
106 // sample 40 million points on the GPU
107 array x = randu(20e6), y = randu(20e6);
108 array dist = sqrt(x * x + y * y);
110 // pi is ratio of how many fell in the unit circle
111 float num_inside = sum<float>(dist < 1);
112 float pi = 4.0 * num_inside / 20e6;
114 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
118 #### Free Community Options
121 list](https://groups.google.com/forum/#!forum/arrayfire-users) (recommended)
122 * [StackOverflow](http://stackoverflow.com/questions/tagged/arrayfire)
126 * Phone Support - available for purchase ([request a
127 quote](mailto:sales@arrayfire.com))
131 * If you need to contact us, visit our [contact us
132 page](http://arrayfire.com/company/#contact).
136 * Engineering: technical@arrayfire.com
137 * Sales: sales@arrayfire.com
139 ## Citations and Acknowledgements
141 If you redistribute ArrayFire, please follow the terms established in <a
142 href="https://github.com/arrayfire/arrayfire/blob/master/LICENSE">the
143 license</a>. If you wish to cite ArrayFire in an academic publication, please
144 use the following reference:
148 Yalamanchili, P., Arshad, U., Mohammed, Z., Garigipati, P., Entschev, P.,
149 Kloppenborg, B., Malcolm, James and Melonakos, J. (2015).
150 ArrayFire - A high performance software library for parallel computing with an
151 easy-to-use API. Atlanta: AccelerEyes. Retrieved from https://github.com/arrayfire/arrayfire
155 @misc{Yalamanchili2015,
156 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.},
158 author = {Yalamanchili, Pavan and Arshad, Umar and Mohammed, Zakiuddin and Garigipati, Pradeep and Entschev, Peter and Kloppenborg, Brian and Malcolm, James and Melonakos, John},
159 publisher = {AccelerEyes},
160 title = {{ArrayFire - A high performance software library for parallel computing with an easy-to-use API}},
161 url = {https://github.com/arrayfire/arrayfire},
165 ArrayFire development is funded by AccelerEyes LLC (dba ArrayFire) and several
166 third parties, please see the list of <a
167 href="https://github.com/arrayfire/arrayfire/blob/master/ACKNOWLEDGEMENTS.md">acknowledgements</a>.