private boolean testKernel(Context clContext, CommandQueue clQueue) {
        try {
            //create fill code
            String include = "#define TYPE float\n";
            Program program = clContext.createProgramFromSourceFilesWithInclude(assetManager, include, "jme3test/opencl/Blas.cl");
            program.build();
            Kernel kernel = program.createKernel("Fill");
            System.out.println("number of args: "+kernel.getArgCount());

            //fill buffer
            int size = 256+128;
            Buffer buffer = clContext.createBuffer(size*4);
            float value = 5;
            Event event = kernel.Run1(clQueue, new com.jme3.opencl.Kernel.WorkSize(buffer.getSize() / 4), buffer, value);
            event.waitForFinished();
            
            //check if filled
            ByteBuffer buf = buffer.map(clQueue, MappingAccess.MAP_READ_ONLY);
            FloatBuffer buff = buf.asFloatBuffer();
            for (int i=0; i<size; ++i) {
                float v = buff.get(i);
                assertEquals(value, v, "Buffer filled with the wrong value at index "+i);
            }
            buffer.unmap(clQueue, buf);
            
            //release
            buffer.release();
            kernel.release();
            program.release();

        } catch (AssertionError ex) {
            LOG.log(Level.SEVERE, "kernel test failed with an assertion error");
            return false;
        } catch (Exception ex) {
            LOG.log(Level.SEVERE, "kernel test failed with:", ex);
            return false;
        }
        return true;
    }
Simple test checking if the basic functions of the OpenCL wrapper work
@author shaman
jme3-examples/src/main/java/jme3test/opencl/HelloOpenCL.java