java.lang.Object
api.Native
au.notzed.zcl.CLObject
au.notzed.zcl.CLKernel
public class CLKernel extends CLObject
Interface for cl_kernel.
Note although this has api versioning it does not extend CLExtendable for efficiency reasons. There is therefore no run-time checking of api.
-
Field Summary
Fields Modifier and Type Field Description static int
CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM
static int
CL_KERNEL_EXEC_INFO_SVM_PTRS
-
Method Summary
Modifier and Type Method Description CLKernel
cloneKernel()
Calls clCloneKernel.int
getArgAccessQualifier(int index)
gets CL_KERNEL_ARG_ACCESS_QUALIFIER.int
getArgAddressQualifier(int index)
gets CL_KERNEL_ARG_ADDRESS_QUALIFIER.java.lang.String
getArgName(int index)
gets CL_KERNEL_ARG_NAME.java.lang.String
getArgTypeName(int index)
gets CL_KERNEL_ARG_TYPE_NAME.long
getArgTypeQualifier(int index)
gets CL_KERNEL_ARG_TYPE_QUALIFIER.java.lang.String
getAttributes()
long[]
getCompileWorkGroupSize(CLDevice device)
CLContext
getContext()
java.lang.String
getFunctionName()
long[]
getGlobalWorkSize(CLDevice device)
gets CL_KERNEL_GLOBAL_WORK_SIZElong
getLocalMemSize(CLDevice device)
long[]
getLocalSizeForSubGroupCount(CLDevice device, long count)
long
getMaxNumSubGroups(CLDevice device)
long
getMaxSubGroupSizeForNDRange(CLDevice device, long[] range)
int
getNumArgs()
long
getPreferredWorkGroupSizeMultiple(CLDevice device)
long
getPrivateMemSize(CLDevice device)
CLProgram
getProgram()
long
getSubGroupCountForNDRange(CLDevice device, long[] range)
long
getWorkGroupSize(CLDevice device)
void
setArg(int index, byte val)
Set a byte-valued argument.void
setArg(int index, byte... val)
Set a multi-element byte argument.void
setArg(int index, double val)
Set a double-valued argument.void
setArg(int index, double... val)
Set a multi-element double argument.void
setArg(int index, float val)
Set a float-valued argument.void
setArg(int index, float... val)
Set a multi-element float argument.void
setArg(int index, int val)
Set an integer-valued argument.void
setArg(int index, int... val)
Set a multi-element integer argument.void
setArg(int index, long val)
Set a long-valued argument.void
setArg(int index, long... val)
Set a multi-element long argument.void
setArg(int index, short val)
Set a short-valued argument.void
setArg(int index, short... val)
Set a multi-element short argument.void
setArg(int index, CLObject o)
Set an argument to an OpenCL object.void
setArg(int index, java.nio.ByteBuffer svm)
Set SVM argument.void
setArgLDS(int index, long size)
Set the size of a parameter that is of a local scope.void
setArgs(int index0, java.lang.Object... values)
Sets a number of arguments.Methods inherited from class au.notzed.zcl.CLObject
getInfo, getInfo, getInfo, getInfoAny, getInfoAny, getInfoAny, getInfoAny, getInfoAnyV, getInfoByteV, getInfoByteV, getInfoInt, getInfoInt, getInfoInt, getInfoInt, getInfoJava, getInfoLong, getInfoLong, getInfoLong, getInfoLong, getInfoLongV, getInfoLongV, getInfoPropertyV, getInfoSizeT, getInfoSizeT, getInfoSizeT, getInfoSizeTA, getInfoString, getInfoString, getInfoString, getInfoString, release, release
Methods inherited from class api.Native
addr, addr, addr, debugDumpReachable, debugFlushAll, downcallHandle, downcallHandle, dumpSignature, freeUpcallStub, getAddr, getAddr, getByte, getByte, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getShort, loadLibraries, parseStruct, parseUnion, release, release, release, resolve, setAddr, setAddr, setByte, setByte, setDouble, setDouble, setFloat, setFloat, setInt, setInt, setLong, setLong, setShort, setShort, toAddrV, toAddrV, toAddrV, toByteV, toByteV, toLongV, toLongV, toObjectV, toObjectV, toString, upcallStub
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
CL_KERNEL_EXEC_INFO_SVM_PTRS
public static final int CL_KERNEL_EXEC_INFO_SVM_PTRS- Since:
- OpenCL 2.1
- See Also:
- Constant Field Values
-
CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM
public static final int CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM- Since:
- OpenCL 2.1
- See Also:
- Constant Field Values
-
-
Method Details
-
cloneKernel
Calls clCloneKernel.- Returns:
- Throws:
CLRuntimeException
- Since:
- OpenCL 2.1
-
setArgLDS
public void setArgLDS(int index, long size)Set the size of a parameter that is of a local scope.- Parameters:
index
-size
- The size to reserve in bytes.
-
setArg
Set an argument to an OpenCL object.- Parameters:
index
-o
-
-
setArg
public void setArg(int index, byte val)Set a byte-valued argument. Equates to OpenCL types char, unsigned char, and uchar (and perhaps bool?).- Parameters:
index
-val
-
-
setArg
public void setArg(int index, short val)Set a short-valued argument. Equates to OpenCL types short, unsigned short, and ushort.- Parameters:
index
-val
-
-
setArg
public void setArg(int index, int val)Set an integer-valued argument. Equates to OpenCL types int, unsigned int, and uint.- Parameters:
index
-val
-
-
setArg
public void setArg(int index, long val)Set a long-valued argument. Equates (somewhat conveniently) to the OpenCL types long, unsigned long, and ulong.- Parameters:
index
-val
-
-
setArg
public void setArg(int index, float val)Set a float-valued argument.- Parameters:
index
-val
-
-
setArg
public void setArg(int index, double val)Set a double-valued argument.- Parameters:
index
-val
-
-
setArg
public void setArg(int index, java.nio.ByteBuffer svm)Set SVM argument.- Parameters:
index
-svm
- MUST have been allocated using CLContext.SVMAlloc().
-
setArg
public void setArg(int index, byte... val)Set a multi-element byte argument. This may be used to setArg vector types.- Parameters:
index
-val
-
-
setArg
public void setArg(int index, short... val)Set a multi-element short argument. This may be used to setArg vector types.- Parameters:
index
-val
-
-
setArg
public void setArg(int index, int... val)Set a multi-element integer argument. This may be used to setArg vector types.- Parameters:
index
-val
-
-
setArg
public void setArg(int index, long... val)Set a multi-element long argument. This may be used to setArg vector types.- Parameters:
index
-val
-
-
setArg
public void setArg(int index, float... val)Set a multi-element float argument. This may be used to setArg vector types.- Parameters:
index
-val
-
-
setArg
public void setArg(int index, double... val)Set a multi-element double argument. This may be used to setArg vector types.- Parameters:
index
-val
-
-
setArgs
public void setArgs(int index0, java.lang.Object... values)Sets a number of arguments.This isn't terribly efficient.
- Parameters:
index0
- Starting index.values
-
-
getFunctionName
public java.lang.String getFunctionName() -
getNumArgs
public int getNumArgs() -
getContext
-
getProgram
-
getAttributes
public java.lang.String getAttributes() -
getGlobalWorkSize
gets CL_KERNEL_GLOBAL_WORK_SIZE- Parameters:
device
- device to use, may be null- Returns:
-
getWorkGroupSize
-
getCompileWorkGroupSize
-
getLocalMemSize
-
getPreferredWorkGroupSizeMultiple
-
getPrivateMemSize
-
getMaxSubGroupSizeForNDRange
- Since:
- OpenCL 2.1
-
getSubGroupCountForNDRange
- Since:
- OpenCL 2.1
-
getLocalSizeForSubGroupCount
- Since:
- OpenCL 2.1
-
getMaxNumSubGroups
-
getArgAddressQualifier
public int getArgAddressQualifier(int index) throws java.lang.UnsupportedOperationExceptiongets CL_KERNEL_ARG_ADDRESS_QUALIFIER.- Parameters:
index
-- Returns:
- Throws:
java.lang.UnsupportedOperationException
- Since:
- OpenCL 1.2
-
getArgAccessQualifier
public int getArgAccessQualifier(int index) throws java.lang.UnsupportedOperationExceptiongets CL_KERNEL_ARG_ACCESS_QUALIFIER.- Parameters:
index
-- Returns:
- Throws:
java.lang.UnsupportedOperationException
- Since:
- OpenCL 1.2
-
getArgTypeName
public java.lang.String getArgTypeName(int index) throws java.lang.UnsupportedOperationExceptiongets CL_KERNEL_ARG_TYPE_NAME.- Parameters:
index
-- Returns:
- Throws:
java.lang.UnsupportedOperationException
- Since:
- OpenCL 1.2
-
getArgTypeQualifier
public long getArgTypeQualifier(int index) throws java.lang.UnsupportedOperationExceptiongets CL_KERNEL_ARG_TYPE_QUALIFIER.- Parameters:
index
-- Returns:
- Throws:
java.lang.UnsupportedOperationException
- Since:
- OpenCL 1.2
-
getArgName
public java.lang.String getArgName(int index) throws java.lang.UnsupportedOperationExceptiongets CL_KERNEL_ARG_NAME.- Parameters:
index
-- Returns:
- Throws:
java.lang.UnsupportedOperationException
- Since:
- OpenCL 1.2
-