This repository contains the files required to use ArrayFire from Java.
-
The latest version of ArrayFire. You can get ArrayFire using one of the following:
-
The latest version of
JAVA SDK. It has been tested with OpenJDK 1.7 and OpenJDK 1.8. Make sure there is an environmental variableJAVA_HOMEpointing to the root directory of java sdk installation. -
CUDA
- Tested for CUDA 7.5
-
make
GNU Makeon Linux
-
C++ compiler
gccorclangon Linux
-
OSX and Windows support coming soon
-
src/: Contains the source files for the ArrayFire Java wrapper*.cppThe JNI wrapper filesjni_helper.hThe JNI API helper functions
-
com/: Contains the Java source files implementing algorithms -
lib/: The location where the JNI library is stored -
examples: contains a few examples demonstrating the usage
After you the necessary pre-requisites, edit the following paramets
- Open
Makefileand changeJAVA_HOMEtogether withAF_PATHto the right location
-
To build the JNI Wrapper for ArrayFire use
make cudato build using CUDA- alternatively, you can pass in environment variables to the
Makefilelike this:JAVA_HOME=<path to the Java SDK> AF_PATH=<path to ArrayFire> make cuda
- alternatively, you can pass in environment variables to the
make openclto build using OpenCL- alternatively, you can pass in environment variables to the
Makefilelike this:JAVA_HOME=<path to the Java SDK> AF_PATH=<path to ArrayFire> make cuda
- alternatively, you can pass in environment variables to the
-
To build the examples do one of the following from the examples directory
make cuda runto use build and run examples using CUDA- alternatively, you can pass in environment variables to the
Makefilelike this:JAVA_HOME=<path to the Java SDK> AF_PATH=<path to ArrayFire> make cuda
- alternatively, you can pass in environment variables to the
make opencl runto use build and run examples using OpenCL- alternatively, you can pass in environment variables to the
Makefilelike this:JAVA_HOME=<path to the Java SDK> AF_PATH=<path to ArrayFire> make cuda
- alternatively, you can pass in environment variables to the
- TODO
- Please check the LICENSE file in the root directory