From: Michael Zucchi Date: Mon, 22 Apr 2019 09:43:05 +0000 (+0930) Subject: Update the README. X-Git-Tag: zcl-1.0~1 X-Git-Url: https://code.zedzone.au/cvs?a=commitdiff_plain;h=05a31bb47c9fbc9d9ffa2364f57f82ed5dad8277;p=zcl Update the README. --- diff --git a/README b/README index f09204d..4cfdf38 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ 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: @@ -45,7 +45,6 @@ These all go hand in hand and allow for simplified application development with a few caveats. Garbage detection is via referent queues for efficiency. - PLATFORMS --------- @@ -56,8 +55,8 @@ The only supported target is 64-bit GNU systems and is obviously the 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. @@ -66,54 +65,42 @@ COMPILING --------- 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//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. for a list of targets possible. - Multiple targets may be specified. +$ make TARGET= -The other `java.make' targets are also supported: +All intermediate and final results are place in `bin/'. -$ make javadocs +`bin//.jar' Cross platform modular .jar. +`bin///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///.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 -------------- @@ -149,8 +136,9 @@ bundled headers which is at OpenCL 2.1. 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. @@ -165,7 +153,9 @@ A simple and incomplete implementation of the 'clinfo' tool is part of 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. @@ -286,7 +276,11 @@ current design seems sufficient. 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 -------