ArrayFire is a high performance library for parallel computing with an easy-to-use API. It enables users to write scientific computing code that is portable across CUDA, OpenCL and CPU devices. This project provides Lua bindings for the ArrayFire library.
The wrapper is currently compliant with ArrayFire 3.4 API (and higher). If you find any bugs, please report them here.
Sample code:
local af = require('arrayfire')
af.info()
a = af.Array{1, 2, 3, 4}
af.print(a)
Sample output:
ArrayFire v3.5.0 (CUDA, 64-bit Linux, build 06e605b0)
Platform: CUDA Toolkit 8, Driver: 378.13
[0] GeForce GTX 950, 1996 MB, CUDA Compute 5.2
ArrayFire Array
[4 1 1 1]
1.0000
2.0000
3.0000
4.0000
TODO
cmake
Visual Studio
on Windows,clang
/gcc
on Linux / OSX.
Addiitonally, if you install the following Lua packages:
You can install ArrayFire using one of the following two ways.
Post Installation Instructions
- Please read the wiki page for setting up the proper environment variables.
cd /path/to/arrayfire-lua/
luarocks make
You should now be good to go!
This is a work in progress and is not intended for production use.
This project began with significant contributions from Steven Johnson. It is currently being maintained by @arrayfire/lua-devel
team.