clGetHostTimer
clGetKernelSubGroupInfo
clSetDefaultDeviceCommandQueue
+
+; OpenCL 2.2 API
+clSetProgramReleaseCallback
+clSetProgramSpecializationConstant
+
}
CL_API_ENTRY cl_int CL_API_CALL
+clSetProgramSpecializationConstant(cl_program program,
+ cl_uint spec_id,
+ size_t spec_size,
+ const void* spec_value) CL_API_SUFFIX__VERSION_2_2
+{
+ KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(program, CL_INVALID_PROGRAM);
+ return program->dispatch->clSetProgramSpecializationConstant(
+ program,
+ spec_id,
+ spec_size,
+ spec_value);
+}
+
+CL_API_ENTRY cl_int CL_API_CALL
+clSetProgramReleaseCallback(cl_program program,
+ void (CL_CALLBACK * pfn_notify)(cl_program program, void * user_data),
+ void * user_data) CL_API_SUFFIX__VERSION_2_2
+{
+ KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(program, CL_INVALID_PROGRAM);
+ return program->dispatch->clSetProgramReleaseCallback(
+ program,
+ pfn_notify,
+ user_data);
+}
+
+CL_API_ENTRY cl_int CL_API_CALL
clUnloadPlatformCompiler(cl_platform_id platform) CL_API_SUFFIX__VERSION_1_2
{
// initialize the platforms (in case they have not been already)
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
#endif
+#ifndef CL_USE_DEPRECATED_OPENCL_2_0_APIS
+#define CL_USE_DEPRECATED_OPENCL_2_0_APIS
+#endif
+
// cl.h
#include <CL/cl.h>
void * user_data,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
+typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clSetProgramSpecializationConstant)(
+ cl_program program,
+ cl_uint spec_id,
+ size_t spec_size,
+ const void* spec_value) CL_API_SUFFIX__VERSION_2_2;
+
+typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clSetProgramReleaseCallback)(
+ cl_program program,
+ void (CL_CALLBACK * pfn_notify)(cl_program program, void * user_data),
+ void * user_data) CL_API_SUFFIX__VERSION_2_2;
+
typedef CL_API_ENTRY cl_int (CL_API_CALL *KHRpfn_clUnloadPlatformCompiler)(
cl_platform_id platform) CL_API_SUFFIX__VERSION_1_2;
KHRpfn_clGetHostTimer clGetHostTimer;
KHRpfn_clGetKernelSubGroupInfo clGetKernelSubGroupInfo;
KHRpfn_clSetDefaultDeviceCommandQueue clSetDefaultDeviceCommandQueue;
+
+ /* OpenCL 2.2 */
+ KHRpfn_clSetProgramReleaseCallback clSetProgramReleaseCallback;
+ KHRpfn_clSetProgramSpecializationConstant clSetProgramSpecializationConstant;
};
/*
clSetDefaultDeviceCommandQueue;
} OPENCL_2.0;
+OPENCL_2.2 {
+ global:
+ clSetProgramReleaseCallback;
+ clSetProgramSpecializationConstant;
+} OPENCL_2.1;