/build/arrayfire/src/arrayfire-full-3.6.1/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 an easy-to-use API. Its array based function set makes parallel programming more accessible.
9 
10 ## Installing ArrayFire
11 
12 You can install ArrayFire using either a binary installer for Windows, OSX,
13 or Linux or download it from source:
14 
15 * [Binary installers for Windows, OSX, and Linux](\ref installing)
16 * [Build from source](https://github.com/arrayfire/arrayfire)
17 
18 ## Easy to use
19 
20 The [array](\ref construct_mat) object is beautifully simple.
21 
22 Array-based notation effectively expresses computational algorithms in
23 readable math-resembling notation. You _do not_ need expertise in
24 parallel programming to use ArrayFire.
25 
26 A few lines of ArrayFire code
27 accomplishes what can take 100s of complicated lines in CUDA or OpenCL
28 kernels.
29 
30 ## ArrayFire is extensive!
31 
32 #### Support for multiple domains
33 
34 ArrayFire contains [hundreds of functions](\ref arrayfire_func) across various domains including:
35 - [Vector Algorithms](\ref vector_mat)
36 - [Image Processing](\ref image_mat)
37 - [Computer Vision](\ref cv_mat)
38 - [Signal Processing](\ref signal_mat)
39 - [Linear Algebra](\ref linalg_mat)
40 - [Statistics](\ref stats_mat)
41 - and more.
42 
43 Each function is hand-tuned by ArrayFire
44 developers with all possible low-level optimizations.
45 
46 #### Support for various data types and sizes
47 
48 ArrayFire operates on common [data shapes and sizes](\ref indexing),
49 including vectors, matrices, volumes, and
50 
51 It supports common [data types](\ref gettingstarted_datatypes),
52 including single and double precision floating
53 point values, complex numbers, booleans, and 32-bit signed and
54 unsigned integers.
55 
56 #### Extending ArrayFire
57 
58 ArrayFire can be used as a stand-alone application or integrated with
59 existing CUDA or OpenCL code. All ArrayFire `arrays` can be
60 interchanged with other CUDA or OpenCL data structures.
61 
62 ## Code once, run anywhere!
63 
64 With support for x86, ARM, CUDA, and OpenCL devices, ArrayFire supports for a comprehensive list of devices.
65 
66 Each ArrayFire installation comes with:
67  - a CUDA version (named 'libafcuda') for [NVIDIA
68  GPUs](https://developer.nvidia.com/cuda-gpus),
69  - an OpenCL version (named 'libafopencl') for [OpenCL devices](http://www.khronos.org/conformance/adopters/conformant-products#opencl)
70  - a CPU version (named 'libafcpu') to fall back to when CUDA or OpenCL devices are not available.
71 
72 ## ArrayFire is highly efficient
73 
74 #### Vectorized and Batched Operations
75 
76 ArrayFire supports batched operations on N-dimensional arrays.
77 Batch operations in ArrayFire are run in parallel ensuring an optimal usage of your CUDA or OpenCL device.
78 
79 You can get the best performance out of ArrayFire using [vectorization techniques](\ref vectorization).
80 
81 ArrayFire can also execute loop iterations in parallel with
82 [the gfor function](\ref gfor).
83 
84 #### Just in Time compilation
85 
86 ArrayFire performs run-time analysis of your code to increase
87 arithmetic intensity and memory throughput, while avoiding unnecessary
88 temporary allocations. It has an awesome internal JIT compiler to make
89 optimizations for you.
90 
91 Read more about how [ArrayFire JIT](http://arrayfire.com/performance-of-arrayfire-jit-code-generation/) can improve the performance in your application.
92 
93 ## Simple Example
94 
95 Here's a live example to let you see ArrayFire code. You create [arrays](\ref construct_mat)
96 which reside on CUDA or OpenCL devices. Then you can use
97 [ArrayFire functions](modules.htm) on those [arrays](\ref construct_mat).
98 
99 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp}
100 // sample 40 million points on the GPU
101 array x = randu(20e6), y = randu(20e6);
102 array dist = sqrt(x * x + y * y);
103 
104 // pi is ratio of how many fell in the unit circle
105 float num_inside = sum<float>(dist < 1);
106 float pi = 4.0 * num_inside / 20e6;
107 af_print(pi);
108 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
109 
110 ## Product Support
111 
112 #### Free Community Options
113 
114 * [ArrayFire mailing list](https://groups.google.com/forum/#!forum/arrayfire-users) (recommended)
115 * [StackOverflow](http://stackoverflow.com/questions/tagged/arrayfire)
116 
117 #### Premium Support
118 
119 * Phone Support - available for purchase ([request a quote](mailto:sales@arrayfire.com))
120 
121 #### Contact Us
122 
123 * If you need to contact us, visit our
124 [contact us page](http://arrayfire.com/company/#contact).
125 
126 #### Email
127 
128 * Engineering: technical@arrayfire.com
129 * Sales: sales@arrayfire.com
130 
131 ## Citations and Acknowledgements
132 
133 If you redistribute ArrayFire, please follow the terms established in <a href="https://github.com/arrayfire/arrayfire/blob/master/LICENSE">the license</a>.
134 If you wish to cite ArrayFire in an academic publication, please use the
135 following reference:
136 
137 Formatted:
138 
139  Yalamanchili, P., Arshad, U., Mohammed, Z., Garigipati, P., Entschev, P.,
140  Kloppenborg, B., Malcolm, James and Melonakos, J. (2015).
141  ArrayFire - A high performance software library for parallel computing with an
142  easy-to-use API. Atlanta: AccelerEyes. Retrieved from https://github.com/arrayfire/arrayfire
143 
144 BibTeX:
145 
146  @misc{Yalamanchili2015,
147  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.},
148  address = {Atlanta},
149  author = {Yalamanchili, Pavan and Arshad, Umar and Mohammed, Zakiuddin and Garigipati, Pradeep and Entschev, Peter and Kloppenborg, Brian and Malcolm, James and Melonakos, John},
150  publisher = {AccelerEyes},
151  title = {{ArrayFire - A high performance software library for parallel computing with an easy-to-use API}},
152  url = {https://github.com/arrayfire/arrayfire},
153  year = {2015}
154  }
155 
156 ArrayFire development is funded by ArrayFire LLC and several third parties, please see the list of <a href="https://github.com/arrayfire/arrayfire/blob/master/ACKNOWLEDGEMENTS.md">acknowledgements</a>.