Free download library from https://arrayfire.com/.
Function list could be found at http://arrayfire.org/docs/group__arrayfire__func.htm
Hello world c++ example.
Code: Select all
array A = randu(5, 3, f32); // Create 5x3 matrix of random floats on the GPU
array B = sin(A) + 1.5; // Element-wise arithmetic
array C = fft(B); // Fourier transform the result
float d[] = { 1, 2, 3, 4, 5, 6 };
array D(2, 3, d, afHost); // Create 2x3 matrix from host data
D.col(0) = D.col(end); // Copy last column onto first
array vals, inds;
sort(vals, inds, A); // Sort A and print sorted array and corresponding indices
af_print(vals);
af_print(inds);