Commit 84a62266 by Chris Forbes Committed by Commit Bot

Expand CL plumbing support to cover all versions

The OpenCL CTS assumes that libOpenCL has symbols for all versions as it usually expects to link against the Khronos loader. Since we're not using that, we have to expose all the symbols it wants, whether we intend to implement all versions or not. All the 2.x stuff will likely remain stubs forever as it is made optional again in 3.0. In the generator scripts, work around a small issue where one function takes an array-typed parameter, which confused just_the_name and produced invalid code. Bug: angleproject:5819 Change-Id: I6c3591dc9229c5276f14ff66ee3ee6362e8bf622 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2807531 Commit-Queue: Chris Forbes <chrisforbes@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarJohn Plate <jplate@google.com>
parent 68f06888
......@@ -12,7 +12,7 @@
"scripts/gl_angle_ext.xml":
"08f74b35d908b7c02b45fdf45572c434",
"scripts/registry_xml.py":
"2d623a8b4a8a49213e8d0c0a0c8c4dd8",
"4a1ac9fd24f4d3779ccaf03c11be3054",
"scripts/wgl.xml":
"c36001431919e1c435f1215a85f7e1db",
"src/libEGL/egl_loader_autogen.cpp":
......@@ -20,7 +20,7 @@
"src/libEGL/egl_loader_autogen.h":
"9cbf4d491497058a32642865eb032276",
"src/libOpenCL/cl_loader_autogen.cpp":
"7cf7c0dbc49dab7af837881ef66686be",
"e14107689ee438fb750a89ac6635a39e",
"src/tests/restricted_traces/trace_egl_loader_autogen.cpp":
"ab1ce9e72e1e248b13302349f2228a89",
"src/tests/restricted_traces/trace_egl_loader_autogen.h":
......
......@@ -10,13 +10,13 @@
"scripts/entry_point_packed_gl_enums.json":
"4f7b43863a5e61991bba4010db463679",
"scripts/generate_entry_points.py":
"142d88c6897c428055ed7f0cbcc24717",
"5b0afb91add7f1cffd526d5df07aa7e7",
"scripts/gl.xml":
"2a73a58a7e26d8676a2c0af6d528cae6",
"scripts/gl_angle_ext.xml":
"08f74b35d908b7c02b45fdf45572c434",
"scripts/registry_xml.py":
"2d623a8b4a8a49213e8d0c0a0c8c4dd8",
"4a1ac9fd24f4d3779ccaf03c11be3054",
"scripts/wgl.xml":
"c36001431919e1c435f1215a85f7e1db",
"src/common/entry_points_enum_autogen.cpp":
......@@ -166,9 +166,9 @@
"src/libGLESv2/libGLESv2_with_capture_autogen.def":
"301a20588e14724b390409c71d5ccfcd",
"src/libOpenCL/entry_points_cl_autogen.cpp":
"228858e9707c6c1c4abe2fe618dfb2ab",
"36dc767bd0a475f2ca58549516cf59b1",
"src/libOpenCL/entry_points_cl_autogen.h":
"ca2c45e4f2ae7688efac5100d5b468ad",
"ef47b0f6110f4a7ef59322c6aad763ab",
"src/libOpenCL/libOpenCL_autogen.cpp":
"5505f26e1214b5c65fd3abfb46139ef0"
"84da77a2f0a740f3a547e24fb1f40208"
}
\ No newline at end of file
......@@ -6,7 +6,7 @@
"scripts/gl_angle_ext.xml":
"08f74b35d908b7c02b45fdf45572c434",
"scripts/registry_xml.py":
"2d623a8b4a8a49213e8d0c0a0c8c4dd8",
"4a1ac9fd24f4d3779ccaf03c11be3054",
"src/libANGLE/capture/gl_enum_utils_autogen.cpp":
"9517df43e12c9d27cdf40a0db05bc85b",
"src/libANGLE/capture/gl_enum_utils_autogen.h":
......
......@@ -12,7 +12,7 @@
"scripts/gl_angle_ext.xml":
"08f74b35d908b7c02b45fdf45572c434",
"scripts/registry_xml.py":
"2d623a8b4a8a49213e8d0c0a0c8c4dd8",
"4a1ac9fd24f4d3779ccaf03c11be3054",
"scripts/wgl.xml":
"c36001431919e1c435f1215a85f7e1db",
"src/libGL/proc_table_wgl_autogen.cpp":
......
......@@ -1225,6 +1225,9 @@ def just_the_name(param):
def get_name(param_string):
return param_string[type_name_sep_index(param_string) + 1:].strip()
if param.find("[]") != -1:
param = param.replace("[]", "")
left_paren = param.find("(")
if left_paren == -1:
return get_name(param)
......
......@@ -222,7 +222,7 @@ DESKTOP_GL_VERSIONS = [(1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (2, 0), (
GLES_VERSIONS = [(2, 0), (3, 0), (3, 1), (3, 2), (1, 0)]
EGL_VERSIONS = [(1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (1, 5)]
WGL_VERSIONS = [(1, 0)]
CL_VERSIONS = [(1, 0)]
CL_VERSIONS = [(1, 0), (1, 1), (1, 2), (2, 0), (2, 1), (2, 2), (3, 0)]
# API types
......
......@@ -31,7 +31,13 @@ angle_source_set("cl_includes") {
angle_shared_library("OpenCL") {
defines = [
"CL_TARGET_OPENCL_VERSION=100",
"CL_TARGET_OPENCL_VERSION=300",
"CL_USE_DEPRECATED_OPENCL_2_2_APIS",
"CL_USE_DEPRECATED_OPENCL_2_1_APIS",
"CL_USE_DEPRECATED_OPENCL_2_0_APIS",
"CL_USE_DEPRECATED_OPENCL_1_2_APIS",
"CL_USE_DEPRECATED_OPENCL_1_1_APIS",
"CL_USE_DEPRECATED_OPENCL_1_0_APIS",
"LIBCL_IMPLEMENTATION",
]
sources = [
......
......@@ -19,71 +19,119 @@ namespace angle
{
void LoadCL(LoadProc loadProc)
{
cl_loader.clGetPlatformIDs = CL_GetPlatformIDs;
cl_loader.clGetPlatformInfo = CL_GetPlatformInfo;
cl_loader.clGetDeviceIDs = CL_GetDeviceIDs;
cl_loader.clGetDeviceInfo = CL_GetDeviceInfo;
cl_loader.clCreateContext = CL_CreateContext;
cl_loader.clCreateContextFromType = CL_CreateContextFromType;
cl_loader.clRetainContext = CL_RetainContext;
cl_loader.clReleaseContext = CL_ReleaseContext;
cl_loader.clGetContextInfo = CL_GetContextInfo;
cl_loader.clRetainCommandQueue = CL_RetainCommandQueue;
cl_loader.clReleaseCommandQueue = CL_ReleaseCommandQueue;
cl_loader.clGetCommandQueueInfo = CL_GetCommandQueueInfo;
cl_loader.clCreateBuffer = CL_CreateBuffer;
cl_loader.clRetainMemObject = CL_RetainMemObject;
cl_loader.clReleaseMemObject = CL_ReleaseMemObject;
cl_loader.clGetSupportedImageFormats = CL_GetSupportedImageFormats;
cl_loader.clGetMemObjectInfo = CL_GetMemObjectInfo;
cl_loader.clGetImageInfo = CL_GetImageInfo;
cl_loader.clRetainSampler = CL_RetainSampler;
cl_loader.clReleaseSampler = CL_ReleaseSampler;
cl_loader.clGetSamplerInfo = CL_GetSamplerInfo;
cl_loader.clCreateProgramWithSource = CL_CreateProgramWithSource;
cl_loader.clCreateProgramWithBinary = CL_CreateProgramWithBinary;
cl_loader.clRetainProgram = CL_RetainProgram;
cl_loader.clReleaseProgram = CL_ReleaseProgram;
cl_loader.clBuildProgram = CL_BuildProgram;
cl_loader.clGetProgramInfo = CL_GetProgramInfo;
cl_loader.clGetProgramBuildInfo = CL_GetProgramBuildInfo;
cl_loader.clCreateKernel = CL_CreateKernel;
cl_loader.clCreateKernelsInProgram = CL_CreateKernelsInProgram;
cl_loader.clRetainKernel = CL_RetainKernel;
cl_loader.clReleaseKernel = CL_ReleaseKernel;
cl_loader.clSetKernelArg = CL_SetKernelArg;
cl_loader.clGetKernelInfo = CL_GetKernelInfo;
cl_loader.clGetKernelWorkGroupInfo = CL_GetKernelWorkGroupInfo;
cl_loader.clWaitForEvents = CL_WaitForEvents;
cl_loader.clGetEventInfo = CL_GetEventInfo;
cl_loader.clRetainEvent = CL_RetainEvent;
cl_loader.clReleaseEvent = CL_ReleaseEvent;
cl_loader.clGetEventProfilingInfo = CL_GetEventProfilingInfo;
cl_loader.clFlush = CL_Flush;
cl_loader.clFinish = CL_Finish;
cl_loader.clEnqueueReadBuffer = CL_EnqueueReadBuffer;
cl_loader.clEnqueueWriteBuffer = CL_EnqueueWriteBuffer;
cl_loader.clEnqueueCopyBuffer = CL_EnqueueCopyBuffer;
cl_loader.clEnqueueReadImage = CL_EnqueueReadImage;
cl_loader.clEnqueueWriteImage = CL_EnqueueWriteImage;
cl_loader.clEnqueueCopyImage = CL_EnqueueCopyImage;
cl_loader.clEnqueueCopyImageToBuffer = CL_EnqueueCopyImageToBuffer;
cl_loader.clEnqueueCopyBufferToImage = CL_EnqueueCopyBufferToImage;
cl_loader.clEnqueueMapBuffer = CL_EnqueueMapBuffer;
cl_loader.clEnqueueMapImage = CL_EnqueueMapImage;
cl_loader.clEnqueueUnmapMemObject = CL_EnqueueUnmapMemObject;
cl_loader.clEnqueueNDRangeKernel = CL_EnqueueNDRangeKernel;
cl_loader.clEnqueueNativeKernel = CL_EnqueueNativeKernel;
cl_loader.clSetCommandQueueProperty = CL_SetCommandQueueProperty;
cl_loader.clCreateImage2D = CL_CreateImage2D;
cl_loader.clCreateImage3D = CL_CreateImage3D;
cl_loader.clEnqueueMarker = CL_EnqueueMarker;
cl_loader.clEnqueueWaitForEvents = CL_EnqueueWaitForEvents;
cl_loader.clEnqueueBarrier = CL_EnqueueBarrier;
cl_loader.clUnloadCompiler = CL_UnloadCompiler;
cl_loader.clGetExtensionFunctionAddress = CL_GetExtensionFunctionAddress;
cl_loader.clCreateCommandQueue = CL_CreateCommandQueue;
cl_loader.clCreateSampler = CL_CreateSampler;
cl_loader.clEnqueueTask = CL_EnqueueTask;
cl_loader.clGetPlatformIDs = CL_GetPlatformIDs;
cl_loader.clGetPlatformInfo = CL_GetPlatformInfo;
cl_loader.clGetDeviceIDs = CL_GetDeviceIDs;
cl_loader.clGetDeviceInfo = CL_GetDeviceInfo;
cl_loader.clCreateContext = CL_CreateContext;
cl_loader.clCreateContextFromType = CL_CreateContextFromType;
cl_loader.clRetainContext = CL_RetainContext;
cl_loader.clReleaseContext = CL_ReleaseContext;
cl_loader.clGetContextInfo = CL_GetContextInfo;
cl_loader.clRetainCommandQueue = CL_RetainCommandQueue;
cl_loader.clReleaseCommandQueue = CL_ReleaseCommandQueue;
cl_loader.clGetCommandQueueInfo = CL_GetCommandQueueInfo;
cl_loader.clCreateBuffer = CL_CreateBuffer;
cl_loader.clRetainMemObject = CL_RetainMemObject;
cl_loader.clReleaseMemObject = CL_ReleaseMemObject;
cl_loader.clGetSupportedImageFormats = CL_GetSupportedImageFormats;
cl_loader.clGetMemObjectInfo = CL_GetMemObjectInfo;
cl_loader.clGetImageInfo = CL_GetImageInfo;
cl_loader.clRetainSampler = CL_RetainSampler;
cl_loader.clReleaseSampler = CL_ReleaseSampler;
cl_loader.clGetSamplerInfo = CL_GetSamplerInfo;
cl_loader.clCreateProgramWithSource = CL_CreateProgramWithSource;
cl_loader.clCreateProgramWithBinary = CL_CreateProgramWithBinary;
cl_loader.clRetainProgram = CL_RetainProgram;
cl_loader.clReleaseProgram = CL_ReleaseProgram;
cl_loader.clBuildProgram = CL_BuildProgram;
cl_loader.clGetProgramInfo = CL_GetProgramInfo;
cl_loader.clGetProgramBuildInfo = CL_GetProgramBuildInfo;
cl_loader.clCreateKernel = CL_CreateKernel;
cl_loader.clCreateKernelsInProgram = CL_CreateKernelsInProgram;
cl_loader.clRetainKernel = CL_RetainKernel;
cl_loader.clReleaseKernel = CL_ReleaseKernel;
cl_loader.clSetKernelArg = CL_SetKernelArg;
cl_loader.clGetKernelInfo = CL_GetKernelInfo;
cl_loader.clGetKernelWorkGroupInfo = CL_GetKernelWorkGroupInfo;
cl_loader.clWaitForEvents = CL_WaitForEvents;
cl_loader.clGetEventInfo = CL_GetEventInfo;
cl_loader.clRetainEvent = CL_RetainEvent;
cl_loader.clReleaseEvent = CL_ReleaseEvent;
cl_loader.clGetEventProfilingInfo = CL_GetEventProfilingInfo;
cl_loader.clFlush = CL_Flush;
cl_loader.clFinish = CL_Finish;
cl_loader.clEnqueueReadBuffer = CL_EnqueueReadBuffer;
cl_loader.clEnqueueWriteBuffer = CL_EnqueueWriteBuffer;
cl_loader.clEnqueueCopyBuffer = CL_EnqueueCopyBuffer;
cl_loader.clEnqueueReadImage = CL_EnqueueReadImage;
cl_loader.clEnqueueWriteImage = CL_EnqueueWriteImage;
cl_loader.clEnqueueCopyImage = CL_EnqueueCopyImage;
cl_loader.clEnqueueCopyImageToBuffer = CL_EnqueueCopyImageToBuffer;
cl_loader.clEnqueueCopyBufferToImage = CL_EnqueueCopyBufferToImage;
cl_loader.clEnqueueMapBuffer = CL_EnqueueMapBuffer;
cl_loader.clEnqueueMapImage = CL_EnqueueMapImage;
cl_loader.clEnqueueUnmapMemObject = CL_EnqueueUnmapMemObject;
cl_loader.clEnqueueNDRangeKernel = CL_EnqueueNDRangeKernel;
cl_loader.clEnqueueNativeKernel = CL_EnqueueNativeKernel;
cl_loader.clSetCommandQueueProperty = CL_SetCommandQueueProperty;
cl_loader.clCreateImage2D = CL_CreateImage2D;
cl_loader.clCreateImage3D = CL_CreateImage3D;
cl_loader.clEnqueueMarker = CL_EnqueueMarker;
cl_loader.clEnqueueWaitForEvents = CL_EnqueueWaitForEvents;
cl_loader.clEnqueueBarrier = CL_EnqueueBarrier;
cl_loader.clUnloadCompiler = CL_UnloadCompiler;
cl_loader.clGetExtensionFunctionAddress = CL_GetExtensionFunctionAddress;
cl_loader.clCreateCommandQueue = CL_CreateCommandQueue;
cl_loader.clCreateSampler = CL_CreateSampler;
cl_loader.clEnqueueTask = CL_EnqueueTask;
cl_loader.clCreateSubBuffer = CL_CreateSubBuffer;
cl_loader.clSetMemObjectDestructorCallback = CL_SetMemObjectDestructorCallback;
cl_loader.clCreateUserEvent = CL_CreateUserEvent;
cl_loader.clSetUserEventStatus = CL_SetUserEventStatus;
cl_loader.clSetEventCallback = CL_SetEventCallback;
cl_loader.clEnqueueReadBufferRect = CL_EnqueueReadBufferRect;
cl_loader.clEnqueueWriteBufferRect = CL_EnqueueWriteBufferRect;
cl_loader.clEnqueueCopyBufferRect = CL_EnqueueCopyBufferRect;
cl_loader.clCreateSubDevices = CL_CreateSubDevices;
cl_loader.clRetainDevice = CL_RetainDevice;
cl_loader.clReleaseDevice = CL_ReleaseDevice;
cl_loader.clCreateImage = CL_CreateImage;
cl_loader.clCreateProgramWithBuiltInKernels = CL_CreateProgramWithBuiltInKernels;
cl_loader.clCompileProgram = CL_CompileProgram;
cl_loader.clLinkProgram = CL_LinkProgram;
cl_loader.clUnloadPlatformCompiler = CL_UnloadPlatformCompiler;
cl_loader.clGetKernelArgInfo = CL_GetKernelArgInfo;
cl_loader.clEnqueueFillBuffer = CL_EnqueueFillBuffer;
cl_loader.clEnqueueFillImage = CL_EnqueueFillImage;
cl_loader.clEnqueueMigrateMemObjects = CL_EnqueueMigrateMemObjects;
cl_loader.clEnqueueMarkerWithWaitList = CL_EnqueueMarkerWithWaitList;
cl_loader.clEnqueueBarrierWithWaitList = CL_EnqueueBarrierWithWaitList;
cl_loader.clGetExtensionFunctionAddressForPlatform = CL_GetExtensionFunctionAddressForPlatform;
cl_loader.clCreateCommandQueueWithProperties = CL_CreateCommandQueueWithProperties;
cl_loader.clCreatePipe = CL_CreatePipe;
cl_loader.clGetPipeInfo = CL_GetPipeInfo;
cl_loader.clSVMAlloc = CL_SVMAlloc;
cl_loader.clSVMFree = CL_SVMFree;
cl_loader.clCreateSamplerWithProperties = CL_CreateSamplerWithProperties;
cl_loader.clSetKernelArgSVMPointer = CL_SetKernelArgSVMPointer;
cl_loader.clSetKernelExecInfo = CL_SetKernelExecInfo;
cl_loader.clEnqueueSVMFree = CL_EnqueueSVMFree;
cl_loader.clEnqueueSVMMemcpy = CL_EnqueueSVMMemcpy;
cl_loader.clEnqueueSVMMemFill = CL_EnqueueSVMMemFill;
cl_loader.clEnqueueSVMMap = CL_EnqueueSVMMap;
cl_loader.clEnqueueSVMUnmap = CL_EnqueueSVMUnmap;
cl_loader.clSetDefaultDeviceCommandQueue = CL_SetDefaultDeviceCommandQueue;
cl_loader.clGetDeviceAndHostTimer = CL_GetDeviceAndHostTimer;
cl_loader.clGetHostTimer = CL_GetHostTimer;
cl_loader.clCreateProgramWithIL = CL_CreateProgramWithIL;
cl_loader.clCloneKernel = CL_CloneKernel;
cl_loader.clGetKernelSubGroupInfo = CL_GetKernelSubGroupInfo;
cl_loader.clEnqueueSVMMigrateMem = CL_EnqueueSVMMigrateMem;
cl_loader.clSetProgramSpecializationConstant = CL_SetProgramSpecializationConstant;
cl_loader.clSetProgramReleaseCallback = CL_SetProgramReleaseCallback;
cl_loader.clSetContextDestructorCallback = CL_SetContextDestructorCallback;
cl_loader.clCreateBufferWithProperties = CL_CreateBufferWithProperties;
cl_loader.clCreateImageWithProperties = CL_CreateImageWithProperties;
}
} // namespace angle
......@@ -1102,4 +1102,863 @@ cl_int CL_API_CALL CL_EnqueueTask(cl_command_queue command_queue,
return (cl_int)0;
}
// CL 1.1
cl_mem CL_API_CALL CL_CreateSubBuffer(cl_mem buffer,
cl_mem_flags flags,
cl_buffer_create_type buffer_create_type,
const void *buffer_create_info,
cl_int *errcode_ret)
{
CL_EVENT(CreateSubBuffer,
"buffer = 0x%016" PRIxPTR
", flags = %lu, buffer_create_type = %u, buffer_create_info = 0x%016" PRIxPTR
", errcode_ret = 0x%016" PRIxPTR "",
(uintptr_t)buffer, flags, buffer_create_type, (uintptr_t)buffer_create_info,
(uintptr_t)errcode_ret);
// TODO: CreateSubBuffer
return (cl_mem)0;
}
cl_int CL_API_CALL CL_SetMemObjectDestructorCallback(cl_mem memobj,
void(CL_CALLBACK *pfn_notify)(cl_mem memobj,
void *user_data),
void *user_data)
{
CL_EVENT(SetMemObjectDestructorCallback,
"memobj = 0x%016" PRIxPTR ", pfn_notify = 0x%016" PRIxPTR
", user_data = 0x%016" PRIxPTR "",
(uintptr_t)memobj, (uintptr_t)pfn_notify, (uintptr_t)user_data);
// TODO: SetMemObjectDestructorCallback
return (cl_int)0;
}
cl_event CL_API_CALL CL_CreateUserEvent(cl_context context, cl_int *errcode_ret)
{
CL_EVENT(CreateUserEvent, "context = 0x%016" PRIxPTR ", errcode_ret = 0x%016" PRIxPTR "",
(uintptr_t)context, (uintptr_t)errcode_ret);
// TODO: CreateUserEvent
return (cl_event)0;
}
cl_int CL_API_CALL CL_SetUserEventStatus(cl_event event, cl_int execution_status)
{
CL_EVENT(SetUserEventStatus, "event = 0x%016" PRIxPTR ", execution_status = %d",
(uintptr_t)event, execution_status);
// TODO: SetUserEventStatus
return (cl_int)0;
}
cl_int CL_API_CALL CL_SetEventCallback(cl_event event,
cl_int command_exec_callback_type,
void(CL_CALLBACK *pfn_notify)(cl_event event,
cl_int event_command_status,
void *user_data),
void *user_data)
{
CL_EVENT(
SetEventCallback,
"event = 0x%016" PRIxPTR ", command_exec_callback_type = %d, pfn_notify = 0x%016" PRIxPTR
", user_data = 0x%016" PRIxPTR "",
(uintptr_t)event, command_exec_callback_type, (uintptr_t)pfn_notify, (uintptr_t)user_data);
// TODO: SetEventCallback
return (cl_int)0;
}
cl_int CL_API_CALL CL_EnqueueReadBufferRect(cl_command_queue command_queue,
cl_mem buffer,
cl_bool blocking_read,
const size_t *buffer_origin,
const size_t *host_origin,
const size_t *region,
size_t buffer_row_pitch,
size_t buffer_slice_pitch,
size_t host_row_pitch,
size_t host_slice_pitch,
void *ptr,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
{
CL_EVENT(EnqueueReadBufferRect,
"command_queue = 0x%016" PRIxPTR ", buffer = 0x%016" PRIxPTR
", blocking_read = %u, buffer_origin = 0x%016" PRIxPTR ", host_origin = 0x%016" PRIxPTR
", region = 0x%016" PRIxPTR
", buffer_row_pitch = %zu, buffer_slice_pitch = %zu, host_row_pitch = %zu, "
"host_slice_pitch = %zu, ptr = 0x%016" PRIxPTR
", num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR
", event = 0x%016" PRIxPTR "",
(uintptr_t)command_queue, (uintptr_t)buffer, blocking_read, (uintptr_t)buffer_origin,
(uintptr_t)host_origin, (uintptr_t)region, buffer_row_pitch, buffer_slice_pitch,
host_row_pitch, host_slice_pitch, (uintptr_t)ptr, num_events_in_wait_list,
(uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueReadBufferRect
return (cl_int)0;
}
cl_int CL_API_CALL CL_EnqueueWriteBufferRect(cl_command_queue command_queue,
cl_mem buffer,
cl_bool blocking_write,
const size_t *buffer_origin,
const size_t *host_origin,
const size_t *region,
size_t buffer_row_pitch,
size_t buffer_slice_pitch,
size_t host_row_pitch,
size_t host_slice_pitch,
const void *ptr,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
{
CL_EVENT(EnqueueWriteBufferRect,
"command_queue = 0x%016" PRIxPTR ", buffer = 0x%016" PRIxPTR
", blocking_write = %u, buffer_origin = 0x%016" PRIxPTR
", host_origin = 0x%016" PRIxPTR ", region = 0x%016" PRIxPTR
", buffer_row_pitch = %zu, buffer_slice_pitch = %zu, host_row_pitch = %zu, "
"host_slice_pitch = %zu, ptr = 0x%016" PRIxPTR
", num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR
", event = 0x%016" PRIxPTR "",
(uintptr_t)command_queue, (uintptr_t)buffer, blocking_write, (uintptr_t)buffer_origin,
(uintptr_t)host_origin, (uintptr_t)region, buffer_row_pitch, buffer_slice_pitch,
host_row_pitch, host_slice_pitch, (uintptr_t)ptr, num_events_in_wait_list,
(uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueWriteBufferRect
return (cl_int)0;
}
cl_int CL_API_CALL CL_EnqueueCopyBufferRect(cl_command_queue command_queue,
cl_mem src_buffer,
cl_mem dst_buffer,
const size_t *src_origin,
const size_t *dst_origin,
const size_t *region,
size_t src_row_pitch,
size_t src_slice_pitch,
size_t dst_row_pitch,
size_t dst_slice_pitch,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
{
CL_EVENT(EnqueueCopyBufferRect,
"command_queue = 0x%016" PRIxPTR ", src_buffer = 0x%016" PRIxPTR
", dst_buffer = 0x%016" PRIxPTR ", src_origin = 0x%016" PRIxPTR
", dst_origin = 0x%016" PRIxPTR ", region = 0x%016" PRIxPTR
", src_row_pitch = %zu, src_slice_pitch = %zu, dst_row_pitch = %zu, dst_slice_pitch = "
"%zu, num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR
", event = 0x%016" PRIxPTR "",
(uintptr_t)command_queue, (uintptr_t)src_buffer, (uintptr_t)dst_buffer,
(uintptr_t)src_origin, (uintptr_t)dst_origin, (uintptr_t)region, src_row_pitch,
src_slice_pitch, dst_row_pitch, dst_slice_pitch, num_events_in_wait_list,
(uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueCopyBufferRect
return (cl_int)0;
}
// CL 1.2
cl_int CL_API_CALL CL_CreateSubDevices(cl_device_id in_device,
const cl_device_partition_property *properties,
cl_uint num_devices,
cl_device_id *out_devices,
cl_uint *num_devices_ret)
{
CL_EVENT(CreateSubDevices,
"in_device = 0x%016" PRIxPTR ", properties = 0x%016" PRIxPTR
", num_devices = %u, out_devices = 0x%016" PRIxPTR ", num_devices_ret = 0x%016" PRIxPTR
"",
(uintptr_t)in_device, (uintptr_t)properties, num_devices, (uintptr_t)out_devices,
(uintptr_t)num_devices_ret);
// TODO: CreateSubDevices
return (cl_int)0;
}
cl_int CL_API_CALL CL_RetainDevice(cl_device_id device)
{
CL_EVENT(RetainDevice, "device = 0x%016" PRIxPTR "", (uintptr_t)device);
// TODO: RetainDevice
return (cl_int)0;
}
cl_int CL_API_CALL CL_ReleaseDevice(cl_device_id device)
{
CL_EVENT(ReleaseDevice, "device = 0x%016" PRIxPTR "", (uintptr_t)device);
// TODO: ReleaseDevice
return (cl_int)0;
}
cl_mem CL_API_CALL CL_CreateImage(cl_context context,
cl_mem_flags flags,
const cl_image_format *image_format,
const cl_image_desc *image_desc,
void *host_ptr,
cl_int *errcode_ret)
{
CL_EVENT(CreateImage,
"context = 0x%016" PRIxPTR ", flags = %lu, image_format = 0x%016" PRIxPTR
", image_desc = 0x%016" PRIxPTR ", host_ptr = 0x%016" PRIxPTR
", errcode_ret = 0x%016" PRIxPTR "",
(uintptr_t)context, flags, (uintptr_t)image_format, (uintptr_t)image_desc,
(uintptr_t)host_ptr, (uintptr_t)errcode_ret);
// TODO: CreateImage
return (cl_mem)0;
}
cl_program CL_API_CALL CL_CreateProgramWithBuiltInKernels(cl_context context,
cl_uint num_devices,
const cl_device_id *device_list,
const char *kernel_names,
cl_int *errcode_ret)
{
CL_EVENT(CreateProgramWithBuiltInKernels,
"context = 0x%016" PRIxPTR ", num_devices = %u, device_list = 0x%016" PRIxPTR
", kernel_names = 0x%016" PRIxPTR ", errcode_ret = 0x%016" PRIxPTR "",
(uintptr_t)context, num_devices, (uintptr_t)device_list, (uintptr_t)kernel_names,
(uintptr_t)errcode_ret);
// TODO: CreateProgramWithBuiltInKernels
return (cl_program)0;
}
cl_int CL_API_CALL CL_CompileProgram(cl_program program,
cl_uint num_devices,
const cl_device_id *device_list,
const char *options,
cl_uint num_input_headers,
const cl_program *input_headers,
const char **header_include_names,
void(CL_CALLBACK *pfn_notify)(cl_program program,
void *user_data),
void *user_data)
{
CL_EVENT(CompileProgram,
"program = 0x%016" PRIxPTR ", num_devices = %u, device_list = 0x%016" PRIxPTR
", options = 0x%016" PRIxPTR ", num_input_headers = %u, input_headers = 0x%016" PRIxPTR
", header_include_names = 0x%016" PRIxPTR ", pfn_notify = 0x%016" PRIxPTR
", user_data = 0x%016" PRIxPTR "",
(uintptr_t)program, num_devices, (uintptr_t)device_list, (uintptr_t)options,
num_input_headers, (uintptr_t)input_headers, (uintptr_t)header_include_names,
(uintptr_t)pfn_notify, (uintptr_t)user_data);
// TODO: CompileProgram
return (cl_int)0;
}
cl_program CL_API_CALL CL_LinkProgram(cl_context context,
cl_uint num_devices,
const cl_device_id *device_list,
const char *options,
cl_uint num_input_programs,
const cl_program *input_programs,
void(CL_CALLBACK *pfn_notify)(cl_program program,
void *user_data),
void *user_data,
cl_int *errcode_ret)
{
CL_EVENT(LinkProgram,
"context = 0x%016" PRIxPTR ", num_devices = %u, device_list = 0x%016" PRIxPTR
", options = 0x%016" PRIxPTR
", num_input_programs = %u, input_programs = 0x%016" PRIxPTR
", pfn_notify = 0x%016" PRIxPTR ", user_data = 0x%016" PRIxPTR
", errcode_ret = 0x%016" PRIxPTR "",
(uintptr_t)context, num_devices, (uintptr_t)device_list, (uintptr_t)options,
num_input_programs, (uintptr_t)input_programs, (uintptr_t)pfn_notify,
(uintptr_t)user_data, (uintptr_t)errcode_ret);
// TODO: LinkProgram
return (cl_program)0;
}
cl_int CL_API_CALL CL_UnloadPlatformCompiler(cl_platform_id platform)
{
CL_EVENT(UnloadPlatformCompiler, "platform = 0x%016" PRIxPTR "", (uintptr_t)platform);
// TODO: UnloadPlatformCompiler
return (cl_int)0;
}
cl_int CL_API_CALL CL_GetKernelArgInfo(cl_kernel kernel,
cl_uint arg_index,
cl_kernel_arg_info param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret)
{
CL_EVENT(
GetKernelArgInfo,
"kernel = 0x%016" PRIxPTR
", arg_index = %u, param_name = %u, param_value_size = %zu, param_value = 0x%016" PRIxPTR
", param_value_size_ret = 0x%016" PRIxPTR "",
(uintptr_t)kernel, arg_index, param_name, param_value_size, (uintptr_t)param_value,
(uintptr_t)param_value_size_ret);
// TODO: GetKernelArgInfo
return (cl_int)0;
}
cl_int CL_API_CALL CL_EnqueueFillBuffer(cl_command_queue command_queue,
cl_mem buffer,
const void *pattern,
size_t pattern_size,
size_t offset,
size_t size,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
{
CL_EVENT(EnqueueFillBuffer,
"command_queue = 0x%016" PRIxPTR ", buffer = 0x%016" PRIxPTR
", pattern = 0x%016" PRIxPTR
", pattern_size = %zu, offset = %zu, size = %zu, num_events_in_wait_list = %u, "
"event_wait_list = 0x%016" PRIxPTR ", event = 0x%016" PRIxPTR "",
(uintptr_t)command_queue, (uintptr_t)buffer, (uintptr_t)pattern, pattern_size, offset,
size, num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueFillBuffer
return (cl_int)0;
}
cl_int CL_API_CALL CL_EnqueueFillImage(cl_command_queue command_queue,
cl_mem image,
const void *fill_color,
const size_t *origin,
const size_t *region,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
{
CL_EVENT(EnqueueFillImage,
"command_queue = 0x%016" PRIxPTR ", image = 0x%016" PRIxPTR
", fill_color = 0x%016" PRIxPTR ", origin = 0x%016" PRIxPTR ", region = 0x%016" PRIxPTR
", num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR
", event = 0x%016" PRIxPTR "",
(uintptr_t)command_queue, (uintptr_t)image, (uintptr_t)fill_color, (uintptr_t)origin,
(uintptr_t)region, num_events_in_wait_list, (uintptr_t)event_wait_list,
(uintptr_t)event);
// TODO: EnqueueFillImage
return (cl_int)0;
}
cl_int CL_API_CALL CL_EnqueueMigrateMemObjects(cl_command_queue command_queue,
cl_uint num_mem_objects,
const cl_mem *mem_objects,
cl_mem_migration_flags flags,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
{
CL_EVENT(EnqueueMigrateMemObjects,
"command_queue = 0x%016" PRIxPTR ", num_mem_objects = %u, mem_objects = 0x%016" PRIxPTR
", flags = %lu, num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR
", event = 0x%016" PRIxPTR "",
(uintptr_t)command_queue, num_mem_objects, (uintptr_t)mem_objects, flags,
num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueMigrateMemObjects
return (cl_int)0;
}
cl_int CL_API_CALL CL_EnqueueMarkerWithWaitList(cl_command_queue command_queue,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
{
CL_EVENT(EnqueueMarkerWithWaitList,
"command_queue = 0x%016" PRIxPTR
", num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR
", event = 0x%016" PRIxPTR "",
(uintptr_t)command_queue, num_events_in_wait_list, (uintptr_t)event_wait_list,
(uintptr_t)event);
// TODO: EnqueueMarkerWithWaitList
return (cl_int)0;
}
cl_int CL_API_CALL CL_EnqueueBarrierWithWaitList(cl_command_queue command_queue,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
{
CL_EVENT(EnqueueBarrierWithWaitList,
"command_queue = 0x%016" PRIxPTR
", num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR
", event = 0x%016" PRIxPTR "",
(uintptr_t)command_queue, num_events_in_wait_list, (uintptr_t)event_wait_list,
(uintptr_t)event);
// TODO: EnqueueBarrierWithWaitList
return (cl_int)0;
}
void *CL_API_CALL CL_GetExtensionFunctionAddressForPlatform(cl_platform_id platform,
const char *func_name)
{
CL_EVENT(GetExtensionFunctionAddressForPlatform,
"platform = 0x%016" PRIxPTR ", func_name = 0x%016" PRIxPTR "", (uintptr_t)platform,
(uintptr_t)func_name);
// TODO: GetExtensionFunctionAddressForPlatform
return (void *)0;
}
// CL 2.0
cl_command_queue CL_API_CALL
CL_CreateCommandQueueWithProperties(cl_context context,
cl_device_id device,
const cl_queue_properties *properties,
cl_int *errcode_ret)
{
CL_EVENT(CreateCommandQueueWithProperties,
"context = 0x%016" PRIxPTR ", device = 0x%016" PRIxPTR ", properties = 0x%016" PRIxPTR
", errcode_ret = 0x%016" PRIxPTR "",
(uintptr_t)context, (uintptr_t)device, (uintptr_t)properties, (uintptr_t)errcode_ret);
// TODO: CreateCommandQueueWithProperties
return (cl_command_queue)0;
}
cl_mem CL_API_CALL CL_CreatePipe(cl_context context,
cl_mem_flags flags,
cl_uint pipe_packet_size,
cl_uint pipe_max_packets,
const cl_pipe_properties *properties,
cl_int *errcode_ret)
{
CL_EVENT(
CreatePipe,
"context = 0x%016" PRIxPTR
", flags = %lu, pipe_packet_size = %u, pipe_max_packets = %u, properties = 0x%016" PRIxPTR
", errcode_ret = 0x%016" PRIxPTR "",
(uintptr_t)context, flags, pipe_packet_size, pipe_max_packets, (uintptr_t)properties,
(uintptr_t)errcode_ret);
// TODO: CreatePipe
return (cl_mem)0;
}
cl_int CL_API_CALL CL_GetPipeInfo(cl_mem pipe,
cl_pipe_info param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret)
{
CL_EVENT(GetPipeInfo,
"pipe = 0x%016" PRIxPTR
", param_name = %u, param_value_size = %zu, param_value = 0x%016" PRIxPTR
", param_value_size_ret = 0x%016" PRIxPTR "",
(uintptr_t)pipe, param_name, param_value_size, (uintptr_t)param_value,
(uintptr_t)param_value_size_ret);
// TODO: GetPipeInfo
return (cl_int)0;
}
void *CL_API_CALL CL_SVMAlloc(cl_context context,
cl_svm_mem_flags flags,
size_t size,
cl_uint alignment)
{
CL_EVENT(SVMAlloc, "context = 0x%016" PRIxPTR ", flags = %lu, size = %zu, alignment = %u",
(uintptr_t)context, flags, size, alignment);
// TODO: SVMAlloc
return (void *)0;
}
void CL_API_CALL CL_SVMFree(cl_context context, void *svm_pointer)
{
CL_EVENT(SVMFree, "context = 0x%016" PRIxPTR ", svm_pointer = 0x%016" PRIxPTR "",
(uintptr_t)context, (uintptr_t)svm_pointer);
// TODO: SVMFree
}
cl_sampler CL_API_CALL
CL_CreateSamplerWithProperties(cl_context context,
const cl_sampler_properties *sampler_properties,
cl_int *errcode_ret)
{
CL_EVENT(CreateSamplerWithProperties,
"context = 0x%016" PRIxPTR ", sampler_properties = 0x%016" PRIxPTR
", errcode_ret = 0x%016" PRIxPTR "",
(uintptr_t)context, (uintptr_t)sampler_properties, (uintptr_t)errcode_ret);
// TODO: CreateSamplerWithProperties
return (cl_sampler)0;
}
cl_int CL_API_CALL CL_SetKernelArgSVMPointer(cl_kernel kernel,
cl_uint arg_index,
const void *arg_value)
{
CL_EVENT(SetKernelArgSVMPointer,
"kernel = 0x%016" PRIxPTR ", arg_index = %u, arg_value = 0x%016" PRIxPTR "",
(uintptr_t)kernel, arg_index, (uintptr_t)arg_value);
// TODO: SetKernelArgSVMPointer
return (cl_int)0;
}
cl_int CL_API_CALL CL_SetKernelExecInfo(cl_kernel kernel,
cl_kernel_exec_info param_name,
size_t param_value_size,
const void *param_value)
{
CL_EVENT(SetKernelExecInfo,
"kernel = 0x%016" PRIxPTR
", param_name = %u, param_value_size = %zu, param_value = 0x%016" PRIxPTR "",
(uintptr_t)kernel, param_name, param_value_size, (uintptr_t)param_value);
// TODO: SetKernelExecInfo
return (cl_int)0;
}
cl_int CL_API_CALL CL_EnqueueSVMFree(cl_command_queue command_queue,
cl_uint num_svm_pointers,
void *svm_pointers[],
void(CL_CALLBACK *pfn_free_func)(cl_command_queue queue,
cl_uint num_svm_pointers,
void *svm_pointers[],
void *user_data),
void *user_data,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
{
CL_EVENT(EnqueueSVMFree,
"command_queue = 0x%016" PRIxPTR
", num_svm_pointers = %u, svm_pointers = 0x%016" PRIxPTR
", pfn_free_func = 0x%016" PRIxPTR ", user_data = 0x%016" PRIxPTR
", num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR
", event = 0x%016" PRIxPTR "",
(uintptr_t)command_queue, num_svm_pointers, (uintptr_t)svm_pointers,
(uintptr_t)pfn_free_func, (uintptr_t)user_data, num_events_in_wait_list,
(uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueSVMFree
return (cl_int)0;
}
cl_int CL_API_CALL CL_EnqueueSVMMemcpy(cl_command_queue command_queue,
cl_bool blocking_copy,
void *dst_ptr,
const void *src_ptr,
size_t size,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
{
CL_EVENT(EnqueueSVMMemcpy,
"command_queue = 0x%016" PRIxPTR ", blocking_copy = %u, dst_ptr = 0x%016" PRIxPTR
", src_ptr = 0x%016" PRIxPTR
", size = %zu, num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR
", event = 0x%016" PRIxPTR "",
(uintptr_t)command_queue, blocking_copy, (uintptr_t)dst_ptr, (uintptr_t)src_ptr, size,
num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueSVMMemcpy
return (cl_int)0;
}
cl_int CL_API_CALL CL_EnqueueSVMMemFill(cl_command_queue command_queue,
void *svm_ptr,
const void *pattern,
size_t pattern_size,
size_t size,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
{
CL_EVENT(EnqueueSVMMemFill,
"command_queue = 0x%016" PRIxPTR ", svm_ptr = 0x%016" PRIxPTR
", pattern = 0x%016" PRIxPTR
", pattern_size = %zu, size = %zu, num_events_in_wait_list = %u, event_wait_list = "
"0x%016" PRIxPTR ", event = 0x%016" PRIxPTR "",
(uintptr_t)command_queue, (uintptr_t)svm_ptr, (uintptr_t)pattern, pattern_size, size,
num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueSVMMemFill
return (cl_int)0;
}
cl_int CL_API_CALL CL_EnqueueSVMMap(cl_command_queue command_queue,
cl_bool blocking_map,
cl_map_flags flags,
void *svm_ptr,
size_t size,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
{
CL_EVENT(EnqueueSVMMap,
"command_queue = 0x%016" PRIxPTR
", blocking_map = %u, flags = %lu, svm_ptr = 0x%016" PRIxPTR
", size = %zu, num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR
", event = 0x%016" PRIxPTR "",
(uintptr_t)command_queue, blocking_map, flags, (uintptr_t)svm_ptr, size,
num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueSVMMap
return (cl_int)0;
}
cl_int CL_API_CALL CL_EnqueueSVMUnmap(cl_command_queue command_queue,
void *svm_ptr,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
{
CL_EVENT(EnqueueSVMUnmap,
"command_queue = 0x%016" PRIxPTR ", svm_ptr = 0x%016" PRIxPTR
", num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR
", event = 0x%016" PRIxPTR "",
(uintptr_t)command_queue, (uintptr_t)svm_ptr, num_events_in_wait_list,
(uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueSVMUnmap
return (cl_int)0;
}
// CL 2.1
cl_int CL_API_CALL CL_SetDefaultDeviceCommandQueue(cl_context context,
cl_device_id device,
cl_command_queue command_queue)
{
CL_EVENT(SetDefaultDeviceCommandQueue,
"context = 0x%016" PRIxPTR ", device = 0x%016" PRIxPTR
", command_queue = 0x%016" PRIxPTR "",
(uintptr_t)context, (uintptr_t)device, (uintptr_t)command_queue);
// TODO: SetDefaultDeviceCommandQueue
return (cl_int)0;
}
cl_int CL_API_CALL CL_GetDeviceAndHostTimer(cl_device_id device,
cl_ulong *device_timestamp,
cl_ulong *host_timestamp)
{
CL_EVENT(GetDeviceAndHostTimer,
"device = 0x%016" PRIxPTR ", device_timestamp = 0x%016" PRIxPTR
", host_timestamp = 0x%016" PRIxPTR "",
(uintptr_t)device, (uintptr_t)device_timestamp, (uintptr_t)host_timestamp);
// TODO: GetDeviceAndHostTimer
return (cl_int)0;
}
cl_int CL_API_CALL CL_GetHostTimer(cl_device_id device, cl_ulong *host_timestamp)
{
CL_EVENT(GetHostTimer, "device = 0x%016" PRIxPTR ", host_timestamp = 0x%016" PRIxPTR "",
(uintptr_t)device, (uintptr_t)host_timestamp);
// TODO: GetHostTimer
return (cl_int)0;
}
cl_program CL_API_CALL CL_CreateProgramWithIL(cl_context context,
const void *il,
size_t length,
cl_int *errcode_ret)
{
CL_EVENT(CreateProgramWithIL,
"context = 0x%016" PRIxPTR ", il = 0x%016" PRIxPTR
", length = %zu, errcode_ret = 0x%016" PRIxPTR "",
(uintptr_t)context, (uintptr_t)il, length, (uintptr_t)errcode_ret);
// TODO: CreateProgramWithIL
return (cl_program)0;
}
cl_kernel CL_API_CALL CL_CloneKernel(cl_kernel source_kernel, cl_int *errcode_ret)
{
CL_EVENT(CloneKernel, "source_kernel = 0x%016" PRIxPTR ", errcode_ret = 0x%016" PRIxPTR "",
(uintptr_t)source_kernel, (uintptr_t)errcode_ret);
// TODO: CloneKernel
return (cl_kernel)0;
}
cl_int CL_API_CALL CL_GetKernelSubGroupInfo(cl_kernel kernel,
cl_device_id device,
cl_kernel_sub_group_info param_name,
size_t input_value_size,
const void *input_value,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret)
{
CL_EVENT(GetKernelSubGroupInfo,
"kernel = 0x%016" PRIxPTR ", device = 0x%016" PRIxPTR
", param_name = %u, input_value_size = %zu, input_value = 0x%016" PRIxPTR
", param_value_size = %zu, param_value = 0x%016" PRIxPTR
", param_value_size_ret = 0x%016" PRIxPTR "",
(uintptr_t)kernel, (uintptr_t)device, param_name, input_value_size,
(uintptr_t)input_value, param_value_size, (uintptr_t)param_value,
(uintptr_t)param_value_size_ret);
// TODO: GetKernelSubGroupInfo
return (cl_int)0;
}
cl_int CL_API_CALL CL_EnqueueSVMMigrateMem(cl_command_queue command_queue,
cl_uint num_svm_pointers,
const void **svm_pointers,
const size_t *sizes,
cl_mem_migration_flags flags,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
{
CL_EVENT(EnqueueSVMMigrateMem,
"command_queue = 0x%016" PRIxPTR
", num_svm_pointers = %u, svm_pointers = 0x%016" PRIxPTR ", sizes = 0x%016" PRIxPTR
", flags = %lu, num_events_in_wait_list = %u, event_wait_list = 0x%016" PRIxPTR
", event = 0x%016" PRIxPTR "",
(uintptr_t)command_queue, num_svm_pointers, (uintptr_t)svm_pointers, (uintptr_t)sizes,
flags, num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueSVMMigrateMem
return (cl_int)0;
}
// CL 2.2
cl_int CL_API_CALL CL_SetProgramReleaseCallback(cl_program program,
void(CL_CALLBACK *pfn_notify)(cl_program program,
void *user_data),
void *user_data)
{
CL_EVENT(SetProgramReleaseCallback,
"program = 0x%016" PRIxPTR ", pfn_notify = 0x%016" PRIxPTR
", user_data = 0x%016" PRIxPTR "",
(uintptr_t)program, (uintptr_t)pfn_notify, (uintptr_t)user_data);
// TODO: SetProgramReleaseCallback
return (cl_int)0;
}
cl_int CL_API_CALL CL_SetProgramSpecializationConstant(cl_program program,
cl_uint spec_id,
size_t spec_size,
const void *spec_value)
{
CL_EVENT(SetProgramSpecializationConstant,
"program = 0x%016" PRIxPTR
", spec_id = %u, spec_size = %zu, spec_value = 0x%016" PRIxPTR "",
(uintptr_t)program, spec_id, spec_size, (uintptr_t)spec_value);
// TODO: SetProgramSpecializationConstant
return (cl_int)0;
}
// CL 3.0
cl_int CL_API_CALL CL_SetContextDestructorCallback(cl_context context,
void(CL_CALLBACK *pfn_notify)(cl_context context,
void *user_data),
void *user_data)
{
CL_EVENT(SetContextDestructorCallback,
"context = 0x%016" PRIxPTR ", pfn_notify = 0x%016" PRIxPTR
", user_data = 0x%016" PRIxPTR "",
(uintptr_t)context, (uintptr_t)pfn_notify, (uintptr_t)user_data);
// TODO: SetContextDestructorCallback
return (cl_int)0;
}
cl_mem CL_API_CALL CL_CreateBufferWithProperties(cl_context context,
const cl_mem_properties *properties,
cl_mem_flags flags,
size_t size,
void *host_ptr,
cl_int *errcode_ret)
{
CL_EVENT(CreateBufferWithProperties,
"context = 0x%016" PRIxPTR ", properties = 0x%016" PRIxPTR
", flags = %lu, size = %zu, host_ptr = 0x%016" PRIxPTR ", errcode_ret = 0x%016" PRIxPTR
"",
(uintptr_t)context, (uintptr_t)properties, flags, size, (uintptr_t)host_ptr,
(uintptr_t)errcode_ret);
// TODO: CreateBufferWithProperties
return (cl_mem)0;
}
cl_mem CL_API_CALL CL_CreateImageWithProperties(cl_context context,
const cl_mem_properties *properties,
cl_mem_flags flags,
const cl_image_format *image_format,
const cl_image_desc *image_desc,
void *host_ptr,
cl_int *errcode_ret)
{
CL_EVENT(CreateImageWithProperties,
"context = 0x%016" PRIxPTR ", properties = 0x%016" PRIxPTR
", flags = %lu, image_format = 0x%016" PRIxPTR ", image_desc = 0x%016" PRIxPTR
", host_ptr = 0x%016" PRIxPTR ", errcode_ret = 0x%016" PRIxPTR "",
(uintptr_t)context, (uintptr_t)properties, flags, (uintptr_t)image_format,
(uintptr_t)image_desc, (uintptr_t)host_ptr, (uintptr_t)errcode_ret);
// TODO: CreateImageWithProperties
return (cl_mem)0;
}
} // extern "C"
......@@ -341,6 +341,281 @@ ANGLE_EXPORT cl_int CL_API_CALL CL_EnqueueTask(cl_command_queue command_queue,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
// CL 1.1
ANGLE_EXPORT cl_mem CL_API_CALL CL_CreateSubBuffer(cl_mem buffer,
cl_mem_flags flags,
cl_buffer_create_type buffer_create_type,
const void *buffer_create_info,
cl_int *errcode_ret);
ANGLE_EXPORT cl_int CL_API_CALL
CL_SetMemObjectDestructorCallback(cl_mem memobj,
void(CL_CALLBACK *pfn_notify)(cl_mem memobj, void *user_data),
void *user_data);
ANGLE_EXPORT cl_event CL_API_CALL CL_CreateUserEvent(cl_context context, cl_int *errcode_ret);
ANGLE_EXPORT cl_int CL_API_CALL CL_SetUserEventStatus(cl_event event, cl_int execution_status);
ANGLE_EXPORT cl_int CL_API_CALL CL_SetEventCallback(
cl_event event,
cl_int command_exec_callback_type,
void(CL_CALLBACK *pfn_notify)(cl_event event, cl_int event_command_status, void *user_data),
void *user_data);
ANGLE_EXPORT cl_int CL_API_CALL CL_EnqueueReadBufferRect(cl_command_queue command_queue,
cl_mem buffer,
cl_bool blocking_read,
const size_t *buffer_origin,
const size_t *host_origin,
const size_t *region,
size_t buffer_row_pitch,
size_t buffer_slice_pitch,
size_t host_row_pitch,
size_t host_slice_pitch,
void *ptr,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
ANGLE_EXPORT cl_int CL_API_CALL CL_EnqueueWriteBufferRect(cl_command_queue command_queue,
cl_mem buffer,
cl_bool blocking_write,
const size_t *buffer_origin,
const size_t *host_origin,
const size_t *region,
size_t buffer_row_pitch,
size_t buffer_slice_pitch,
size_t host_row_pitch,
size_t host_slice_pitch,
const void *ptr,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
ANGLE_EXPORT cl_int CL_API_CALL CL_EnqueueCopyBufferRect(cl_command_queue command_queue,
cl_mem src_buffer,
cl_mem dst_buffer,
const size_t *src_origin,
const size_t *dst_origin,
const size_t *region,
size_t src_row_pitch,
size_t src_slice_pitch,
size_t dst_row_pitch,
size_t dst_slice_pitch,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
// CL 1.2
ANGLE_EXPORT cl_int CL_API_CALL CL_CreateSubDevices(cl_device_id in_device,
const cl_device_partition_property *properties,
cl_uint num_devices,
cl_device_id *out_devices,
cl_uint *num_devices_ret);
ANGLE_EXPORT cl_int CL_API_CALL CL_RetainDevice(cl_device_id device);
ANGLE_EXPORT cl_int CL_API_CALL CL_ReleaseDevice(cl_device_id device);
ANGLE_EXPORT cl_mem CL_API_CALL CL_CreateImage(cl_context context,
cl_mem_flags flags,
const cl_image_format *image_format,
const cl_image_desc *image_desc,
void *host_ptr,
cl_int *errcode_ret);
ANGLE_EXPORT cl_program CL_API_CALL
CL_CreateProgramWithBuiltInKernels(cl_context context,
cl_uint num_devices,
const cl_device_id *device_list,
const char *kernel_names,
cl_int *errcode_ret);
ANGLE_EXPORT cl_int CL_API_CALL CL_CompileProgram(cl_program program,
cl_uint num_devices,
const cl_device_id *device_list,
const char *options,
cl_uint num_input_headers,
const cl_program *input_headers,
const char **header_include_names,
void(CL_CALLBACK *pfn_notify)(cl_program program,
void *user_data),
void *user_data);
ANGLE_EXPORT cl_program CL_API_CALL CL_LinkProgram(cl_context context,
cl_uint num_devices,
const cl_device_id *device_list,
const char *options,
cl_uint num_input_programs,
const cl_program *input_programs,
void(CL_CALLBACK *pfn_notify)(cl_program program,
void *user_data),
void *user_data,
cl_int *errcode_ret);
ANGLE_EXPORT cl_int CL_API_CALL CL_UnloadPlatformCompiler(cl_platform_id platform);
ANGLE_EXPORT cl_int CL_API_CALL CL_GetKernelArgInfo(cl_kernel kernel,
cl_uint arg_index,
cl_kernel_arg_info param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
ANGLE_EXPORT cl_int CL_API_CALL CL_EnqueueFillBuffer(cl_command_queue command_queue,
cl_mem buffer,
const void *pattern,
size_t pattern_size,
size_t offset,
size_t size,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
ANGLE_EXPORT cl_int CL_API_CALL CL_EnqueueFillImage(cl_command_queue command_queue,
cl_mem image,
const void *fill_color,
const size_t *origin,
const size_t *region,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
ANGLE_EXPORT cl_int CL_API_CALL CL_EnqueueMigrateMemObjects(cl_command_queue command_queue,
cl_uint num_mem_objects,
const cl_mem *mem_objects,
cl_mem_migration_flags flags,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
ANGLE_EXPORT cl_int CL_API_CALL CL_EnqueueMarkerWithWaitList(cl_command_queue command_queue,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
ANGLE_EXPORT cl_int CL_API_CALL CL_EnqueueBarrierWithWaitList(cl_command_queue command_queue,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
ANGLE_EXPORT void *CL_API_CALL CL_GetExtensionFunctionAddressForPlatform(cl_platform_id platform,
const char *func_name);
// CL 2.0
ANGLE_EXPORT cl_command_queue CL_API_CALL
CL_CreateCommandQueueWithProperties(cl_context context,
cl_device_id device,
const cl_queue_properties *properties,
cl_int *errcode_ret);
ANGLE_EXPORT cl_mem CL_API_CALL CL_CreatePipe(cl_context context,
cl_mem_flags flags,
cl_uint pipe_packet_size,
cl_uint pipe_max_packets,
const cl_pipe_properties *properties,
cl_int *errcode_ret);
ANGLE_EXPORT cl_int CL_API_CALL CL_GetPipeInfo(cl_mem pipe,
cl_pipe_info param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
ANGLE_EXPORT void *CL_API_CALL CL_SVMAlloc(cl_context context,
cl_svm_mem_flags flags,
size_t size,
cl_uint alignment);
ANGLE_EXPORT void CL_API_CALL CL_SVMFree(cl_context context, void *svm_pointer);
ANGLE_EXPORT cl_sampler CL_API_CALL
CL_CreateSamplerWithProperties(cl_context context,
const cl_sampler_properties *sampler_properties,
cl_int *errcode_ret);
ANGLE_EXPORT cl_int CL_API_CALL CL_SetKernelArgSVMPointer(cl_kernel kernel,
cl_uint arg_index,
const void *arg_value);
ANGLE_EXPORT cl_int CL_API_CALL CL_SetKernelExecInfo(cl_kernel kernel,
cl_kernel_exec_info param_name,
size_t param_value_size,
const void *param_value);
ANGLE_EXPORT cl_int CL_API_CALL
CL_EnqueueSVMFree(cl_command_queue command_queue,
cl_uint num_svm_pointers,
void *svm_pointers[],
void(CL_CALLBACK *pfn_free_func)(cl_command_queue queue,
cl_uint num_svm_pointers,
void *svm_pointers[],
void *user_data),
void *user_data,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
ANGLE_EXPORT cl_int CL_API_CALL CL_EnqueueSVMMemcpy(cl_command_queue command_queue,
cl_bool blocking_copy,
void *dst_ptr,
const void *src_ptr,
size_t size,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
ANGLE_EXPORT cl_int CL_API_CALL CL_EnqueueSVMMemFill(cl_command_queue command_queue,
void *svm_ptr,
const void *pattern,
size_t pattern_size,
size_t size,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
ANGLE_EXPORT cl_int CL_API_CALL CL_EnqueueSVMMap(cl_command_queue command_queue,
cl_bool blocking_map,
cl_map_flags flags,
void *svm_ptr,
size_t size,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
ANGLE_EXPORT cl_int CL_API_CALL CL_EnqueueSVMUnmap(cl_command_queue command_queue,
void *svm_ptr,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
// CL 2.1
ANGLE_EXPORT cl_int CL_API_CALL CL_SetDefaultDeviceCommandQueue(cl_context context,
cl_device_id device,
cl_command_queue command_queue);
ANGLE_EXPORT cl_int CL_API_CALL CL_GetDeviceAndHostTimer(cl_device_id device,
cl_ulong *device_timestamp,
cl_ulong *host_timestamp);
ANGLE_EXPORT cl_int CL_API_CALL CL_GetHostTimer(cl_device_id device, cl_ulong *host_timestamp);
ANGLE_EXPORT cl_program CL_API_CALL CL_CreateProgramWithIL(cl_context context,
const void *il,
size_t length,
cl_int *errcode_ret);
ANGLE_EXPORT cl_kernel CL_API_CALL CL_CloneKernel(cl_kernel source_kernel, cl_int *errcode_ret);
ANGLE_EXPORT cl_int CL_API_CALL CL_GetKernelSubGroupInfo(cl_kernel kernel,
cl_device_id device,
cl_kernel_sub_group_info param_name,
size_t input_value_size,
const void *input_value,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
ANGLE_EXPORT cl_int CL_API_CALL CL_EnqueueSVMMigrateMem(cl_command_queue command_queue,
cl_uint num_svm_pointers,
const void **svm_pointers,
const size_t *sizes,
cl_mem_migration_flags flags,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
// CL 2.2
ANGLE_EXPORT cl_int CL_API_CALL
CL_SetProgramReleaseCallback(cl_program program,
void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data),
void *user_data);
ANGLE_EXPORT cl_int CL_API_CALL CL_SetProgramSpecializationConstant(cl_program program,
cl_uint spec_id,
size_t spec_size,
const void *spec_value);
// CL 3.0
ANGLE_EXPORT cl_int CL_API_CALL
CL_SetContextDestructorCallback(cl_context context,
void(CL_CALLBACK *pfn_notify)(cl_context context, void *user_data),
void *user_data);
ANGLE_EXPORT cl_mem CL_API_CALL CL_CreateBufferWithProperties(cl_context context,
const cl_mem_properties *properties,
cl_mem_flags flags,
size_t size,
void *host_ptr,
cl_int *errcode_ret);
ANGLE_EXPORT cl_mem CL_API_CALL CL_CreateImageWithProperties(cl_context context,
const cl_mem_properties *properties,
cl_mem_flags flags,
const cl_image_format *image_format,
const cl_image_desc *image_desc,
void *host_ptr,
cl_int *errcode_ret);
} // extern "C"
#endif // LIBOPENCL_ENTRY_POINTS_CL_AUTOGEN_H_
......@@ -749,4 +749,544 @@ cl_int CL_API_CALL clEnqueueTask(cl_command_queue command_queue,
event);
}
// CL 1.1
cl_mem CL_API_CALL clCreateSubBuffer(cl_mem buffer,
cl_mem_flags flags,
cl_buffer_create_type buffer_create_type,
const void *buffer_create_info,
cl_int *errcode_ret)
{
EnsureCLLoaded();
return cl_loader.clCreateSubBuffer(buffer, flags, buffer_create_type, buffer_create_info,
errcode_ret);
}
cl_int CL_API_CALL clSetMemObjectDestructorCallback(cl_mem memobj,
void(CL_CALLBACK *pfn_notify)(cl_mem memobj,
void *user_data),
void *user_data)
{
EnsureCLLoaded();
return cl_loader.clSetMemObjectDestructorCallback(memobj, pfn_notify, user_data);
}
cl_event CL_API_CALL clCreateUserEvent(cl_context context, cl_int *errcode_ret)
{
EnsureCLLoaded();
return cl_loader.clCreateUserEvent(context, errcode_ret);
}
cl_int CL_API_CALL clSetUserEventStatus(cl_event event, cl_int execution_status)
{
EnsureCLLoaded();
return cl_loader.clSetUserEventStatus(event, execution_status);
}
cl_int CL_API_CALL clSetEventCallback(cl_event event,
cl_int command_exec_callback_type,
void(CL_CALLBACK *pfn_notify)(cl_event event,
cl_int event_command_status,
void *user_data),
void *user_data)
{
EnsureCLLoaded();
return cl_loader.clSetEventCallback(event, command_exec_callback_type, pfn_notify, user_data);
}
cl_int CL_API_CALL clEnqueueReadBufferRect(cl_command_queue command_queue,
cl_mem buffer,
cl_bool blocking_read,
const size_t *buffer_origin,
const size_t *host_origin,
const size_t *region,
size_t buffer_row_pitch,
size_t buffer_slice_pitch,
size_t host_row_pitch,
size_t host_slice_pitch,
void *ptr,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
{
EnsureCLLoaded();
return cl_loader.clEnqueueReadBufferRect(command_queue, buffer, blocking_read, buffer_origin,
host_origin, region, buffer_row_pitch,
buffer_slice_pitch, host_row_pitch, host_slice_pitch,
ptr, num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueWriteBufferRect(cl_command_queue command_queue,
cl_mem buffer,
cl_bool blocking_write,
const size_t *buffer_origin,
const size_t *host_origin,
const size_t *region,
size_t buffer_row_pitch,
size_t buffer_slice_pitch,
size_t host_row_pitch,
size_t host_slice_pitch,
const void *ptr,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
{
EnsureCLLoaded();
return cl_loader.clEnqueueWriteBufferRect(command_queue, buffer, blocking_write, buffer_origin,
host_origin, region, buffer_row_pitch,
buffer_slice_pitch, host_row_pitch, host_slice_pitch,
ptr, num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueCopyBufferRect(cl_command_queue command_queue,
cl_mem src_buffer,
cl_mem dst_buffer,
const size_t *src_origin,
const size_t *dst_origin,
const size_t *region,
size_t src_row_pitch,
size_t src_slice_pitch,
size_t dst_row_pitch,
size_t dst_slice_pitch,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
{
EnsureCLLoaded();
return cl_loader.clEnqueueCopyBufferRect(command_queue, src_buffer, dst_buffer, src_origin,
dst_origin, region, src_row_pitch, src_slice_pitch,
dst_row_pitch, dst_slice_pitch,
num_events_in_wait_list, event_wait_list, event);
}
// CL 1.2
cl_int CL_API_CALL clCreateSubDevices(cl_device_id in_device,
const cl_device_partition_property *properties,
cl_uint num_devices,
cl_device_id *out_devices,
cl_uint *num_devices_ret)
{
EnsureCLLoaded();
return cl_loader.clCreateSubDevices(in_device, properties, num_devices, out_devices,
num_devices_ret);
}
cl_int CL_API_CALL clRetainDevice(cl_device_id device)
{
EnsureCLLoaded();
return cl_loader.clRetainDevice(device);
}
cl_int CL_API_CALL clReleaseDevice(cl_device_id device)
{
EnsureCLLoaded();
return cl_loader.clReleaseDevice(device);
}
cl_mem CL_API_CALL clCreateImage(cl_context context,
cl_mem_flags flags,
const cl_image_format *image_format,
const cl_image_desc *image_desc,
void *host_ptr,
cl_int *errcode_ret)
{
EnsureCLLoaded();
return cl_loader.clCreateImage(context, flags, image_format, image_desc, host_ptr, errcode_ret);
}
cl_program CL_API_CALL clCreateProgramWithBuiltInKernels(cl_context context,
cl_uint num_devices,
const cl_device_id *device_list,
const char *kernel_names,
cl_int *errcode_ret)
{
EnsureCLLoaded();
return cl_loader.clCreateProgramWithBuiltInKernels(context, num_devices, device_list,
kernel_names, errcode_ret);
}
cl_int CL_API_CALL clCompileProgram(cl_program program,
cl_uint num_devices,
const cl_device_id *device_list,
const char *options,
cl_uint num_input_headers,
const cl_program *input_headers,
const char **header_include_names,
void(CL_CALLBACK *pfn_notify)(cl_program program,
void *user_data),
void *user_data)
{
EnsureCLLoaded();
return cl_loader.clCompileProgram(program, num_devices, device_list, options, num_input_headers,
input_headers, header_include_names, pfn_notify, user_data);
}
cl_program CL_API_CALL clLinkProgram(cl_context context,
cl_uint num_devices,
const cl_device_id *device_list,
const char *options,
cl_uint num_input_programs,
const cl_program *input_programs,
void(CL_CALLBACK *pfn_notify)(cl_program program,
void *user_data),
void *user_data,
cl_int *errcode_ret)
{
EnsureCLLoaded();
return cl_loader.clLinkProgram(context, num_devices, device_list, options, num_input_programs,
input_programs, pfn_notify, user_data, errcode_ret);
}
cl_int CL_API_CALL clUnloadPlatformCompiler(cl_platform_id platform)
{
EnsureCLLoaded();
return cl_loader.clUnloadPlatformCompiler(platform);
}
cl_int CL_API_CALL clGetKernelArgInfo(cl_kernel kernel,
cl_uint arg_index,
cl_kernel_arg_info param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret)
{
EnsureCLLoaded();
return cl_loader.clGetKernelArgInfo(kernel, arg_index, param_name, param_value_size,
param_value, param_value_size_ret);
}
cl_int CL_API_CALL clEnqueueFillBuffer(cl_command_queue command_queue,
cl_mem buffer,
const void *pattern,
size_t pattern_size,
size_t offset,
size_t size,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
{
EnsureCLLoaded();
return cl_loader.clEnqueueFillBuffer(command_queue, buffer, pattern, pattern_size, offset, size,
num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueFillImage(cl_command_queue command_queue,
cl_mem image,
const void *fill_color,
const size_t *origin,
const size_t *region,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
{
EnsureCLLoaded();
return cl_loader.clEnqueueFillImage(command_queue, image, fill_color, origin, region,
num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueMigrateMemObjects(cl_command_queue command_queue,
cl_uint num_mem_objects,
const cl_mem *mem_objects,
cl_mem_migration_flags flags,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
{
EnsureCLLoaded();
return cl_loader.clEnqueueMigrateMemObjects(command_queue, num_mem_objects, mem_objects, flags,
num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueMarkerWithWaitList(cl_command_queue command_queue,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
{
EnsureCLLoaded();
return cl_loader.clEnqueueMarkerWithWaitList(command_queue, num_events_in_wait_list,
event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueBarrierWithWaitList(cl_command_queue command_queue,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
{
EnsureCLLoaded();
return cl_loader.clEnqueueBarrierWithWaitList(command_queue, num_events_in_wait_list,
event_wait_list, event);
}
void *CL_API_CALL clGetExtensionFunctionAddressForPlatform(cl_platform_id platform,
const char *func_name)
{
EnsureCLLoaded();
return cl_loader.clGetExtensionFunctionAddressForPlatform(platform, func_name);
}
// CL 2.0
cl_command_queue CL_API_CALL
clCreateCommandQueueWithProperties(cl_context context,
cl_device_id device,
const cl_queue_properties *properties,
cl_int *errcode_ret)
{
EnsureCLLoaded();
return cl_loader.clCreateCommandQueueWithProperties(context, device, properties, errcode_ret);
}
cl_mem CL_API_CALL clCreatePipe(cl_context context,
cl_mem_flags flags,
cl_uint pipe_packet_size,
cl_uint pipe_max_packets,
const cl_pipe_properties *properties,
cl_int *errcode_ret)
{
EnsureCLLoaded();
return cl_loader.clCreatePipe(context, flags, pipe_packet_size, pipe_max_packets, properties,
errcode_ret);
}
cl_int CL_API_CALL clGetPipeInfo(cl_mem pipe,
cl_pipe_info param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret)
{
EnsureCLLoaded();
return cl_loader.clGetPipeInfo(pipe, param_name, param_value_size, param_value,
param_value_size_ret);
}
void *CL_API_CALL clSVMAlloc(cl_context context,
cl_svm_mem_flags flags,
size_t size,
cl_uint alignment)
{
EnsureCLLoaded();
return cl_loader.clSVMAlloc(context, flags, size, alignment);
}
void CL_API_CALL clSVMFree(cl_context context, void *svm_pointer)
{
EnsureCLLoaded();
return cl_loader.clSVMFree(context, svm_pointer);
}
cl_sampler CL_API_CALL
clCreateSamplerWithProperties(cl_context context,
const cl_sampler_properties *sampler_properties,
cl_int *errcode_ret)
{
EnsureCLLoaded();
return cl_loader.clCreateSamplerWithProperties(context, sampler_properties, errcode_ret);
}
cl_int CL_API_CALL clSetKernelArgSVMPointer(cl_kernel kernel,
cl_uint arg_index,
const void *arg_value)
{
EnsureCLLoaded();
return cl_loader.clSetKernelArgSVMPointer(kernel, arg_index, arg_value);
}
cl_int CL_API_CALL clSetKernelExecInfo(cl_kernel kernel,
cl_kernel_exec_info param_name,
size_t param_value_size,
const void *param_value)
{
EnsureCLLoaded();
return cl_loader.clSetKernelExecInfo(kernel, param_name, param_value_size, param_value);
}
cl_int CL_API_CALL clEnqueueSVMFree(cl_command_queue command_queue,
cl_uint num_svm_pointers,
void *svm_pointers[],
void(CL_CALLBACK *pfn_free_func)(cl_command_queue queue,
cl_uint num_svm_pointers,
void *svm_pointers[],
void *user_data),
void *user_data,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
{
EnsureCLLoaded();
return cl_loader.clEnqueueSVMFree(command_queue, num_svm_pointers, svm_pointers, pfn_free_func,
user_data, num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueSVMMemcpy(cl_command_queue command_queue,
cl_bool blocking_copy,
void *dst_ptr,
const void *src_ptr,
size_t size,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
{
EnsureCLLoaded();
return cl_loader.clEnqueueSVMMemcpy(command_queue, blocking_copy, dst_ptr, src_ptr, size,
num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueSVMMemFill(cl_command_queue command_queue,
void *svm_ptr,
const void *pattern,
size_t pattern_size,
size_t size,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
{
EnsureCLLoaded();
return cl_loader.clEnqueueSVMMemFill(command_queue, svm_ptr, pattern, pattern_size, size,
num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueSVMMap(cl_command_queue command_queue,
cl_bool blocking_map,
cl_map_flags flags,
void *svm_ptr,
size_t size,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
{
EnsureCLLoaded();
return cl_loader.clEnqueueSVMMap(command_queue, blocking_map, flags, svm_ptr, size,
num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueSVMUnmap(cl_command_queue command_queue,
void *svm_ptr,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
{
EnsureCLLoaded();
return cl_loader.clEnqueueSVMUnmap(command_queue, svm_ptr, num_events_in_wait_list,
event_wait_list, event);
}
// CL 2.1
cl_int CL_API_CALL clSetDefaultDeviceCommandQueue(cl_context context,
cl_device_id device,
cl_command_queue command_queue)
{
EnsureCLLoaded();
return cl_loader.clSetDefaultDeviceCommandQueue(context, device, command_queue);
}
cl_int CL_API_CALL clGetDeviceAndHostTimer(cl_device_id device,
cl_ulong *device_timestamp,
cl_ulong *host_timestamp)
{
EnsureCLLoaded();
return cl_loader.clGetDeviceAndHostTimer(device, device_timestamp, host_timestamp);
}
cl_int CL_API_CALL clGetHostTimer(cl_device_id device, cl_ulong *host_timestamp)
{
EnsureCLLoaded();
return cl_loader.clGetHostTimer(device, host_timestamp);
}
cl_program CL_API_CALL clCreateProgramWithIL(cl_context context,
const void *il,
size_t length,
cl_int *errcode_ret)
{
EnsureCLLoaded();
return cl_loader.clCreateProgramWithIL(context, il, length, errcode_ret);
}
cl_kernel CL_API_CALL clCloneKernel(cl_kernel source_kernel, cl_int *errcode_ret)
{
EnsureCLLoaded();
return cl_loader.clCloneKernel(source_kernel, errcode_ret);
}
cl_int CL_API_CALL clGetKernelSubGroupInfo(cl_kernel kernel,
cl_device_id device,
cl_kernel_sub_group_info param_name,
size_t input_value_size,
const void *input_value,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret)
{
EnsureCLLoaded();
return cl_loader.clGetKernelSubGroupInfo(kernel, device, param_name, input_value_size,
input_value, param_value_size, param_value,
param_value_size_ret);
}
cl_int CL_API_CALL clEnqueueSVMMigrateMem(cl_command_queue command_queue,
cl_uint num_svm_pointers,
const void **svm_pointers,
const size_t *sizes,
cl_mem_migration_flags flags,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
{
EnsureCLLoaded();
return cl_loader.clEnqueueSVMMigrateMem(command_queue, num_svm_pointers, svm_pointers, sizes,
flags, num_events_in_wait_list, event_wait_list, event);
}
// CL 2.2
cl_int CL_API_CALL clSetProgramReleaseCallback(cl_program program,
void(CL_CALLBACK *pfn_notify)(cl_program program,
void *user_data),
void *user_data)
{
EnsureCLLoaded();
return cl_loader.clSetProgramReleaseCallback(program, pfn_notify, user_data);
}
cl_int CL_API_CALL clSetProgramSpecializationConstant(cl_program program,
cl_uint spec_id,
size_t spec_size,
const void *spec_value)
{
EnsureCLLoaded();
return cl_loader.clSetProgramSpecializationConstant(program, spec_id, spec_size, spec_value);
}
// CL 3.0
cl_int CL_API_CALL clSetContextDestructorCallback(cl_context context,
void(CL_CALLBACK *pfn_notify)(cl_context context,
void *user_data),
void *user_data)
{
EnsureCLLoaded();
return cl_loader.clSetContextDestructorCallback(context, pfn_notify, user_data);
}
cl_mem CL_API_CALL clCreateBufferWithProperties(cl_context context,
const cl_mem_properties *properties,
cl_mem_flags flags,
size_t size,
void *host_ptr,
cl_int *errcode_ret)
{
EnsureCLLoaded();
return cl_loader.clCreateBufferWithProperties(context, properties, flags, size, host_ptr,
errcode_ret);
}
cl_mem CL_API_CALL clCreateImageWithProperties(cl_context context,
const cl_mem_properties *properties,
cl_mem_flags flags,
const cl_image_format *image_format,
const cl_image_desc *image_desc,
void *host_ptr,
cl_int *errcode_ret)
{
EnsureCLLoaded();
return cl_loader.clCreateImageWithProperties(context, properties, flags, image_format,
image_desc, host_ptr, errcode_ret);
}
} // extern "C"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment