ArrayFire is simple

Simply cast your data to ArrayFire's GPU data type, "array", and your code will use the GPU. No need to do anything else. No low-level hassle with tricky, obtuse details. ArrayFire makes sure you get good performance on the GPU, through its vast function library and optimized GPU runtime system.

Below is sample ArrayFire code: