public class LwjglProgram extends Program
OpenCLObject.ObjectReleaser
releaser
Constructor and Description |
---|
LwjglProgram(org.lwjgl.opencl.CLProgram program,
LwjglContext context) |
Modifier and Type | Method and Description |
---|---|
void |
build(java.lang.String args,
Device... devices)
Builds this program with the specified argument string on the specified
devices.
|
Kernel[] |
createAllKernels()
Creates all available kernels in this program.
|
Kernel |
createKernel(java.lang.String name)
Creates the kernel with the specified name.
|
java.nio.ByteBuffer |
getBinary(Device device)
Queries a compiled binary representation of this program for a particular
device.
|
org.lwjgl.opencl.CLProgram |
getProgram() |
finalize, getReleaser, release
public LwjglProgram(org.lwjgl.opencl.CLProgram program, LwjglContext context)
public org.lwjgl.opencl.CLProgram getProgram()
public void build(java.lang.String args, Device... devices) throws KernelCompilationException
Program
Context.getDevices()
.
If null
is passed, the program is built on all available devices.build
in class Program
args
- the compilation argumentsdevices
- a list of devices on which the program is build.KernelCompilationException
- if the compilation failsProgram.build()
public Kernel createKernel(java.lang.String name)
Program
createKernel
in class Program
name
- the name of the kernel as defined in the source codepublic Kernel[] createAllKernels()
Program
Kernel.getName()
.createAllKernels
in class Program
public java.nio.ByteBuffer getBinary(Device device)
Program
getBinary
in class Program
device
- the device from which the binaries are takenContext.createProgramFromBinary(java.nio.ByteBuffer, com.jme3.opencl.Device)