Z's Simple OpenCL Binding for Java

zcl is a Java binding for OpenCL 2.1. The goal of the design was to create a small and direct binding to OpenCL whilst maintaining `javaness' and a clean and type-safe object orientated interface.

A side goal of the project was to explore Java to native binding mechanisms ``by hand'' rather than scripts and automation.

The API closely follows OpenCL and has 100% coverage and so general OpenCL programming resources should be applicable. All of the header constants are defined in au.notzed.zcl.CL which when imported statically allow direct use as if it were C.

For further details see the README and javadocs.


As of 1.0 this has been converted to a Java 11 modular project. But it should be possible to build with Java 8 with some minor changes to the makefiles.

This is still more or leass beta as I haven't been using it much. It's pretty easy to hack on to fix. I think it's much nicer to use than pretty much any other OpenCL binding.

Native kernels written in Java are supported. As is garbage collection and a lambda interface.

The only 'supported' platform is GNU/amd64, but a build script is provided for native code via mingw32.


This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Note that this is not the lesser license, the full source-code must accompany any programme which utilises this library.

I'm still trying to find out whether this license is applicable for .jmod files.


It requires an OpenJDK, perl, and the usual GNU build tools. It only builds on GNU/Linux systems.

There are currently no examples but as the API follows OpenCL closely it should be straightforward to use.



notzed on various mail servers, primarily gmail.com.

Copyright (C) 2014 Michael Zucchi, All Rights Reserved.