public class CLKernel extends Object
CLProgram.createKernel(java.lang.String, java.lang.Object[]) and CLProgram.createKernels()| Modifier and Type | Field and Description |
|---|---|
static Object |
NULL_POINTER_KERNEL_ARGUMENT |
| Modifier and Type | Method and Description |
|---|---|
CLEvent |
enqueueNDRange(CLQueue queue,
int[] globalWorkSizes,
CLEvent... eventsToWaitFor)
Calls clEnqueueNDRangeKernel.
|
CLEvent |
enqueueNDRange(CLQueue queue,
int[] globalWorkSizes,
int[] localWorkSizes,
CLEvent... eventsToWaitFor)
Calls clEnqueueNDRangeKernel.
|
CLEvent |
enqueueNDRange(CLQueue queue,
int[] globalOffsets,
int[] globalWorkSizes,
int[] localWorkSizes,
CLEvent... eventsToWaitFor)
Deprecated.
|
CLEvent |
enqueueNDRange(CLQueue queue,
long[] globalOffsets,
long[] globalWorkSizes,
long[] localWorkSizes,
CLEvent... eventsToWaitFor)
Calls clEnqueueNDRangeKernel.
|
CLEvent |
enqueueTask(CLQueue queue,
CLEvent... eventsToWaitFor)
Calls clEnqueueTask.
|
boolean |
equals(Object obj)
Underyling implementation pointer-based equality test
|
Map<CLDevice,long[]> |
getCompileWorkGroupSize()
Returns the work-group size specified by the __attribute__((reqd_work_gr oup_size(X, Y, Z))) qualifier.
|
static <E extends TypedPointer,A extends com.nativelibs4java.opencl.CLAbstractEntity> |
getEntities(A[] objects,
Pointer<E> out) |
String |
getFunctionName()
Return the kernel function name.
|
Map<CLDevice,Long> |
getLocalMemSize()
Returns the amount of local memory in bytes being used by a kernel.
|
int |
getNumArgs()
Return the number of arguments to kernel.
|
Map<CLDevice,Long> |
getPreferredWorkGroupSizeMultiple()
Returns the preferred multiple of work- group size for launch.
|
CLProgram |
getProgram() |
Map<CLDevice,Long> |
getWorkGroupSize()
This provides a mechanism for the application to query the maximum work-group size that can be used to execute a kernel on a specific device given by device.
|
int |
hashCode()
Underyling implementation pointer-based hashCode computation
|
void |
release()
Manual release of the OpenCL resources represented by this object.
|
void |
setArg(int i,
boolean arg)
Calls clSetKernelArg.
|
void |
setArg(int i,
boolean[] arg)
Calls clSetKernelArg.
|
void |
setArg(int i,
byte arg)
Calls clSetKernelArg.
|
void |
setArg(int i,
byte[] arg)
Calls clSetKernelArg.
|
void |
setArg(int i,
char[] arg)
Calls clSetKernelArg.
|
void |
setArg(int i,
com.nativelibs4java.opencl.CLAbstractEntity arg)
Calls clSetKernelArg.
|
void |
setArg(int i,
double arg)
Calls clSetKernelArg.
|
void |
setArg(int i,
double[] arg)
Calls clSetKernelArg.
|
void |
setArg(int i,
float arg)
Calls clSetKernelArg.
|
void |
setArg(int i,
float[] arg)
Calls clSetKernelArg.
|
void |
setArg(int i,
int arg)
Calls clSetKernelArg.
|
void |
setArg(int i,
int[] arg)
Calls clSetKernelArg.
|
void |
setArg(int i,
LocalSize arg)
Calls clSetKernelArg.
|
void |
setArg(int i,
long arg)
Calls clSetKernelArg.
|
void |
setArg(int i,
long[] arg)
Calls clSetKernelArg.
|
void |
setArg(int i,
Pointer<?> ptr)
Calls clSetKernelArg.
|
void |
setArg(int i,
short arg)
Calls clSetKernelArg.
|
void |
setArg(int i,
short[] arg)
Calls clSetKernelArg.
|
void |
setArg(int i,
SizeT arg)
Calls clSetKernelArg.
|
void |
setArgs(Object... args) |
void |
setLocalArg(int argIndex,
long localArgByteLength) |
void |
setObjectArg(int iArg,
Object arg) |
String |
toString() |
public static final Object NULL_POINTER_KERNEL_ARGUMENT
public CLProgram getProgram()
public Map<CLDevice,Long> getPreferredWorkGroupSizeMultiple()
public Map<CLDevice,Long> getWorkGroupSize()
public Map<CLDevice,long[]> getCompileWorkGroupSize()
public Map<CLDevice,Long> getLocalMemSize()
public void setObjectArg(int iArg, Object arg)
public void setArg(int i, LocalSize arg)
public void setLocalArg(int argIndex, long localArgByteLength)
public void setArg(int i, Pointer<?> ptr)
public void setArg(int i, float[] arg)
public void setArg(int i, int[] arg)
public void setArg(int i, double[] arg)
public void setArg(int i, long[] arg)
public void setArg(int i, short[] arg)
public void setArg(int i, byte[] arg)
public void setArg(int i, boolean[] arg)
public void setArg(int i, char[] arg)
public void setArg(int i, SizeT arg)
public void setArg(int i, int arg)
public void setArg(int i, long arg)
public void setArg(int i, short arg)
public void setArg(int i, byte arg)
public void setArg(int i, boolean arg)
public void setArg(int i, float arg)
public void setArg(int i, double arg)
public void setArg(int i, com.nativelibs4java.opencl.CLAbstractEntity arg)
public CLEvent enqueueTask(CLQueue queue, CLEvent... eventsToWaitFor)
queue - eventsToWaitFor - Events that need to complete before this particular command can be executed. Special value CLEvent.FIRE_AND_FORGET can be used to avoid returning a CLEvent.CLEvent.FIRE_AND_FORGET.public CLEvent enqueueNDRange(CLQueue queue, int[] globalWorkSizes, int[] localWorkSizes, CLEvent... eventsToWaitFor)
enqueueNDRange(CLQueue, int[], int[], int[], CLEvent[]))globalWorkSizes - Each element describes the number of global work-items in a dimension that will execute the kernel function. The total number of global work-items is computed as globalWorkSizes[0] * ... * globalWorkSizes[globalWorkSizes.length - 1].localWorkSizes - Each element describes the number of work-items that make up a work-group (also referred to as the size of the work-group) that will execute the kernel specified by kernel. The total number of work-items in a work-group is computed as localWorkSizes[0] * ... * localWorkSizes[localWorkSizes.length - 1]. The total number of work-items in the work-group must be less than or equal to the CL_DEVICE_MAX_WORK_GROUP_SIZE value specified in table 4.3 and the number of work- items specified in localWorkSizes[0], ... localWorkSizes[localWorkSizes.length - 1] must be less than or equal to the corresponding values specified by CLDevice.getMaxWorkItemSizes()[dimensionIndex]. The explicitly specified localWorkSize will be used to determine how to break the global work-items specified by global_work_size into appropriate work-group instances. If localWorkSize is specified, the values specified in globalWorkSize[dimensionIndex] must be evenly divisible by the corresponding values specified in localWorkSize[dimensionIndex]. This parameter can be left null, in which case the OpenCL implementation will choose good values.queue - This kernel will be queued for execution on the device associated with that queue.eventsToWaitFor - Events that need to complete before this particular command can be executed. Special value CLEvent.FIRE_AND_FORGET can be used to avoid returning a CLEvent.CLEvent.FIRE_AND_FORGET.public CLEvent enqueueNDRange(CLQueue queue, int[] globalWorkSizes, CLEvent... eventsToWaitFor)
enqueueNDRange(CLQueue, int[], int[], int[], CLEvent[])globalWorkSizes - Each element describes the number of global work-items in a dimension that will execute the kernel function. The total number of global work-items is computed as globalWorkSizes[0] * ... * globalWorkSizes[globalWorkSizes.length - 1].queue - This kernel will be queued for execution on the device associated with that queue.eventsToWaitFor - Events that need to complete before this particular command can be executed. Special value CLEvent.FIRE_AND_FORGET can be used to avoid returning a CLEvent.CLEvent.FIRE_AND_FORGET.public CLEvent enqueueNDRange(CLQueue queue, long[] globalOffsets, long[] globalWorkSizes, long[] localWorkSizes, CLEvent... eventsToWaitFor)
globalOffsets - Must be null in OpenCL 1.0. Each element describes the offset used to calculate the global ID of a work-item. If globalOffsets is null, the global IDs start at offset (0, 0, ... 0).globalWorkSizes - Each element describes the number of global work-items in a dimension that will execute the kernel function. The total number of global work-items is computed as globalWorkSizes[0] * ... * globalWorkSizes[globalWorkSizes.length - 1].localWorkSizes - Each element describes the number of work-items that make up a work-group (also referred to as the size of the work-group) that will execute the kernel specified by kernel. The total number of work-items in a work-group is computed as localWorkSizes[0] * ... * localWorkSizes[localWorkSizes.length - 1]. The total number of work-items in the work-group must be less than or equal to the CL_DEVICE_MAX_WORK_GROUP_SIZE value specified in table 4.3 and the number of work- items specified in localWorkSizes[0], ... localWorkSizes[localWorkSizes.length - 1] must be less than or equal to the corresponding values specified by CLDevice.getMaxWorkItemSizes()[dimensionIndex]. The explicitly specified localWorkSize will be used to determine how to break the global work-items specified by global_work_size into appropriate work-group instances. If localWorkSize is specified, the values specified in globalWorkSize[dimensionIndex] must be evenly divisible by the corresponding values specified in localWorkSize[dimensionIndex]. This parameter can be left null, in which case the OpenCL implementation will choose good values.queue - This kernel will be queued for execution on the device associated with that queue.eventsToWaitFor - Events that need to complete before this particular command can be executed. Special value CLEvent.FIRE_AND_FORGET can be used to avoid returning a CLEvent.CLEvent.FIRE_AND_FORGET.@Deprecated public CLEvent enqueueNDRange(CLQueue queue, int[] globalOffsets, int[] globalWorkSizes, int[] localWorkSizes, CLEvent... eventsToWaitFor)
enqueueNDRange(CLQueue, long[], long[], long[], CLEvent[]) instead.public int getNumArgs()
public String getFunctionName()
public void release()
public static <E extends TypedPointer,A extends com.nativelibs4java.opencl.CLAbstractEntity> Pointer<E> getEntities(A[] objects, Pointer<E> out)
public int hashCode()
Copyright © 2009-2015. All Rights Reserved.