Do more. Code less. Free software for GPU computing.
<scroll to top>

ArrayFire CUDA Documentation

ArrayFire is the fastest GPU matrix library with the simplest API.

ArrayFire is the fastest GPU software

ArrayFire is the easiest-to-use GPU software

ArrayFire is the most comprehensive GPU software

See it in action...

Here's a stripped down example of Monte-Carlo estimation of Pi:

    #include <stdio.h>
    #include <arrayfire.h>
    using namespace af;

    int main() {

        // create GPU arrays
        int n = 20e6; // use 20 million random samples
        array x = randu(n), y = randu(n);

        // determine how many fell inside the unit circle?
        // ... calculate on GPU, return result to CPU
        float pi = 4.0 * sum<float>(hypot(x,y) < 1) / n;

        printf("pi = %g\n", pi);
        return 0;
    }

Download and Requirements

Download the latest stable version of the library and view documentation online. See Release Notes for a list of changes in each version.

Supported Platforms:

Requirements:

The Getting Started tutorial walks through more detailed steps on getting your first example to compile and run.

Tutorials

Support

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines