Skip to content

wcork/arrayfire-java

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

arrayfire_java

Join the chat at https://gitter.im/arrayfire/arrayfire-java

This repository contains the files required to use ArrayFire from Java.

Prerequisites

  • 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 variable JAVA_HOME pointing to the root directory of java sdk installation.

  • CUDA

    • Tested for CUDA 7.5
  • make

    • GNU Make on Linux
  • C++ compiler

    • gcc or clang on Linux
  • OSX and Windows support coming soon

Contents

  • src/: Contains the source files for the ArrayFire Java wrapper

    • *.cpp The JNI wrapper files
    • jni_helper.h The 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

Usage

After you the necessary pre-requisites, edit the following paramets

  • Open Makefile and change JAVA_HOME together with AF_PATH to the right location

Linux

  • To build the JNI Wrapper for ArrayFire use

    • make cuda to build using CUDA
      • alternatively, you can pass in environment variables to the Makefile like this: JAVA_HOME=<path to the Java SDK> AF_PATH=<path to ArrayFire> make cuda
    • make opencl to build using OpenCL
      • alternatively, you can pass in environment variables to the Makefile like this: JAVA_HOME=<path to the Java SDK> AF_PATH=<path to ArrayFire> make cuda
  • To build the examples do one of the following from the examples directory

    • make cuda run to use build and run examples using CUDA
      • alternatively, you can pass in environment variables to the Makefile like this: JAVA_HOME=<path to the Java SDK> AF_PATH=<path to ArrayFire> make cuda
    • make opencl run to use build and run examples using OpenCL
      • alternatively, you can pass in environment variables to the Makefile like this: JAVA_HOME=<path to the Java SDK> AF_PATH=<path to ArrayFire> make cuda

Documentation

  • TODO

License

  • Please check the LICENSE file in the root directory

About

Java wrapper for ArrayFire

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 51.6%
  • C++ 44.5%
  • Makefile 2.5%
  • C 1.4%