Name: arrayfire
Owner: ArrayFire
Description: ArrayFire: a general purpose GPU library.
Created: 2014-10-28 20:58:33.0
Updated: 2018-01-20 03:58:28.0
Pushed: 2018-01-16 06:06:20.0
Homepage: https://arrayfire.com
Size: 11045
Language: C++
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
ArrayFire is a general-purpose library that simplifies the process of developing software that targets parallel and massively-parallel architectures including CPUs, GPUs, and other hardware acceleration devices.
Several of ArrayFire's benefits include:
ArrayFire provides software developers with a high-level
abstraction of data which resides on the accelerator, the af::array
object.
Developers write code which performs operations on ArrayFire arrays which, in turn,
are automatically translated into near-optimal kernels that execute on the computational
device.
ArrayFire is successfully used on devices ranging from low-power mobile phones to high-power GPU-enabled supercomputers. ArrayFire runs on CPUs from all major vendors (Intel, AMD, ARM), GPUs from the prominent manufacturers (NVIDIA, AMD, and Qualcomm), as well as a variety of other accelerator devices on Windows, Mac, and Linux.
You can install the ArrayFire library from one of the following ways:
Execute one of our official binary installers for Linux, OSX, and Windows platforms.
Build from source by following instructions on our wiki.
The following examples are simplified versions of
helloworld.cpp
and
conway_pretty.cpp
,
respectively. For more code examples, visit the
examples/
directory.
y A = randu(5, 3, f32); // Create 5x3 matrix of random floats on the GPU
y B = sin(A) + 1.5; // Element-wise arithmetic
y C = fft(B); // Fourier transform the result
t d[] = { 1, 2, 3, 4, 5, 6 };
y D(2, 3, d, afHost); // Create 2x3 matrix from host data
l(0) = D.col(end); // Copy last column onto first
y vals, inds;
(vals, inds, A); // Sort A and print sorted array and corresponding indices
rint(vals);
rint(inds);
Visit the Wikipedia page for a description of Conway's Game of Life.
ic const float h_kernel[] = {1, 1, 1, 1, 0, 1, 1, 1, 1};
ic const array kernel(3, 3, h_kernel, afHost);
y state = (randu(128, 128, f32) > 0.5).as(f32); // Generate starting state
ow myWindow(256, 256);
e(!myWindow.close()) {
ray nHood = convolve(state, kernel); // Obtain neighbors
ray C0 = (nHood == 2); // Generate conditions for life
ray C1 = (nHood == 3);
ate = state * C0 + C1; // Update state
Window.image(state); // Display
You can find our complete documentation here.
Quick links:
ArrayFire has several official and third-party language wrappers.
Official wrappers
We currently support the following language wrappers for ArrayFire:
Wrappers for other languages are a work-in-progress: .NET, Fortran, Go, Java, Lua, NodeJS, R
Third-party wrappers
The following wrappers are being maintained and supported by third parties:
Contributions of any kind are welcome! Please refer to CONTRIBUTING.md to learn more about how you can get involved with ArrayFire.
If you redistribute ArrayFire, please follow the terms established in the license. If you wish to cite ArrayFire in an academic publication, please use the following citation document.
ArrayFire development is funded by ArrayFire LLC and several third parties, please see the list of acknowledgements for further details.
The literal mark ?ArrayFire? and ArrayFire logos are trademarks of AccelerEyes LLC DBA ArrayFire. If you wish to use either of these marks in your own project, please consult ArrayFire's Trademark Policy