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.WorkSizeNested classes/interfaces inherited from interface com.jme3.opencl.OpenCLObject
OpenCLObject.ObjectReleaser -
Field Summary
Fields inherited from class com.jme3.opencl.Kernel
globalWorkSize, workGroupSizeFields inherited from class com.jme3.opencl.AbstractOpenCLObject
releaser -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintorg.lwjgl.opencl.CLKernellonggetMaxWorkGroupSize(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.voidRunNoEvent(CommandQueue queue) Launches the kernel with the current global work size, work group size and arguments without returning an event object.voidsetArg(int index, byte b) voidsetArg(int index, double d) voidsetArg(int index, float f) voidsetArg(int index, int i) voidsetArg(int index, long l) voidsetArg(int index, short s) voidvoidsetArg(int index, Quaternion q) voidvoidvoidvoidvoidsetArg(int index, Kernel.LocalMem t) voidsetArg(int index, Kernel.LocalMemPerElement t) voidsetArg(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, toStringMethods 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:
getArgCountin classKernel- Returns:
- the number of arguments
-
getMaxWorkGroupSize
Description copied from class:KernelReturns the maximal work group size when this kernel is executed on the specified device- Specified by:
getMaxWorkGroupSizein 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:KernelRaw version to set an argument.sizebytes 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:KernelLaunches 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:KernelLaunches 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:
RunNoEventin classKernel- Parameters:
queue- the command queue- See Also:
-
getReleaser
Description copied from interface:OpenCLObjectReturns 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:
getReleaserin interfaceOpenCLObject- Overrides:
getReleaserin classAbstractOpenCLObject- Returns:
- the object releaser
-