Class KHRILProgram
This extension adds the ability to create programs with intermediate language (IL), usually SPIR-V. Further information about the format and contents of SPIR-V may be found in the SPIR-V Specification. Information about how SPIR-V modules behave in the OpenCL environment may be found in the OpenCL SPIR-V Environment Specification.
This functionality described by this extension is a core feature in OpenCL 2.1.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intAccepted as a newparam_nameargument toGetDeviceInfo.static final intAccepted as a newparam_nameargument toGetProgramInfo. -
Method Summary
Modifier and TypeMethodDescriptionstatic longclCreateProgramWithILKHR(long context, ByteBuffer il, int @Nullable [] errcode_ret) Array version of:CreateProgramWithILKHRstatic longclCreateProgramWithILKHR(long context, ByteBuffer il, @Nullable IntBuffer errcode_ret) Creates a new program object for context using thelengthbytes of intermediate language pointed to byil.static longnclCreateProgramWithILKHR(long context, long il, long length, long errcode_ret) Unsafe version of:CreateProgramWithILKHR
-
Field Details
-
CL_DEVICE_IL_VERSION_KHR
public static final int CL_DEVICE_IL_VERSION_KHRAccepted as a newparam_nameargument toGetDeviceInfo. (char[])The intermediate languages that are be supported by
CreateProgramWithILKHRfor this device.Returns a space separated list of IL version strings of the form:
<IL_Prefix>_<Major_version>.<Minor_version>A device that supports the
cl_khr_il_programextension must support the “SPIR-V” IL prefix.- See Also:
-
CL_PROGRAM_IL_KHR
public static final int CL_PROGRAM_IL_KHRAccepted as a newparam_nameargument toGetProgramInfo. (unsigned char[])Returns the program IL for programs created with
CreateProgramWithILKHR.If program is created with
CreateProgramWithSource,CreateProgramWithBinary, orCreateProgramWithBuiltInKernels, the memory pointed to byparam_valuewill be unchanged andparam_value_size_retwill be set to zero.- See Also:
-
-
Method Details
-
nclCreateProgramWithILKHR
public static long nclCreateProgramWithILKHR(long context, long il, long length, long errcode_ret) Unsafe version of:CreateProgramWithILKHR- Parameters:
length- the length of the block of memory pointed to byil
-
clCreateProgramWithILKHR
public static long clCreateProgramWithILKHR(long context, ByteBuffer il, @Nullable IntBuffer errcode_ret) Creates a new program object for context using thelengthbytes of intermediate language pointed to byil.- Parameters:
context- must be a valid OpenCL contextil- a pointer to alength-byte block of memory containing intermediate languageerrcode_ret- will return an appropriate error code. Iferrcode_retisNULL, no error code is returned.
-
clCreateProgramWithILKHR
public static long clCreateProgramWithILKHR(long context, ByteBuffer il, int @Nullable [] errcode_ret) Array version of:CreateProgramWithILKHR
-