$darkmode
A high-performance general-purpose compute library
/home/abuild/rpmbuild/BUILD/arrayfire-full-v3.9.0/docs/pages/README.md
Go to the documentation of this file.
1 Overview {#mainpage}
2 ========
3 
4 [TOC]
5 
6 ## About ArrayFire
7 
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
10 more accessible.
11 
12 ## Installing ArrayFire
13 
14 Install ArrayFire using either a binary installer for Windows, OSX, or Linux
15 or download it from source:
16 
17 * [Binary installers for Windows, OSX, and Linux](\ref installing)
18 * [Build from source](https://github.com/arrayfire/arrayfire)
19 
20 ## Easy to use
21 
22 The [array](\ref af::array) object is beautifully simple.
23 
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.
27 
28 A few lines of ArrayFire code accomplishes what can take 100s of complicated
29 lines in CUDA, oneAPI, or OpenCL kernels.
30 
31 ## ArrayFire is extensive!
32 
33 #### Support for multiple domains
34 
35 ArrayFire contains [hundreds of functions](\ref arrayfire_func) across various
36 domains including:
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)
43 - and more.
44 
45 Each function is hand-tuned by ArrayFire developers with all possible
46 low-level optimizations.
47 
48 #### Support for various data types and sizes
49 
50 ArrayFire operates on common [data shapes and sizes](\ref indexing), including
51 vectors, matrices, volumes, and
52 
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.
56 
57 #### Extending ArrayFire
58 
59 ArrayFire can be used as a stand-alone application or integrated with existing
60 CUDA, oneAPI, or OpenCL code.
61 
62 ## Code once, run anywhere!
63 
64 With support for x86, ARM, CUDA, oneAPI, and OpenCL devices, ArrayFire
65 supports for a comprehensive list of devices.
66 
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.
76 
77 ## ArrayFire is highly efficient
78 
79 #### Vectorized and Batched Operations
80 
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.
84 
85 Best performance with ArrayFire is achieved using
86 [vectorization techniques](\ref vectorization).
87 
88 ArrayFire can also execute loop iterations in parallel with
89 [the gfor function](\ref gfor).
90 
91 #### Just in Time compilation
92 
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.
96 
97 Read more about how [ArrayFire JIT](\ref jit). can improve the performance in
98 your application.
99 
100 ## Simple Example
101 
102 Here is an example of ArrayFire code that performs a Monte Carlo estimation of
103 PI.
104 
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);
109 
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;
113 af_print(pi);
114 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
115 
116 ## Product Support
117 
118 #### Free Community Options
119 
120 * [ArrayFire mailing
121  list](https://groups.google.com/forum/#!forum/arrayfire-users) (recommended)
122 * [StackOverflow](http://stackoverflow.com/questions/tagged/arrayfire)
123 
124 #### Premium Support
125 
126 * Phone Support - available for purchase ([request a
127  quote](mailto:sales@arrayfire.com))
128 
129 #### Contact Us
130 
131 * If you need to contact us, visit our [contact us
132  page](http://arrayfire.com/company/#contact).
133 
134 #### Email
135 
136 * Engineering: technical@arrayfire.com
137 * Sales: sales@arrayfire.com
138 
139 ## Citations and Acknowledgements
140 
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:
145 
146 Formatted:
147 
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
152 
153 BibTeX:
154 
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.},
157  address = {Atlanta},
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},
162  year = {2015}
163  }
164 
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>.