Skip to content

Syncleus/aparapi-jni

Repository files navigation

License Maven Central Javadocs Gitter

Licensed under the Apache Software License v2

This project simply loads the Aparapi Native library at runtime. This prevents the need for the user to install it manually.

There is usually no need for a user to call this library directly as it is called internally by Aparapi. However it may be useful if creating your own custom agent.

Currently packaged native libraries support Windows 64bit, Windows 32bit, Mac OSX 64bit, Linux 64bit, and Linux 32bit.

Support and Documentation

The official source repository for this project can be found on QOTO GitLab an up-to-date mirror of the repository is also hosted on Github.

Aparapi JNI Javadocs: latest - 1.4.3 - 1.4.2 - 1.4.1 - 1.4.0 - 1.3.1 - 1.2.0 - 1.1.2 - 1.1.1 - 1.1.0 - 1.0.1 - 1.0.0

For detailed documentation see Aparapi.com or check out the latest Javadocs.

For support please use Gitter or the official Aparapi mailing list and Discourse forum.

Please file bugs and feature requests on QOTO GitLab older issues are archived at Github.

Related Projects

This particular repository only represents the core Java library. There are several other related repositories worth taking a look at.

  • Aparapi - Core Aparapi java library.
  • Aparapi Examples - A collection of Java examples to showcase the Aparapi library and help developers get started.
  • Aparapi Native - The native library component. Without this the Java library can't talk to the graphics card. This is not a java project but rather a C/C++ project.
  • Aparapi Vagrant - A vagrant environment for compiling aparapi native libraries for linux, both x86 an x64.
  • Aparapi Website - Source for the Aparapi website as hosted at http://aparapi.com. The site also contains our detailed documentation.

Java Dependency

To include Aparapi in your project of choice include the following Maven dependency into your build.

<dependency>
    <groupId>com.aparapi</groupId>
    <artifactId>aparapi-jni</artifactId>
    <version>1.4.3</version>
</dependency>

Obtaining the Source

The official source repository for Aparapi is located on the QOTO GitLab repository and can be cloned using the following command.

git clone http://git.qoto.org/aparapi/aparapi-jni.git

Getting Started

Simply add the dependency above then call the load method, thats all there is to it.

try {
   NativeLoader.load();
   System.out.println("Aparapi JNI loaded successfully.");
}
catch (final IOException e) {
   System.out.println("Check your environment. Failed to load aparapi native library "
         + " or possibly failed to locate opencl native library (opencl.dll/opencl.so)."
         + " Ensure that OpenCL is in your PATH (windows) or in LD_LIBRARY_PATH (linux).");
}