<a href=”http://code.google.com/p/javacl/” _mce_href=”http://code.google.com/p/javacl/”>JavaCL</a> v1.0.0 RC1 is available !

Feedback needed : last-minute bugs will be fixed in next release candidates within the coming weeks, then a final 1.0 version will be released.

Download / Install / Browse JavaDoc / Getting Started (Tutorial) / Discuss

<a href=”http://nativelibs4java.sourceforge.net/webstart/OpenCL/InteractiveImageTransformDemo.jnlp” _mce_href=”http://nativelibs4java.sourceforge.net/webstart/OpenCL/InteractiveImageTransformDemo.jnlp”><img class=”size-medium wp-image-489” title=”JavaCLInteractiveImageTransformDemo” src=”/blog/wp-content/uploads/2011/02/JavaCLInteractiveImageTransformDemo-300x120.png” _mce_src=”/blog/wp-content/uploads/2011/02/JavaCLInteractiveImageTransformDemo-300x120.png” alt=”” width=”300” height=”120” srcset=”/blog/wp-content/uploads/2011/02/JavaCLInteractiveImageTransformDemo-300x120.png 300w, /blog/wp-content/uploads/2011/02/JavaCLInteractiveImageTransformDemo-1024x410.png 1024w, /blog/wp-content/uploads/2011/02/JavaCLInteractiveImageTransformDemo.png 1202w” sizes=”(max-width: 300px) 100vw, 300px” /> Launch the new JavaCL Interactive Image Transform Editor. </a>

Release Notes

