This project is still in the prototype phase. Please follow the discussionon this issue. You can also chat with us at the following locations:
Ensure you have the ArrayFire library installed on your system.
You can get the ArrayFire library from one of the following ways:
- Point
AF_PATH
to the installed location of ArrayFire. - If using the CUDA backend, point
CUDA_PATH
to the location of the CUDA toolkit - Point
GOPATH
to the location of arrayfire-go - Export
LD_LIBRARY_PATH
on Linux andDYLD_LIBRARY_PATH
on OSX to point toAF_PATH/lib
CUDA_PATH/nvvm/lib64
if using CUDA backend.
For CPU backend:
$ export CGO_CFLAGS="-I$AF_PATH/include"
$ export CGO_LDFLAGS="-L$AF_PATH/lib -lafcpu -lforge"
$ go build
For CUDA backend:
$ export CGO_CFLAGS="-I$AF_PATH/include"
$ CGO_LDFLAGS="-L$AF_PATH/lib -lafcuda -lforge -L$CUDA_PATH/nvvm/lib64 -lnvvm"
$ go build
For OpenCL backend:
$ export CGO_CFLAGS="-I$AF_PATH/include"
$ export CGO_LDFLAGS="-L$AF_PATH/lib -lafopencl -lforge"
$ go build
If you want to contribute to this project, start here: