|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jogamp.opencl.CLObject
com.jogamp.opencl.CLKernel
public class CLKernel
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.
CLProgram.createCLKernel(java.lang.String)
,
CLProgram.createCLKernels()
Field Summary | |
---|---|
String |
name
|
int |
numArgs
|
Fields inherited from class com.jogamp.opencl.CLObject |
---|
context, ID |
Method Summary | |
---|---|
CLKernel |
clone()
Returns a new instance of this kernel with uninitialized arguments. |
void |
close()
Deprecated. This method is not intended to be called from client code. |
boolean |
equals(Object obj)
|
long[] |
getCompileWorkGroupSize(CLDevice device)
Returns the work-group size specified by the __attribute__((reqd_work_group_size(X, Y, Z))) qualifier in kernel sources. |
long |
getLocalMemorySize(CLDevice device)
Returns the amount of local memory in bytes being used by a kernel. |
CLProgram |
getProgram()
|
long |
getWorkGroupSize(CLDevice device)
Returns the work group size for this kernel on the given device. |
int |
hashCode()
|
boolean |
isForce32BitArgsEnabled()
|
boolean |
isReleased()
Returns true if CLResource.release() has been called. |
int |
position()
Returns the argument index used in the relative putArt(...) methods. |
CLKernel |
putArg(CLMemory<?> value)
|
CLKernel |
putArg(double value)
|
CLKernel |
putArg(float value)
|
CLKernel |
putArg(int value)
|
CLKernel |
putArg(long value)
|
CLKernel |
putArg(short value)
|
CLKernel |
putArgs(CLMemory<?>... values)
|
CLKernel |
putNullArg(int size)
|
void |
release()
Releases all resources of this kernel from its context. |
CLKernel |
rewind()
Resets the argument index to 0. |
CLKernel |
setArg(int argumentIndex,
CLMemory<?> value)
|
CLKernel |
setArg(int argumentIndex,
double value)
|
CLKernel |
setArg(int argumentIndex,
float value)
|
CLKernel |
setArg(int argumentIndex,
int value)
|
CLKernel |
setArg(int argumentIndex,
long value)
|
CLKernel |
setArg(int argumentIndex,
short value)
|
CLKernel |
setArgs(CLMemory<?>... values)
|
CLKernel |
setArgs(Object... values)
|
CLKernel |
setForce32BitArgs(boolean force)
Forces double and long arguments to be passed as float and int to the OpenCL kernel. |
CLKernel |
setNullArg(int argumentIndex,
int size)
|
String |
toString()
|
Methods inherited from class com.jogamp.opencl.CLObject |
---|
getContext, getID, getPlatform |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final String name
public final int numArgs
Method Detail |
---|
public CLKernel putArg(CLMemory<?> value)
public CLKernel putArg(short value)
public CLKernel putArg(int value)
public CLKernel putArg(long value)
public CLKernel putArg(float value)
public CLKernel putArg(double value)
public CLKernel putNullArg(int size)
public CLKernel putArgs(CLMemory<?>... values)
public CLKernel rewind()
public int position()
public CLKernel setArg(int argumentIndex, CLMemory<?> value)
public CLKernel setArg(int argumentIndex, short value)
public CLKernel setArg(int argumentIndex, int value)
public CLKernel setArg(int argumentIndex, long value)
public CLKernel setArg(int argumentIndex, float value)
public CLKernel setArg(int argumentIndex, double value)
public CLKernel setNullArg(int argumentIndex, int size)
public CLKernel setArgs(CLMemory<?>... values)
public CLKernel setArgs(Object... values)
public CLKernel setForce32BitArgs(boolean force)
public CLProgram getProgram()
public boolean isForce32BitArgsEnabled()
setForce32BitArgs(boolean)
public long getLocalMemorySize(CLDevice device)
__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.
public long getWorkGroupSize(CLDevice device)
public long[] getCompileWorkGroupSize(CLDevice device)
__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.
public void release()
release
in interface CLResource
public String toString()
toString
in class CLObject
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public CLKernel clone()
clone
in class Object
@Deprecated public final void close()
AutoCloseable
.
Might be remove as soon we have extension methods, but shall validate with Java 1.5 specs.
close
in interface AutoCloseable
AutoCloseable
public boolean isReleased()
CLResource
CLResource.release()
has been called.
isReleased
in interface CLResource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |