Package com.jme3.opencl.lwjgl
Class LwjglKernel
java.lang.Object
com.jme3.opencl.AbstractOpenCLObject
com.jme3.opencl.Kernel
com.jme3.opencl.lwjgl.LwjglKernel
- All Implemented Interfaces:
OpenCLObject
-
Nested Class Summary
Nested classes/interfaces inherited from class com.jme3.opencl.Kernel
Kernel.LocalMem, Kernel.LocalMemPerElement, Kernel.WorkSize
Nested classes/interfaces inherited from interface com.jme3.opencl.OpenCLObject
OpenCLObject.ObjectReleaser
-
Field Summary
Fields inherited from class com.jme3.opencl.Kernel
globalWorkSize, workGroupSize
Fields inherited from class com.jme3.opencl.AbstractOpenCLObject
releaser
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
org.lwjgl.opencl.CLKernel
long
getMaxWorkGroupSize
(Device device) Returns the maximal work group size when this kernel is executed on the specified devicegetName()
Returns the releaser object.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, byte b) void
setArg
(int index, double d) void
setArg
(int index, float f) void
setArg
(int index, int i) void
setArg
(int index, long l) void
setArg
(int index, short s) void
void
setArg
(int index, Quaternion q) void
void
void
void
void
setArg
(int index, Kernel.LocalMem t) void
setArg
(int index, Kernel.LocalMemPerElement t) void
setArg
(int index, ByteBuffer buffer, long size) Raw version to set an argument.Methods inherited from class com.jme3.opencl.Kernel
getGlobalWorkSize, getWorkGroupSize, register, Run1, Run1NoEvent, Run2, Run2NoEvent, setArg, setArg, setGlobalWorkSize, setGlobalWorkSize, setGlobalWorkSize, setGlobalWorkSize, setWorkGroupSdize, setWorkGroupSize, setWorkGroupSize, setWorkGroupSize, setWorkGroupSizeToNull, toString
Methods inherited from class com.jme3.opencl.AbstractOpenCLObject
finalize, release
-
Constructor Details
-
LwjglKernel
public LwjglKernel(org.lwjgl.opencl.CLKernel kernel)
-
-
Method Details
-
getKernel
public org.lwjgl.opencl.CLKernel getKernel() -
getName
-
getArgCount
public int getArgCount()- Specified by:
getArgCount
in classKernel
- Returns:
- the number of arguments
-
getMaxWorkGroupSize
Description copied from class:Kernel
Returns the maximal work group size when this kernel is executed on the specified device- Specified by:
getMaxWorkGroupSize
in classKernel
- Parameters:
device
- the device- Returns:
- the maximal work group size
-
setArg
-
setArg
-
setArg
-
setArg
-
setArg
public void setArg(int index, byte b) -
setArg
public void setArg(int index, short s) -
setArg
public void setArg(int index, int i) -
setArg
public void setArg(int index, long l) -
setArg
public void setArg(int index, float f) -
setArg
public void setArg(int index, double d) -
setArg
-
setArg
-
setArg
-
setArg
-
setArg
Description copied from class:Kernel
Raw version to set an argument.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 kernel -
Run
Description copied from class:Kernel
Launches the kernel with the current global work size, work group size and arguments. If the returned event object is not needed and would otherwise be released immediately,Kernel.RunNoEvent(com.jme3.opencl.CommandQueue)
might bring a better performance. -
RunNoEvent
Description copied from class:Kernel
Launches the kernel with the current global work size, work group size and arguments without returning an event object. The generated event is directly released. Therefore, the performance is better, but there is no way to detect when the kernel execution has finished. For this purpose, useKernel.Run(com.jme3.opencl.CommandQueue)
.- Overrides:
RunNoEvent
in classKernel
- Parameters:
queue
- the command queue- See Also:
-
getReleaser
Description copied from interface:OpenCLObject
Returns the releaser object. Multiple calls should return the same object. The ObjectReleaser is used to release the OpenCLObject when it is garbage collected. Therefore, the returned object must not hold a reference to the OpenCLObject.- Specified by:
getReleaser
in interfaceOpenCLObject
- Overrides:
getReleaser
in classAbstractOpenCLObject
- Returns:
- the object releaser
-