Library for high performance parallel computing

C, C++, Visual C++, C++.Net Topics
Post Reply
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Library for high performance parallel computing

Post by Neo » Wed Nov 07, 2018 6:40 am

The ArrayFire accelerated computing library is a free, general-purpose, open-source library that simplifies the process of developing software that targets parallel and massively-parallel architectures including CPUs, GPUs, and other hardware acceleration devices. ArrayFire is used on devices from low-powered mobile phones to high-powered GPU-enabled supercomputers including CPUs from all major vendors (Intel, AMD, Arm), GPUs from the dominant manufacturers (NVIDIA, AMD, and Qualcomm), as well as a variety of other accelerator devices on Windows, Mac, and Linux.

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);
User avatar
Himash
Sergeant
Sergeant
Posts: 14
Joined: Fri Oct 12, 2018 11:25 am

Re: Library for high performance parallel computing

Post by Himash » Thu Nov 08, 2018 8:36 pm

Good one ....
Post Reply

Return to “C/C++ Programming”