public class JoclKernel extends Kernel
Kernel.LocalMem, Kernel.LocalMemPerElement, Kernel.WorkSize
OpenCLObject.ObjectReleaser
globalWorkSize, workGroupSize
releaser
Constructor and Description |
---|
JoclKernel(long kernel) |
Modifier and Type | Method and Description |
---|---|
int |
getArgCount() |
long |
getMaxWorkGroupSize(Device device)
Returns the maximal work group size when this kernel is executed on
the specified device
|
java.lang.String |
getName() |
Event |
Run(CommandQueue queue)
Launches the kernel with the current global work size, work group size
and arguments.
|
void |
RunNoEvent(CommandQueue queue)
Launches the kernel with the current global work size, work group size
and arguments without returning an event object.
|
void |
setArg(int index,
Buffer t) |
void |
setArg(int index,
byte b) |
void |
setArg(int index,
java.nio.ByteBuffer buffer,
long size)
Raw version to set an argument.
|
void |
setArg(int index,
double d) |
void |
setArg(int index,
float f) |
void |
setArg(int index,
Image i) |
void |
setArg(int index,
int i) |
void |
setArg(int index,
Kernel.LocalMem t) |
void |
setArg(int index,
Kernel.LocalMemPerElement t) |
void |
setArg(int index,
long l) |
void |
setArg(int index,
Matrix4f m) |
void |
setArg(int index,
Quaternion q) |
void |
setArg(int index,
short s) |
void |
setArg(int index,
Vector2f v) |
void |
setArg(int index,
Vector4f v) |
getGlobalWorkSize, getWorkGroupSize, register, Run1, Run1NoEvent, Run2, Run2NoEvent, setArg, setArg, setGlobalWorkSize, setGlobalWorkSize, setGlobalWorkSize, setGlobalWorkSize, setWorkGroupSdize, setWorkGroupSize, setWorkGroupSize, setWorkGroupSize, setWorkGroupSizeToNull, toString
finalize, getReleaser, release
public java.lang.String getName()
public int getArgCount()
getArgCount
in class Kernel
public long getMaxWorkGroupSize(Device device)
Kernel
getMaxWorkGroupSize
in class Kernel
device
- the devicepublic void setArg(int index, Kernel.LocalMemPerElement t)
public void setArg(int index, Kernel.LocalMem t)
public void setArg(int index, Quaternion q)
public void setArg(int index, java.nio.ByteBuffer buffer, long size)
Kernel
size
bytes of the provided byte buffer are copied to the kernel
argument. The size in bytes must match exactly the argument size
as defined in the kernel code.
Use this method to send custom structures to the kernelpublic Event Run(CommandQueue queue)
Kernel
Kernel.RunNoEvent(com.jme3.opencl.CommandQueue)
might bring a better performance.Run
in class Kernel
queue
- the command queueKernel.setGlobalWorkSize(com.jme3.opencl.Kernel.WorkSize)
,
Kernel.setWorkGroupSize(com.jme3.opencl.Kernel.WorkSize)
,
Kernel.setArg(int, java.lang.Object)
public void RunNoEvent(CommandQueue queue)
Kernel
Kernel.Run(com.jme3.opencl.CommandQueue)
.RunNoEvent
in class Kernel
queue
- the command queueKernel.setGlobalWorkSize(com.jme3.opencl.Kernel.WorkSize)
,
Kernel.setWorkGroupSize(com.jme3.opencl.Kernel.WorkSize)
,
Kernel.setArg(int, java.lang.Object)