INTRODUCTION
------------
-This is a direct Java binding for OpenCL 2.1 and Java 8.
+This is a direct Java binding for OpenCL 2.1 and Java 11.
I originally wrote it over a few days mostly just to pass the time and
the goals were:
development with a few caveats. Garbage detection is via referent
queues for efficiency.
-
PLATFORMS
---------
default when running make. But it should also compile on 32-bit
platforms in a straightforward manner.
-A NON-SUPPORTED 64-bit ming32 cross-compilation makefile is also
-included. It is not supported.
+As a NON-SUPPORTED target, it can be cross-compiled for windows-amd64.
+It is not supported.
The library supports full OpenCL 2.1 and two OpenGL related
extensions.
---------
Standard GNU development tools and a Java JDK are required in order to
-compile zcl (ant is not used). Java 8 is required. As of version 0.6
-the Jva code is compiled using my java.make makefile which provides
-some additional targets.
+compile zcl (ant is not used). perl and cproto are also required.
+Java 11 is probably required.
+
+The prequisitve project notzed.nativez must also have previously been
+compiled and will be automatically used if it is present in the
+directory above this one (../nativez/).
+
+See config.make for configuration parameters.
The jni source includes the KHR OpenCL headers so an OpenCL SDK is not
required but one may be used instead by defining CL_HOME on the
command line.
-The environmental variable $JAVA_HOME is used to resolve the location
-of the Java SDK - required for jni.h. A default is set in
-jni/Makefile and may be edited manually.
+Build everything for default target of linux-amd64:
$ make
- Will build the class library and native library for the default
- target (gnu-amd64). The jar file is created in `bin/zcl.jar' and the
- native library will be written to `jni/bin/<target>/libzcl.so'.
-
-$ make TARGETS=foo
+Build everything for a specific target:
- Will build the class library and native library for the "foo" native
- target. See jni/Makefile.<target> for a list of targets possible.
- Multiple targets may be specified.
+$ make TARGET=<target>
-The other `java.make' targets are also supported:
+All intermediate and final results are place in `bin/'.
-$ make javadocs
+`bin/<module>/<module>.jar' Cross platform modular .jar.
+`bin/<module>/<target>/lib' Platform specific libraries.
- Build javadocs in `bin/zcl-${version}-doc.jar'. They are somewhat
- incomplete but cover some of the zcl specific features.
+`bin/<module>/<target>/<module>.jmod' Target specific .jmod.
-$ make sources
+$ make bin
- Build a IDE (NetBeans?) compatible source archive in
- `bin/zcl-${version}-src.jar'.
-
-$ make all
+Build everything but the jars and jmods.
- Build everything (jar, javadocs, sources, and native libraries).
- TARGET may also be specified.
+$ make dist
-$ make tar
-
- Create a source distribution in standard GNU format; everything in a
- sub-directory matching the basename of the archive. This is not
- called `make dist' to avoid clashing with ant/netbeans being used.
-
-$ make clean
+Create a source archive. The source is found via $(find) so
+this will include any droppings.
OPENCL VERSION
--------------
USING
-----
-The directory containing libzcl.so must be added to the
-java.library.path or LD_LIBRARY_PATH during execution.
+If not using .jmod, the directory containing libzcl.so must be added
+to the java.library.path or LD_LIBRARY_PATH during execution. The same
+goes for libnativez.so.
The API follows the C api closely together with some convenient
property getters and some overloaded functions for native arrays.
the package. After building it can be used as a basic functionality
test.
-$ java -Djava.library.path=jni/bin/gnu-amd64 -cp dist/zcl.jar au.notzed.zcl.tools.clinfo
+$ LD_LIBRARY_PATH=../nativez/bin/notzed.nativez/linux-amd64/lib:bin/notzed.zcl/linux-amd64/lib \
+ java --module-path bin/modules:../nativez/bin/modules \
+ -m notzed.zcl.demo/au.notzed.zcl.tools.clinfo
Note that clinfo will crash on coprthr 1.6.0 due to a bug.
FUTURE PLANS
------------
-I'll see. It is quite close to a 1.0 release.
+I'm not sure now, I haven't been using it much and there's zero
+outside interest. CUDA is all the fucked-up-rage these days.
+
+I might look into Vulkan, which has significant overlap although not
+such a simple API.
LICENSE
-------