@Override public Program createProgramFromSourceCode(String sourceCode) { LOG.log(Level.FINE, "Create program from source:\n{0}", sourceCode); Utils.errorBuffer.rewind(); CLProgram p = CL10.clCreateProgramWithSource(context, sourceCode, Utils.errorBuffer); Utils.checkError(Utils.errorBuffer, "clCreateProgramWithSource"); return new LwjglProgram(p, this); }
@Override public Program createProgramFromSourceCode(String sourceCode) { LOG.log(Level.FINE, "Create program from source:\n{0}", sourceCode); Utils.errorBuffer.rewind(); long p = CL10.clCreateProgramWithSource(context, sourceCode, Utils.errorBuffer); Utils.checkError(Utils.errorBuffer, "clCreateProgramWithSource"); return new LwjglProgram(p, this); }
@Override public Program createProgramFromBinary(ByteBuffer binaries, Device device) { Utils.errorBuffer.rewind(); Utils.tempBuffers[0].b16i.rewind(); CLProgram p = CL10.clCreateProgramWithBinary(context, ((LwjglDevice) device).device, binaries, Utils.tempBuffers[0].b16i, Utils.errorBuffer); Utils.checkError(Utils.errorBuffer, "clCreateProgramWithBinary"); Utils.checkError(Utils.tempBuffers[0].b16i, "clCreateProgramWithBinary"); return new LwjglProgram(p, this); }
@Override public Program createProgramFromBinary(ByteBuffer binaries, Device device) { Utils.errorBuffer.rewind(); Utils.tempBuffers[0].b16i.rewind(); Utils.pointerBuffers[0].rewind(); Utils.pointerBuffers[0].put(0, ((LwjglDevice) device).getDevice()); long p = CL10.clCreateProgramWithBinary(context, Utils.pointerBuffers[0], binaries, Utils.tempBuffers[0].b16i, Utils.errorBuffer); Utils.checkError(Utils.errorBuffer, "clCreateProgramWithBinary"); Utils.checkError(Utils.tempBuffers[0].b16i, "clCreateProgramWithBinary"); return new LwjglProgram(p, this); }
@Override public Program createProgramFromSourceCode(String sourceCode) { LOG.log(Level.FINE, "Create program from source:\n{0}", sourceCode); Utils.errorBuffer.rewind(); long p = CL10.clCreateProgramWithSource(context, sourceCode, Utils.errorBuffer); Utils.checkError(Utils.errorBuffer, "clCreateProgramWithSource"); return new LwjglProgram(p, this); }
@Override public Program createProgramFromBinary(ByteBuffer binaries, Device device) { Utils.errorBuffer.rewind(); Utils.tempBuffers[0].b16i.rewind(); Utils.pointerBuffers[0].rewind(); Utils.pointerBuffers[0].put(0, ((LwjglDevice) device).getDevice()); long p = CL10.clCreateProgramWithBinary(context, Utils.pointerBuffers[0], binaries, Utils.tempBuffers[0].b16i, Utils.errorBuffer); Utils.checkError(Utils.errorBuffer, "clCreateProgramWithBinary"); Utils.checkError(Utils.tempBuffers[0].b16i, "clCreateProgramWithBinary"); return new LwjglProgram(p, this); }