Here are the main changes from this new version (see full change log) :

  • The BridJ-powered version now becomes the default !
    The JNA version is still maintained and available with all Maven artifact ids suffixed with “-jna”. See migration notes below…
  • Added simple Fourier-analysis classes (package com.nativelibs4java.opencl.util.fft), with double and float variants, usable with primitive arrays or OpenCL buffers :
    • naive Discrete Fourier Transform (DFT) :

      FloatDFT, DoubleDFT

    • Fast Fourier Transform (FFT) for power-of-two arrays / buffers (performs better than Apache Commons on a CPU) :

      [<a href=”http://code.google.com/p/javacl/” _mce_href=”http://code.google.com/p/javacl/”>JavaCL</a> v1.0.0 RC1 is available !

Feedback needed : last-minute bugs will be fixed in next release candidates within the coming weeks, then a final 1.0 version will be released.

Download / Install / Browse JavaDoc / Getting Started (Tutorial) / Discuss

<a href=”http://nativelibs4java.sourceforge.net/webstart/OpenCL/InteractiveImageTransformDemo.jnlp” _mce_href=”http://nativelibs4java.sourceforge.net/webstart/OpenCL/InteractiveImageTransformDemo.jnlp”><img class=”size-medium wp-image-489” title=”JavaCLInteractiveImageTransformDemo” src=”/blog/wp-content/uploads/2011/02/JavaCLInteractiveImageTransformDemo-300x120.png” _mce_src=”/blog/wp-content/uploads/2011/02/JavaCLInteractiveImageTransformDemo-300x120.png” alt=”” width=”300” height=”120” srcset=”/blog/wp-content/uploads/2011/02/JavaCLInteractiveImageTransformDemo-300x120.png 300w, /blog/wp-content/uploads/2011/02/JavaCLInteractiveImageTransformDemo-1024x410.png 1024w, /blog/wp-content/uploads/2011/02/JavaCLInteractiveImageTransformDemo.png 1202w” sizes=”(max-width: 300px) 100vw, 300px” />

Launch the new JavaCL Interactive Image Transform Editor.

</a>

Release Notes

Here are the main changes from this new version (see full change log) :

  • The BridJ-powered version now becomes the default !
    The JNA version is still maintained and available with all Maven artifact ids suffixed with “-jna”. See migration notes below…
  • Added simple Fourier-analysis classes (package com.nativelibs4java.opencl.util.fft), with double and float variants, usable with primitive arrays or OpenCL buffers :
    • naive Discrete Fourier Transform (DFT) :

      FloatDFT, DoubleDFT

    • Fast Fourier Transform (FFT) for power-of-two arrays / buffers (performs better than Apache Commons on a CPU) :

](http://nativelibs4java.sourceforge.net/javacl/api/stable/com/nativelibs4java/opencl/util/fft/FloatFFTPow2.html) , DoubleFFTPow2

  • Added some math-related compiler options to <a href=”http://nativelibs4java.sourceforge.net/javacl/api/stable/com/nativelibs4java/opencl/CLProgram.html” _mce_href=”http://nativelibs4java.sourceforge.net/javacl/api/stable/com/nativelibs4java/opencl/CLProgram.html”>CLProgram</a> :
    • setFastRelaxedMath() (triggers all the others !)
    • setFiniteMathOnly()
    • setUnsafeMathOptimizations()
    • setMadEnable()
    • setNoSignedZero()
  • Added CLContext.createBuffer(Usage, Buffer)
  • Added CLBuffer.copyTo(CLQueue, CLMem destination, CLEvent…) and CLBuffer.emptyClone(Usage)
  • Added NIOUtils.indirectBuffer(size, bufferClass)
  • Added CLContext.toString
  • Deprecated CLXXXBuffer in favor of CLBuffer (CLIntBuffer becomes CLBuffer, etc...)
  • Changed CLContext.createBuffer(Usage, length, class) to createBuffer(Usage, class, length) to match the JavaCL/BridJ API (and provoke migration issues : people should now use a primitive class rather than an NIO buffer class !!!
  • Complete rewrite of http: www.ujmp.org=""UJMP <a href=”http://code.google.com/p/nativelibs4java/source/browse/branches/OpenCL-BridJ/libraries/OpenCL/Blas/src/test/java/com/nativelibs4java/opencl/blas/ujmp/UJMPOpenCLTest.java” _mce_href=”http://code.google.com/p/nativelibs4java/source/browse/branches/OpenCL-BridJ/libraries/OpenCL/Blas/src/test/java/com/nativelibs4java/opencl/blas/ujmp/UJMPOpenCLTest.java”>Matrix implementation</a>, using a design borrowed to <a href=”http://scalacl.googlecode.com/” _mce_href=”http://scalacl.googlecode.com/”>ScalaCL</a> (uses the BridJ port of JavaCL)

    </http:>

  • Fixed <a href=”http://code.google.com/p/nativelibs4java/issues/detail?id=66” _mce_href=”http://code.google.com/p/nativelibs4java/issues/detail?id=66”>issue #66</a> (create temp files in ~/.javacl subdirectories instead of /tmp)
  • Fixed OpenGL sharing on MacOS X
  • Fixed CLProgram.getBinaries() in some cases
  • Fixed CLBuffer.read on indirect buffers
  • Fixed NPE that happens with null varargs CLEvent[] array
  • Fixed length = 1 case in reduction utility
  • Fixed ATI detection (“ATI Stream” now replaced by “AMD Accelerated Parallel Processing”, cf. Csaba’s comment in <a href=”http://code.google.com/p/nativelibs4java/issues/detail?id=39” _mce_href=”http://code.google.com/p/nativelibs4java/issues/detail?id=39”>issue #39</a>)
  • Fixed <a href=”http://code.google.com/p/nativelibs4java/issues/detail?id=55” _mce_href=”http://code.google.com/p/nativelibs4java/issues/detail?id=55”>issue #55</a> : applied Kazo Csaba’s patch to fix the bounds of CLBuffer.map’s returned buffer
  • Fixed inheritance of CLBuildException (now derives from CLException)

Migration notes : from JNA to BridJ

The “javacl” Maven artifact now refers to the BridJ version of JavaCL, while “javacl-jna” corresponds to the JNA version (which was the default version up to 1.0 beta 6).

While the JNA version is still maintained (and will get patches at least for the 1.0.x versions), it is advised that all users migrate to the BridJ port at some point. The main selling points are :

  • Smaller call overhead (<a href=”http://code.google.com/p/bridj/” _mce_href=”http://code.google.com/p/bridj/”>BridJ beats out JNA</a> in interop. performance)
  • BSD-licensed (as opposed to the LGPL license of the JNA version)
  • Nicer API, with generic CLBuffer instead of typed buffer classes (CLIntBuffer is now CLBuffer)
  • All the new features will be reserved to the BridJ version

This quick migration guide on the wiki will help you perform the move in minutes.

Getting started

You can read the Getting Started (Tutorial) page on the wiki to get started very quickly !

Please join the <a href=”http://groups.google.fr/group/nativelibs4java/” _mce_href=”http://groups.google.fr/group/nativelibs4java/”>NativeLibs4Java Google Group</a> to discuss JavaCL / ScalaCL, get the latest news and ask for support from the growing JavaCL community.