|
JOCL v2.6.0-rc-20250722
JOCL, OpenCL® API Binding for Java (public API).
|
High level abstraction for an OpenCL Kernel. More...
Public Member Functions | |
| CLKernel | putArg (final CLMemory<?> value) |
| CLKernel | putArg (final short value) |
| CLKernel | putArg (final int value) |
| CLKernel | putArg (final long value) |
| CLKernel | putArg (final float value) |
| CLKernel | putArg (final double value) |
| CLKernel | putNullArg (final int size) |
| CLKernel | putArgs (final CLMemory<?>... values) |
| CLKernel | rewind () |
| Resets the argument index to 0. More... | |
| int | position () |
| Returns the argument index used in the relative putArt(...) methods. More... | |
| CLKernel | setArg (final int argumentIndex, final CLMemory<?> value) |
| CLKernel | setArg (final int argumentIndex, final short value) |
| CLKernel | setArg (final int argumentIndex, final int value) |
| CLKernel | setArg (final int argumentIndex, final long value) |
| CLKernel | setArg (final int argumentIndex, final float value) |
| CLKernel | setArg (final int argumentIndex, final double value) |
| CLKernel | setNullArg (final int argumentIndex, final int size) |
| CLKernel | setArgs (final CLMemory<?>... values) |
| CLKernel | setArgs (final Object... values) |
| CLKernel | setForce32BitArgs (final boolean force) |
| Forces double and long arguments to be passed as float and int to the OpenCL kernel. More... | |
| CLProgram | getProgram () |
| boolean | isForce32BitArgsEnabled () |
| long | getLocalMemorySize (final CLDevice device) |
| Returns the amount of local memory in bytes being used by a kernel. More... | |
| long | getWorkGroupSize (final CLDevice device) |
| Returns the work group size for this kernel on the given device. More... | |
| long[] | getCompileWorkGroupSize (final CLDevice device) |
Returns the work-group size specified by the attribute((reqd_work_group_size(X, Y, Z))) qualifier in kernel sources. More... | |
| long | getPreferredWorkGroupSizeMultiple (final CLDevice device) |
| Returns the preferred multiple of workgroup size to use for kernel launch. More... | |
| long | getPrivateMemSize (final CLDevice device) |
| Returns the number of bytes of private memory used by each work item in the kernel. More... | |
| void | release () |
| Releases all resources of this kernel from its context. More... | |
| String | toString () |
| boolean | equals (final Object obj) |
| int | hashCode () |
| CLKernel | clone () |
| Returns a new instance of this kernel with uninitialized arguments. More... | |
Public Attributes | |
| final String | name |
| final int | numArgs |
High level abstraction for an OpenCL Kernel.
A kernel is a function declared in a program. A kernel is identified by the kernel qualifier applied to any function in a program. A kernel object encapsulates the specific kernel function declared in a program and the argument values to be used when executing this kernel function. CLKernel is not threadsafe.
Definition at line 53 of file CLKernel.java.
| CLKernel com.jogamp.opencl.CLKernel.clone | ( | ) |
Returns a new instance of this kernel with uninitialized arguments.
Definition at line 431 of file CLKernel.java.
| boolean com.jogamp.opencl.CLKernel.equals | ( | final Object | obj | ) |
| long[] com.jogamp.opencl.CLKernel.getCompileWorkGroupSize | ( | final CLDevice | device | ) |
Returns the work-group size specified by the attribute((reqd_work_group_size(X, Y, Z))) qualifier in kernel sources.
If the work-group size is not specified using the above attribute qualifier new long[]{(0, 0, 0)} is returned. The returned array has always three elements.
Definition at line 342 of file CLKernel.java.
| long com.jogamp.opencl.CLKernel.getLocalMemorySize | ( | final CLDevice | device | ) |
Returns the amount of local memory in bytes being used by a kernel.
This includes local memory that may be needed by an implementation to execute the kernel, variables declared inside the kernel with the __local address qualifier and local memory to be allocated for arguments to the kernel declared as pointers with the __local address qualifier and whose size is specified with clSetKernelArg. If the local memory size, for any pointer argument to the kernel declared with the __local address qualifier, is not specified, its size is assumed to be 0.
Definition at line 320 of file CLKernel.java.
| long com.jogamp.opencl.CLKernel.getPreferredWorkGroupSizeMultiple | ( | final CLDevice | device | ) |
Returns the preferred multiple of workgroup size to use for kernel launch.
This is only a performance hint; enqueueing with other sizes will still work, unless the size is more than the maximum allowed.
Definition at line 360 of file CLKernel.java.
| long com.jogamp.opencl.CLKernel.getPrivateMemSize | ( | final CLDevice | device | ) |
Returns the number of bytes of private memory used by each work item in the kernel.
This includes private memory declared with the __private qualifier, as well as other private memory used by the implementation.
Definition at line 370 of file CLKernel.java.
| CLProgram com.jogamp.opencl.CLKernel.getProgram | ( | ) |
Definition at line 279 of file CLKernel.java.
| long com.jogamp.opencl.CLKernel.getWorkGroupSize | ( | final CLDevice | device | ) |
Returns the work group size for this kernel on the given device.
This provides a mechanism for the application to query the work-group size that can be used to execute a kernel on a specific device given by device. The OpenCL implementation uses the resource requirements of the kernel (register usage etc.) to determine what this work-group size should be.
Definition at line 332 of file CLKernel.java.
| int com.jogamp.opencl.CLKernel.hashCode | ( | ) |
| boolean com.jogamp.opencl.CLKernel.isForce32BitArgsEnabled | ( | ) |
Definition at line 286 of file CLKernel.java.
| int com.jogamp.opencl.CLKernel.position | ( | ) |
Returns the argument index used in the relative putArt(...) methods.
Definition at line 166 of file CLKernel.java.
Definition at line 107 of file CLKernel.java.
| CLKernel com.jogamp.opencl.CLKernel.putArg | ( | final double | value | ) |
| CLKernel com.jogamp.opencl.CLKernel.putArg | ( | final float | value | ) |
| CLKernel com.jogamp.opencl.CLKernel.putArg | ( | final int | value | ) |
| CLKernel com.jogamp.opencl.CLKernel.putArg | ( | final long | value | ) |
| CLKernel com.jogamp.opencl.CLKernel.putArg | ( | final short | value | ) |
Definition at line 149 of file CLKernel.java.
| CLKernel com.jogamp.opencl.CLKernel.putNullArg | ( | final int | size | ) |
| void com.jogamp.opencl.CLKernel.release | ( | ) |
Releases all resources of this kernel from its context.
Implements com.jogamp.opencl.CLResource.
Definition at line 386 of file CLKernel.java.
| CLKernel com.jogamp.opencl.CLKernel.rewind | ( | ) |
Resets the argument index to 0.
Definition at line 158 of file CLKernel.java.
| CLKernel com.jogamp.opencl.CLKernel.setArg | ( | final int | argumentIndex, |
| final double | value | ||
| ) |
Definition at line 204 of file CLKernel.java.
| CLKernel com.jogamp.opencl.CLKernel.setArg | ( | final int | argumentIndex, |
| final float | value | ||
| ) |
Definition at line 199 of file CLKernel.java.
| CLKernel com.jogamp.opencl.CLKernel.setArg | ( | final int | argumentIndex, |
| final int | value | ||
| ) |
Definition at line 185 of file CLKernel.java.
| CLKernel com.jogamp.opencl.CLKernel.setArg | ( | final int | argumentIndex, |
| final long | value | ||
| ) |
Definition at line 190 of file CLKernel.java.
| CLKernel com.jogamp.opencl.CLKernel.setArg | ( | final int | argumentIndex, |
| final short | value | ||
| ) |
Definition at line 180 of file CLKernel.java.
Definition at line 218 of file CLKernel.java.
| CLKernel com.jogamp.opencl.CLKernel.setArgs | ( | final Object... | values | ) |
| CLKernel com.jogamp.opencl.CLKernel.setForce32BitArgs | ( | final boolean | force | ) |
Forces double and long arguments to be passed as float and int to the OpenCL kernel.
This can be used in applications which want to mix kernels with different floating point precision.
Definition at line 274 of file CLKernel.java.
| CLKernel com.jogamp.opencl.CLKernel.setNullArg | ( | final int | argumentIndex, |
| final int | size | ||
| ) |
| String com.jogamp.opencl.CLKernel.toString | ( | ) |
Reimplemented from com.jogamp.opencl.CLObject.
Definition at line 396 of file CLKernel.java.
| final String com.jogamp.opencl.CLKernel.name |
Definition at line 55 of file CLKernel.java.
| final int com.jogamp.opencl.CLKernel.numArgs |
Definition at line 56 of file CLKernel.java.