This repository contains the files required to use ArrayFire from Java.
-
The latest version of ArrayFire. You can download here
- All the pre-requisites for ArrayFire still apply.
-
The latest version of
JAVA SDK. Make sure there is an environmental variableJAVA_HOMEpointing to the root directory of java sdk installation. -
make
GNU MakeonLinuxnmakeonWindows
-
C++ compiler
gcc/g++on LinuxVisual Studio 2012forWindows.
-
OSX support coming soon.
-
src/: Contains the source files for the ArrayFire Java wrapperjava_wrapper.cppThe JNI wrapper filejava_wrapper.hThe JNI API definitions
-
com/: Contains the Java source files implementingArrayandImageclasses -
lib/,lib64/: 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 changeAF_PATHto the right location
-
To build the JNI Wrapper for ArrayFire use
make cudato build using CUDAmake openclto build using OpenCL
-
To build the examples do one of the following from the examples directory
make cuda runto use build and run examples using CUDAmake opencl runto use build and run examples using OpenCL
-
To build the JNI Wrapper for ArrayFire
- Open the project
ArrayFireJavaWrapper.vcxprojin Visual Studio 2012 and build it. - OpenCL support coming soon.
- Open the project
-
To build and run the examples
- Launch
Developer command prompt for Visual Studio 2012. nmake /F Makefile.Windowsto build and run all examples.nmake /F Makefile.Windows [HelloWorld | MonteCarloPi]to run a specific example.
- Launch
- TODO
- Please check the LICENSE file in the root directory