From 120bf5438d4003c45d08fb99bd33ffbfe1c16941 Mon Sep 17 00:00:00 2001 From: Brice Videau Date: Wed, 26 Apr 2023 13:56:16 -0500 Subject: [PATCH 1/8] Use function type definitions and use these to defines pointer types. --- CL/cl_d3d10.h | 56 ++- CL/cl_d3d11.h | 56 ++- CL/cl_dx9_media_sharing.h | 72 ++-- CL/cl_egl.h | 32 +- CL/cl_ext.h | 616 ++++++++++++++++++----------- CL/cl_gl.h | 96 +++-- CL/cl_layer.h | 30 +- CL/cl_va_api_media_sharing_intel.h | 40 +- scripts/cl_ext.h.mako | 18 +- 9 files changed, 623 insertions(+), 393 deletions(-) diff --git a/CL/cl_d3d10.h b/CL/cl_d3d10.h index 3d8fe131..43ec470a 100644 --- a/CL/cl_d3d10.h +++ b/CL/cl_d3d10.h @@ -97,56 +97,68 @@ typedef cl_uint cl_d3d10_device_set_khr; #define CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR 0x4018 -typedef cl_int (CL_API_CALL * -clGetDeviceIDsFromD3D10KHR_fn)( +typedef cl_int CL_API_CALL +clGetDeviceIDsFromD3D10KHR_t( cl_platform_id platform, cl_d3d10_device_source_khr d3d_device_source, void* d3d_object, cl_d3d10_device_set_khr d3d_device_set, cl_uint num_entries, cl_device_id* devices, - cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_0; + cl_uint* num_devices); + +typedef clGetDeviceIDsFromD3D10KHR_t *clGetDeviceIDsFromD3D10KHR_fn CL_API_SUFFIX__VERSION_1_0; -typedef cl_mem (CL_API_CALL * -clCreateFromD3D10BufferKHR_fn)( +typedef cl_mem CL_API_CALL +clCreateFromD3D10BufferKHR_t( cl_context context, cl_mem_flags flags, ID3D10Buffer* resource, - cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0; + cl_int* errcode_ret); + +typedef clCreateFromD3D10BufferKHR_t *clCreateFromD3D10BufferKHR_fn CL_API_SUFFIX__VERSION_1_0; -typedef cl_mem (CL_API_CALL * -clCreateFromD3D10Texture2DKHR_fn)( +typedef cl_mem CL_API_CALL +clCreateFromD3D10Texture2DKHR_t( cl_context context, cl_mem_flags flags, ID3D10Texture2D* resource, UINT subresource, - cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0; + cl_int* errcode_ret); + +typedef clCreateFromD3D10Texture2DKHR_t *clCreateFromD3D10Texture2DKHR_fn CL_API_SUFFIX__VERSION_1_0; -typedef cl_mem (CL_API_CALL * -clCreateFromD3D10Texture3DKHR_fn)( +typedef cl_mem CL_API_CALL +clCreateFromD3D10Texture3DKHR_t( cl_context context, cl_mem_flags flags, ID3D10Texture3D* resource, UINT subresource, - cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0; + cl_int* errcode_ret); -typedef cl_int (CL_API_CALL * -clEnqueueAcquireD3D10ObjectsKHR_fn)( +typedef clCreateFromD3D10Texture3DKHR_t *clCreateFromD3D10Texture3DKHR_fn CL_API_SUFFIX__VERSION_1_0; + +typedef cl_int CL_API_CALL +clEnqueueAcquireD3D10ObjectsKHR_t( cl_command_queue command_queue, cl_uint num_objects, const cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) CL_API_SUFFIX__VERSION_1_0; + cl_event* event); -typedef cl_int (CL_API_CALL * -clEnqueueReleaseD3D10ObjectsKHR_fn)( +typedef clEnqueueAcquireD3D10ObjectsKHR_t *clEnqueueAcquireD3D10ObjectsKHR_fn CL_API_SUFFIX__VERSION_1_0; + +typedef cl_int CL_API_CALL +clEnqueueReleaseD3D10ObjectsKHR_t( cl_command_queue command_queue, cl_uint num_objects, const cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) CL_API_SUFFIX__VERSION_1_0; + cl_event* event); + +typedef clEnqueueReleaseD3D10ObjectsKHR_t *clEnqueueReleaseD3D10ObjectsKHR_fn CL_API_SUFFIX__VERSION_1_0; #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -212,14 +224,16 @@ clEnqueueReleaseD3D10ObjectsKHR( /* when cl_khr_d3d10_sharing is supported */ -typedef cl_int (CL_API_CALL * -clGetSupportedD3D10TextureFormatsINTEL_fn)( +typedef cl_int CL_API_CALL +clGetSupportedD3D10TextureFormatsINTEL_t( cl_context context, cl_mem_flags flags, cl_mem_object_type image_type, cl_uint num_entries, DXGI_FORMAT* d3d10_formats, - cl_uint* num_texture_formats) ; + cl_uint* num_texture_formats); + +typedef clGetSupportedD3D10TextureFormatsINTEL_t *clGetSupportedD3D10TextureFormatsINTEL_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) diff --git a/CL/cl_d3d11.h b/CL/cl_d3d11.h index 6a6af21d..f2da8f2f 100644 --- a/CL/cl_d3d11.h +++ b/CL/cl_d3d11.h @@ -97,56 +97,68 @@ typedef cl_uint cl_d3d11_device_set_khr; #define CL_COMMAND_RELEASE_D3D11_OBJECTS_KHR 0x4021 -typedef cl_int (CL_API_CALL * -clGetDeviceIDsFromD3D11KHR_fn)( +typedef cl_int CL_API_CALL +clGetDeviceIDsFromD3D11KHR_t( cl_platform_id platform, cl_d3d11_device_source_khr d3d_device_source, void* d3d_object, cl_d3d11_device_set_khr d3d_device_set, cl_uint num_entries, cl_device_id* devices, - cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_2; + cl_uint* num_devices); + +typedef clGetDeviceIDsFromD3D11KHR_t *clGetDeviceIDsFromD3D11KHR_fn CL_API_SUFFIX__VERSION_1_2; -typedef cl_mem (CL_API_CALL * -clCreateFromD3D11BufferKHR_fn)( +typedef cl_mem CL_API_CALL +clCreateFromD3D11BufferKHR_t( cl_context context, cl_mem_flags flags, ID3D11Buffer* resource, - cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2; + cl_int* errcode_ret); + +typedef clCreateFromD3D11BufferKHR_t *clCreateFromD3D11BufferKHR_fn CL_API_SUFFIX__VERSION_1_2; -typedef cl_mem (CL_API_CALL * -clCreateFromD3D11Texture2DKHR_fn)( +typedef cl_mem CL_API_CALL +clCreateFromD3D11Texture2DKHR_t( cl_context context, cl_mem_flags flags, ID3D11Texture2D* resource, UINT subresource, - cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2; + cl_int* errcode_ret); + +typedef clCreateFromD3D11Texture2DKHR_t *clCreateFromD3D11Texture2DKHR_fn CL_API_SUFFIX__VERSION_1_2; -typedef cl_mem (CL_API_CALL * -clCreateFromD3D11Texture3DKHR_fn)( +typedef cl_mem CL_API_CALL +clCreateFromD3D11Texture3DKHR_t( cl_context context, cl_mem_flags flags, ID3D11Texture3D* resource, UINT subresource, - cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2; + cl_int* errcode_ret); -typedef cl_int (CL_API_CALL * -clEnqueueAcquireD3D11ObjectsKHR_fn)( +typedef clCreateFromD3D11Texture3DKHR_t *clCreateFromD3D11Texture3DKHR_fn CL_API_SUFFIX__VERSION_1_2; + +typedef cl_int CL_API_CALL +clEnqueueAcquireD3D11ObjectsKHR_t( cl_command_queue command_queue, cl_uint num_objects, const cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) CL_API_SUFFIX__VERSION_1_2; + cl_event* event); -typedef cl_int (CL_API_CALL * -clEnqueueReleaseD3D11ObjectsKHR_fn)( +typedef clEnqueueAcquireD3D11ObjectsKHR_t *clEnqueueAcquireD3D11ObjectsKHR_fn CL_API_SUFFIX__VERSION_1_2; + +typedef cl_int CL_API_CALL +clEnqueueReleaseD3D11ObjectsKHR_t( cl_command_queue command_queue, cl_uint num_objects, const cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) CL_API_SUFFIX__VERSION_1_2; + cl_event* event); + +typedef clEnqueueReleaseD3D11ObjectsKHR_t *clEnqueueReleaseD3D11ObjectsKHR_fn CL_API_SUFFIX__VERSION_1_2; #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -212,15 +224,17 @@ clEnqueueReleaseD3D11ObjectsKHR( /* when cl_khr_d3d11_sharing is supported */ -typedef cl_int (CL_API_CALL * -clGetSupportedD3D11TextureFormatsINTEL_fn)( +typedef cl_int CL_API_CALL +clGetSupportedD3D11TextureFormatsINTEL_t( cl_context context, cl_mem_flags flags, cl_mem_object_type image_type, cl_uint plane, cl_uint num_entries, DXGI_FORMAT* d3d11_formats, - cl_uint* num_texture_formats) ; + cl_uint* num_texture_formats); + +typedef clGetSupportedD3D11TextureFormatsINTEL_t *clGetSupportedD3D11TextureFormatsINTEL_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) diff --git a/CL/cl_dx9_media_sharing.h b/CL/cl_dx9_media_sharing.h index e7f8c452..7b0ebe80 100644 --- a/CL/cl_dx9_media_sharing.h +++ b/CL/cl_dx9_media_sharing.h @@ -110,8 +110,8 @@ typedef struct _cl_dx9_surface_info_khr { #define CL_COMMAND_RELEASE_DX9_MEDIA_SURFACES_KHR 0x202C -typedef cl_int (CL_API_CALL * -clGetDeviceIDsFromDX9MediaAdapterKHR_fn)( +typedef cl_int CL_API_CALL +clGetDeviceIDsFromDX9MediaAdapterKHR_t( cl_platform_id platform, cl_uint num_media_adapters, cl_dx9_media_adapter_type_khr* media_adapter_type, @@ -119,34 +119,42 @@ clGetDeviceIDsFromDX9MediaAdapterKHR_fn)( cl_dx9_media_adapter_set_khr media_adapter_set, cl_uint num_entries, cl_device_id* devices, - cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_2; + cl_uint* num_devices); + +typedef clGetDeviceIDsFromDX9MediaAdapterKHR_t *clGetDeviceIDsFromDX9MediaAdapterKHR_fn CL_API_SUFFIX__VERSION_1_2; -typedef cl_mem (CL_API_CALL * -clCreateFromDX9MediaSurfaceKHR_fn)( +typedef cl_mem CL_API_CALL +clCreateFromDX9MediaSurfaceKHR_t( cl_context context, cl_mem_flags flags, cl_dx9_media_adapter_type_khr adapter_type, void* surface_info, cl_uint plane, - cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2; + cl_int* errcode_ret); -typedef cl_int (CL_API_CALL * -clEnqueueAcquireDX9MediaSurfacesKHR_fn)( +typedef clCreateFromDX9MediaSurfaceKHR_t *clCreateFromDX9MediaSurfaceKHR_fn CL_API_SUFFIX__VERSION_1_2; + +typedef cl_int CL_API_CALL +clEnqueueAcquireDX9MediaSurfacesKHR_t( cl_command_queue command_queue, cl_uint num_objects, const cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) CL_API_SUFFIX__VERSION_1_2; + cl_event* event); -typedef cl_int (CL_API_CALL * -clEnqueueReleaseDX9MediaSurfacesKHR_fn)( +typedef clEnqueueAcquireDX9MediaSurfacesKHR_t *clEnqueueAcquireDX9MediaSurfacesKHR_fn CL_API_SUFFIX__VERSION_1_2; + +typedef cl_int CL_API_CALL +clEnqueueReleaseDX9MediaSurfacesKHR_t( cl_command_queue command_queue, cl_uint num_objects, const cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) CL_API_SUFFIX__VERSION_1_2; + cl_event* event); + +typedef clEnqueueReleaseDX9MediaSurfacesKHR_t *clEnqueueReleaseDX9MediaSurfacesKHR_fn CL_API_SUFFIX__VERSION_1_2; #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -232,42 +240,50 @@ typedef cl_uint cl_dx9_device_set_intel; #define CL_COMMAND_RELEASE_DX9_OBJECTS_INTEL 0x402B -typedef cl_int (CL_API_CALL * -clGetDeviceIDsFromDX9INTEL_fn)( +typedef cl_int CL_API_CALL +clGetDeviceIDsFromDX9INTEL_t( cl_platform_id platform, cl_dx9_device_source_intel dx9_device_source, void* dx9_object, cl_dx9_device_set_intel dx9_device_set, cl_uint num_entries, cl_device_id* devices, - cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_1; + cl_uint* num_devices); -typedef cl_mem (CL_API_CALL * -clCreateFromDX9MediaSurfaceINTEL_fn)( +typedef clGetDeviceIDsFromDX9INTEL_t *clGetDeviceIDsFromDX9INTEL_fn CL_API_SUFFIX__VERSION_1_1; + +typedef cl_mem CL_API_CALL +clCreateFromDX9MediaSurfaceINTEL_t( cl_context context, cl_mem_flags flags, IDirect3DSurface9* resource, HANDLE sharedHandle, UINT plane, - cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1; + cl_int* errcode_ret); + +typedef clCreateFromDX9MediaSurfaceINTEL_t *clCreateFromDX9MediaSurfaceINTEL_fn CL_API_SUFFIX__VERSION_1_1; -typedef cl_int (CL_API_CALL * -clEnqueueAcquireDX9ObjectsINTEL_fn)( +typedef cl_int CL_API_CALL +clEnqueueAcquireDX9ObjectsINTEL_t( cl_command_queue command_queue, cl_uint num_objects, const cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) CL_API_SUFFIX__VERSION_1_1; + cl_event* event); + +typedef clEnqueueAcquireDX9ObjectsINTEL_t *clEnqueueAcquireDX9ObjectsINTEL_fn CL_API_SUFFIX__VERSION_1_1; -typedef cl_int (CL_API_CALL * -clEnqueueReleaseDX9ObjectsINTEL_fn)( +typedef cl_int CL_API_CALL +clEnqueueReleaseDX9ObjectsINTEL_t( cl_command_queue command_queue, cl_uint num_objects, cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) CL_API_SUFFIX__VERSION_1_1; + cl_event* event); + +typedef clEnqueueReleaseDX9ObjectsINTEL_t *clEnqueueReleaseDX9ObjectsINTEL_fn CL_API_SUFFIX__VERSION_1_1; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -319,15 +335,17 @@ clEnqueueReleaseDX9ObjectsINTEL( /* when cl_khr_dx9_media_sharing or cl_intel_dx9_media_sharing is supported */ -typedef cl_int (CL_API_CALL * -clGetSupportedDX9MediaSurfaceFormatsINTEL_fn)( +typedef cl_int CL_API_CALL +clGetSupportedDX9MediaSurfaceFormatsINTEL_t( cl_context context, cl_mem_flags flags, cl_mem_object_type image_type, cl_uint plane, cl_uint num_entries, D3DFORMAT* dx9_formats, - cl_uint* num_surface_formats) ; + cl_uint* num_surface_formats); + +typedef clGetSupportedDX9MediaSurfaceFormatsINTEL_t *clGetSupportedDX9MediaSurfaceFormatsINTEL_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) diff --git a/CL/cl_egl.h b/CL/cl_egl.h index e2db9025..b6bbc18e 100644 --- a/CL/cl_egl.h +++ b/CL/cl_egl.h @@ -70,32 +70,38 @@ typedef void* CLeglDisplayKHR; typedef intptr_t cl_egl_image_properties_khr; -typedef cl_mem (CL_API_CALL * -clCreateFromEGLImageKHR_fn)( +typedef cl_mem CL_API_CALL +clCreateFromEGLImageKHR_t( cl_context context, CLeglDisplayKHR egldisplay, CLeglImageKHR eglimage, cl_mem_flags flags, const cl_egl_image_properties_khr* properties, - cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0; + cl_int* errcode_ret); + +typedef clCreateFromEGLImageKHR_t *clCreateFromEGLImageKHR_fn CL_API_SUFFIX__VERSION_1_0; -typedef cl_int (CL_API_CALL * -clEnqueueAcquireEGLObjectsKHR_fn)( +typedef cl_int CL_API_CALL +clEnqueueAcquireEGLObjectsKHR_t( cl_command_queue command_queue, cl_uint num_objects, const cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) CL_API_SUFFIX__VERSION_1_0; + cl_event* event); + +typedef clEnqueueAcquireEGLObjectsKHR_t *clEnqueueAcquireEGLObjectsKHR_fn CL_API_SUFFIX__VERSION_1_0; -typedef cl_int (CL_API_CALL * -clEnqueueReleaseEGLObjectsKHR_fn)( +typedef cl_int CL_API_CALL +clEnqueueReleaseEGLObjectsKHR_t( cl_command_queue command_queue, cl_uint num_objects, const cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) CL_API_SUFFIX__VERSION_1_0; + cl_event* event); + +typedef clEnqueueReleaseEGLObjectsKHR_t *clEnqueueReleaseEGLObjectsKHR_fn CL_API_SUFFIX__VERSION_1_0; #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -142,12 +148,14 @@ clEnqueueReleaseEGLObjectsKHR( typedef void* CLeglSyncKHR; -typedef cl_event (CL_API_CALL * -clCreateEventFromEGLSyncKHR_fn)( +typedef cl_event CL_API_CALL +clCreateEventFromEGLSyncKHR_t( cl_context context, CLeglSyncKHR sync, CLeglDisplayKHR display, - cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0; + cl_int* errcode_ret); + +typedef clCreateEventFromEGLSyncKHR_t *clCreateEventFromEGLSyncKHR_fn CL_API_SUFFIX__VERSION_1_0; #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) diff --git a/CL/cl_ext.h b/CL/cl_ext.h index 12ebd043..8738ed7e 100644 --- a/CL/cl_ext.h +++ b/CL/cl_ext.h @@ -100,45 +100,57 @@ typedef struct _cl_mutable_command_khr* cl_mutable_command_khr; #define CL_COMMAND_COMMAND_BUFFER_KHR 0x12A8 -typedef cl_command_buffer_khr (CL_API_CALL * -clCreateCommandBufferKHR_fn)( +typedef cl_command_buffer_khr CL_API_CALL +clCreateCommandBufferKHR_t( cl_uint num_queues, const cl_command_queue* queues, const cl_command_buffer_properties_khr* properties, - cl_int* errcode_ret) ; + cl_int* errcode_ret); -typedef cl_int (CL_API_CALL * -clFinalizeCommandBufferKHR_fn)( - cl_command_buffer_khr command_buffer) ; +typedef clCreateCommandBufferKHR_t *clCreateCommandBufferKHR_fn ; -typedef cl_int (CL_API_CALL * -clRetainCommandBufferKHR_fn)( - cl_command_buffer_khr command_buffer) ; +typedef cl_int CL_API_CALL +clFinalizeCommandBufferKHR_t( + cl_command_buffer_khr command_buffer); -typedef cl_int (CL_API_CALL * -clReleaseCommandBufferKHR_fn)( - cl_command_buffer_khr command_buffer) ; +typedef clFinalizeCommandBufferKHR_t *clFinalizeCommandBufferKHR_fn ; + +typedef cl_int CL_API_CALL +clRetainCommandBufferKHR_t( + cl_command_buffer_khr command_buffer); -typedef cl_int (CL_API_CALL * -clEnqueueCommandBufferKHR_fn)( +typedef clRetainCommandBufferKHR_t *clRetainCommandBufferKHR_fn ; + +typedef cl_int CL_API_CALL +clReleaseCommandBufferKHR_t( + cl_command_buffer_khr command_buffer); + +typedef clReleaseCommandBufferKHR_t *clReleaseCommandBufferKHR_fn ; + +typedef cl_int CL_API_CALL +clEnqueueCommandBufferKHR_t( cl_uint num_queues, cl_command_queue* queues, cl_command_buffer_khr command_buffer, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) ; + cl_event* event); + +typedef clEnqueueCommandBufferKHR_t *clEnqueueCommandBufferKHR_fn ; -typedef cl_int (CL_API_CALL * -clCommandBarrierWithWaitListKHR_fn)( +typedef cl_int CL_API_CALL +clCommandBarrierWithWaitListKHR_t( cl_command_buffer_khr command_buffer, cl_command_queue command_queue, cl_uint num_sync_points_in_wait_list, const cl_sync_point_khr* sync_point_wait_list, cl_sync_point_khr* sync_point, - cl_mutable_command_khr* mutable_handle) ; + cl_mutable_command_khr* mutable_handle); + +typedef clCommandBarrierWithWaitListKHR_t *clCommandBarrierWithWaitListKHR_fn ; -typedef cl_int (CL_API_CALL * -clCommandCopyBufferKHR_fn)( +typedef cl_int CL_API_CALL +clCommandCopyBufferKHR_t( cl_command_buffer_khr command_buffer, cl_command_queue command_queue, cl_mem src_buffer, @@ -149,10 +161,12 @@ clCommandCopyBufferKHR_fn)( cl_uint num_sync_points_in_wait_list, const cl_sync_point_khr* sync_point_wait_list, cl_sync_point_khr* sync_point, - cl_mutable_command_khr* mutable_handle) ; + cl_mutable_command_khr* mutable_handle); -typedef cl_int (CL_API_CALL * -clCommandCopyBufferRectKHR_fn)( +typedef clCommandCopyBufferKHR_t *clCommandCopyBufferKHR_fn ; + +typedef cl_int CL_API_CALL +clCommandCopyBufferRectKHR_t( cl_command_buffer_khr command_buffer, cl_command_queue command_queue, cl_mem src_buffer, @@ -167,10 +181,12 @@ clCommandCopyBufferRectKHR_fn)( cl_uint num_sync_points_in_wait_list, const cl_sync_point_khr* sync_point_wait_list, cl_sync_point_khr* sync_point, - cl_mutable_command_khr* mutable_handle) ; + cl_mutable_command_khr* mutable_handle); -typedef cl_int (CL_API_CALL * -clCommandCopyBufferToImageKHR_fn)( +typedef clCommandCopyBufferRectKHR_t *clCommandCopyBufferRectKHR_fn ; + +typedef cl_int CL_API_CALL +clCommandCopyBufferToImageKHR_t( cl_command_buffer_khr command_buffer, cl_command_queue command_queue, cl_mem src_buffer, @@ -181,10 +197,12 @@ clCommandCopyBufferToImageKHR_fn)( cl_uint num_sync_points_in_wait_list, const cl_sync_point_khr* sync_point_wait_list, cl_sync_point_khr* sync_point, - cl_mutable_command_khr* mutable_handle) ; + cl_mutable_command_khr* mutable_handle); + +typedef clCommandCopyBufferToImageKHR_t *clCommandCopyBufferToImageKHR_fn ; -typedef cl_int (CL_API_CALL * -clCommandCopyImageKHR_fn)( +typedef cl_int CL_API_CALL +clCommandCopyImageKHR_t( cl_command_buffer_khr command_buffer, cl_command_queue command_queue, cl_mem src_image, @@ -195,10 +213,12 @@ clCommandCopyImageKHR_fn)( cl_uint num_sync_points_in_wait_list, const cl_sync_point_khr* sync_point_wait_list, cl_sync_point_khr* sync_point, - cl_mutable_command_khr* mutable_handle) ; + cl_mutable_command_khr* mutable_handle); + +typedef clCommandCopyImageKHR_t *clCommandCopyImageKHR_fn ; -typedef cl_int (CL_API_CALL * -clCommandCopyImageToBufferKHR_fn)( +typedef cl_int CL_API_CALL +clCommandCopyImageToBufferKHR_t( cl_command_buffer_khr command_buffer, cl_command_queue command_queue, cl_mem src_image, @@ -209,10 +229,12 @@ clCommandCopyImageToBufferKHR_fn)( cl_uint num_sync_points_in_wait_list, const cl_sync_point_khr* sync_point_wait_list, cl_sync_point_khr* sync_point, - cl_mutable_command_khr* mutable_handle) ; + cl_mutable_command_khr* mutable_handle); + +typedef clCommandCopyImageToBufferKHR_t *clCommandCopyImageToBufferKHR_fn ; -typedef cl_int (CL_API_CALL * -clCommandFillBufferKHR_fn)( +typedef cl_int CL_API_CALL +clCommandFillBufferKHR_t( cl_command_buffer_khr command_buffer, cl_command_queue command_queue, cl_mem buffer, @@ -223,10 +245,12 @@ clCommandFillBufferKHR_fn)( cl_uint num_sync_points_in_wait_list, const cl_sync_point_khr* sync_point_wait_list, cl_sync_point_khr* sync_point, - cl_mutable_command_khr* mutable_handle) ; + cl_mutable_command_khr* mutable_handle); -typedef cl_int (CL_API_CALL * -clCommandFillImageKHR_fn)( +typedef clCommandFillBufferKHR_t *clCommandFillBufferKHR_fn ; + +typedef cl_int CL_API_CALL +clCommandFillImageKHR_t( cl_command_buffer_khr command_buffer, cl_command_queue command_queue, cl_mem image, @@ -236,10 +260,12 @@ clCommandFillImageKHR_fn)( cl_uint num_sync_points_in_wait_list, const cl_sync_point_khr* sync_point_wait_list, cl_sync_point_khr* sync_point, - cl_mutable_command_khr* mutable_handle) ; + cl_mutable_command_khr* mutable_handle); -typedef cl_int (CL_API_CALL * -clCommandNDRangeKernelKHR_fn)( +typedef clCommandFillImageKHR_t *clCommandFillImageKHR_fn ; + +typedef cl_int CL_API_CALL +clCommandNDRangeKernelKHR_t( cl_command_buffer_khr command_buffer, cl_command_queue command_queue, const cl_ndrange_kernel_command_properties_khr* properties, @@ -251,15 +277,19 @@ clCommandNDRangeKernelKHR_fn)( cl_uint num_sync_points_in_wait_list, const cl_sync_point_khr* sync_point_wait_list, cl_sync_point_khr* sync_point, - cl_mutable_command_khr* mutable_handle) ; + cl_mutable_command_khr* mutable_handle); + +typedef clCommandNDRangeKernelKHR_t *clCommandNDRangeKernelKHR_fn ; -typedef cl_int (CL_API_CALL * -clGetCommandBufferInfoKHR_fn)( +typedef cl_int CL_API_CALL +clGetCommandBufferInfoKHR_t( cl_command_buffer_khr command_buffer, cl_command_buffer_info_khr param_name, size_t param_value_size, void* param_value, - size_t* param_value_size_ret) ; + size_t* param_value_size_ret); + +typedef clGetCommandBufferInfoKHR_t *clGetCommandBufferInfoKHR_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -454,8 +484,8 @@ typedef cl_bitfield cl_platform_command_buffer_capabilities_khr; #define CL_COMMAND_BUFFER_DEVICE_SIDE_SYNC_KHR (1 << 2) -typedef cl_command_buffer_khr (CL_API_CALL * -clRemapCommandBufferKHR_fn)( +typedef cl_command_buffer_khr CL_API_CALL +clRemapCommandBufferKHR_t( cl_command_buffer_khr command_buffer, cl_bool automatic, cl_uint num_queues, @@ -463,7 +493,9 @@ clRemapCommandBufferKHR_fn)( cl_uint num_handles, const cl_mutable_command_khr* handles, cl_mutable_command_khr* handles_ret, - cl_int* errcode_ret) ; + cl_int* errcode_ret); + +typedef clRemapCommandBufferKHR_t *clRemapCommandBufferKHR_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -557,18 +589,22 @@ typedef struct _cl_mutable_base_config_khr { #define CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR 1 -typedef cl_int (CL_API_CALL * -clUpdateMutableCommandsKHR_fn)( +typedef cl_int CL_API_CALL +clUpdateMutableCommandsKHR_t( cl_command_buffer_khr command_buffer, - const cl_mutable_base_config_khr* mutable_config) ; + const cl_mutable_base_config_khr* mutable_config); -typedef cl_int (CL_API_CALL * -clGetMutableCommandInfoKHR_fn)( +typedef clUpdateMutableCommandsKHR_t *clUpdateMutableCommandsKHR_fn ; + +typedef cl_int CL_API_CALL +clGetMutableCommandInfoKHR_t( cl_mutable_command_khr command, cl_mutable_command_info_khr param_name, size_t param_value_size, void* param_value, - size_t* param_value_size_ret) ; + size_t* param_value_size_ret); + +typedef clGetMutableCommandInfoKHR_t *clGetMutableCommandInfoKHR_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -618,11 +654,13 @@ clGetMutableCommandInfoKHR( "cl_APPLE_SetMemObjectDestructor" -typedef cl_int (CL_API_CALL * -clSetMemObjectDestructorAPPLE_fn)( +typedef cl_int CL_API_CALL +clSetMemObjectDestructorAPPLE_t( cl_mem memobj, void (CL_CALLBACK* pfn_notify)(cl_mem memobj, void* user_data), - void* user_data) CL_API_SUFFIX__VERSION_1_0; + void* user_data); + +typedef clSetMemObjectDestructorAPPLE_t *clSetMemObjectDestructorAPPLE_fn CL_API_SUFFIX__VERSION_1_0; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -642,26 +680,32 @@ clSetMemObjectDestructorAPPLE( "cl_APPLE_ContextLoggingFunctions" -typedef void (CL_API_CALL * -clLogMessagesToSystemLogAPPLE_fn)( +typedef void CL_API_CALL +clLogMessagesToSystemLogAPPLE_t( const char* errstr, const void* private_info, size_t cb, - void* user_data) CL_API_SUFFIX__VERSION_1_0; + void* user_data); -typedef void (CL_API_CALL * -clLogMessagesToStdoutAPPLE_fn)( +typedef clLogMessagesToSystemLogAPPLE_t *clLogMessagesToSystemLogAPPLE_fn CL_API_SUFFIX__VERSION_1_0; + +typedef void CL_API_CALL +clLogMessagesToStdoutAPPLE_t( const char* errstr, const void* private_info, size_t cb, - void* user_data) CL_API_SUFFIX__VERSION_1_0; + void* user_data); + +typedef clLogMessagesToStdoutAPPLE_t *clLogMessagesToStdoutAPPLE_fn CL_API_SUFFIX__VERSION_1_0; -typedef void (CL_API_CALL * -clLogMessagesToStderrAPPLE_fn)( +typedef void CL_API_CALL +clLogMessagesToStderrAPPLE_t( const char* errstr, const void* private_info, size_t cb, - void* user_data) CL_API_SUFFIX__VERSION_1_0; + void* user_data); + +typedef clLogMessagesToStderrAPPLE_t *clLogMessagesToStderrAPPLE_fn CL_API_SUFFIX__VERSION_1_0; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -702,11 +746,13 @@ clLogMessagesToStderrAPPLE( #define CL_PLATFORM_NOT_FOUND_KHR -1001 -typedef cl_int (CL_API_CALL * -clIcdGetPlatformIDsKHR_fn)( +typedef cl_int CL_API_CALL +clIcdGetPlatformIDsKHR_t( cl_uint num_entries, cl_platform_id* platforms, - cl_uint* num_platforms) ; + cl_uint* num_platforms); + +typedef clIcdGetPlatformIDsKHR_t *clIcdGetPlatformIDsKHR_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -732,12 +778,14 @@ clIcdGetPlatformIDsKHR( #define CL_PROGRAM_IL_KHR 0x1169 -typedef cl_program (CL_API_CALL * -clCreateProgramWithILKHR_fn)( +typedef cl_program CL_API_CALL +clCreateProgramWithILKHR_t( cl_context context, const void* il, size_t length, - cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2; + cl_int* errcode_ret); + +typedef clCreateProgramWithILKHR_t *clCreateProgramWithILKHR_fn CL_API_SUFFIX__VERSION_1_2; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -793,9 +841,11 @@ typedef cl_bitfield cl_device_terminate_capability_khr; #define CL_CONTEXT_TERMINATED_KHR -1121 -typedef cl_int (CL_API_CALL * -clTerminateContextKHR_fn)( - cl_context context) CL_API_SUFFIX__VERSION_1_2; +typedef cl_int CL_API_CALL +clTerminateContextKHR_t( + cl_context context); + +typedef clTerminateContextKHR_t *clTerminateContextKHR_fn CL_API_SUFFIX__VERSION_1_2; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -828,12 +878,14 @@ clTerminateContextKHR( typedef cl_properties cl_queue_properties_khr; -typedef cl_command_queue (CL_API_CALL * -clCreateCommandQueueWithPropertiesKHR_fn)( +typedef cl_command_queue CL_API_CALL +clCreateCommandQueueWithPropertiesKHR_t( cl_context context, cl_device_id device, const cl_queue_properties_khr* properties, - cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2; + cl_int* errcode_ret); + +typedef clCreateCommandQueueWithPropertiesKHR_t *clCreateCommandQueueWithPropertiesKHR_fn CL_API_SUFFIX__VERSION_1_2; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -944,21 +996,27 @@ typedef cl_ulong cl_device_partition_property_ext; #define CL_PARTITION_BY_NAMES_LIST_END_EXT ((cl_device_partition_property_ext)0 - 1) -typedef cl_int (CL_API_CALL * -clReleaseDeviceEXT_fn)( - cl_device_id device) CL_API_SUFFIX__VERSION_1_1; +typedef cl_int CL_API_CALL +clReleaseDeviceEXT_t( + cl_device_id device); -typedef cl_int (CL_API_CALL * -clRetainDeviceEXT_fn)( - cl_device_id device) CL_API_SUFFIX__VERSION_1_1; +typedef clReleaseDeviceEXT_t *clReleaseDeviceEXT_fn CL_API_SUFFIX__VERSION_1_1; -typedef cl_int (CL_API_CALL * -clCreateSubDevicesEXT_fn)( +typedef cl_int CL_API_CALL +clRetainDeviceEXT_t( + cl_device_id device); + +typedef clRetainDeviceEXT_t *clRetainDeviceEXT_fn CL_API_SUFFIX__VERSION_1_1; + +typedef cl_int CL_API_CALL +clCreateSubDevicesEXT_t( cl_device_id in_device, const cl_device_partition_property_ext* properties, cl_uint num_entries, cl_device_id* out_devices, - cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_1; + cl_uint* num_devices); + +typedef clCreateSubDevicesEXT_t *clCreateSubDevicesEXT_fn CL_API_SUFFIX__VERSION_1_1; #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -996,15 +1054,17 @@ typedef cl_bitfield cl_mem_migration_flags_ext; #define CL_COMMAND_MIGRATE_MEM_OBJECT_EXT 0x4040 -typedef cl_int (CL_API_CALL * -clEnqueueMigrateMemObjectEXT_fn)( +typedef cl_int CL_API_CALL +clEnqueueMigrateMemObjectEXT_t( cl_command_queue command_queue, cl_uint num_mem_objects, const cl_mem* mem_objects, cl_mem_migration_flags_ext flags, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) ; + cl_event* event); + +typedef clEnqueueMigrateMemObjectEXT_t *clEnqueueMigrateMemObjectEXT_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -1061,8 +1121,8 @@ typedef struct _cl_mem_ext_host_ptr { #define CL_MEM_HOST_WRITE_COMBINING_QCOM 0x40A7 -typedef cl_int (CL_API_CALL * -clGetDeviceImageInfoQCOM_fn)( +typedef cl_int CL_API_CALL +clGetDeviceImageInfoQCOM_t( cl_device_id device, size_t image_width, size_t image_height, @@ -1070,7 +1130,9 @@ clGetDeviceImageInfoQCOM_fn)( cl_image_pitch_info_qcom param_name, size_t param_value_size, void* param_value, - size_t* param_value_size_ret) ; + size_t* param_value_size_ret); + +typedef clGetDeviceImageInfoQCOM_t *clGetDeviceImageInfoQCOM_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -1171,23 +1233,27 @@ typedef struct _cl_mem_android_native_buffer_host_ptr { #define CL_COMMAND_RELEASE_GRALLOC_OBJECTS_IMG 0x40D3 -typedef cl_int (CL_API_CALL * -clEnqueueAcquireGrallocObjectsIMG_fn)( +typedef cl_int CL_API_CALL +clEnqueueAcquireGrallocObjectsIMG_t( cl_command_queue command_queue, cl_uint num_objects, const cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) CL_API_SUFFIX__VERSION_1_2; + cl_event* event); -typedef cl_int (CL_API_CALL * -clEnqueueReleaseGrallocObjectsIMG_fn)( +typedef clEnqueueAcquireGrallocObjectsIMG_t *clEnqueueAcquireGrallocObjectsIMG_fn CL_API_SUFFIX__VERSION_1_2; + +typedef cl_int CL_API_CALL +clEnqueueReleaseGrallocObjectsIMG_t( cl_command_queue command_queue, cl_uint num_objects, const cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) CL_API_SUFFIX__VERSION_1_2; + cl_event* event); + +typedef clEnqueueReleaseGrallocObjectsIMG_t *clEnqueueReleaseGrallocObjectsIMG_fn CL_API_SUFFIX__VERSION_1_2; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -1228,8 +1294,8 @@ typedef cl_uint cl_mipmap_filter_mode_img; #define CL_COMMAND_GENERATE_MIPMAP_IMG 0x40D6 -typedef cl_int (CL_API_CALL * -clEnqueueGenerateMipmapIMG_fn)( +typedef cl_int CL_API_CALL +clEnqueueGenerateMipmapIMG_t( cl_command_queue command_queue, cl_mem src_image, cl_mem dst_image, @@ -1238,7 +1304,9 @@ clEnqueueGenerateMipmapIMG_fn)( const size_t* mip_region, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) CL_API_SUFFIX__VERSION_1_2; + cl_event* event); + +typedef clEnqueueGenerateMipmapIMG_t *clEnqueueGenerateMipmapIMG_fn CL_API_SUFFIX__VERSION_1_2; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -1287,8 +1355,8 @@ typedef cl_uint cl_kernel_sub_group_info; #define CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE_KHR 0x2034 -typedef cl_int (CL_API_CALL * -clGetKernelSubGroupInfoKHR_fn)( +typedef cl_int CL_API_CALL +clGetKernelSubGroupInfoKHR_t( cl_kernel in_kernel, cl_device_id in_device, cl_kernel_sub_group_info param_name, @@ -1296,7 +1364,9 @@ clGetKernelSubGroupInfoKHR_fn)( const void* input_value, size_t param_value_size, void* param_value, - size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_2_0_DEPRECATED; + size_t* param_value_size_ret); + +typedef clGetKernelSubGroupInfoKHR_t *clGetKernelSubGroupInfoKHR_fn CL_API_SUFFIX__VERSION_2_0_DEPRECATED; #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -1457,14 +1527,16 @@ typedef struct _cl_device_pci_bus_info_khr { "cl_khr_suggested_local_work_size" -typedef cl_int (CL_API_CALL * -clGetKernelSuggestedLocalWorkSizeKHR_fn)( +typedef cl_int CL_API_CALL +clGetKernelSuggestedLocalWorkSizeKHR_t( cl_command_queue command_queue, cl_kernel kernel, cl_uint work_dim, const size_t* global_work_offset, const size_t* global_work_size, - size_t* suggested_local_work_size) CL_API_SUFFIX__VERSION_3_0; + size_t* suggested_local_work_size); + +typedef clGetKernelSuggestedLocalWorkSizeKHR_t *clGetKernelSuggestedLocalWorkSizeKHR_fn CL_API_SUFFIX__VERSION_3_0; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -1529,23 +1601,27 @@ typedef cl_uint cl_external_memory_handle_type_khr; #define CL_COMMAND_RELEASE_EXTERNAL_MEM_OBJECTS_KHR 0x2048 -typedef cl_int (CL_API_CALL * -clEnqueueAcquireExternalMemObjectsKHR_fn)( +typedef cl_int CL_API_CALL +clEnqueueAcquireExternalMemObjectsKHR_t( cl_command_queue command_queue, cl_uint num_mem_objects, const cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) CL_API_SUFFIX__VERSION_3_0; + cl_event* event); -typedef cl_int (CL_API_CALL * -clEnqueueReleaseExternalMemObjectsKHR_fn)( +typedef clEnqueueAcquireExternalMemObjectsKHR_t *clEnqueueAcquireExternalMemObjectsKHR_fn CL_API_SUFFIX__VERSION_3_0; + +typedef cl_int CL_API_CALL +clEnqueueReleaseExternalMemObjectsKHR_t( cl_command_queue command_queue, cl_uint num_mem_objects, const cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) CL_API_SUFFIX__VERSION_3_0; + cl_event* event); + +typedef clEnqueueReleaseExternalMemObjectsKHR_t *clEnqueueReleaseExternalMemObjectsKHR_fn CL_API_SUFFIX__VERSION_3_0; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -1636,14 +1712,16 @@ typedef cl_uint cl_external_semaphore_handle_type_khr; #define CL_SEMAPHORE_EXPORT_HANDLE_TYPES_LIST_END_KHR 0 -typedef cl_int (CL_API_CALL * -clGetSemaphoreHandleForTypeKHR_fn)( +typedef cl_int CL_API_CALL +clGetSemaphoreHandleForTypeKHR_t( cl_semaphore_khr sema_object, cl_device_id device, cl_external_semaphore_handle_type_khr handle_type, size_t handle_size, void* handle_ptr, - size_t* handle_size_ret) CL_API_SUFFIX__VERSION_1_2; + size_t* handle_size_ret); + +typedef clGetSemaphoreHandleForTypeKHR_t *clGetSemaphoreHandleForTypeKHR_fn CL_API_SUFFIX__VERSION_1_2; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -1740,47 +1818,59 @@ typedef cl_ulong cl_semaphore_payload_khr; #define CL_INVALID_SEMAPHORE_KHR -1142 -typedef cl_semaphore_khr (CL_API_CALL * -clCreateSemaphoreWithPropertiesKHR_fn)( +typedef cl_semaphore_khr CL_API_CALL +clCreateSemaphoreWithPropertiesKHR_t( cl_context context, const cl_semaphore_properties_khr* sema_props, - cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2; + cl_int* errcode_ret); + +typedef clCreateSemaphoreWithPropertiesKHR_t *clCreateSemaphoreWithPropertiesKHR_fn CL_API_SUFFIX__VERSION_1_2; -typedef cl_int (CL_API_CALL * -clEnqueueWaitSemaphoresKHR_fn)( +typedef cl_int CL_API_CALL +clEnqueueWaitSemaphoresKHR_t( cl_command_queue command_queue, cl_uint num_sema_objects, const cl_semaphore_khr* sema_objects, const cl_semaphore_payload_khr* sema_payload_list, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) CL_API_SUFFIX__VERSION_1_2; + cl_event* event); + +typedef clEnqueueWaitSemaphoresKHR_t *clEnqueueWaitSemaphoresKHR_fn CL_API_SUFFIX__VERSION_1_2; -typedef cl_int (CL_API_CALL * -clEnqueueSignalSemaphoresKHR_fn)( +typedef cl_int CL_API_CALL +clEnqueueSignalSemaphoresKHR_t( cl_command_queue command_queue, cl_uint num_sema_objects, const cl_semaphore_khr* sema_objects, const cl_semaphore_payload_khr* sema_payload_list, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) CL_API_SUFFIX__VERSION_1_2; + cl_event* event); + +typedef clEnqueueSignalSemaphoresKHR_t *clEnqueueSignalSemaphoresKHR_fn CL_API_SUFFIX__VERSION_1_2; -typedef cl_int (CL_API_CALL * -clGetSemaphoreInfoKHR_fn)( +typedef cl_int CL_API_CALL +clGetSemaphoreInfoKHR_t( cl_semaphore_khr sema_object, cl_semaphore_info_khr param_name, size_t param_value_size, void* param_value, - size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_2; + size_t* param_value_size_ret); -typedef cl_int (CL_API_CALL * -clReleaseSemaphoreKHR_fn)( - cl_semaphore_khr sema_object) CL_API_SUFFIX__VERSION_1_2; +typedef clGetSemaphoreInfoKHR_t *clGetSemaphoreInfoKHR_fn CL_API_SUFFIX__VERSION_1_2; -typedef cl_int (CL_API_CALL * -clRetainSemaphoreKHR_fn)( - cl_semaphore_khr sema_object) CL_API_SUFFIX__VERSION_1_2; +typedef cl_int CL_API_CALL +clReleaseSemaphoreKHR_t( + cl_semaphore_khr sema_object); + +typedef clReleaseSemaphoreKHR_t *clReleaseSemaphoreKHR_fn CL_API_SUFFIX__VERSION_1_2; + +typedef cl_int CL_API_CALL +clRetainSemaphoreKHR_t( + cl_semaphore_khr sema_object); + +typedef clRetainSemaphoreKHR_t *clRetainSemaphoreKHR_fn CL_API_SUFFIX__VERSION_1_2; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -1849,14 +1939,16 @@ typedef intptr_t cl_import_properties_arm; #define CL_IMPORT_ANDROID_HARDWARE_BUFFER_LAYER_INDEX_ARM 0x41F0 -typedef cl_mem (CL_API_CALL * -clImportMemoryARM_fn)( +typedef cl_mem CL_API_CALL +clImportMemoryARM_t( cl_context context, cl_mem_flags flags, const cl_import_properties_arm* properties, void* memory, size_t size, - cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0; + cl_int* errcode_ret); + +typedef clImportMemoryARM_t *clImportMemoryARM_fn CL_API_SUFFIX__VERSION_1_0; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -1910,20 +2002,24 @@ typedef cl_bitfield cl_device_svm_capabilities_arm; #define CL_MEM_SVM_ATOMICS_ARM (1 << 11) -typedef void* (CL_API_CALL * -clSVMAllocARM_fn)( +typedef void* CL_API_CALL +clSVMAllocARM_t( cl_context context, cl_svm_mem_flags_arm flags, size_t size, - cl_uint alignment) CL_API_SUFFIX__VERSION_1_2; + cl_uint alignment); + +typedef clSVMAllocARM_t *clSVMAllocARM_fn CL_API_SUFFIX__VERSION_1_2; -typedef void (CL_API_CALL * -clSVMFreeARM_fn)( +typedef void CL_API_CALL +clSVMFreeARM_t( cl_context context, - void* svm_pointer) CL_API_SUFFIX__VERSION_1_2; + void* svm_pointer); -typedef cl_int (CL_API_CALL * -clEnqueueSVMFreeARM_fn)( +typedef clSVMFreeARM_t *clSVMFreeARM_fn CL_API_SUFFIX__VERSION_1_2; + +typedef cl_int CL_API_CALL +clEnqueueSVMFreeARM_t( cl_command_queue command_queue, cl_uint num_svm_pointers, void* svm_pointers[], @@ -1931,10 +2027,12 @@ clEnqueueSVMFreeARM_fn)( void* user_data, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) CL_API_SUFFIX__VERSION_1_2; + cl_event* event); -typedef cl_int (CL_API_CALL * -clEnqueueSVMMemcpyARM_fn)( +typedef clEnqueueSVMFreeARM_t *clEnqueueSVMFreeARM_fn CL_API_SUFFIX__VERSION_1_2; + +typedef cl_int CL_API_CALL +clEnqueueSVMMemcpyARM_t( cl_command_queue command_queue, cl_bool blocking_copy, void* dst_ptr, @@ -1942,10 +2040,12 @@ clEnqueueSVMMemcpyARM_fn)( size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) CL_API_SUFFIX__VERSION_1_2; + cl_event* event); + +typedef clEnqueueSVMMemcpyARM_t *clEnqueueSVMMemcpyARM_fn CL_API_SUFFIX__VERSION_1_2; -typedef cl_int (CL_API_CALL * -clEnqueueSVMMemFillARM_fn)( +typedef cl_int CL_API_CALL +clEnqueueSVMMemFillARM_t( cl_command_queue command_queue, void* svm_ptr, const void* pattern, @@ -1953,10 +2053,12 @@ clEnqueueSVMMemFillARM_fn)( size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) CL_API_SUFFIX__VERSION_1_2; + cl_event* event); + +typedef clEnqueueSVMMemFillARM_t *clEnqueueSVMMemFillARM_fn CL_API_SUFFIX__VERSION_1_2; -typedef cl_int (CL_API_CALL * -clEnqueueSVMMapARM_fn)( +typedef cl_int CL_API_CALL +clEnqueueSVMMapARM_t( cl_command_queue command_queue, cl_bool blocking_map, cl_map_flags flags, @@ -1964,28 +2066,36 @@ clEnqueueSVMMapARM_fn)( size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) CL_API_SUFFIX__VERSION_1_2; + cl_event* event); + +typedef clEnqueueSVMMapARM_t *clEnqueueSVMMapARM_fn CL_API_SUFFIX__VERSION_1_2; -typedef cl_int (CL_API_CALL * -clEnqueueSVMUnmapARM_fn)( +typedef cl_int CL_API_CALL +clEnqueueSVMUnmapARM_t( 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_API_SUFFIX__VERSION_1_2; + cl_event* event); -typedef cl_int (CL_API_CALL * -clSetKernelArgSVMPointerARM_fn)( +typedef clEnqueueSVMUnmapARM_t *clEnqueueSVMUnmapARM_fn CL_API_SUFFIX__VERSION_1_2; + +typedef cl_int CL_API_CALL +clSetKernelArgSVMPointerARM_t( cl_kernel kernel, cl_uint arg_index, - const void* arg_value) CL_API_SUFFIX__VERSION_1_2; + const void* arg_value); -typedef cl_int (CL_API_CALL * -clSetKernelExecInfoARM_fn)( +typedef clSetKernelArgSVMPointerARM_t *clSetKernelArgSVMPointerARM_fn CL_API_SUFFIX__VERSION_1_2; + +typedef cl_int CL_API_CALL +clSetKernelExecInfoARM_t( cl_kernel kernel, cl_kernel_exec_info_arm param_name, size_t param_value_size, - const void* param_value) CL_API_SUFFIX__VERSION_1_2; + const void* param_value); + +typedef clSetKernelExecInfoARM_t *clSetKernelExecInfoARM_fn CL_API_SUFFIX__VERSION_1_2; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -2237,29 +2347,37 @@ typedef cl_uint cl_accelerator_info_intel; #define CL_ACCELERATOR_TYPE_NOT_SUPPORTED_INTEL -1097 -typedef cl_accelerator_intel (CL_API_CALL * -clCreateAcceleratorINTEL_fn)( +typedef cl_accelerator_intel CL_API_CALL +clCreateAcceleratorINTEL_t( cl_context context, cl_accelerator_type_intel accelerator_type, size_t descriptor_size, const void* descriptor, - cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2; + cl_int* errcode_ret); + +typedef clCreateAcceleratorINTEL_t *clCreateAcceleratorINTEL_fn CL_API_SUFFIX__VERSION_1_2; -typedef cl_int (CL_API_CALL * -clGetAcceleratorInfoINTEL_fn)( +typedef cl_int CL_API_CALL +clGetAcceleratorInfoINTEL_t( cl_accelerator_intel accelerator, cl_accelerator_info_intel param_name, size_t param_value_size, void* param_value, - size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_2; + size_t* param_value_size_ret); -typedef cl_int (CL_API_CALL * -clRetainAcceleratorINTEL_fn)( - cl_accelerator_intel accelerator) CL_API_SUFFIX__VERSION_1_2; +typedef clGetAcceleratorInfoINTEL_t *clGetAcceleratorInfoINTEL_fn CL_API_SUFFIX__VERSION_1_2; -typedef cl_int (CL_API_CALL * -clReleaseAcceleratorINTEL_fn)( - cl_accelerator_intel accelerator) CL_API_SUFFIX__VERSION_1_2; +typedef cl_int CL_API_CALL +clRetainAcceleratorINTEL_t( + cl_accelerator_intel accelerator); + +typedef clRetainAcceleratorINTEL_t *clRetainAcceleratorINTEL_fn CL_API_SUFFIX__VERSION_1_2; + +typedef cl_int CL_API_CALL +clReleaseAcceleratorINTEL_t( + cl_accelerator_intel accelerator); + +typedef clReleaseAcceleratorINTEL_t *clReleaseAcceleratorINTEL_fn CL_API_SUFFIX__VERSION_1_2; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -2682,59 +2800,73 @@ typedef cl_uint cl_mem_advice_intel; #define CL_COMMAND_MEMADVISE_INTEL 0x4207 -typedef void* (CL_API_CALL * -clHostMemAllocINTEL_fn)( +typedef void* CL_API_CALL +clHostMemAllocINTEL_t( cl_context context, const cl_mem_properties_intel* properties, size_t size, cl_uint alignment, - cl_int* errcode_ret) ; + cl_int* errcode_ret); -typedef void* (CL_API_CALL * -clDeviceMemAllocINTEL_fn)( +typedef clHostMemAllocINTEL_t *clHostMemAllocINTEL_fn ; + +typedef void* CL_API_CALL +clDeviceMemAllocINTEL_t( cl_context context, cl_device_id device, const cl_mem_properties_intel* properties, size_t size, cl_uint alignment, - cl_int* errcode_ret) ; + cl_int* errcode_ret); -typedef void* (CL_API_CALL * -clSharedMemAllocINTEL_fn)( +typedef clDeviceMemAllocINTEL_t *clDeviceMemAllocINTEL_fn ; + +typedef void* CL_API_CALL +clSharedMemAllocINTEL_t( cl_context context, cl_device_id device, const cl_mem_properties_intel* properties, size_t size, cl_uint alignment, - cl_int* errcode_ret) ; + cl_int* errcode_ret); + +typedef clSharedMemAllocINTEL_t *clSharedMemAllocINTEL_fn ; -typedef cl_int (CL_API_CALL * -clMemFreeINTEL_fn)( +typedef cl_int CL_API_CALL +clMemFreeINTEL_t( cl_context context, - void* ptr) ; + void* ptr); + +typedef clMemFreeINTEL_t *clMemFreeINTEL_fn ; -typedef cl_int (CL_API_CALL * -clMemBlockingFreeINTEL_fn)( +typedef cl_int CL_API_CALL +clMemBlockingFreeINTEL_t( cl_context context, - void* ptr) ; + void* ptr); + +typedef clMemBlockingFreeINTEL_t *clMemBlockingFreeINTEL_fn ; -typedef cl_int (CL_API_CALL * -clGetMemAllocInfoINTEL_fn)( +typedef cl_int CL_API_CALL +clGetMemAllocInfoINTEL_t( cl_context context, const void* ptr, cl_mem_info_intel param_name, size_t param_value_size, void* param_value, - size_t* param_value_size_ret) ; + size_t* param_value_size_ret); -typedef cl_int (CL_API_CALL * -clSetKernelArgMemPointerINTEL_fn)( +typedef clGetMemAllocInfoINTEL_t *clGetMemAllocInfoINTEL_fn ; + +typedef cl_int CL_API_CALL +clSetKernelArgMemPointerINTEL_t( cl_kernel kernel, cl_uint arg_index, - const void* arg_value) ; + const void* arg_value); -typedef cl_int (CL_API_CALL * -clEnqueueMemFillINTEL_fn)( +typedef clSetKernelArgMemPointerINTEL_t *clSetKernelArgMemPointerINTEL_fn ; + +typedef cl_int CL_API_CALL +clEnqueueMemFillINTEL_t( cl_command_queue command_queue, void* dst_ptr, const void* pattern, @@ -2742,10 +2874,12 @@ clEnqueueMemFillINTEL_fn)( size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) ; + cl_event* event); -typedef cl_int (CL_API_CALL * -clEnqueueMemcpyINTEL_fn)( +typedef clEnqueueMemFillINTEL_t *clEnqueueMemFillINTEL_fn ; + +typedef cl_int CL_API_CALL +clEnqueueMemcpyINTEL_t( cl_command_queue command_queue, cl_bool blocking, void* dst_ptr, @@ -2753,17 +2887,21 @@ clEnqueueMemcpyINTEL_fn)( size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) ; + cl_event* event); -typedef cl_int (CL_API_CALL * -clEnqueueMemAdviseINTEL_fn)( +typedef clEnqueueMemcpyINTEL_t *clEnqueueMemcpyINTEL_fn ; + +typedef cl_int CL_API_CALL +clEnqueueMemAdviseINTEL_t( cl_command_queue command_queue, const void* ptr, size_t size, cl_mem_advice_intel advice, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) ; + cl_event* event); + +typedef clEnqueueMemAdviseINTEL_t *clEnqueueMemAdviseINTEL_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -2855,15 +2993,17 @@ clEnqueueMemAdviseINTEL( #if defined(CL_VERSION_1_2) /* Requires OpenCL 1.2 for cl_mem_migration_flags: */ -typedef cl_int (CL_API_CALL * -clEnqueueMigrateMemINTEL_fn)( +typedef cl_int CL_API_CALL +clEnqueueMigrateMemINTEL_t( cl_command_queue command_queue, const void* ptr, size_t size, cl_mem_migration_flags flags, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) ; + cl_event* event); + +typedef clEnqueueMigrateMemINTEL_t *clEnqueueMigrateMemINTEL_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -2883,15 +3023,17 @@ clEnqueueMigrateMemINTEL( /* deprecated, use clEnqueueMemFillINTEL instead */ -typedef cl_int (CL_API_CALL * -clEnqueueMemsetINTEL_fn)( +typedef cl_int CL_API_CALL +clEnqueueMemsetINTEL_t( cl_command_queue command_queue, void* dst_ptr, cl_int value, size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) ; + cl_event* event); + +typedef clEnqueueMemsetINTEL_t *clEnqueueMemsetINTEL_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -2930,14 +3072,16 @@ clEnqueueMemsetINTEL( /* type cl_mem_properties_intel */ -typedef cl_mem (CL_API_CALL * -clCreateBufferWithPropertiesINTEL_fn)( +typedef cl_mem CL_API_CALL +clCreateBufferWithPropertiesINTEL_t( cl_context context, const cl_mem_properties_intel* properties, cl_mem_flags flags, size_t size, void* host_ptr, - cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0; + cl_int* errcode_ret); + +typedef clCreateBufferWithPropertiesINTEL_t *clCreateBufferWithPropertiesINTEL_fn CL_API_SUFFIX__VERSION_1_0; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -2968,8 +3112,8 @@ clCreateBufferWithPropertiesINTEL( #define CL_PROGRAM_HOST_PIPE_NAMES_INTEL 0x4217 -typedef cl_int (CL_API_CALL * -clEnqueueReadHostPipeINTEL_fn)( +typedef cl_int CL_API_CALL +clEnqueueReadHostPipeINTEL_t( cl_command_queue command_queue, cl_program program, const char* pipe_symbol, @@ -2978,10 +3122,12 @@ clEnqueueReadHostPipeINTEL_fn)( size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) CL_API_SUFFIX__VERSION_1_0; + cl_event* event); -typedef cl_int (CL_API_CALL * -clEnqueueWriteHostPipeINTEL_fn)( +typedef clEnqueueReadHostPipeINTEL_t *clEnqueueReadHostPipeINTEL_fn CL_API_SUFFIX__VERSION_1_0; + +typedef cl_int CL_API_CALL +clEnqueueWriteHostPipeINTEL_t( cl_command_queue command_queue, cl_program program, const char* pipe_symbol, @@ -2990,7 +3136,9 @@ clEnqueueWriteHostPipeINTEL_fn)( size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) CL_API_SUFFIX__VERSION_1_0; + cl_event* event); + +typedef clEnqueueWriteHostPipeINTEL_t *clEnqueueWriteHostPipeINTEL_fn CL_API_SUFFIX__VERSION_1_0; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -3124,8 +3272,8 @@ typedef cl_uint cl_image_requirements_info_ext; /* Enqueued Commands APIs */ -typedef cl_int (CL_API_CALL * -clGetImageRequirementsInfoEXT_fn)( +typedef cl_int CL_API_CALL +clGetImageRequirementsInfoEXT_t( cl_context context, const cl_mem_properties* properties, cl_mem_flags flags, @@ -3134,7 +3282,9 @@ clGetImageRequirementsInfoEXT_fn)( cl_image_requirements_info_ext param_name, size_t param_value_size, void* param_value, - size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_3_0; + size_t* param_value_size_ret); + +typedef clGetImageRequirementsInfoEXT_t *clGetImageRequirementsInfoEXT_fn CL_API_SUFFIX__VERSION_3_0; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -3184,12 +3334,14 @@ typedef cl_uint cl_icdl_info; #define CL_ICDL_VENDOR 4 -typedef cl_int (CL_API_CALL * -clGetICDLoaderInfoOCLICD_fn)( +typedef cl_int CL_API_CALL +clGetICDLoaderInfoOCLICD_t( cl_icdl_info param_name, size_t param_value_size, void* param_value, - size_t* param_value_size_ret) ; + size_t* param_value_size_ret); + +typedef clGetICDLoaderInfoOCLICD_t *clGetICDLoaderInfoOCLICD_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -3256,10 +3408,12 @@ typedef cl_bitfield cl_device_fp_atomic_capabilities_ext; "cl_pocl_content_size" -typedef cl_int (CL_API_CALL * -clSetContentSizeBufferPoCL_fn)( +typedef cl_int CL_API_CALL +clSetContentSizeBufferPoCL_t( cl_mem buffer, - cl_mem content_size_buffer) CL_API_SUFFIX__VERSION_1_0; + cl_mem content_size_buffer); + +typedef clSetContentSizeBufferPoCL_t *clSetContentSizeBufferPoCL_fn CL_API_SUFFIX__VERSION_1_0; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) diff --git a/CL/cl_gl.h b/CL/cl_gl.h index f88348e2..e17def1f 100644 --- a/CL/cl_gl.h +++ b/CL/cl_gl.h @@ -91,20 +91,24 @@ typedef cl_uint cl_gl_platform_info; #define CL_GL_MIPMAP_LEVEL 0x2005 -typedef cl_int (CL_API_CALL * -clGetGLContextInfoKHR_fn)( +typedef cl_int CL_API_CALL +clGetGLContextInfoKHR_t( const cl_context_properties* properties, cl_gl_context_info param_name, size_t param_value_size, void* param_value, - size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; + size_t* param_value_size_ret); + +typedef clGetGLContextInfoKHR_t *clGetGLContextInfoKHR_fn CL_API_SUFFIX__VERSION_1_0; -typedef cl_mem (CL_API_CALL * -clCreateFromGLBuffer_fn)( +typedef cl_mem CL_API_CALL +clCreateFromGLBuffer_t( cl_context context, cl_mem_flags flags, cl_GLuint bufobj, - cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0; + cl_int* errcode_ret); + +typedef clCreateFromGLBuffer_t *clCreateFromGLBuffer_fn CL_API_SUFFIX__VERSION_1_0; #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -127,14 +131,16 @@ clCreateFromGLBuffer( #if defined(CL_VERSION_1_2) -typedef cl_mem (CL_API_CALL * -clCreateFromGLTexture_fn)( +typedef cl_mem CL_API_CALL +clCreateFromGLTexture_t( cl_context context, cl_mem_flags flags, cl_GLenum target, cl_GLint miplevel, cl_GLuint texture, - cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2; + cl_int* errcode_ret); + +typedef clCreateFromGLTexture_t *clCreateFromGLTexture_fn CL_API_SUFFIX__VERSION_1_2; #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -152,44 +158,54 @@ clCreateFromGLTexture( #endif /* defined(CL_VERSION_1_2) */ -typedef cl_mem (CL_API_CALL * -clCreateFromGLRenderbuffer_fn)( +typedef cl_mem CL_API_CALL +clCreateFromGLRenderbuffer_t( cl_context context, cl_mem_flags flags, cl_GLuint renderbuffer, - cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0; + cl_int* errcode_ret); + +typedef clCreateFromGLRenderbuffer_t *clCreateFromGLRenderbuffer_fn CL_API_SUFFIX__VERSION_1_0; -typedef cl_int (CL_API_CALL * -clGetGLObjectInfo_fn)( +typedef cl_int CL_API_CALL +clGetGLObjectInfo_t( cl_mem memobj, cl_gl_object_type* gl_object_type, - cl_GLuint* gl_object_name) CL_API_SUFFIX__VERSION_1_0; + cl_GLuint* gl_object_name); -typedef cl_int (CL_API_CALL * -clGetGLTextureInfo_fn)( +typedef clGetGLObjectInfo_t *clGetGLObjectInfo_fn CL_API_SUFFIX__VERSION_1_0; + +typedef cl_int CL_API_CALL +clGetGLTextureInfo_t( cl_mem memobj, cl_gl_texture_info param_name, size_t param_value_size, void* param_value, - size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; + size_t* param_value_size_ret); + +typedef clGetGLTextureInfo_t *clGetGLTextureInfo_fn CL_API_SUFFIX__VERSION_1_0; -typedef cl_int (CL_API_CALL * -clEnqueueAcquireGLObjects_fn)( +typedef cl_int CL_API_CALL +clEnqueueAcquireGLObjects_t( cl_command_queue command_queue, cl_uint num_objects, const cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) CL_API_SUFFIX__VERSION_1_0; + cl_event* event); + +typedef clEnqueueAcquireGLObjects_t *clEnqueueAcquireGLObjects_fn CL_API_SUFFIX__VERSION_1_0; -typedef cl_int (CL_API_CALL * -clEnqueueReleaseGLObjects_fn)( +typedef cl_int CL_API_CALL +clEnqueueReleaseGLObjects_t( cl_command_queue command_queue, cl_uint num_objects, const cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) CL_API_SUFFIX__VERSION_1_0; + cl_event* event); + +typedef clEnqueueReleaseGLObjects_t *clEnqueueReleaseGLObjects_fn CL_API_SUFFIX__VERSION_1_0; #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -236,23 +252,27 @@ clEnqueueReleaseGLObjects( /* OpenCL 1.0 APIs that were deprecated in OpenCL 1.2 */ -typedef cl_mem (CL_API_CALL * -clCreateFromGLTexture2D_fn)( +typedef cl_mem CL_API_CALL +clCreateFromGLTexture2D_t( cl_context context, cl_mem_flags flags, cl_GLenum target, cl_GLint miplevel, cl_GLuint texture, - cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED; + cl_int* errcode_ret); + +typedef clCreateFromGLTexture2D_t *clCreateFromGLTexture2D_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED; -typedef cl_mem (CL_API_CALL * -clCreateFromGLTexture3D_fn)( +typedef cl_mem CL_API_CALL +clCreateFromGLTexture3D_t( cl_context context, cl_mem_flags flags, cl_GLenum target, cl_GLint miplevel, cl_GLuint texture, - cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED; + cl_int* errcode_ret); + +typedef clCreateFromGLTexture3D_t *clCreateFromGLTexture3D_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED; #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -289,11 +309,13 @@ typedef struct __GLsync * cl_GLsync; #define CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR 0x200D -typedef cl_event (CL_API_CALL * -clCreateEventFromGLsyncKHR_fn)( +typedef cl_event CL_API_CALL +clCreateEventFromGLsyncKHR_t( cl_context context, cl_GLsync sync, - cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1; + cl_int* errcode_ret); + +typedef clCreateEventFromGLsyncKHR_t *clCreateEventFromGLsyncKHR_fn CL_API_SUFFIX__VERSION_1_1; #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -343,14 +365,16 @@ clCreateEventFromGLsyncKHR( /* when cl_khr_gl_sharing is supported */ -typedef cl_int (CL_API_CALL * -clGetSupportedGLTextureFormatsINTEL_fn)( +typedef cl_int CL_API_CALL +clGetSupportedGLTextureFormatsINTEL_t( cl_context context, cl_mem_flags flags, cl_mem_object_type image_type, cl_uint num_entries, cl_GLenum* gl_formats, - cl_uint* num_texture_formats) ; + cl_uint* num_texture_formats); + +typedef clGetSupportedGLTextureFormatsINTEL_t *clGetSupportedGLTextureFormatsINTEL_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) diff --git a/CL/cl_layer.h b/CL/cl_layer.h index acaa6c2a..13e4e6bb 100644 --- a/CL/cl_layer.h +++ b/CL/cl_layer.h @@ -64,19 +64,23 @@ typedef cl_uint cl_layer_api_version; #define CL_LAYER_API_VERSION_100 100 -typedef cl_int (CL_API_CALL * -clGetLayerInfo_fn)( +typedef cl_int CL_API_CALL +clGetLayerInfo_t( cl_layer_info param_name, size_t param_value_size, void* param_value, - size_t* param_value_size_ret) ; + size_t* param_value_size_ret); + +typedef clGetLayerInfo_t *clGetLayerInfo_fn ; -typedef cl_int (CL_API_CALL * -clInitLayer_fn)( +typedef cl_int CL_API_CALL +clInitLayer_t( cl_uint num_entries, const cl_icd_dispatch* target_dispatch, cl_uint* num_entries_ret, - const cl_icd_dispatch** layer_dispatch_ret) ; + const cl_icd_dispatch** layer_dispatch_ret); + +typedef clInitLayer_t *clInitLayer_fn ; /* ** The function pointer typedefs prefixed with "pfn_" are provided for @@ -85,19 +89,9 @@ clInitLayer_fn)( ** "_fn" instead, for consistency. */ -typedef cl_int (CL_API_CALL * -pfn_clGetLayerInfo)( - cl_layer_info param_name, - size_t param_value_size, - void* param_value, - size_t* param_value_size_ret) ; +typedef clGetLayerInfo_t *pfn_clGetLayerInfo ; -typedef cl_int (CL_API_CALL * -pfn_clInitLayer)( - cl_uint num_entries, - const cl_icd_dispatch* target_dispatch, - cl_uint* num_entries_ret, - const cl_icd_dispatch** layer_dispatch_ret) ; +typedef clInitLayer_t *pfn_clInitLayer ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) diff --git a/CL/cl_va_api_media_sharing_intel.h b/CL/cl_va_api_media_sharing_intel.h index 767da05f..c1256e23 100644 --- a/CL/cl_va_api_media_sharing_intel.h +++ b/CL/cl_va_api_media_sharing_intel.h @@ -55,15 +55,17 @@ extern "C" { /* when cl_intel_va_api_media_sharing is supported */ -typedef cl_int (CL_API_CALL * -clGetSupportedVA_APIMediaSurfaceFormatsINTEL_fn)( +typedef cl_int CL_API_CALL +clGetSupportedVA_APIMediaSurfaceFormatsINTEL_t( cl_context context, cl_mem_flags flags, cl_mem_object_type image_type, cl_uint plane, cl_uint num_entries, VAImageFormat* va_api_formats, - cl_uint* num_surface_formats) ; + cl_uint* num_surface_formats); + +typedef clGetSupportedVA_APIMediaSurfaceFormatsINTEL_t *clGetSupportedVA_APIMediaSurfaceFormatsINTEL_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -116,41 +118,49 @@ typedef cl_uint cl_va_api_device_set_intel; #define CL_COMMAND_RELEASE_VA_API_MEDIA_SURFACES_INTEL 0x409B -typedef cl_int (CL_API_CALL * -clGetDeviceIDsFromVA_APIMediaAdapterINTEL_fn)( +typedef cl_int CL_API_CALL +clGetDeviceIDsFromVA_APIMediaAdapterINTEL_t( cl_platform_id platform, cl_va_api_device_source_intel media_adapter_type, void* media_adapter, cl_va_api_device_set_intel media_adapter_set, cl_uint num_entries, cl_device_id* devices, - cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_2; + cl_uint* num_devices); -typedef cl_mem (CL_API_CALL * -clCreateFromVA_APIMediaSurfaceINTEL_fn)( +typedef clGetDeviceIDsFromVA_APIMediaAdapterINTEL_t *clGetDeviceIDsFromVA_APIMediaAdapterINTEL_fn CL_API_SUFFIX__VERSION_1_2; + +typedef cl_mem CL_API_CALL +clCreateFromVA_APIMediaSurfaceINTEL_t( cl_context context, cl_mem_flags flags, VASurfaceID* surface, cl_uint plane, - cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2; + cl_int* errcode_ret); -typedef cl_int (CL_API_CALL * -clEnqueueAcquireVA_APIMediaSurfacesINTEL_fn)( +typedef clCreateFromVA_APIMediaSurfaceINTEL_t *clCreateFromVA_APIMediaSurfaceINTEL_fn CL_API_SUFFIX__VERSION_1_2; + +typedef cl_int CL_API_CALL +clEnqueueAcquireVA_APIMediaSurfacesINTEL_t( cl_command_queue command_queue, cl_uint num_objects, const cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) CL_API_SUFFIX__VERSION_1_2; + cl_event* event); + +typedef clEnqueueAcquireVA_APIMediaSurfacesINTEL_t *clEnqueueAcquireVA_APIMediaSurfacesINTEL_fn CL_API_SUFFIX__VERSION_1_2; -typedef cl_int (CL_API_CALL * -clEnqueueReleaseVA_APIMediaSurfacesINTEL_fn)( +typedef cl_int CL_API_CALL +clEnqueueReleaseVA_APIMediaSurfacesINTEL_t( cl_command_queue command_queue, cl_uint num_objects, const cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, - cl_event* event) CL_API_SUFFIX__VERSION_1_2; + cl_event* event); + +typedef clEnqueueReleaseVA_APIMediaSurfacesINTEL_t *clEnqueueReleaseVA_APIMediaSurfacesINTEL_fn CL_API_SUFFIX__VERSION_1_2; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) diff --git a/scripts/cl_ext.h.mako b/scripts/cl_ext.h.mako index c00fb849..70ac096e 100644 --- a/scripts/cl_ext.h.mako +++ b/scripts/cl_ext.h.mako @@ -353,15 +353,17 @@ ${typedefs[type.get('name')].Typedef.ljust(27)} ${type.get('name')}; <% api = apisigs[func.get('name')] %> -typedef ${api.RetType} (CL_API_CALL * -${api.Name}_fn)( +typedef ${api.RetType} CL_API_CALL +${api.Name}_t( % for i, paramStr in enumerate(getCParameterStrings(api.Params)): % if i < len(api.Params)-1: ${paramStr}, % else: - ${paramStr}) ${api.Suffix}; + ${paramStr}); % endif % endfor + +typedef ${api.Name}_t *${api.Name}_fn ${api.Suffix}; % endfor % if generate_pfn_typedefs: @@ -375,15 +377,7 @@ ${api.Name}_fn)( <% api = apisigs[func.get('name')] %> -typedef ${api.RetType} (CL_API_CALL * -pfn_${api.Name})( -% for i, paramStr in enumerate(getCParameterStrings(api.Params)): -% if i < len(api.Params)-1: - ${paramStr}, -% else: - ${paramStr}) ${api.Suffix}; -% endif -% endfor +typedef ${api.Name}_t *pfn_${api.Name} ${api.Suffix}; % endfor % endif From 06658a10b533dcaa76bf9eaf97c76d9d01a12eef Mon Sep 17 00:00:00 2001 From: Brice Videau Date: Wed, 26 Apr 2023 15:00:52 -0500 Subject: [PATCH 2/8] Add generated function type definitions. --- CL/cl_function_types.h | 832 +++++++++++++++++++++++++++++++ CMakeLists.txt | 3 + scripts/cl_function_types.h.mako | 54 ++ scripts/gen_headers.py | 12 + 4 files changed, 901 insertions(+) create mode 100644 CL/cl_function_types.h create mode 100644 scripts/cl_function_types.h.mako diff --git a/CL/cl_function_types.h b/CL/cl_function_types.h new file mode 100644 index 00000000..8f04c81f --- /dev/null +++ b/CL/cl_function_types.h @@ -0,0 +1,832 @@ +/* + * Copyright (c) 2023 The Khronos Group Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * OpenCL is a trademark of Apple Inc. used under license by Khronos. + */ + +#include + +typedef cl_int CL_API_CALL clGetPlatformIDs_t( + cl_uint num_entries, + cl_platform_id* platforms, + cl_uint* num_platforms); + +typedef cl_int CL_API_CALL clGetPlatformInfo_t( + cl_platform_id platform, + cl_platform_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret); + +typedef cl_int CL_API_CALL clGetDeviceIDs_t( + cl_platform_id platform, + cl_device_type device_type, + cl_uint num_entries, + cl_device_id* devices, + cl_uint* num_devices); + +typedef cl_int CL_API_CALL clGetDeviceInfo_t( + cl_device_id device, + cl_device_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret); + +typedef cl_context CL_API_CALL clCreateContext_t( + const cl_context_properties* properties, + cl_uint num_devices, + const cl_device_id* devices, + void (CL_CALLBACK* pfn_notify)(const char* errinfo, const void* private_info, size_t cb, void* user_data), + void* user_data, + cl_int* errcode_ret); + +typedef cl_context CL_API_CALL clCreateContextFromType_t( + const cl_context_properties* properties, + cl_device_type device_type, + void (CL_CALLBACK* pfn_notify)(const char* errinfo, const void* private_info, size_t cb, void* user_data), + void* user_data, + cl_int* errcode_ret); + +typedef cl_int CL_API_CALL clRetainContext_t( + cl_context context); + +typedef cl_int CL_API_CALL clReleaseContext_t( + cl_context context); + +typedef cl_int CL_API_CALL clGetContextInfo_t( + cl_context context, + cl_context_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret); + +typedef cl_int CL_API_CALL clRetainCommandQueue_t( + cl_command_queue command_queue); + +typedef cl_int CL_API_CALL clReleaseCommandQueue_t( + cl_command_queue command_queue); + +typedef cl_int CL_API_CALL clGetCommandQueueInfo_t( + cl_command_queue command_queue, + cl_command_queue_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret); + +typedef cl_mem CL_API_CALL clCreateBuffer_t( + cl_context context, + cl_mem_flags flags, + size_t size, + void* host_ptr, + cl_int* errcode_ret); + +typedef cl_int CL_API_CALL clRetainMemObject_t( + cl_mem memobj); + +typedef cl_int CL_API_CALL clReleaseMemObject_t( + cl_mem memobj); + +typedef cl_int CL_API_CALL clGetSupportedImageFormats_t( + cl_context context, + cl_mem_flags flags, + cl_mem_object_type image_type, + cl_uint num_entries, + cl_image_format* image_formats, + cl_uint* num_image_formats); + +typedef cl_int CL_API_CALL clGetMemObjectInfo_t( + cl_mem memobj, + cl_mem_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret); + +typedef cl_int CL_API_CALL clGetImageInfo_t( + cl_mem image, + cl_image_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret); + +typedef cl_int CL_API_CALL clRetainSampler_t( + cl_sampler sampler); + +typedef cl_int CL_API_CALL clReleaseSampler_t( + cl_sampler sampler); + +typedef cl_int CL_API_CALL clGetSamplerInfo_t( + cl_sampler sampler, + cl_sampler_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret); + +typedef cl_program CL_API_CALL clCreateProgramWithSource_t( + cl_context context, + cl_uint count, + const char** strings, + const size_t* lengths, + cl_int* errcode_ret); + +typedef cl_program CL_API_CALL clCreateProgramWithBinary_t( + cl_context context, + cl_uint num_devices, + const cl_device_id* device_list, + const size_t* lengths, + const unsigned char** binaries, + cl_int* binary_status, + cl_int* errcode_ret); + +typedef cl_int CL_API_CALL clRetainProgram_t( + cl_program program); + +typedef cl_int CL_API_CALL clReleaseProgram_t( + cl_program program); + +typedef cl_int CL_API_CALL clBuildProgram_t( + cl_program program, + cl_uint num_devices, + const cl_device_id* device_list, + const char* options, + void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data), + void* user_data); + +typedef cl_int CL_API_CALL clGetProgramInfo_t( + cl_program program, + cl_program_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret); + +typedef cl_int CL_API_CALL clGetProgramBuildInfo_t( + cl_program program, + cl_device_id device, + cl_program_build_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret); + +typedef cl_kernel CL_API_CALL clCreateKernel_t( + cl_program program, + const char* kernel_name, + cl_int* errcode_ret); + +typedef cl_int CL_API_CALL clCreateKernelsInProgram_t( + cl_program program, + cl_uint num_kernels, + cl_kernel* kernels, + cl_uint* num_kernels_ret); + +typedef cl_int CL_API_CALL clRetainKernel_t( + cl_kernel kernel); + +typedef cl_int CL_API_CALL clReleaseKernel_t( + cl_kernel kernel); + +typedef cl_int CL_API_CALL clSetKernelArg_t( + cl_kernel kernel, + cl_uint arg_index, + size_t arg_size, + const void* arg_value); + +typedef cl_int CL_API_CALL clGetKernelInfo_t( + cl_kernel kernel, + cl_kernel_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret); + +typedef cl_int CL_API_CALL clGetKernelWorkGroupInfo_t( + cl_kernel kernel, + cl_device_id device, + cl_kernel_work_group_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret); + +typedef cl_int CL_API_CALL clWaitForEvents_t( + cl_uint num_events, + const cl_event* event_list); + +typedef cl_int CL_API_CALL clGetEventInfo_t( + cl_event event, + cl_event_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret); + +typedef cl_int CL_API_CALL clRetainEvent_t( + cl_event event); + +typedef cl_int CL_API_CALL clReleaseEvent_t( + cl_event event); + +typedef cl_int CL_API_CALL clGetEventProfilingInfo_t( + cl_event event, + cl_profiling_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret); + +typedef cl_int CL_API_CALL clFlush_t( + cl_command_queue command_queue); + +typedef cl_int CL_API_CALL clFinish_t( + cl_command_queue command_queue); + +typedef cl_int CL_API_CALL clEnqueueReadBuffer_t( + cl_command_queue command_queue, + cl_mem buffer, + cl_bool blocking_read, + size_t offset, + size_t size, + void* ptr, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event); + +typedef cl_int CL_API_CALL clEnqueueWriteBuffer_t( + cl_command_queue command_queue, + cl_mem buffer, + cl_bool blocking_write, + size_t offset, + size_t size, + const void* ptr, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event); + +typedef cl_int CL_API_CALL clEnqueueCopyBuffer_t( + cl_command_queue command_queue, + cl_mem src_buffer, + cl_mem dst_buffer, + size_t src_offset, + size_t dst_offset, + size_t size, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event); + +typedef cl_int CL_API_CALL clEnqueueReadImage_t( + cl_command_queue command_queue, + cl_mem image, + cl_bool blocking_read, + const size_t* origin, + const size_t* region, + size_t row_pitch, + size_t slice_pitch, + void* ptr, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event); + +typedef cl_int CL_API_CALL clEnqueueWriteImage_t( + cl_command_queue command_queue, + cl_mem image, + cl_bool blocking_write, + const size_t* origin, + const size_t* region, + size_t input_row_pitch, + size_t input_slice_pitch, + const void* ptr, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event); + +typedef cl_int CL_API_CALL clEnqueueCopyImage_t( + cl_command_queue command_queue, + cl_mem src_image, + cl_mem dst_image, + const size_t* src_origin, + const size_t* dst_origin, + const size_t* region, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event); + +typedef cl_int CL_API_CALL clEnqueueCopyImageToBuffer_t( + cl_command_queue command_queue, + cl_mem src_image, + cl_mem dst_buffer, + const size_t* src_origin, + const size_t* region, + size_t dst_offset, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event); + +typedef cl_int CL_API_CALL clEnqueueCopyBufferToImage_t( + cl_command_queue command_queue, + cl_mem src_buffer, + cl_mem dst_image, + size_t src_offset, + const size_t* dst_origin, + const size_t* region, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event); + +typedef void* CL_API_CALL clEnqueueMapBuffer_t( + cl_command_queue command_queue, + cl_mem buffer, + cl_bool blocking_map, + cl_map_flags map_flags, + size_t offset, + size_t size, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event, + cl_int* errcode_ret); + +typedef void* CL_API_CALL clEnqueueMapImage_t( + cl_command_queue command_queue, + cl_mem image, + cl_bool blocking_map, + cl_map_flags map_flags, + const size_t* origin, + const size_t* region, + size_t* image_row_pitch, + size_t* image_slice_pitch, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event, + cl_int* errcode_ret); + +typedef cl_int CL_API_CALL clEnqueueUnmapMemObject_t( + cl_command_queue command_queue, + cl_mem memobj, + void* mapped_ptr, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event); + +typedef cl_int CL_API_CALL clEnqueueNDRangeKernel_t( + cl_command_queue command_queue, + cl_kernel kernel, + cl_uint work_dim, + const size_t* global_work_offset, + const size_t* global_work_size, + const size_t* local_work_size, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event); + +typedef cl_int CL_API_CALL clEnqueueNativeKernel_t( + cl_command_queue command_queue, + void (CL_CALLBACK* user_func)(void*), + void* args, + size_t cb_args, + cl_uint num_mem_objects, + const cl_mem* mem_list, + const void** args_mem_loc, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event); + +typedef cl_int CL_API_CALL clSetCommandQueueProperty_t( + cl_command_queue command_queue, + cl_command_queue_properties properties, + cl_bool enable, + cl_command_queue_properties* old_properties); + +typedef cl_mem CL_API_CALL clCreateImage2D_t( + cl_context context, + cl_mem_flags flags, + const cl_image_format* image_format, + size_t image_width, + size_t image_height, + size_t image_row_pitch, + void* host_ptr, + cl_int* errcode_ret); + +typedef cl_mem CL_API_CALL clCreateImage3D_t( + cl_context context, + cl_mem_flags flags, + const cl_image_format* image_format, + size_t image_width, + size_t image_height, + size_t image_depth, + size_t image_row_pitch, + size_t image_slice_pitch, + void* host_ptr, + cl_int* errcode_ret); + +typedef cl_int CL_API_CALL clEnqueueMarker_t( + cl_command_queue command_queue, + cl_event* event); + +typedef cl_int CL_API_CALL clEnqueueWaitForEvents_t( + cl_command_queue command_queue, + cl_uint num_events, + const cl_event* event_list); + +typedef cl_int CL_API_CALL clEnqueueBarrier_t( + cl_command_queue command_queue); + +typedef cl_int CL_API_CALL clUnloadCompiler_t( + void ); + +typedef void* CL_API_CALL clGetExtensionFunctionAddress_t( + const char* func_name); + +typedef cl_command_queue CL_API_CALL clCreateCommandQueue_t( + cl_context context, + cl_device_id device, + cl_command_queue_properties properties, + cl_int* errcode_ret); + +typedef cl_sampler CL_API_CALL clCreateSampler_t( + cl_context context, + cl_bool normalized_coords, + cl_addressing_mode addressing_mode, + cl_filter_mode filter_mode, + cl_int* errcode_ret); + +typedef cl_int CL_API_CALL clEnqueueTask_t( + cl_command_queue command_queue, + cl_kernel kernel, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event); + +#ifdef CL_VERSION_1_1 +typedef cl_mem CL_API_CALL clCreateSubBuffer_t( + cl_mem buffer, + cl_mem_flags flags, + cl_buffer_create_type buffer_create_type, + const void* buffer_create_info, + cl_int* errcode_ret); + +typedef cl_int CL_API_CALL clSetMemObjectDestructorCallback_t( + cl_mem memobj, + void (CL_CALLBACK* pfn_notify)(cl_mem memobj, void* user_data), + void* user_data); + +typedef cl_event CL_API_CALL clCreateUserEvent_t( + cl_context context, + cl_int* errcode_ret); + +typedef cl_int CL_API_CALL clSetUserEventStatus_t( + cl_event event, + cl_int execution_status); + +typedef cl_int CL_API_CALL clSetEventCallback_t( + 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); + +typedef cl_int CL_API_CALL clEnqueueReadBufferRect_t( + 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); + +typedef cl_int CL_API_CALL clEnqueueWriteBufferRect_t( + 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); + +typedef cl_int CL_API_CALL clEnqueueCopyBufferRect_t( + 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); + +#endif /* CL_VERSION_1_1 */ + +#ifdef CL_VERSION_1_2 +typedef cl_int CL_API_CALL clCreateSubDevices_t( + 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); + +typedef cl_int CL_API_CALL clRetainDevice_t( + cl_device_id device); + +typedef cl_int CL_API_CALL clReleaseDevice_t( + cl_device_id device); + +typedef cl_mem CL_API_CALL clCreateImage_t( + 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); + +typedef cl_program CL_API_CALL clCreateProgramWithBuiltInKernels_t( + cl_context context, + cl_uint num_devices, + const cl_device_id* device_list, + const char* kernel_names, + cl_int* errcode_ret); + +typedef cl_int CL_API_CALL clCompileProgram_t( + 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); + +typedef cl_program CL_API_CALL clLinkProgram_t( + 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); + +typedef cl_int CL_API_CALL clUnloadPlatformCompiler_t( + cl_platform_id platform); + +typedef cl_int CL_API_CALL clGetKernelArgInfo_t( + 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); + +typedef cl_int CL_API_CALL clEnqueueFillBuffer_t( + 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); + +typedef cl_int CL_API_CALL clEnqueueFillImage_t( + 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); + +typedef cl_int CL_API_CALL clEnqueueMigrateMemObjects_t( + 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); + +typedef cl_int CL_API_CALL clEnqueueMarkerWithWaitList_t( + cl_command_queue command_queue, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event); + +typedef cl_int CL_API_CALL clEnqueueBarrierWithWaitList_t( + cl_command_queue command_queue, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event); + +typedef void* CL_API_CALL clGetExtensionFunctionAddressForPlatform_t( + cl_platform_id platform, + const char* func_name); + +#endif /* CL_VERSION_1_2 */ + +#ifdef CL_VERSION_2_0 +typedef cl_command_queue CL_API_CALL clCreateCommandQueueWithProperties_t( + cl_context context, + cl_device_id device, + const cl_queue_properties* properties, + cl_int* errcode_ret); + +typedef cl_mem CL_API_CALL clCreatePipe_t( + 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); + +typedef cl_int CL_API_CALL clGetPipeInfo_t( + cl_mem pipe, + cl_pipe_info param_name, + size_t param_value_size, + void* param_value, + size_t* param_value_size_ret); + +typedef void* CL_API_CALL clSVMAlloc_t( + cl_context context, + cl_svm_mem_flags flags, + size_t size, + cl_uint alignment); + +typedef void CL_API_CALL clSVMFree_t( + cl_context context, + void* svm_pointer); + +typedef cl_sampler CL_API_CALL clCreateSamplerWithProperties_t( + cl_context context, + const cl_sampler_properties* sampler_properties, + cl_int* errcode_ret); + +typedef cl_int CL_API_CALL clSetKernelArgSVMPointer_t( + cl_kernel kernel, + cl_uint arg_index, + const void* arg_value); + +typedef cl_int CL_API_CALL clSetKernelExecInfo_t( + cl_kernel kernel, + cl_kernel_exec_info param_name, + size_t param_value_size, + const void* param_value); + +typedef cl_int CL_API_CALL clEnqueueSVMFree_t( + 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); + +typedef cl_int CL_API_CALL clEnqueueSVMMemcpy_t( + 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); + +typedef cl_int CL_API_CALL clEnqueueSVMMemFill_t( + 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); + +typedef cl_int CL_API_CALL clEnqueueSVMMap_t( + 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); + +typedef cl_int CL_API_CALL clEnqueueSVMUnmap_t( + cl_command_queue command_queue, + void* svm_ptr, + cl_uint num_events_in_wait_list, + const cl_event* event_wait_list, + cl_event* event); + +#endif /* CL_VERSION_2_0 */ + +#ifdef CL_VERSION_2_1 +typedef cl_int CL_API_CALL clSetDefaultDeviceCommandQueue_t( + cl_context context, + cl_device_id device, + cl_command_queue command_queue); + +typedef cl_int CL_API_CALL clGetDeviceAndHostTimer_t( + cl_device_id device, + cl_ulong* device_timestamp, + cl_ulong* host_timestamp); + +typedef cl_int CL_API_CALL clGetHostTimer_t( + cl_device_id device, + cl_ulong* host_timestamp); + +typedef cl_program CL_API_CALL clCreateProgramWithIL_t( + cl_context context, + const void* il, + size_t length, + cl_int* errcode_ret); + +typedef cl_kernel CL_API_CALL clCloneKernel_t( + cl_kernel source_kernel, + cl_int* errcode_ret); + +typedef cl_int CL_API_CALL clGetKernelSubGroupInfo_t( + 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); + +typedef cl_int CL_API_CALL clEnqueueSVMMigrateMem_t( + 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); + +#endif /* CL_VERSION_2_1 */ + +#ifdef CL_VERSION_2_2 +typedef cl_int CL_API_CALL clSetProgramSpecializationConstant_t( + cl_program program, + cl_uint spec_id, + size_t spec_size, + const void* spec_value); + +typedef cl_int CL_API_CALL clSetProgramReleaseCallback_t( + cl_program program, + void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data), + void* user_data); + +#endif /* CL_VERSION_2_2 */ + +#ifdef CL_VERSION_3_0 +typedef cl_int CL_API_CALL clSetContextDestructorCallback_t( + cl_context context, + void (CL_CALLBACK* pfn_notify)(cl_context context, void* user_data), + void* user_data); + +typedef cl_mem CL_API_CALL clCreateBufferWithProperties_t( + cl_context context, + const cl_mem_properties* properties, + cl_mem_flags flags, + size_t size, + void* host_ptr, + cl_int* errcode_ret); + +typedef cl_mem CL_API_CALL clCreateImageWithProperties_t( + 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); + +#endif /* CL_VERSION_3_0 */ + diff --git a/CMakeLists.txt b/CMakeLists.txt index 43e97cc3..7002c372 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -133,6 +133,9 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) COMMAND ${CMAKE_COMMAND} -E copy ${OPENCL_HEADERS_OUTPUT_DIRECTORY}/cl_va_api_media_sharing_intel.h ${CMAKE_CURRENT_SOURCE_DIR}/CL + COMMAND ${CMAKE_COMMAND} -E copy + ${OPENCL_HEADERS_OUTPUT_DIRECTORY}/cl_function_types.h + ${CMAKE_CURRENT_SOURCE_DIR}/CL ) set_target_properties(headers_generate PROPERTIES FOLDER "Generation") set_target_properties(headers_copy PROPERTIES FOLDER "Generation") diff --git a/scripts/cl_function_types.h.mako b/scripts/cl_function_types.h.mako new file mode 100644 index 00000000..e7f02fdf --- /dev/null +++ b/scripts/cl_function_types.h.mako @@ -0,0 +1,54 @@ +<% +# Gets C function parameter strings for the specified API params: +import sys +import json +def getCParameterStrings(params): + strings = [] + if len(params) == 0: + strings.append("void") + else: + for param in params: + paramstr = param.Type + ' ' + param.Name + param.TypeEnd + strings.append(paramstr) + return strings + +%>/* + * Copyright (c) 2023 The Khronos Group Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * OpenCL is a trademark of Apple Inc. used under license by Khronos. + */ + +#include + +%for version, apis in coreapis.items(): +% if version != "CL_VERSION_1_0": +#ifdef ${version} +% endif +% for api in apis: +typedef ${api.RetType} CL_API_CALL ${api.Name}_t( +% for i, paramStr in enumerate(getCParameterStrings(api.Params)): +% if i < len(api.Params)-1: + ${paramStr}, +% else: + ${paramStr}); +% endif +% endfor + +% endfor +% if version != "CL_VERSION_1_0": +#endif /* ${version} */ + +% endif +%endfor diff --git a/scripts/gen_headers.py b/scripts/gen_headers.py index 96904838..4bfaa0e4 100644 --- a/scripts/gen_headers.py +++ b/scripts/gen_headers.py @@ -60,6 +60,7 @@ def getWin32OnlyIncludeString(include): try: cl_ext_h_template = Template(filename='cl_ext.h.mako', input_encoding='utf-8') + cl_function_types_h_template = Template(filename='cl_function_types.h.mako', input_encoding='utf-8') print('Generating cl_dx9_media_sharing.h...') text = cl_ext_h_template.render( @@ -220,6 +221,17 @@ def getWin32OnlyIncludeString(include): text = re.sub(r'\r\n', r'\n', text) with open(args.directory + '/cl_ext.h', 'w') as gen: gen.write(text) + + print('Generating cl_function_types.h...') + text = cl_function_types_h_template.render( + spec=spec, + apisigs=apisigs, + coreapis=coreapis, + extapis=extapis) + text = re.sub(r'\r\n', r'\n', text) + with open(args.directory + '/cl_function_types.h', 'w') as gen: + gen.write(text) + except: traceback = RichTraceback() for (filename, lineno, function, line) in traceback.traceback: From 8751cd27477fa1a7aecf0ba5cad241a43d0438aa Mon Sep 17 00:00:00 2001 From: Brice Videau Date: Wed, 26 Apr 2023 15:01:30 -0500 Subject: [PATCH 3/8] Leverage function types in cl_icd.h. --- CL/cl_icd.h | 1010 +++++++++++++++++---------------------------------- 1 file changed, 332 insertions(+), 678 deletions(-) diff --git a/CL/cl_icd.h b/CL/cl_icd.h index 360b8703..89e7324a 100644 --- a/CL/cl_icd.h +++ b/CL/cl_icd.h @@ -18,6 +18,7 @@ #define OPENCL_CL_ICD_H #include +#include #include #include #include @@ -41,36 +42,29 @@ extern "C" { /* API function pointer definitions */ // Platform APIs -typedef cl_int(CL_API_CALL *cl_api_clGetPlatformIDs)( - cl_uint num_entries, cl_platform_id *platforms, - cl_uint *num_platforms) CL_API_SUFFIX__VERSION_1_0; +typedef clGetPlatformIDs_t * +cl_api_clGetPlatformIDs CL_API_SUFFIX__VERSION_1_0; -typedef cl_int(CL_API_CALL *cl_api_clGetPlatformInfo)( - cl_platform_id platform, cl_platform_info param_name, - size_t param_value_size, void *param_value, - size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; +typedef clGetPlatformInfo_t * +cl_api_clGetPlatformInfo CL_API_SUFFIX__VERSION_1_0; // Device APIs -typedef cl_int(CL_API_CALL *cl_api_clGetDeviceIDs)( - cl_platform_id platform, cl_device_type device_type, cl_uint num_entries, - cl_device_id *devices, cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_0; +typedef clGetDeviceIDs_t * +cl_api_clGetDeviceIDs CL_API_SUFFIX__VERSION_1_0; -typedef cl_int(CL_API_CALL *cl_api_clGetDeviceInfo)( - cl_device_id device, cl_device_info param_name, size_t param_value_size, - void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; +typedef clGetDeviceInfo_t * +cl_api_clGetDeviceInfo CL_API_SUFFIX__VERSION_1_0; #ifdef CL_VERSION_1_2 -typedef cl_int(CL_API_CALL *cl_api_clCreateSubDevices)( - cl_device_id in_device, - const cl_device_partition_property *partition_properties, - cl_uint num_entries, cl_device_id *out_devices, cl_uint *num_devices); +typedef clCreateSubDevices_t * +cl_api_clCreateSubDevices CL_API_SUFFIX__VERSION_1_2; -typedef cl_int(CL_API_CALL *cl_api_clRetainDevice)( - cl_device_id device) CL_API_SUFFIX__VERSION_1_2; +typedef clRetainDevice_t * +cl_api_clRetainDevice CL_API_SUFFIX__VERSION_1_2; -typedef cl_int(CL_API_CALL *cl_api_clReleaseDevice)( - cl_device_id device) CL_API_SUFFIX__VERSION_1_2; +typedef clReleaseDevice_t * +cl_api_clReleaseDevice CL_API_SUFFIX__VERSION_1_2; #else @@ -81,40 +75,29 @@ typedef void *cl_api_clReleaseDevice; #endif // Context APIs -typedef cl_context(CL_API_CALL *cl_api_clCreateContext)( - const cl_context_properties *properties, cl_uint num_devices, - const cl_device_id *devices, - void(CL_CALLBACK *pfn_notify)(const char *, const void *, size_t, void *), - void *user_data, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0; +typedef clCreateContext_t * +cl_api_clCreateContext CL_API_SUFFIX__VERSION_1_0; -typedef cl_context(CL_API_CALL *cl_api_clCreateContextFromType)( - const cl_context_properties *properties, cl_device_type device_type, - void(CL_CALLBACK *pfn_notify)(const char *, const void *, size_t, void *), - void *user_data, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0; +typedef clCreateContextFromType_t * +cl_api_clCreateContextFromType CL_API_SUFFIX__VERSION_1_0; -typedef cl_int(CL_API_CALL *cl_api_clRetainContext)( - cl_context context) CL_API_SUFFIX__VERSION_1_0; +typedef clRetainContext_t * +cl_api_clRetainContext CL_API_SUFFIX__VERSION_1_0; -typedef cl_int(CL_API_CALL *cl_api_clReleaseContext)( - cl_context context) CL_API_SUFFIX__VERSION_1_0; +typedef clReleaseContext_t * +cl_api_clReleaseContext CL_API_SUFFIX__VERSION_1_0; -typedef cl_int(CL_API_CALL *cl_api_clGetContextInfo)( - cl_context context, cl_context_info param_name, size_t param_value_size, - void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; +typedef clGetContextInfo_t * +cl_api_clGetContextInfo CL_API_SUFFIX__VERSION_1_0; // Command Queue APIs -typedef cl_command_queue(CL_API_CALL *cl_api_clCreateCommandQueue)( - cl_context context, cl_device_id device, - cl_command_queue_properties properties, - cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0; +typedef clCreateCommandQueue_t * +cl_api_clCreateCommandQueue CL_API_SUFFIX__VERSION_1_0; #ifdef CL_VERSION_2_0 -typedef -cl_command_queue(CL_API_CALL *cl_api_clCreateCommandQueueWithProperties)( - cl_context /* context */, cl_device_id /* device */, - const cl_queue_properties * /* properties */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_2_0; +typedef clCreateCommandQueueWithProperties_t * +cl_api_clCreateCommandQueueWithProperties CL_API_SUFFIX__VERSION_2_0; #else @@ -122,28 +105,23 @@ typedef void *cl_api_clCreateCommandQueueWithProperties; #endif -typedef cl_int(CL_API_CALL *cl_api_clRetainCommandQueue)( - cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0; +typedef clRetainCommandQueue_t * +cl_api_clRetainCommandQueue CL_API_SUFFIX__VERSION_1_0; -typedef cl_int(CL_API_CALL *cl_api_clReleaseCommandQueue)( - cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0; +typedef clReleaseCommandQueue_t * +cl_api_clReleaseCommandQueue CL_API_SUFFIX__VERSION_1_0; -typedef cl_int(CL_API_CALL *cl_api_clGetCommandQueueInfo)( - cl_command_queue command_queue, cl_command_queue_info param_name, - size_t param_value_size, void *param_value, - size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; +typedef clGetCommandQueueInfo_t * +cl_api_clGetCommandQueueInfo CL_API_SUFFIX__VERSION_1_0; // Memory Object APIs -typedef cl_mem(CL_API_CALL *cl_api_clCreateBuffer)( - cl_context context, cl_mem_flags flags, size_t size, void *host_ptr, - cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0; +typedef clCreateBuffer_t * +cl_api_clCreateBuffer CL_API_SUFFIX__VERSION_1_0; #ifdef CL_VERSION_1_2 -typedef cl_mem(CL_API_CALL *cl_api_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) CL_API_SUFFIX__VERSION_1_2; +typedef clCreateImage_t * +cl_api_clCreateImage CL_API_SUFFIX__VERSION_1_2; #else @@ -153,20 +131,14 @@ typedef void *cl_api_clCreateImage; #ifdef CL_VERSION_3_0 -typedef cl_mem(CL_API_CALL *cl_api_clCreateBufferWithProperties)( - cl_context context, const cl_mem_properties *properties, cl_mem_flags flags, - size_t size, void *host_ptr, - cl_int *errcode_ret) CL_API_SUFFIX__VERSION_3_0; +typedef clCreateBufferWithProperties_t * +cl_api_clCreateBufferWithProperties CL_API_SUFFIX__VERSION_3_0; -typedef cl_mem(CL_API_CALL *cl_api_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) CL_API_SUFFIX__VERSION_3_0; +typedef clCreateImageWithProperties_t * +cl_api_clCreateImageWithProperties CL_API_SUFFIX__VERSION_3_0; -typedef cl_int(CL_API_CALL* cl_api_clSetContextDestructorCallback)( - cl_context context, - void(CL_CALLBACK* pfn_notify)(cl_context context, void* user_data), - void* user_data) CL_API_SUFFIX__VERSION_3_0; +typedef clSetContextDestructorCallback_t * +cl_api_clSetContextDestructorCallback CL_API_SUFFIX__VERSION_3_0; #else @@ -176,45 +148,34 @@ typedef void *cl_api_clSetContextDestructorCallback; #endif -typedef cl_int(CL_API_CALL *cl_api_clRetainMemObject)( - cl_mem memobj) CL_API_SUFFIX__VERSION_1_0; +typedef clRetainMemObject_t * +cl_api_clRetainMemObject CL_API_SUFFIX__VERSION_1_0; -typedef cl_int(CL_API_CALL *cl_api_clReleaseMemObject)( - cl_mem memobj) CL_API_SUFFIX__VERSION_1_0; +typedef clReleaseMemObject_t * +cl_api_clReleaseMemObject CL_API_SUFFIX__VERSION_1_0; -typedef cl_int(CL_API_CALL *cl_api_clGetSupportedImageFormats)( - cl_context context, cl_mem_flags flags, cl_mem_object_type image_type, - cl_uint num_entries, cl_image_format *image_formats, - cl_uint *num_image_formats) CL_API_SUFFIX__VERSION_1_0; +typedef clGetSupportedImageFormats_t * +cl_api_clGetSupportedImageFormats CL_API_SUFFIX__VERSION_1_0; -typedef cl_int(CL_API_CALL *cl_api_clGetMemObjectInfo)( - cl_mem memobj, cl_mem_info param_name, size_t param_value_size, - void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; +typedef clGetMemObjectInfo_t * +cl_api_clGetMemObjectInfo CL_API_SUFFIX__VERSION_1_0; -typedef cl_int(CL_API_CALL *cl_api_clGetImageInfo)( - cl_mem image, cl_image_info param_name, size_t param_value_size, - void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; +typedef clGetImageInfo_t * +cl_api_clGetImageInfo CL_API_SUFFIX__VERSION_1_0; #ifdef CL_VERSION_2_0 -typedef cl_mem(CL_API_CALL *cl_api_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 */) CL_API_SUFFIX__VERSION_2_0; +typedef clCreatePipe_t * +cl_api_clCreatePipe CL_API_SUFFIX__VERSION_2_0; -typedef cl_int(CL_API_CALL *cl_api_clGetPipeInfo)( - cl_mem /* pipe */, cl_pipe_info /* param_name */, - size_t /* param_value_size */, void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_2_0; +typedef clGetPipeInfo_t * +cl_api_clGetPipeInfo CL_API_SUFFIX__VERSION_2_0; -typedef void *(CL_API_CALL *cl_api_clSVMAlloc)( - cl_context /* context */, cl_svm_mem_flags /* flags */, size_t /* size */, - unsigned int /* alignment */)CL_API_SUFFIX__VERSION_2_0; +typedef clSVMAlloc_t * +cl_api_clSVMAlloc CL_API_SUFFIX__VERSION_2_0; -typedef void(CL_API_CALL *cl_api_clSVMFree)( - cl_context /* context */, - void * /* svm_pointer */) CL_API_SUFFIX__VERSION_2_0; +typedef clSVMFree_t * +cl_api_clSVMFree CL_API_SUFFIX__VERSION_2_0; #else @@ -226,28 +187,22 @@ typedef void *cl_api_clSVMFree; #endif // Sampler APIs -typedef cl_sampler(CL_API_CALL *cl_api_clCreateSampler)( - cl_context context, cl_bool normalized_coords, - cl_addressing_mode addressing_mode, cl_filter_mode filter_mode, - cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0; +typedef clCreateSampler_t * +cl_api_clCreateSampler CL_API_SUFFIX__VERSION_1_0; -typedef cl_int(CL_API_CALL *cl_api_clRetainSampler)( - cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0; +typedef clRetainSampler_t * +cl_api_clRetainSampler CL_API_SUFFIX__VERSION_1_0; -typedef cl_int(CL_API_CALL *cl_api_clReleaseSampler)( - cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0; +typedef clReleaseSampler_t * +cl_api_clReleaseSampler CL_API_SUFFIX__VERSION_1_0; -typedef cl_int(CL_API_CALL *cl_api_clGetSamplerInfo)( - cl_sampler sampler, cl_sampler_info param_name, size_t param_value_size, - void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; +typedef clGetSamplerInfo_t * +cl_api_clGetSamplerInfo CL_API_SUFFIX__VERSION_1_0; #ifdef CL_VERSION_2_0 -typedef -cl_sampler(CL_API_CALL *cl_api_clCreateSamplerWithProperties)( - cl_context /* context */, - const cl_sampler_properties * /* sampler_properties */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_2_0; +typedef clCreateSamplerWithProperties_t * +cl_api_clCreateSamplerWithProperties CL_API_SUFFIX__VERSION_2_0; #else @@ -256,21 +211,16 @@ typedef void *cl_api_clCreateSamplerWithProperties; #endif // Program Object APIs -typedef cl_program(CL_API_CALL *cl_api_clCreateProgramWithSource)( - cl_context context, cl_uint count, const char **strings, - const size_t *lengths, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0; +typedef clCreateProgramWithSource_t * +cl_api_clCreateProgramWithSource CL_API_SUFFIX__VERSION_1_0; -typedef cl_program(CL_API_CALL *cl_api_clCreateProgramWithBinary)( - cl_context context, cl_uint num_devices, const cl_device_id *device_list, - const size_t *lengths, const unsigned char **binaries, - cl_int *binary_status, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0; +typedef clCreateProgramWithBinary_t * +cl_api_clCreateProgramWithBinary CL_API_SUFFIX__VERSION_1_0; #ifdef CL_VERSION_1_2 -typedef -cl_program(CL_API_CALL *cl_api_clCreateProgramWithBuiltInKernels)( - cl_context context, cl_uint num_devices, const cl_device_id *device_list, - const char *kernel_names, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2; +typedef clCreateProgramWithBuiltInKernels_t * +cl_api_clCreateProgramWithBuiltInKernels CL_API_SUFFIX__VERSION_1_2; #else @@ -278,33 +228,22 @@ typedef void *cl_api_clCreateProgramWithBuiltInKernels; #endif -typedef cl_int(CL_API_CALL *cl_api_clRetainProgram)( - cl_program program) CL_API_SUFFIX__VERSION_1_0; +typedef clRetainProgram_t * +cl_api_clRetainProgram CL_API_SUFFIX__VERSION_1_0; -typedef cl_int(CL_API_CALL *cl_api_clReleaseProgram)( - cl_program program) CL_API_SUFFIX__VERSION_1_0; +typedef clReleaseProgram_t * +cl_api_clReleaseProgram CL_API_SUFFIX__VERSION_1_0; -typedef cl_int(CL_API_CALL *cl_api_clBuildProgram)( - cl_program program, cl_uint num_devices, const cl_device_id *device_list, - const char *options, - void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data), - void *user_data) CL_API_SUFFIX__VERSION_1_0; +typedef clBuildProgram_t * +cl_api_clBuildProgram CL_API_SUFFIX__VERSION_1_0; #ifdef CL_VERSION_1_2 -typedef cl_int(CL_API_CALL *cl_api_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) CL_API_SUFFIX__VERSION_1_2; +typedef clCompileProgram_t * +cl_api_clCompileProgram CL_API_SUFFIX__VERSION_1_2; -typedef cl_program(CL_API_CALL *cl_api_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) CL_API_SUFFIX__VERSION_1_2; +typedef clLinkProgram_t * +cl_api_clLinkProgram CL_API_SUFFIX__VERSION_1_2; #else @@ -315,15 +254,11 @@ typedef void *cl_api_clLinkProgram; #ifdef CL_VERSION_2_2 -typedef -cl_int(CL_API_CALL *cl_api_clSetProgramSpecializationConstant)( - cl_program program, cl_uint spec_id, size_t spec_size, - const void *spec_value) CL_API_SUFFIX__VERSION_2_2; +typedef clSetProgramSpecializationConstant_t * +cl_api_clSetProgramSpecializationConstant CL_API_SUFFIX__VERSION_2_2; -typedef cl_int(CL_API_CALL *cl_api_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 clSetProgramReleaseCallback_t * +cl_api_clSetProgramReleaseCallback CL_API_SUFFIX__VERSION_2_2; #else @@ -334,8 +269,8 @@ typedef void *cl_api_clSetProgramReleaseCallback; #ifdef CL_VERSION_1_2 -typedef cl_int(CL_API_CALL *cl_api_clUnloadPlatformCompiler)( - cl_platform_id platform) CL_API_SUFFIX__VERSION_1_2; +typedef clUnloadPlatformCompiler_t * +cl_api_clUnloadPlatformCompiler CL_API_SUFFIX__VERSION_1_2; #else @@ -343,44 +278,35 @@ typedef void *cl_api_clUnloadPlatformCompiler; #endif -typedef cl_int(CL_API_CALL *cl_api_clGetProgramInfo)( - cl_program program, cl_program_info param_name, size_t param_value_size, - void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; +typedef clGetProgramInfo_t * +cl_api_clGetProgramInfo CL_API_SUFFIX__VERSION_1_0; -typedef cl_int(CL_API_CALL *cl_api_clGetProgramBuildInfo)( - cl_program program, cl_device_id device, cl_program_build_info param_name, - size_t param_value_size, void *param_value, - size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; +typedef clGetProgramBuildInfo_t * +cl_api_clGetProgramBuildInfo CL_API_SUFFIX__VERSION_1_0; // Kernel Object APIs -typedef cl_kernel(CL_API_CALL *cl_api_clCreateKernel)( - cl_program program, const char *kernel_name, - cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0; +typedef clCreateKernel_t * +cl_api_clCreateKernel CL_API_SUFFIX__VERSION_1_0; -typedef cl_int(CL_API_CALL *cl_api_clCreateKernelsInProgram)( - cl_program program, cl_uint num_kernels, cl_kernel *kernels, - cl_uint *num_kernels_ret) CL_API_SUFFIX__VERSION_1_0; +typedef clCreateKernelsInProgram_t * +cl_api_clCreateKernelsInProgram CL_API_SUFFIX__VERSION_1_0; -typedef cl_int(CL_API_CALL *cl_api_clRetainKernel)( - cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0; +typedef clRetainKernel_t * +cl_api_clRetainKernel CL_API_SUFFIX__VERSION_1_0; -typedef cl_int(CL_API_CALL *cl_api_clReleaseKernel)( - cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0; +typedef clReleaseKernel_t * +cl_api_clReleaseKernel CL_API_SUFFIX__VERSION_1_0; -typedef cl_int(CL_API_CALL *cl_api_clSetKernelArg)( - cl_kernel kernel, cl_uint arg_index, size_t arg_size, - const void *arg_value) CL_API_SUFFIX__VERSION_1_0; +typedef clSetKernelArg_t * +cl_api_clSetKernelArg CL_API_SUFFIX__VERSION_1_0; -typedef cl_int(CL_API_CALL *cl_api_clGetKernelInfo)( - cl_kernel kernel, cl_kernel_info param_name, size_t param_value_size, - void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; +typedef clGetKernelInfo_t * +cl_api_clGetKernelInfo CL_API_SUFFIX__VERSION_1_0; #ifdef CL_VERSION_1_2 -typedef cl_int(CL_API_CALL *cl_api_clGetKernelArgInfo)( - cl_kernel kernel, cl_uint arg_indx, cl_kernel_arg_info param_name, - size_t param_value_size, void *param_value, - size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_2; +typedef clGetKernelArgInfo_t * +cl_api_clGetKernelArgInfo CL_API_SUFFIX__VERSION_1_2; #else @@ -388,28 +314,19 @@ typedef void *cl_api_clGetKernelArgInfo; #endif -typedef cl_int(CL_API_CALL *cl_api_clGetKernelWorkGroupInfo)( - cl_kernel kernel, cl_device_id device, cl_kernel_work_group_info param_name, - size_t param_value_size, void *param_value, - size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; +typedef clGetKernelWorkGroupInfo_t * +cl_api_clGetKernelWorkGroupInfo CL_API_SUFFIX__VERSION_1_0; #ifdef CL_VERSION_2_0 -typedef cl_int(CL_API_CALL *cl_api_clSetKernelArgSVMPointer)( - cl_kernel /* kernel */, cl_uint /* arg_index */, - const void * /* arg_value */) CL_API_SUFFIX__VERSION_2_0; +typedef clSetKernelArgSVMPointer_t * +cl_api_clSetKernelArgSVMPointer CL_API_SUFFIX__VERSION_2_0; -typedef cl_int(CL_API_CALL *cl_api_clSetKernelExecInfo)( - cl_kernel /* kernel */, cl_kernel_exec_info /* param_name */, - size_t /* param_value_size */, - const void * /* param_value */) CL_API_SUFFIX__VERSION_2_0; +typedef clSetKernelExecInfo_t * +cl_api_clSetKernelExecInfo CL_API_SUFFIX__VERSION_2_0; -typedef cl_int(CL_API_CALL *cl_api_clGetKernelSubGroupInfoKHR)( - cl_kernel /* in_kernel */, cl_device_id /*in_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_API_SUFFIX__VERSION_2_0; +typedef clGetKernelSubGroupInfoKHR_t * +cl_api_clGetKernelSubGroupInfoKHR CL_API_SUFFIX__VERSION_2_0; #else @@ -420,47 +337,37 @@ typedef void *cl_api_clGetKernelSubGroupInfoKHR; #endif // Event Object APIs -typedef cl_int(CL_API_CALL *cl_api_clWaitForEvents)( - cl_uint num_events, const cl_event *event_list) CL_API_SUFFIX__VERSION_1_0; +typedef clWaitForEvents_t * +cl_api_clWaitForEvents CL_API_SUFFIX__VERSION_1_0; -typedef cl_int(CL_API_CALL *cl_api_clGetEventInfo)( - cl_event event, cl_event_info param_name, size_t param_value_size, - void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; +typedef clGetEventInfo_t * +cl_api_clGetEventInfo CL_API_SUFFIX__VERSION_1_0; -typedef cl_int(CL_API_CALL *cl_api_clRetainEvent)(cl_event event) - CL_API_SUFFIX__VERSION_1_0; +typedef clRetainEvent_t * +cl_api_clRetainEvent CL_API_SUFFIX__VERSION_1_0; -typedef cl_int(CL_API_CALL *cl_api_clReleaseEvent)(cl_event event) - CL_API_SUFFIX__VERSION_1_0; +typedef clReleaseEvent_t * +cl_api_clReleaseEvent CL_API_SUFFIX__VERSION_1_0; // Profiling APIs -typedef cl_int(CL_API_CALL *cl_api_clGetEventProfilingInfo)( - cl_event event, cl_profiling_info param_name, size_t param_value_size, - void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; +typedef clGetEventProfilingInfo_t * +cl_api_clGetEventProfilingInfo CL_API_SUFFIX__VERSION_1_0; // Flush and Finish APIs -typedef cl_int(CL_API_CALL *cl_api_clFlush)( - cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0; +typedef clFlush_t * +cl_api_clFlush CL_API_SUFFIX__VERSION_1_0; -typedef cl_int(CL_API_CALL *cl_api_clFinish)( - cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0; +typedef clFinish_t * +cl_api_clFinish CL_API_SUFFIX__VERSION_1_0; // Enqueued Commands APIs -typedef cl_int(CL_API_CALL *cl_api_clEnqueueReadBuffer)( - cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read, - size_t offset, size_t cb, void *ptr, cl_uint num_events_in_wait_list, - const cl_event *event_wait_list, - cl_event *event) CL_API_SUFFIX__VERSION_1_0; +typedef clEnqueueReadBuffer_t * +cl_api_clEnqueueReadBuffer CL_API_SUFFIX__VERSION_1_0; #ifdef CL_VERSION_1_1 -typedef cl_int(CL_API_CALL *cl_api_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) CL_API_SUFFIX__VERSION_1_1; +typedef clEnqueueReadBufferRect_t * +cl_api_clEnqueueReadBufferRect CL_API_SUFFIX__VERSION_1_1; #else @@ -468,21 +375,13 @@ typedef void *cl_api_clEnqueueReadBufferRect; #endif -typedef cl_int(CL_API_CALL *cl_api_clEnqueueWriteBuffer)( - cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_write, - size_t offset, size_t cb, const void *ptr, cl_uint num_events_in_wait_list, - const cl_event *event_wait_list, - cl_event *event) CL_API_SUFFIX__VERSION_1_0; +typedef clEnqueueWriteBuffer_t * +cl_api_clEnqueueWriteBuffer CL_API_SUFFIX__VERSION_1_0; #ifdef CL_VERSION_1_1 -typedef cl_int(CL_API_CALL *cl_api_clEnqueueWriteBufferRect)( - 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, const void *ptr, - cl_uint num_events_in_wait_list, const cl_event *event_wait_list, - cl_event *event) CL_API_SUFFIX__VERSION_1_1; +typedef clEnqueueWriteBufferRect_t * +cl_api_clEnqueueWriteBufferRect CL_API_SUFFIX__VERSION_1_1; #else @@ -492,11 +391,8 @@ typedef void *cl_api_clEnqueueWriteBufferRect; #ifdef CL_VERSION_1_2 -typedef cl_int(CL_API_CALL *cl_api_clEnqueueFillBuffer)( - cl_command_queue command_queue, cl_mem buffer, const void *pattern, - size_t pattern_size, size_t offset, size_t cb, - cl_uint num_events_in_wait_list, const cl_event *event_wait_list, - cl_event *event) CL_API_SUFFIX__VERSION_1_2; +typedef clEnqueueFillBuffer_t * +cl_api_clEnqueueFillBuffer CL_API_SUFFIX__VERSION_1_2; #else @@ -504,21 +400,13 @@ typedef void *cl_api_clEnqueueFillBuffer; #endif -typedef cl_int(CL_API_CALL *cl_api_clEnqueueCopyBuffer)( - cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_buffer, - size_t src_offset, size_t dst_offset, size_t cb, - cl_uint num_events_in_wait_list, const cl_event *event_wait_list, - cl_event *event) CL_API_SUFFIX__VERSION_1_0; +typedef clEnqueueCopyBuffer_t * +cl_api_clEnqueueCopyBuffer CL_API_SUFFIX__VERSION_1_0; #ifdef CL_VERSION_1_1 -typedef cl_int(CL_API_CALL *cl_api_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) CL_API_SUFFIX__VERSION_1_1; +typedef clEnqueueCopyBufferRect_t * +cl_api_clEnqueueCopyBufferRect CL_API_SUFFIX__VERSION_1_1; #else @@ -526,27 +414,16 @@ typedef void *cl_api_clEnqueueCopyBufferRect; #endif -typedef cl_int(CL_API_CALL *cl_api_clEnqueueReadImage)( - cl_command_queue command_queue, cl_mem image, cl_bool blocking_read, - const size_t *origin, const size_t *region, size_t row_pitch, - size_t slice_pitch, void *ptr, cl_uint num_events_in_wait_list, - const cl_event *event_wait_list, - cl_event *event) CL_API_SUFFIX__VERSION_1_0; +typedef clEnqueueReadImage_t * +cl_api_clEnqueueReadImage CL_API_SUFFIX__VERSION_1_0; -typedef cl_int(CL_API_CALL *cl_api_clEnqueueWriteImage)( - cl_command_queue command_queue, cl_mem image, cl_bool blocking_write, - const size_t *origin, const size_t *region, size_t input_row_pitch, - size_t input_slice_pitch, const void *ptr, cl_uint num_events_in_wait_list, - const cl_event *event_wait_list, - cl_event *event) CL_API_SUFFIX__VERSION_1_0; +typedef clEnqueueWriteImage_t * +cl_api_clEnqueueWriteImage CL_API_SUFFIX__VERSION_1_0; #ifdef CL_VERSION_1_2 -typedef cl_int(CL_API_CALL *cl_api_clEnqueueFillImage)( - cl_command_queue command_queue, cl_mem image, const void *fill_color, - const size_t origin[3], const size_t region[3], - cl_uint num_events_in_wait_list, const cl_event *event_wait_list, - cl_event *event) CL_API_SUFFIX__VERSION_1_2; +typedef clEnqueueFillImage_t * +cl_api_clEnqueueFillImage CL_API_SUFFIX__VERSION_1_2; #else @@ -554,49 +431,28 @@ typedef void *cl_api_clEnqueueFillImage; #endif -typedef cl_int(CL_API_CALL *cl_api_clEnqueueCopyImage)( - cl_command_queue command_queue, cl_mem src_image, cl_mem dst_image, - const size_t *src_origin, const size_t *dst_origin, const size_t *region, - cl_uint num_events_in_wait_list, const cl_event *event_wait_list, - cl_event *event) CL_API_SUFFIX__VERSION_1_0; - -typedef cl_int(CL_API_CALL *cl_api_clEnqueueCopyImageToBuffer)( - cl_command_queue command_queue, cl_mem src_image, cl_mem dst_buffer, - const size_t *src_origin, const size_t *region, size_t dst_offset, - cl_uint num_events_in_wait_list, const cl_event *event_wait_list, - cl_event *event) CL_API_SUFFIX__VERSION_1_0; - -typedef cl_int(CL_API_CALL *cl_api_clEnqueueCopyBufferToImage)( - cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_image, - size_t src_offset, const size_t *dst_origin, const size_t *region, - cl_uint num_events_in_wait_list, const cl_event *event_wait_list, - cl_event *event) CL_API_SUFFIX__VERSION_1_0; - -typedef void *(CL_API_CALL *cl_api_clEnqueueMapBuffer)( - cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_map, - cl_map_flags map_flags, size_t offset, size_t cb, - cl_uint num_events_in_wait_list, const cl_event *event_wait_list, - cl_event *event, cl_int *errcode_ret)CL_API_SUFFIX__VERSION_1_0; - -typedef void *(CL_API_CALL *cl_api_clEnqueueMapImage)( - cl_command_queue command_queue, cl_mem image, cl_bool blocking_map, - cl_map_flags map_flags, const size_t *origin, const size_t *region, - size_t *image_row_pitch, size_t *image_slice_pitch, - cl_uint num_events_in_wait_list, const cl_event *event_wait_list, - cl_event *event, cl_int *errcode_ret)CL_API_SUFFIX__VERSION_1_0; - -typedef cl_int(CL_API_CALL *cl_api_clEnqueueUnmapMemObject)( - cl_command_queue command_queue, cl_mem memobj, void *mapped_ptr, - cl_uint num_events_in_wait_list, const cl_event *event_wait_list, - cl_event *event) CL_API_SUFFIX__VERSION_1_0; +typedef clEnqueueCopyImage_t * +cl_api_clEnqueueCopyImage CL_API_SUFFIX__VERSION_1_0; + +typedef clEnqueueCopyImageToBuffer_t * +cl_api_clEnqueueCopyImageToBuffer CL_API_SUFFIX__VERSION_1_0; + +typedef clEnqueueCopyBufferToImage_t * +cl_api_clEnqueueCopyBufferToImage CL_API_SUFFIX__VERSION_1_0; + +typedef clEnqueueMapBuffer_t * +cl_api_clEnqueueMapBuffer CL_API_SUFFIX__VERSION_1_0; + +typedef clEnqueueMapImage_t * +cl_api_clEnqueueMapImage CL_API_SUFFIX__VERSION_1_0; + +typedef clEnqueueUnmapMemObject_t * +cl_api_clEnqueueUnmapMemObject CL_API_SUFFIX__VERSION_1_0; #ifdef CL_VERSION_1_2 -typedef cl_int(CL_API_CALL *cl_api_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) CL_API_SUFFIX__VERSION_1_2; +typedef clEnqueueMigrateMemObjects_t * +cl_api_clEnqueueMigrateMemObjects CL_API_SUFFIX__VERSION_1_2; #else @@ -604,41 +460,25 @@ typedef void *cl_api_clEnqueueMigrateMemObjects; #endif -typedef cl_int(CL_API_CALL *cl_api_clEnqueueNDRangeKernel)( - cl_command_queue command_queue, cl_kernel kernel, cl_uint work_dim, - const size_t *global_work_offset, const size_t *global_work_size, - const size_t *local_work_size, cl_uint num_events_in_wait_list, - const cl_event *event_wait_list, - cl_event *event) CL_API_SUFFIX__VERSION_1_0; - -typedef cl_int(CL_API_CALL *cl_api_clEnqueueTask)( - cl_command_queue command_queue, cl_kernel kernel, - cl_uint num_events_in_wait_list, const cl_event *event_wait_list, - cl_event *event) CL_API_SUFFIX__VERSION_1_0; - -typedef cl_int(CL_API_CALL *cl_api_clEnqueueNativeKernel)( - cl_command_queue command_queue, void(CL_CALLBACK *user_func)(void *), - void *args, size_t cb_args, cl_uint num_mem_objects, const cl_mem *mem_list, - const void **args_mem_loc, cl_uint num_events_in_wait_list, - const cl_event *event_wait_list, - cl_event *event) CL_API_SUFFIX__VERSION_1_0; +typedef clEnqueueNDRangeKernel_t * +cl_api_clEnqueueNDRangeKernel CL_API_SUFFIX__VERSION_1_0; + +typedef clEnqueueTask_t * +cl_api_clEnqueueTask CL_API_SUFFIX__VERSION_1_0; + +typedef clEnqueueNativeKernel_t * +cl_api_clEnqueueNativeKernel CL_API_SUFFIX__VERSION_1_0; #ifdef CL_VERSION_1_2 -typedef cl_int(CL_API_CALL *cl_api_clEnqueueMarkerWithWaitList)( - cl_command_queue command_queue, cl_uint num_events_in_wait_list, - const cl_event *event_wait_list, - cl_event *event) CL_API_SUFFIX__VERSION_1_2; +typedef clEnqueueMarkerWithWaitList_t * +cl_api_clEnqueueMarkerWithWaitList CL_API_SUFFIX__VERSION_1_2; -typedef cl_int(CL_API_CALL *cl_api_clEnqueueBarrierWithWaitList)( - cl_command_queue command_queue, cl_uint num_events_in_wait_list, - const cl_event *event_wait_list, - cl_event *event) CL_API_SUFFIX__VERSION_1_2; +typedef clEnqueueBarrierWithWaitList_t * +cl_api_clEnqueueBarrierWithWaitList CL_API_SUFFIX__VERSION_1_2; -typedef void *( - CL_API_CALL *cl_api_clGetExtensionFunctionAddressForPlatform)( - cl_platform_id platform, - const char *function_name)CL_API_SUFFIX__VERSION_1_2; +typedef clGetExtensionFunctionAddressForPlatform_t * +cl_api_clGetExtensionFunctionAddressForPlatform CL_API_SUFFIX__VERSION_1_2; #else @@ -652,43 +492,20 @@ typedef void *cl_api_clGetExtensionFunctionAddressForPlatform; #ifdef CL_VERSION_2_0 -typedef cl_int(CL_API_CALL *cl_api_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 */) CL_API_SUFFIX__VERSION_2_0; - -typedef cl_int(CL_API_CALL *cl_api_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 */) CL_API_SUFFIX__VERSION_2_0; - -typedef cl_int(CL_API_CALL *cl_api_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 */) CL_API_SUFFIX__VERSION_2_0; - -typedef cl_int(CL_API_CALL *cl_api_clEnqueueSVMMap)( - cl_command_queue /* command_queue */, cl_bool /* blocking_map */, - cl_map_flags /* map_flags */, void * /* svm_ptr */, size_t /* size */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0; - -typedef cl_int(CL_API_CALL *cl_api_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 */) CL_API_SUFFIX__VERSION_2_0; +typedef clEnqueueSVMFree_t * +cl_api_clEnqueueSVMFree CL_API_SUFFIX__VERSION_2_0; + +typedef clEnqueueSVMMemcpy_t * +cl_api_clEnqueueSVMMemcpy CL_API_SUFFIX__VERSION_2_0; + +typedef clEnqueueSVMMemFill_t * +cl_api_clEnqueueSVMMemFill CL_API_SUFFIX__VERSION_2_0; + +typedef clEnqueueSVMMap_t * +cl_api_clEnqueueSVMMap CL_API_SUFFIX__VERSION_2_0; + +typedef clEnqueueSVMUnmap_t * +cl_api_clEnqueueSVMUnmap CL_API_SUFFIX__VERSION_2_0; #else @@ -701,261 +518,127 @@ typedef void *cl_api_clEnqueueSVMUnmap; #endif // Deprecated APIs -typedef cl_int(CL_API_CALL *cl_api_clSetCommandQueueProperty)( - cl_command_queue command_queue, cl_command_queue_properties properties, - cl_bool enable, cl_command_queue_properties *old_properties) - CL_API_SUFFIX__VERSION_1_0_DEPRECATED; +typedef clSetCommandQueueProperty_t * +cl_api_clSetCommandQueueProperty CL_API_SUFFIX__VERSION_1_0_DEPRECATED; -typedef cl_mem(CL_API_CALL *cl_api_clCreateImage2D)( - cl_context context, cl_mem_flags flags, const cl_image_format *image_format, - size_t image_width, size_t image_height, size_t image_row_pitch, - void *host_ptr, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED; +typedef clCreateImage2D_t * +cl_api_clCreateImage2D CL_API_SUFFIX__VERSION_1_1_DEPRECATED; -typedef cl_mem(CL_API_CALL *cl_api_clCreateImage3D)( - cl_context context, cl_mem_flags flags, const cl_image_format *image_format, - size_t image_width, size_t image_height, size_t image_depth, - size_t image_row_pitch, size_t image_slice_pitch, void *host_ptr, - cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED; +typedef clCreateImage3D_t * +cl_api_clCreateImage3D CL_API_SUFFIX__VERSION_1_1_DEPRECATED; -typedef cl_int(CL_API_CALL *cl_api_clUnloadCompiler)(void) - CL_API_SUFFIX__VERSION_1_1_DEPRECATED; +typedef clUnloadCompiler_t * +cl_api_clUnloadCompiler CL_API_SUFFIX__VERSION_1_1_DEPRECATED; -typedef cl_int(CL_API_CALL *cl_api_clEnqueueMarker)( - cl_command_queue command_queue, - cl_event *event) CL_API_SUFFIX__VERSION_1_1_DEPRECATED; +typedef clEnqueueMarker_t * +cl_api_clEnqueueMarker CL_API_SUFFIX__VERSION_1_1_DEPRECATED; -typedef cl_int(CL_API_CALL *cl_api_clEnqueueWaitForEvents)( - cl_command_queue command_queue, cl_uint num_events, - const cl_event *event_list) CL_API_SUFFIX__VERSION_1_1_DEPRECATED; +typedef clEnqueueWaitForEvents_t * +cl_api_clEnqueueWaitForEvents CL_API_SUFFIX__VERSION_1_1_DEPRECATED; -typedef cl_int(CL_API_CALL *cl_api_clEnqueueBarrier)( - cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_1_DEPRECATED; +typedef clEnqueueBarrier_t * +cl_api_clEnqueueBarrier CL_API_SUFFIX__VERSION_1_1_DEPRECATED; -typedef void *(CL_API_CALL *cl_api_clGetExtensionFunctionAddress)( - const char *function_name)CL_API_SUFFIX__VERSION_1_1_DEPRECATED; +typedef clGetExtensionFunctionAddress_t * +cl_api_clGetExtensionFunctionAddress CL_API_SUFFIX__VERSION_1_1_DEPRECATED; // GL and other APIs -typedef cl_mem(CL_API_CALL *cl_api_clCreateFromGLBuffer)( - cl_context context, cl_mem_flags flags, cl_GLuint bufobj, - int *errcode_ret) CL_API_SUFFIX__VERSION_1_0; - -typedef cl_mem(CL_API_CALL *cl_api_clCreateFromGLTexture)( - cl_context context, cl_mem_flags flags, cl_GLenum target, cl_GLint miplevel, - cl_GLuint texture, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2; - -typedef cl_mem(CL_API_CALL *cl_api_clCreateFromGLTexture2D)( - cl_context context, cl_mem_flags flags, cl_GLenum target, cl_GLint miplevel, - cl_GLuint texture, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0; - -typedef cl_mem(CL_API_CALL *cl_api_clCreateFromGLTexture3D)( - cl_context context, cl_mem_flags flags, cl_GLenum target, cl_GLint miplevel, - cl_GLuint texture, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0; - -typedef cl_mem(CL_API_CALL *cl_api_clCreateFromGLRenderbuffer)( - cl_context context, cl_mem_flags flags, cl_GLuint renderbuffer, - cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0; - -typedef cl_int(CL_API_CALL *cl_api_clGetGLObjectInfo)( - cl_mem memobj, cl_gl_object_type *gl_object_type, - cl_GLuint *gl_object_name) CL_API_SUFFIX__VERSION_1_0; - -typedef cl_int(CL_API_CALL *cl_api_clGetGLTextureInfo)( - cl_mem memobj, cl_gl_texture_info param_name, size_t param_value_size, - void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; - -typedef cl_int(CL_API_CALL *cl_api_clEnqueueAcquireGLObjects)( - cl_command_queue command_queue, cl_uint num_objects, - const cl_mem *mem_objects, cl_uint num_events_in_wait_list, - const cl_event *event_wait_list, - cl_event *event) CL_API_SUFFIX__VERSION_1_0; - -typedef cl_int(CL_API_CALL *cl_api_clEnqueueReleaseGLObjects)( - cl_command_queue command_queue, cl_uint num_objects, - const cl_mem *mem_objects, cl_uint num_events_in_wait_list, - const cl_event *event_wait_list, - cl_event *event) CL_API_SUFFIX__VERSION_1_0; +typedef clCreateFromGLBuffer_t * +cl_api_clCreateFromGLBuffer CL_API_SUFFIX__VERSION_1_0; + +#if defined(CL_VERSION_1_2) + +typedef clCreateFromGLTexture_t * +cl_api_clCreateFromGLTexture CL_API_SUFFIX__VERSION_1_2; + +#else + +typedef void *cl_api_clCreateFromGLTexture; + +#endif + +typedef clCreateFromGLTexture2D_t * +cl_api_clCreateFromGLTexture2D CL_API_SUFFIX__VERSION_1_0; + +typedef clCreateFromGLTexture3D_t * +cl_api_clCreateFromGLTexture3D CL_API_SUFFIX__VERSION_1_0; + +typedef clCreateFromGLRenderbuffer_t * +cl_api_clCreateFromGLRenderbuffer CL_API_SUFFIX__VERSION_1_0; + +typedef clGetGLObjectInfo_t * +cl_api_clGetGLObjectInfo CL_API_SUFFIX__VERSION_1_0; + +typedef clGetGLTextureInfo_t * +cl_api_clGetGLTextureInfo CL_API_SUFFIX__VERSION_1_0; + +typedef clEnqueueAcquireGLObjects_t * +cl_api_clEnqueueAcquireGLObjects CL_API_SUFFIX__VERSION_1_0; + +typedef clEnqueueReleaseGLObjects_t * +cl_api_clEnqueueReleaseGLObjects CL_API_SUFFIX__VERSION_1_0; /* cl_khr_gl_sharing */ -typedef cl_int(CL_API_CALL *cl_api_clGetGLContextInfoKHR)( - const cl_context_properties *properties, cl_gl_context_info param_name, - size_t param_value_size, void *param_value, size_t *param_value_size_ret); +typedef clGetGLContextInfoKHR_t * +cl_api_clGetGLContextInfoKHR; /* cl_khr_gl_event */ -typedef cl_event(CL_API_CALL *cl_api_clCreateEventFromGLsyncKHR)( - cl_context context, cl_GLsync sync, cl_int *errcode_ret); +typedef clCreateEventFromGLsyncKHR_t * +cl_api_clCreateEventFromGLsyncKHR; #if defined(_WIN32) /* cl_khr_d3d10_sharing */ -typedef cl_int(CL_API_CALL *cl_api_clGetDeviceIDsFromD3D10KHR)( - cl_platform_id platform, cl_d3d10_device_source_khr d3d_device_source, - void *d3d_object, cl_d3d10_device_set_khr d3d_device_set, - cl_uint num_entries, cl_device_id *devices, - cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_0; - -typedef cl_mem(CL_API_CALL *cl_api_clCreateFromD3D10BufferKHR)( - cl_context context, cl_mem_flags flags, ID3D10Buffer *resource, - cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0; - -typedef cl_mem(CL_API_CALL *cl_api_clCreateFromD3D10Texture2DKHR)( - cl_context context, cl_mem_flags flags, ID3D10Texture2D *resource, - UINT subresource, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0; - -typedef cl_mem(CL_API_CALL *cl_api_clCreateFromD3D10Texture3DKHR)( - cl_context context, cl_mem_flags flags, ID3D10Texture3D *resource, - UINT subresource, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0; - -typedef -cl_int(CL_API_CALL *cl_api_clEnqueueAcquireD3D10ObjectsKHR)( - cl_command_queue command_queue, cl_uint num_objects, - const cl_mem *mem_objects, cl_uint num_events_in_wait_list, - const cl_event *event_wait_list, - cl_event *event) CL_API_SUFFIX__VERSION_1_0; - -typedef -cl_int(CL_API_CALL *cl_api_clEnqueueReleaseD3D10ObjectsKHR)( - cl_command_queue command_queue, cl_uint num_objects, - const cl_mem *mem_objects, cl_uint num_events_in_wait_list, - const cl_event *event_wait_list, - cl_event *event) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL clGetDeviceIDsFromD3D10KHR( - cl_platform_id platform, cl_d3d10_device_source_khr d3d_device_source, - void *d3d_object, cl_d3d10_device_set_khr d3d_device_set, - cl_uint num_entries, cl_device_id *devices, cl_uint *num_devices); - -extern CL_API_ENTRY cl_mem CL_API_CALL -clCreateFromD3D10BufferKHR(cl_context context, cl_mem_flags flags, - ID3D10Buffer *resource, cl_int *errcode_ret); - -extern CL_API_ENTRY cl_mem CL_API_CALL clCreateFromD3D10Texture2DKHR( - cl_context context, cl_mem_flags flags, ID3D10Texture2D *resource, - UINT subresource, cl_int *errcode_ret); - -extern CL_API_ENTRY cl_mem CL_API_CALL clCreateFromD3D10Texture3DKHR( - cl_context context, cl_mem_flags flags, ID3D10Texture3D *resource, - UINT subresource, cl_int *errcode_ret); - -extern CL_API_ENTRY cl_int CL_API_CALL clEnqueueAcquireD3D10ObjectsKHR( - cl_command_queue command_queue, cl_uint num_objects, - const cl_mem *mem_objects, cl_uint num_events_in_wait_list, - const cl_event *event_wait_list, cl_event *event); - -extern CL_API_ENTRY cl_int CL_API_CALL clEnqueueReleaseD3D10ObjectsKHR( - cl_command_queue command_queue, cl_uint num_objects, - const cl_mem *mem_objects, cl_uint num_events_in_wait_list, - const cl_event *event_wait_list, cl_event *event); +typedef clGetDeviceIDsFromD3D10KHR_t * +cl_api_clGetDeviceIDsFromD3D10KHR CL_API_SUFFIX__VERSION_1_0; -/* cl_khr_d3d11_sharing */ -typedef cl_int(CL_API_CALL *cl_api_clGetDeviceIDsFromD3D11KHR)( - cl_platform_id platform, cl_d3d11_device_source_khr d3d_device_source, - void *d3d_object, cl_d3d11_device_set_khr d3d_device_set, - cl_uint num_entries, cl_device_id *devices, - cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_2; - -typedef cl_mem(CL_API_CALL *cl_api_clCreateFromD3D11BufferKHR)( - cl_context context, cl_mem_flags flags, ID3D11Buffer *resource, - cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2; - -typedef cl_mem(CL_API_CALL *cl_api_clCreateFromD3D11Texture2DKHR)( - cl_context context, cl_mem_flags flags, ID3D11Texture2D *resource, - UINT subresource, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2; - -typedef cl_mem(CL_API_CALL *cl_api_clCreateFromD3D11Texture3DKHR)( - cl_context context, cl_mem_flags flags, ID3D11Texture3D *resource, - UINT subresource, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2; - -typedef -cl_int(CL_API_CALL *cl_api_clEnqueueAcquireD3D11ObjectsKHR)( - cl_command_queue command_queue, cl_uint num_objects, - const cl_mem *mem_objects, cl_uint num_events_in_wait_list, - const cl_event *event_wait_list, - cl_event *event) CL_API_SUFFIX__VERSION_1_2; - -typedef -cl_int(CL_API_CALL *cl_api_clEnqueueReleaseD3D11ObjectsKHR)( - cl_command_queue command_queue, cl_uint num_objects, - const cl_mem *mem_objects, cl_uint num_events_in_wait_list, - const cl_event *event_wait_list, - cl_event *event) CL_API_SUFFIX__VERSION_1_2; +typedef clCreateFromD3D10BufferKHR_t * +cl_api_clCreateFromD3D10BufferKHR CL_API_SUFFIX__VERSION_1_0; -/* cl_khr_dx9_media_sharing */ -typedef -cl_int(CL_API_CALL *cl_api_clGetDeviceIDsFromDX9MediaAdapterKHR)( - cl_platform_id platform, cl_uint num_media_adapters, - cl_dx9_media_adapter_type_khr *media_adapters_type, void *media_adapters, - cl_dx9_media_adapter_set_khr media_adapter_set, cl_uint num_entries, - cl_device_id *devices, cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_2; - -typedef cl_mem(CL_API_CALL *cl_api_clCreateFromDX9MediaSurfaceKHR)( - cl_context context, cl_mem_flags flags, - cl_dx9_media_adapter_type_khr adapter_type, void *surface_info, - cl_uint plane, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2; - -typedef -cl_int(CL_API_CALL *cl_api_clEnqueueAcquireDX9MediaSurfacesKHR)( - cl_command_queue command_queue, cl_uint num_objects, - const cl_mem *mem_objects, cl_uint num_events_in_wait_list, - const cl_event *event_wait_list, - cl_event *event) CL_API_SUFFIX__VERSION_1_2; - -typedef -cl_int(CL_API_CALL *cl_api_clEnqueueReleaseDX9MediaSurfacesKHR)( - cl_command_queue command_queue, cl_uint num_objects, - const cl_mem *mem_objects, cl_uint num_events_in_wait_list, - const cl_event *event_wait_list, - cl_event *event) CL_API_SUFFIX__VERSION_1_2; +typedef clCreateFromD3D10Texture2DKHR_t * +cl_api_clCreateFromD3D10Texture2DKHR CL_API_SUFFIX__VERSION_1_0; + +typedef clCreateFromD3D10Texture3DKHR_t * +cl_api_clCreateFromD3D10Texture3DKHR CL_API_SUFFIX__VERSION_1_0; + +typedef clEnqueueAcquireD3D10ObjectsKHR_t * +cl_api_clEnqueueAcquireD3D10ObjectsKHR CL_API_SUFFIX__VERSION_1_0; + +typedef clEnqueueReleaseD3D10ObjectsKHR_t * +cl_api_clEnqueueReleaseD3D10ObjectsKHR CL_API_SUFFIX__VERSION_1_0; /* cl_khr_d3d11_sharing */ -extern CL_API_ENTRY cl_int CL_API_CALL clGetDeviceIDsFromD3D11KHR( - cl_platform_id platform, cl_d3d11_device_source_khr d3d_device_source, - void *d3d_object, cl_d3d11_device_set_khr d3d_device_set, - cl_uint num_entries, cl_device_id *devices, cl_uint *num_devices); +typedef clGetDeviceIDsFromD3D11KHR_t * +cl_api_clGetDeviceIDsFromD3D11KHR CL_API_SUFFIX__VERSION_1_2; -extern CL_API_ENTRY cl_mem CL_API_CALL -clCreateFromD3D11BufferKHR(cl_context context, cl_mem_flags flags, - ID3D11Buffer *resource, cl_int *errcode_ret); +typedef clCreateFromD3D11BufferKHR_t * +cl_api_clCreateFromD3D11BufferKHR CL_API_SUFFIX__VERSION_1_2; -extern CL_API_ENTRY cl_mem CL_API_CALL clCreateFromD3D11Texture2DKHR( - cl_context context, cl_mem_flags flags, ID3D11Texture2D *resource, - UINT subresource, cl_int *errcode_ret); +typedef clCreateFromD3D11Texture2DKHR_t * +cl_api_clCreateFromD3D11Texture2DKHR CL_API_SUFFIX__VERSION_1_2; -extern CL_API_ENTRY cl_mem CL_API_CALL clCreateFromD3D11Texture3DKHR( - cl_context context, cl_mem_flags flags, ID3D11Texture3D *resource, - UINT subresource, cl_int *errcode_ret); +typedef clCreateFromD3D11Texture3DKHR_t * +cl_api_clCreateFromD3D11Texture3DKHR CL_API_SUFFIX__VERSION_1_2; -extern CL_API_ENTRY cl_int CL_API_CALL clEnqueueAcquireD3D11ObjectsKHR( - cl_command_queue command_queue, cl_uint num_objects, - const cl_mem *mem_objects, cl_uint num_events_in_wait_list, - const cl_event *event_wait_list, cl_event *event); +typedef clEnqueueAcquireD3D11ObjectsKHR_t * +cl_api_clEnqueueAcquireD3D11ObjectsKHR CL_API_SUFFIX__VERSION_1_2; -extern CL_API_ENTRY cl_int CL_API_CALL clEnqueueReleaseD3D11ObjectsKHR( - cl_command_queue command_queue, cl_uint num_objects, - const cl_mem *mem_objects, cl_uint num_events_in_wait_list, - const cl_event *event_wait_list, cl_event *event); +typedef clEnqueueReleaseD3D11ObjectsKHR_t * +cl_api_clEnqueueReleaseD3D11ObjectsKHR CL_API_SUFFIX__VERSION_1_2; /* cl_khr_dx9_media_sharing */ -extern CL_API_ENTRY cl_int CL_API_CALL clGetDeviceIDsFromDX9MediaAdapterKHR( - cl_platform_id platform, cl_uint num_media_adapters, - cl_dx9_media_adapter_type_khr *media_adapter_type, void *media_adapters, - cl_dx9_media_adapter_set_khr media_adapter_set, cl_uint num_entries, - cl_device_id *devices, cl_uint *num_devices); - -extern CL_API_ENTRY cl_mem CL_API_CALL clCreateFromDX9MediaSurfaceKHR( - cl_context context, cl_mem_flags flags, - cl_dx9_media_adapter_type_khr adapter_type, void *surface_info, - cl_uint plane, cl_int *errcode_ret); - -extern CL_API_ENTRY cl_int CL_API_CALL clEnqueueAcquireDX9MediaSurfacesKHR( - cl_command_queue command_queue, cl_uint num_objects, - const cl_mem *mem_objects, cl_uint num_events_in_wait_list, - const cl_event *event_wait_list, cl_event *event); - -extern CL_API_ENTRY cl_int CL_API_CALL clEnqueueReleaseDX9MediaSurfacesKHR( - cl_command_queue command_queue, cl_uint num_objects, - const cl_mem *mem_objects, cl_uint num_events_in_wait_list, - const cl_event *event_wait_list, cl_event *event); +typedef clGetDeviceIDsFromDX9MediaAdapterKHR_t * +cl_api_clGetDeviceIDsFromDX9MediaAdapterKHR CL_API_SUFFIX__VERSION_1_2; + +typedef clCreateFromDX9MediaSurfaceKHR_t * +cl_api_clCreateFromDX9MediaSurfaceKHR CL_API_SUFFIX__VERSION_1_2; + +typedef clEnqueueAcquireDX9MediaSurfacesKHR_t * +cl_api_clEnqueueAcquireDX9MediaSurfacesKHR CL_API_SUFFIX__VERSION_1_2; + +typedef clEnqueueReleaseDX9MediaSurfacesKHR_t * +cl_api_clEnqueueReleaseDX9MediaSurfacesKHR CL_API_SUFFIX__VERSION_1_2; #else @@ -987,31 +670,20 @@ typedef void *cl_api_clGetDeviceIDsFromDX9MediaAdapterKHR; #ifdef CL_VERSION_1_1 -typedef cl_int(CL_API_CALL *cl_api_clSetEventCallback)( - cl_event /* event */, cl_int /* command_exec_callback_type */, - void(CL_CALLBACK * /* pfn_notify */)(cl_event, cl_int, void *), - void * /* user_data */) CL_API_SUFFIX__VERSION_1_1; +typedef clSetEventCallback_t * +cl_api_clSetEventCallback CL_API_SUFFIX__VERSION_1_1; -typedef cl_mem(CL_API_CALL *cl_api_clCreateSubBuffer)( - cl_mem /* buffer */, cl_mem_flags /* flags */, - cl_buffer_create_type /* buffer_create_type */, - const void * /* buffer_create_info */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1; +typedef clCreateSubBuffer_t * +cl_api_clCreateSubBuffer CL_API_SUFFIX__VERSION_1_1; -typedef -cl_int(CL_API_CALL *cl_api_clSetMemObjectDestructorCallback)( - cl_mem /* memobj */, - void(CL_CALLBACK * /*pfn_notify*/)(cl_mem /* memobj */, - void * /*user_data*/), - void * /*user_data */) CL_API_SUFFIX__VERSION_1_1; +typedef clSetMemObjectDestructorCallback_t * +cl_api_clSetMemObjectDestructorCallback CL_API_SUFFIX__VERSION_1_1; -typedef cl_event(CL_API_CALL *cl_api_clCreateUserEvent)( - cl_context /* context */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1; +typedef clCreateUserEvent_t * +cl_api_clCreateUserEvent CL_API_SUFFIX__VERSION_1_1; -typedef cl_int(CL_API_CALL *cl_api_clSetUserEventStatus)( - cl_event /* event */, - cl_int /* execution_status */) CL_API_SUFFIX__VERSION_1_1; +typedef clSetUserEventStatus_t * +cl_api_clSetUserEventStatus CL_API_SUFFIX__VERSION_1_1; #else @@ -1023,69 +695,51 @@ typedef void *cl_api_clSetUserEventStatus; #endif -typedef cl_int(CL_API_CALL *cl_api_clCreateSubDevicesEXT)( - cl_device_id in_device, - const cl_device_partition_property_ext *partition_properties, - cl_uint num_entries, cl_device_id *out_devices, cl_uint *num_devices); +typedef clCreateSubDevicesEXT_t * +cl_api_clCreateSubDevicesEXT; -typedef cl_int(CL_API_CALL *cl_api_clRetainDeviceEXT)( - cl_device_id device) CL_API_SUFFIX__VERSION_1_0; +typedef clRetainDeviceEXT_t * +cl_api_clRetainDeviceEXT CL_API_SUFFIX__VERSION_1_0; -typedef cl_int(CL_API_CALL *cl_api_clReleaseDeviceEXT)( - cl_device_id device) CL_API_SUFFIX__VERSION_1_0; +typedef clReleaseDeviceEXT_t * +cl_api_clReleaseDeviceEXT CL_API_SUFFIX__VERSION_1_0; /* cl_khr_egl_image */ -typedef cl_mem(CL_API_CALL *cl_api_clCreateFromEGLImageKHR)( - cl_context context, CLeglDisplayKHR display, CLeglImageKHR image, - cl_mem_flags flags, const cl_egl_image_properties_khr *properties, - cl_int *errcode_ret); +typedef clCreateFromEGLImageKHR_t * +cl_api_clCreateFromEGLImageKHR; -typedef cl_int(CL_API_CALL *cl_api_clEnqueueAcquireEGLObjectsKHR)( - cl_command_queue command_queue, cl_uint num_objects, - const cl_mem *mem_objects, cl_uint num_events_in_wait_list, - const cl_event *event_wait_list, cl_event *event); +typedef clEnqueueAcquireEGLObjectsKHR_t * +cl_api_clEnqueueAcquireEGLObjectsKHR; -typedef cl_int(CL_API_CALL *cl_api_clEnqueueReleaseEGLObjectsKHR)( - cl_command_queue command_queue, cl_uint num_objects, - const cl_mem *mem_objects, cl_uint num_events_in_wait_list, - const cl_event *event_wait_list, cl_event *event); +typedef clEnqueueReleaseEGLObjectsKHR_t * +cl_api_clEnqueueReleaseEGLObjectsKHR; /* cl_khr_egl_event */ -typedef cl_event(CL_API_CALL *cl_api_clCreateEventFromEGLSyncKHR)( - cl_context context, CLeglSyncKHR sync, CLeglDisplayKHR display, - cl_int *errcode_ret); +typedef clCreateEventFromEGLSyncKHR_t * +cl_api_clCreateEventFromEGLSyncKHR; #ifdef CL_VERSION_2_1 -typedef cl_int(CL_API_CALL *cl_api_clSetDefaultDeviceCommandQueue)( - cl_context context, cl_device_id device, - cl_command_queue command_queue) CL_API_SUFFIX__VERSION_2_1; +typedef clSetDefaultDeviceCommandQueue_t * +cl_api_clSetDefaultDeviceCommandQueue CL_API_SUFFIX__VERSION_2_1; -typedef cl_program(CL_API_CALL *cl_api_clCreateProgramWithIL)( - cl_context context, const void *il, size_t length, - cl_int *errcode_ret) CL_API_SUFFIX__VERSION_2_1; +typedef clCreateProgramWithIL_t * +cl_api_clCreateProgramWithIL CL_API_SUFFIX__VERSION_2_1; -typedef cl_int(CL_API_CALL *cl_api_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) CL_API_SUFFIX__VERSION_2_1; +typedef clGetKernelSubGroupInfo_t * +cl_api_clGetKernelSubGroupInfo CL_API_SUFFIX__VERSION_2_1; -typedef cl_kernel(CL_API_CALL *cl_api_clCloneKernel)( - cl_kernel source_kernel, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_2_1; +typedef clCloneKernel_t * +cl_api_clCloneKernel CL_API_SUFFIX__VERSION_2_1; -typedef cl_int(CL_API_CALL *cl_api_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) CL_API_SUFFIX__VERSION_2_1; +typedef clEnqueueSVMMigrateMem_t * +cl_api_clEnqueueSVMMigrateMem CL_API_SUFFIX__VERSION_2_1; -typedef cl_int(CL_API_CALL *cl_api_clGetDeviceAndHostTimer)( - cl_device_id device, cl_ulong *device_timestamp, - cl_ulong *host_timestamp) CL_API_SUFFIX__VERSION_2_1; +typedef clGetDeviceAndHostTimer_t * +cl_api_clGetDeviceAndHostTimer CL_API_SUFFIX__VERSION_2_1; -typedef cl_int(CL_API_CALL *cl_api_clGetHostTimer)( - cl_device_id device, cl_ulong *host_timestamp) CL_API_SUFFIX__VERSION_2_1; +typedef clGetHostTimer_t * +cl_api_clGetHostTimer CL_API_SUFFIX__VERSION_2_1; #else From 911ddf56683b663ef4fa93eb045ecbe9a75bbf85 Mon Sep 17 00:00:00 2001 From: Brice Videau Date: Wed, 26 Apr 2023 15:05:19 -0500 Subject: [PATCH 4/8] Add missing include guards. --- CL/cl_function_types.h | 5 +++++ scripts/cl_function_types.h.mako | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/CL/cl_function_types.h b/CL/cl_function_types.h index 8f04c81f..e5699af9 100644 --- a/CL/cl_function_types.h +++ b/CL/cl_function_types.h @@ -16,6 +16,9 @@ * OpenCL is a trademark of Apple Inc. used under license by Khronos. */ +#ifndef OPENCL_CL_FUNCTION_TYPES_H_ +#define OPENCL_CL_FUNCTION_TYPES_H_ + #include typedef cl_int CL_API_CALL clGetPlatformIDs_t( @@ -830,3 +833,5 @@ typedef cl_mem CL_API_CALL clCreateImageWithProperties_t( #endif /* CL_VERSION_3_0 */ + +#endif /* OPENCL_CL_FUNCTION_TYPES_H_ */ diff --git a/scripts/cl_function_types.h.mako b/scripts/cl_function_types.h.mako index e7f02fdf..f08680a9 100644 --- a/scripts/cl_function_types.h.mako +++ b/scripts/cl_function_types.h.mako @@ -30,6 +30,9 @@ def getCParameterStrings(params): * OpenCL is a trademark of Apple Inc. used under license by Khronos. */ +#ifndef OPENCL_CL_FUNCTION_TYPES_H_ +#define OPENCL_CL_FUNCTION_TYPES_H_ + #include %for version, apis in coreapis.items(): @@ -52,3 +55,5 @@ typedef ${api.RetType} CL_API_CALL ${api.Name}_t( % endif %endfor + +#endif /* OPENCL_CL_FUNCTION_TYPES_H_ */ From 3be15d56e05c1f511cd9c79bd82247c024e7bb60 Mon Sep 17 00:00:00 2001 From: Brice Videau Date: Wed, 26 Apr 2023 15:26:16 -0500 Subject: [PATCH 5/8] Cosmetic. --- CL/cl_d3d10.h | 21 ++- CL/cl_d3d11.h | 21 ++- CL/cl_dx9_media_sharing.h | 27 ++-- CL/cl_egl.h | 12 +- CL/cl_ext.h | 231 +++++++++++++++++++---------- CL/cl_function_types.h | 7 +- CL/cl_gl.h | 36 +++-- CL/cl_layer.h | 12 +- CL/cl_va_api_media_sharing_intel.h | 15 +- scripts/cl_ext.h.mako | 6 +- scripts/cl_function_types.h.mako | 2 +- 11 files changed, 261 insertions(+), 129 deletions(-) diff --git a/CL/cl_d3d10.h b/CL/cl_d3d10.h index 43ec470a..8404644a 100644 --- a/CL/cl_d3d10.h +++ b/CL/cl_d3d10.h @@ -107,7 +107,8 @@ clGetDeviceIDsFromD3D10KHR_t( cl_device_id* devices, cl_uint* num_devices); -typedef clGetDeviceIDsFromD3D10KHR_t *clGetDeviceIDsFromD3D10KHR_fn CL_API_SUFFIX__VERSION_1_0; +typedef clGetDeviceIDsFromD3D10KHR_t * +clGetDeviceIDsFromD3D10KHR_fn CL_API_SUFFIX__VERSION_1_0; typedef cl_mem CL_API_CALL clCreateFromD3D10BufferKHR_t( @@ -116,7 +117,8 @@ clCreateFromD3D10BufferKHR_t( ID3D10Buffer* resource, cl_int* errcode_ret); -typedef clCreateFromD3D10BufferKHR_t *clCreateFromD3D10BufferKHR_fn CL_API_SUFFIX__VERSION_1_0; +typedef clCreateFromD3D10BufferKHR_t * +clCreateFromD3D10BufferKHR_fn CL_API_SUFFIX__VERSION_1_0; typedef cl_mem CL_API_CALL clCreateFromD3D10Texture2DKHR_t( @@ -126,7 +128,8 @@ clCreateFromD3D10Texture2DKHR_t( UINT subresource, cl_int* errcode_ret); -typedef clCreateFromD3D10Texture2DKHR_t *clCreateFromD3D10Texture2DKHR_fn CL_API_SUFFIX__VERSION_1_0; +typedef clCreateFromD3D10Texture2DKHR_t * +clCreateFromD3D10Texture2DKHR_fn CL_API_SUFFIX__VERSION_1_0; typedef cl_mem CL_API_CALL clCreateFromD3D10Texture3DKHR_t( @@ -136,7 +139,8 @@ clCreateFromD3D10Texture3DKHR_t( UINT subresource, cl_int* errcode_ret); -typedef clCreateFromD3D10Texture3DKHR_t *clCreateFromD3D10Texture3DKHR_fn CL_API_SUFFIX__VERSION_1_0; +typedef clCreateFromD3D10Texture3DKHR_t * +clCreateFromD3D10Texture3DKHR_fn CL_API_SUFFIX__VERSION_1_0; typedef cl_int CL_API_CALL clEnqueueAcquireD3D10ObjectsKHR_t( @@ -147,7 +151,8 @@ clEnqueueAcquireD3D10ObjectsKHR_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueAcquireD3D10ObjectsKHR_t *clEnqueueAcquireD3D10ObjectsKHR_fn CL_API_SUFFIX__VERSION_1_0; +typedef clEnqueueAcquireD3D10ObjectsKHR_t * +clEnqueueAcquireD3D10ObjectsKHR_fn CL_API_SUFFIX__VERSION_1_0; typedef cl_int CL_API_CALL clEnqueueReleaseD3D10ObjectsKHR_t( @@ -158,7 +163,8 @@ clEnqueueReleaseD3D10ObjectsKHR_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueReleaseD3D10ObjectsKHR_t *clEnqueueReleaseD3D10ObjectsKHR_fn CL_API_SUFFIX__VERSION_1_0; +typedef clEnqueueReleaseD3D10ObjectsKHR_t * +clEnqueueReleaseD3D10ObjectsKHR_fn CL_API_SUFFIX__VERSION_1_0; #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -233,7 +239,8 @@ clGetSupportedD3D10TextureFormatsINTEL_t( DXGI_FORMAT* d3d10_formats, cl_uint* num_texture_formats); -typedef clGetSupportedD3D10TextureFormatsINTEL_t *clGetSupportedD3D10TextureFormatsINTEL_fn ; +typedef clGetSupportedD3D10TextureFormatsINTEL_t * +clGetSupportedD3D10TextureFormatsINTEL_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) diff --git a/CL/cl_d3d11.h b/CL/cl_d3d11.h index f2da8f2f..ade87950 100644 --- a/CL/cl_d3d11.h +++ b/CL/cl_d3d11.h @@ -107,7 +107,8 @@ clGetDeviceIDsFromD3D11KHR_t( cl_device_id* devices, cl_uint* num_devices); -typedef clGetDeviceIDsFromD3D11KHR_t *clGetDeviceIDsFromD3D11KHR_fn CL_API_SUFFIX__VERSION_1_2; +typedef clGetDeviceIDsFromD3D11KHR_t * +clGetDeviceIDsFromD3D11KHR_fn CL_API_SUFFIX__VERSION_1_2; typedef cl_mem CL_API_CALL clCreateFromD3D11BufferKHR_t( @@ -116,7 +117,8 @@ clCreateFromD3D11BufferKHR_t( ID3D11Buffer* resource, cl_int* errcode_ret); -typedef clCreateFromD3D11BufferKHR_t *clCreateFromD3D11BufferKHR_fn CL_API_SUFFIX__VERSION_1_2; +typedef clCreateFromD3D11BufferKHR_t * +clCreateFromD3D11BufferKHR_fn CL_API_SUFFIX__VERSION_1_2; typedef cl_mem CL_API_CALL clCreateFromD3D11Texture2DKHR_t( @@ -126,7 +128,8 @@ clCreateFromD3D11Texture2DKHR_t( UINT subresource, cl_int* errcode_ret); -typedef clCreateFromD3D11Texture2DKHR_t *clCreateFromD3D11Texture2DKHR_fn CL_API_SUFFIX__VERSION_1_2; +typedef clCreateFromD3D11Texture2DKHR_t * +clCreateFromD3D11Texture2DKHR_fn CL_API_SUFFIX__VERSION_1_2; typedef cl_mem CL_API_CALL clCreateFromD3D11Texture3DKHR_t( @@ -136,7 +139,8 @@ clCreateFromD3D11Texture3DKHR_t( UINT subresource, cl_int* errcode_ret); -typedef clCreateFromD3D11Texture3DKHR_t *clCreateFromD3D11Texture3DKHR_fn CL_API_SUFFIX__VERSION_1_2; +typedef clCreateFromD3D11Texture3DKHR_t * +clCreateFromD3D11Texture3DKHR_fn CL_API_SUFFIX__VERSION_1_2; typedef cl_int CL_API_CALL clEnqueueAcquireD3D11ObjectsKHR_t( @@ -147,7 +151,8 @@ clEnqueueAcquireD3D11ObjectsKHR_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueAcquireD3D11ObjectsKHR_t *clEnqueueAcquireD3D11ObjectsKHR_fn CL_API_SUFFIX__VERSION_1_2; +typedef clEnqueueAcquireD3D11ObjectsKHR_t * +clEnqueueAcquireD3D11ObjectsKHR_fn CL_API_SUFFIX__VERSION_1_2; typedef cl_int CL_API_CALL clEnqueueReleaseD3D11ObjectsKHR_t( @@ -158,7 +163,8 @@ clEnqueueReleaseD3D11ObjectsKHR_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueReleaseD3D11ObjectsKHR_t *clEnqueueReleaseD3D11ObjectsKHR_fn CL_API_SUFFIX__VERSION_1_2; +typedef clEnqueueReleaseD3D11ObjectsKHR_t * +clEnqueueReleaseD3D11ObjectsKHR_fn CL_API_SUFFIX__VERSION_1_2; #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -234,7 +240,8 @@ clGetSupportedD3D11TextureFormatsINTEL_t( DXGI_FORMAT* d3d11_formats, cl_uint* num_texture_formats); -typedef clGetSupportedD3D11TextureFormatsINTEL_t *clGetSupportedD3D11TextureFormatsINTEL_fn ; +typedef clGetSupportedD3D11TextureFormatsINTEL_t * +clGetSupportedD3D11TextureFormatsINTEL_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) diff --git a/CL/cl_dx9_media_sharing.h b/CL/cl_dx9_media_sharing.h index 7b0ebe80..c0df5c91 100644 --- a/CL/cl_dx9_media_sharing.h +++ b/CL/cl_dx9_media_sharing.h @@ -121,7 +121,8 @@ clGetDeviceIDsFromDX9MediaAdapterKHR_t( cl_device_id* devices, cl_uint* num_devices); -typedef clGetDeviceIDsFromDX9MediaAdapterKHR_t *clGetDeviceIDsFromDX9MediaAdapterKHR_fn CL_API_SUFFIX__VERSION_1_2; +typedef clGetDeviceIDsFromDX9MediaAdapterKHR_t * +clGetDeviceIDsFromDX9MediaAdapterKHR_fn CL_API_SUFFIX__VERSION_1_2; typedef cl_mem CL_API_CALL clCreateFromDX9MediaSurfaceKHR_t( @@ -132,7 +133,8 @@ clCreateFromDX9MediaSurfaceKHR_t( cl_uint plane, cl_int* errcode_ret); -typedef clCreateFromDX9MediaSurfaceKHR_t *clCreateFromDX9MediaSurfaceKHR_fn CL_API_SUFFIX__VERSION_1_2; +typedef clCreateFromDX9MediaSurfaceKHR_t * +clCreateFromDX9MediaSurfaceKHR_fn CL_API_SUFFIX__VERSION_1_2; typedef cl_int CL_API_CALL clEnqueueAcquireDX9MediaSurfacesKHR_t( @@ -143,7 +145,8 @@ clEnqueueAcquireDX9MediaSurfacesKHR_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueAcquireDX9MediaSurfacesKHR_t *clEnqueueAcquireDX9MediaSurfacesKHR_fn CL_API_SUFFIX__VERSION_1_2; +typedef clEnqueueAcquireDX9MediaSurfacesKHR_t * +clEnqueueAcquireDX9MediaSurfacesKHR_fn CL_API_SUFFIX__VERSION_1_2; typedef cl_int CL_API_CALL clEnqueueReleaseDX9MediaSurfacesKHR_t( @@ -154,7 +157,8 @@ clEnqueueReleaseDX9MediaSurfacesKHR_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueReleaseDX9MediaSurfacesKHR_t *clEnqueueReleaseDX9MediaSurfacesKHR_fn CL_API_SUFFIX__VERSION_1_2; +typedef clEnqueueReleaseDX9MediaSurfacesKHR_t * +clEnqueueReleaseDX9MediaSurfacesKHR_fn CL_API_SUFFIX__VERSION_1_2; #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -250,7 +254,8 @@ clGetDeviceIDsFromDX9INTEL_t( cl_device_id* devices, cl_uint* num_devices); -typedef clGetDeviceIDsFromDX9INTEL_t *clGetDeviceIDsFromDX9INTEL_fn CL_API_SUFFIX__VERSION_1_1; +typedef clGetDeviceIDsFromDX9INTEL_t * +clGetDeviceIDsFromDX9INTEL_fn CL_API_SUFFIX__VERSION_1_1; typedef cl_mem CL_API_CALL clCreateFromDX9MediaSurfaceINTEL_t( @@ -261,7 +266,8 @@ clCreateFromDX9MediaSurfaceINTEL_t( UINT plane, cl_int* errcode_ret); -typedef clCreateFromDX9MediaSurfaceINTEL_t *clCreateFromDX9MediaSurfaceINTEL_fn CL_API_SUFFIX__VERSION_1_1; +typedef clCreateFromDX9MediaSurfaceINTEL_t * +clCreateFromDX9MediaSurfaceINTEL_fn CL_API_SUFFIX__VERSION_1_1; typedef cl_int CL_API_CALL clEnqueueAcquireDX9ObjectsINTEL_t( @@ -272,7 +278,8 @@ clEnqueueAcquireDX9ObjectsINTEL_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueAcquireDX9ObjectsINTEL_t *clEnqueueAcquireDX9ObjectsINTEL_fn CL_API_SUFFIX__VERSION_1_1; +typedef clEnqueueAcquireDX9ObjectsINTEL_t * +clEnqueueAcquireDX9ObjectsINTEL_fn CL_API_SUFFIX__VERSION_1_1; typedef cl_int CL_API_CALL clEnqueueReleaseDX9ObjectsINTEL_t( @@ -283,7 +290,8 @@ clEnqueueReleaseDX9ObjectsINTEL_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueReleaseDX9ObjectsINTEL_t *clEnqueueReleaseDX9ObjectsINTEL_fn CL_API_SUFFIX__VERSION_1_1; +typedef clEnqueueReleaseDX9ObjectsINTEL_t * +clEnqueueReleaseDX9ObjectsINTEL_fn CL_API_SUFFIX__VERSION_1_1; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -345,7 +353,8 @@ clGetSupportedDX9MediaSurfaceFormatsINTEL_t( D3DFORMAT* dx9_formats, cl_uint* num_surface_formats); -typedef clGetSupportedDX9MediaSurfaceFormatsINTEL_t *clGetSupportedDX9MediaSurfaceFormatsINTEL_fn ; +typedef clGetSupportedDX9MediaSurfaceFormatsINTEL_t * +clGetSupportedDX9MediaSurfaceFormatsINTEL_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) diff --git a/CL/cl_egl.h b/CL/cl_egl.h index b6bbc18e..25cd5e0c 100644 --- a/CL/cl_egl.h +++ b/CL/cl_egl.h @@ -79,7 +79,8 @@ clCreateFromEGLImageKHR_t( const cl_egl_image_properties_khr* properties, cl_int* errcode_ret); -typedef clCreateFromEGLImageKHR_t *clCreateFromEGLImageKHR_fn CL_API_SUFFIX__VERSION_1_0; +typedef clCreateFromEGLImageKHR_t * +clCreateFromEGLImageKHR_fn CL_API_SUFFIX__VERSION_1_0; typedef cl_int CL_API_CALL clEnqueueAcquireEGLObjectsKHR_t( @@ -90,7 +91,8 @@ clEnqueueAcquireEGLObjectsKHR_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueAcquireEGLObjectsKHR_t *clEnqueueAcquireEGLObjectsKHR_fn CL_API_SUFFIX__VERSION_1_0; +typedef clEnqueueAcquireEGLObjectsKHR_t * +clEnqueueAcquireEGLObjectsKHR_fn CL_API_SUFFIX__VERSION_1_0; typedef cl_int CL_API_CALL clEnqueueReleaseEGLObjectsKHR_t( @@ -101,7 +103,8 @@ clEnqueueReleaseEGLObjectsKHR_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueReleaseEGLObjectsKHR_t *clEnqueueReleaseEGLObjectsKHR_fn CL_API_SUFFIX__VERSION_1_0; +typedef clEnqueueReleaseEGLObjectsKHR_t * +clEnqueueReleaseEGLObjectsKHR_fn CL_API_SUFFIX__VERSION_1_0; #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -155,7 +158,8 @@ clCreateEventFromEGLSyncKHR_t( CLeglDisplayKHR display, cl_int* errcode_ret); -typedef clCreateEventFromEGLSyncKHR_t *clCreateEventFromEGLSyncKHR_fn CL_API_SUFFIX__VERSION_1_0; +typedef clCreateEventFromEGLSyncKHR_t * +clCreateEventFromEGLSyncKHR_fn CL_API_SUFFIX__VERSION_1_0; #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) diff --git a/CL/cl_ext.h b/CL/cl_ext.h index 8738ed7e..a015cda3 100644 --- a/CL/cl_ext.h +++ b/CL/cl_ext.h @@ -107,25 +107,29 @@ clCreateCommandBufferKHR_t( const cl_command_buffer_properties_khr* properties, cl_int* errcode_ret); -typedef clCreateCommandBufferKHR_t *clCreateCommandBufferKHR_fn ; +typedef clCreateCommandBufferKHR_t * +clCreateCommandBufferKHR_fn ; typedef cl_int CL_API_CALL clFinalizeCommandBufferKHR_t( cl_command_buffer_khr command_buffer); -typedef clFinalizeCommandBufferKHR_t *clFinalizeCommandBufferKHR_fn ; +typedef clFinalizeCommandBufferKHR_t * +clFinalizeCommandBufferKHR_fn ; typedef cl_int CL_API_CALL clRetainCommandBufferKHR_t( cl_command_buffer_khr command_buffer); -typedef clRetainCommandBufferKHR_t *clRetainCommandBufferKHR_fn ; +typedef clRetainCommandBufferKHR_t * +clRetainCommandBufferKHR_fn ; typedef cl_int CL_API_CALL clReleaseCommandBufferKHR_t( cl_command_buffer_khr command_buffer); -typedef clReleaseCommandBufferKHR_t *clReleaseCommandBufferKHR_fn ; +typedef clReleaseCommandBufferKHR_t * +clReleaseCommandBufferKHR_fn ; typedef cl_int CL_API_CALL clEnqueueCommandBufferKHR_t( @@ -136,7 +140,8 @@ clEnqueueCommandBufferKHR_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueCommandBufferKHR_t *clEnqueueCommandBufferKHR_fn ; +typedef clEnqueueCommandBufferKHR_t * +clEnqueueCommandBufferKHR_fn ; typedef cl_int CL_API_CALL clCommandBarrierWithWaitListKHR_t( @@ -147,7 +152,8 @@ clCommandBarrierWithWaitListKHR_t( cl_sync_point_khr* sync_point, cl_mutable_command_khr* mutable_handle); -typedef clCommandBarrierWithWaitListKHR_t *clCommandBarrierWithWaitListKHR_fn ; +typedef clCommandBarrierWithWaitListKHR_t * +clCommandBarrierWithWaitListKHR_fn ; typedef cl_int CL_API_CALL clCommandCopyBufferKHR_t( @@ -163,7 +169,8 @@ clCommandCopyBufferKHR_t( cl_sync_point_khr* sync_point, cl_mutable_command_khr* mutable_handle); -typedef clCommandCopyBufferKHR_t *clCommandCopyBufferKHR_fn ; +typedef clCommandCopyBufferKHR_t * +clCommandCopyBufferKHR_fn ; typedef cl_int CL_API_CALL clCommandCopyBufferRectKHR_t( @@ -183,7 +190,8 @@ clCommandCopyBufferRectKHR_t( cl_sync_point_khr* sync_point, cl_mutable_command_khr* mutable_handle); -typedef clCommandCopyBufferRectKHR_t *clCommandCopyBufferRectKHR_fn ; +typedef clCommandCopyBufferRectKHR_t * +clCommandCopyBufferRectKHR_fn ; typedef cl_int CL_API_CALL clCommandCopyBufferToImageKHR_t( @@ -199,7 +207,8 @@ clCommandCopyBufferToImageKHR_t( cl_sync_point_khr* sync_point, cl_mutable_command_khr* mutable_handle); -typedef clCommandCopyBufferToImageKHR_t *clCommandCopyBufferToImageKHR_fn ; +typedef clCommandCopyBufferToImageKHR_t * +clCommandCopyBufferToImageKHR_fn ; typedef cl_int CL_API_CALL clCommandCopyImageKHR_t( @@ -215,7 +224,8 @@ clCommandCopyImageKHR_t( cl_sync_point_khr* sync_point, cl_mutable_command_khr* mutable_handle); -typedef clCommandCopyImageKHR_t *clCommandCopyImageKHR_fn ; +typedef clCommandCopyImageKHR_t * +clCommandCopyImageKHR_fn ; typedef cl_int CL_API_CALL clCommandCopyImageToBufferKHR_t( @@ -231,7 +241,8 @@ clCommandCopyImageToBufferKHR_t( cl_sync_point_khr* sync_point, cl_mutable_command_khr* mutable_handle); -typedef clCommandCopyImageToBufferKHR_t *clCommandCopyImageToBufferKHR_fn ; +typedef clCommandCopyImageToBufferKHR_t * +clCommandCopyImageToBufferKHR_fn ; typedef cl_int CL_API_CALL clCommandFillBufferKHR_t( @@ -247,7 +258,8 @@ clCommandFillBufferKHR_t( cl_sync_point_khr* sync_point, cl_mutable_command_khr* mutable_handle); -typedef clCommandFillBufferKHR_t *clCommandFillBufferKHR_fn ; +typedef clCommandFillBufferKHR_t * +clCommandFillBufferKHR_fn ; typedef cl_int CL_API_CALL clCommandFillImageKHR_t( @@ -262,7 +274,8 @@ clCommandFillImageKHR_t( cl_sync_point_khr* sync_point, cl_mutable_command_khr* mutable_handle); -typedef clCommandFillImageKHR_t *clCommandFillImageKHR_fn ; +typedef clCommandFillImageKHR_t * +clCommandFillImageKHR_fn ; typedef cl_int CL_API_CALL clCommandNDRangeKernelKHR_t( @@ -279,7 +292,8 @@ clCommandNDRangeKernelKHR_t( cl_sync_point_khr* sync_point, cl_mutable_command_khr* mutable_handle); -typedef clCommandNDRangeKernelKHR_t *clCommandNDRangeKernelKHR_fn ; +typedef clCommandNDRangeKernelKHR_t * +clCommandNDRangeKernelKHR_fn ; typedef cl_int CL_API_CALL clGetCommandBufferInfoKHR_t( @@ -289,7 +303,8 @@ clGetCommandBufferInfoKHR_t( void* param_value, size_t* param_value_size_ret); -typedef clGetCommandBufferInfoKHR_t *clGetCommandBufferInfoKHR_fn ; +typedef clGetCommandBufferInfoKHR_t * +clGetCommandBufferInfoKHR_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -495,7 +510,8 @@ clRemapCommandBufferKHR_t( cl_mutable_command_khr* handles_ret, cl_int* errcode_ret); -typedef clRemapCommandBufferKHR_t *clRemapCommandBufferKHR_fn ; +typedef clRemapCommandBufferKHR_t * +clRemapCommandBufferKHR_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -594,7 +610,8 @@ clUpdateMutableCommandsKHR_t( cl_command_buffer_khr command_buffer, const cl_mutable_base_config_khr* mutable_config); -typedef clUpdateMutableCommandsKHR_t *clUpdateMutableCommandsKHR_fn ; +typedef clUpdateMutableCommandsKHR_t * +clUpdateMutableCommandsKHR_fn ; typedef cl_int CL_API_CALL clGetMutableCommandInfoKHR_t( @@ -604,7 +621,8 @@ clGetMutableCommandInfoKHR_t( void* param_value, size_t* param_value_size_ret); -typedef clGetMutableCommandInfoKHR_t *clGetMutableCommandInfoKHR_fn ; +typedef clGetMutableCommandInfoKHR_t * +clGetMutableCommandInfoKHR_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -660,7 +678,8 @@ clSetMemObjectDestructorAPPLE_t( void (CL_CALLBACK* pfn_notify)(cl_mem memobj, void* user_data), void* user_data); -typedef clSetMemObjectDestructorAPPLE_t *clSetMemObjectDestructorAPPLE_fn CL_API_SUFFIX__VERSION_1_0; +typedef clSetMemObjectDestructorAPPLE_t * +clSetMemObjectDestructorAPPLE_fn CL_API_SUFFIX__VERSION_1_0; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -687,7 +706,8 @@ clLogMessagesToSystemLogAPPLE_t( size_t cb, void* user_data); -typedef clLogMessagesToSystemLogAPPLE_t *clLogMessagesToSystemLogAPPLE_fn CL_API_SUFFIX__VERSION_1_0; +typedef clLogMessagesToSystemLogAPPLE_t * +clLogMessagesToSystemLogAPPLE_fn CL_API_SUFFIX__VERSION_1_0; typedef void CL_API_CALL clLogMessagesToStdoutAPPLE_t( @@ -696,7 +716,8 @@ clLogMessagesToStdoutAPPLE_t( size_t cb, void* user_data); -typedef clLogMessagesToStdoutAPPLE_t *clLogMessagesToStdoutAPPLE_fn CL_API_SUFFIX__VERSION_1_0; +typedef clLogMessagesToStdoutAPPLE_t * +clLogMessagesToStdoutAPPLE_fn CL_API_SUFFIX__VERSION_1_0; typedef void CL_API_CALL clLogMessagesToStderrAPPLE_t( @@ -705,7 +726,8 @@ clLogMessagesToStderrAPPLE_t( size_t cb, void* user_data); -typedef clLogMessagesToStderrAPPLE_t *clLogMessagesToStderrAPPLE_fn CL_API_SUFFIX__VERSION_1_0; +typedef clLogMessagesToStderrAPPLE_t * +clLogMessagesToStderrAPPLE_fn CL_API_SUFFIX__VERSION_1_0; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -752,7 +774,8 @@ clIcdGetPlatformIDsKHR_t( cl_platform_id* platforms, cl_uint* num_platforms); -typedef clIcdGetPlatformIDsKHR_t *clIcdGetPlatformIDsKHR_fn ; +typedef clIcdGetPlatformIDsKHR_t * +clIcdGetPlatformIDsKHR_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -785,7 +808,8 @@ clCreateProgramWithILKHR_t( size_t length, cl_int* errcode_ret); -typedef clCreateProgramWithILKHR_t *clCreateProgramWithILKHR_fn CL_API_SUFFIX__VERSION_1_2; +typedef clCreateProgramWithILKHR_t * +clCreateProgramWithILKHR_fn CL_API_SUFFIX__VERSION_1_2; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -845,7 +869,8 @@ typedef cl_int CL_API_CALL clTerminateContextKHR_t( cl_context context); -typedef clTerminateContextKHR_t *clTerminateContextKHR_fn CL_API_SUFFIX__VERSION_1_2; +typedef clTerminateContextKHR_t * +clTerminateContextKHR_fn CL_API_SUFFIX__VERSION_1_2; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -885,7 +910,8 @@ clCreateCommandQueueWithPropertiesKHR_t( const cl_queue_properties_khr* properties, cl_int* errcode_ret); -typedef clCreateCommandQueueWithPropertiesKHR_t *clCreateCommandQueueWithPropertiesKHR_fn CL_API_SUFFIX__VERSION_1_2; +typedef clCreateCommandQueueWithPropertiesKHR_t * +clCreateCommandQueueWithPropertiesKHR_fn CL_API_SUFFIX__VERSION_1_2; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -1000,13 +1026,15 @@ typedef cl_int CL_API_CALL clReleaseDeviceEXT_t( cl_device_id device); -typedef clReleaseDeviceEXT_t *clReleaseDeviceEXT_fn CL_API_SUFFIX__VERSION_1_1; +typedef clReleaseDeviceEXT_t * +clReleaseDeviceEXT_fn CL_API_SUFFIX__VERSION_1_1; typedef cl_int CL_API_CALL clRetainDeviceEXT_t( cl_device_id device); -typedef clRetainDeviceEXT_t *clRetainDeviceEXT_fn CL_API_SUFFIX__VERSION_1_1; +typedef clRetainDeviceEXT_t * +clRetainDeviceEXT_fn CL_API_SUFFIX__VERSION_1_1; typedef cl_int CL_API_CALL clCreateSubDevicesEXT_t( @@ -1016,7 +1044,8 @@ clCreateSubDevicesEXT_t( cl_device_id* out_devices, cl_uint* num_devices); -typedef clCreateSubDevicesEXT_t *clCreateSubDevicesEXT_fn CL_API_SUFFIX__VERSION_1_1; +typedef clCreateSubDevicesEXT_t * +clCreateSubDevicesEXT_fn CL_API_SUFFIX__VERSION_1_1; #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -1064,7 +1093,8 @@ clEnqueueMigrateMemObjectEXT_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueMigrateMemObjectEXT_t *clEnqueueMigrateMemObjectEXT_fn ; +typedef clEnqueueMigrateMemObjectEXT_t * +clEnqueueMigrateMemObjectEXT_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -1132,7 +1162,8 @@ clGetDeviceImageInfoQCOM_t( void* param_value, size_t* param_value_size_ret); -typedef clGetDeviceImageInfoQCOM_t *clGetDeviceImageInfoQCOM_fn ; +typedef clGetDeviceImageInfoQCOM_t * +clGetDeviceImageInfoQCOM_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -1242,7 +1273,8 @@ clEnqueueAcquireGrallocObjectsIMG_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueAcquireGrallocObjectsIMG_t *clEnqueueAcquireGrallocObjectsIMG_fn CL_API_SUFFIX__VERSION_1_2; +typedef clEnqueueAcquireGrallocObjectsIMG_t * +clEnqueueAcquireGrallocObjectsIMG_fn CL_API_SUFFIX__VERSION_1_2; typedef cl_int CL_API_CALL clEnqueueReleaseGrallocObjectsIMG_t( @@ -1253,7 +1285,8 @@ clEnqueueReleaseGrallocObjectsIMG_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueReleaseGrallocObjectsIMG_t *clEnqueueReleaseGrallocObjectsIMG_fn CL_API_SUFFIX__VERSION_1_2; +typedef clEnqueueReleaseGrallocObjectsIMG_t * +clEnqueueReleaseGrallocObjectsIMG_fn CL_API_SUFFIX__VERSION_1_2; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -1306,7 +1339,8 @@ clEnqueueGenerateMipmapIMG_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueGenerateMipmapIMG_t *clEnqueueGenerateMipmapIMG_fn CL_API_SUFFIX__VERSION_1_2; +typedef clEnqueueGenerateMipmapIMG_t * +clEnqueueGenerateMipmapIMG_fn CL_API_SUFFIX__VERSION_1_2; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -1366,7 +1400,8 @@ clGetKernelSubGroupInfoKHR_t( void* param_value, size_t* param_value_size_ret); -typedef clGetKernelSubGroupInfoKHR_t *clGetKernelSubGroupInfoKHR_fn CL_API_SUFFIX__VERSION_2_0_DEPRECATED; +typedef clGetKernelSubGroupInfoKHR_t * +clGetKernelSubGroupInfoKHR_fn CL_API_SUFFIX__VERSION_2_0_DEPRECATED; #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -1536,7 +1571,8 @@ clGetKernelSuggestedLocalWorkSizeKHR_t( const size_t* global_work_size, size_t* suggested_local_work_size); -typedef clGetKernelSuggestedLocalWorkSizeKHR_t *clGetKernelSuggestedLocalWorkSizeKHR_fn CL_API_SUFFIX__VERSION_3_0; +typedef clGetKernelSuggestedLocalWorkSizeKHR_t * +clGetKernelSuggestedLocalWorkSizeKHR_fn CL_API_SUFFIX__VERSION_3_0; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -1610,7 +1646,8 @@ clEnqueueAcquireExternalMemObjectsKHR_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueAcquireExternalMemObjectsKHR_t *clEnqueueAcquireExternalMemObjectsKHR_fn CL_API_SUFFIX__VERSION_3_0; +typedef clEnqueueAcquireExternalMemObjectsKHR_t * +clEnqueueAcquireExternalMemObjectsKHR_fn CL_API_SUFFIX__VERSION_3_0; typedef cl_int CL_API_CALL clEnqueueReleaseExternalMemObjectsKHR_t( @@ -1621,7 +1658,8 @@ clEnqueueReleaseExternalMemObjectsKHR_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueReleaseExternalMemObjectsKHR_t *clEnqueueReleaseExternalMemObjectsKHR_fn CL_API_SUFFIX__VERSION_3_0; +typedef clEnqueueReleaseExternalMemObjectsKHR_t * +clEnqueueReleaseExternalMemObjectsKHR_fn CL_API_SUFFIX__VERSION_3_0; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -1721,7 +1759,8 @@ clGetSemaphoreHandleForTypeKHR_t( void* handle_ptr, size_t* handle_size_ret); -typedef clGetSemaphoreHandleForTypeKHR_t *clGetSemaphoreHandleForTypeKHR_fn CL_API_SUFFIX__VERSION_1_2; +typedef clGetSemaphoreHandleForTypeKHR_t * +clGetSemaphoreHandleForTypeKHR_fn CL_API_SUFFIX__VERSION_1_2; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -1824,7 +1863,8 @@ clCreateSemaphoreWithPropertiesKHR_t( const cl_semaphore_properties_khr* sema_props, cl_int* errcode_ret); -typedef clCreateSemaphoreWithPropertiesKHR_t *clCreateSemaphoreWithPropertiesKHR_fn CL_API_SUFFIX__VERSION_1_2; +typedef clCreateSemaphoreWithPropertiesKHR_t * +clCreateSemaphoreWithPropertiesKHR_fn CL_API_SUFFIX__VERSION_1_2; typedef cl_int CL_API_CALL clEnqueueWaitSemaphoresKHR_t( @@ -1836,7 +1876,8 @@ clEnqueueWaitSemaphoresKHR_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueWaitSemaphoresKHR_t *clEnqueueWaitSemaphoresKHR_fn CL_API_SUFFIX__VERSION_1_2; +typedef clEnqueueWaitSemaphoresKHR_t * +clEnqueueWaitSemaphoresKHR_fn CL_API_SUFFIX__VERSION_1_2; typedef cl_int CL_API_CALL clEnqueueSignalSemaphoresKHR_t( @@ -1848,7 +1889,8 @@ clEnqueueSignalSemaphoresKHR_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueSignalSemaphoresKHR_t *clEnqueueSignalSemaphoresKHR_fn CL_API_SUFFIX__VERSION_1_2; +typedef clEnqueueSignalSemaphoresKHR_t * +clEnqueueSignalSemaphoresKHR_fn CL_API_SUFFIX__VERSION_1_2; typedef cl_int CL_API_CALL clGetSemaphoreInfoKHR_t( @@ -1858,19 +1900,22 @@ clGetSemaphoreInfoKHR_t( void* param_value, size_t* param_value_size_ret); -typedef clGetSemaphoreInfoKHR_t *clGetSemaphoreInfoKHR_fn CL_API_SUFFIX__VERSION_1_2; +typedef clGetSemaphoreInfoKHR_t * +clGetSemaphoreInfoKHR_fn CL_API_SUFFIX__VERSION_1_2; typedef cl_int CL_API_CALL clReleaseSemaphoreKHR_t( cl_semaphore_khr sema_object); -typedef clReleaseSemaphoreKHR_t *clReleaseSemaphoreKHR_fn CL_API_SUFFIX__VERSION_1_2; +typedef clReleaseSemaphoreKHR_t * +clReleaseSemaphoreKHR_fn CL_API_SUFFIX__VERSION_1_2; typedef cl_int CL_API_CALL clRetainSemaphoreKHR_t( cl_semaphore_khr sema_object); -typedef clRetainSemaphoreKHR_t *clRetainSemaphoreKHR_fn CL_API_SUFFIX__VERSION_1_2; +typedef clRetainSemaphoreKHR_t * +clRetainSemaphoreKHR_fn CL_API_SUFFIX__VERSION_1_2; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -1948,7 +1993,8 @@ clImportMemoryARM_t( size_t size, cl_int* errcode_ret); -typedef clImportMemoryARM_t *clImportMemoryARM_fn CL_API_SUFFIX__VERSION_1_0; +typedef clImportMemoryARM_t * +clImportMemoryARM_fn CL_API_SUFFIX__VERSION_1_0; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -2009,14 +2055,16 @@ clSVMAllocARM_t( size_t size, cl_uint alignment); -typedef clSVMAllocARM_t *clSVMAllocARM_fn CL_API_SUFFIX__VERSION_1_2; +typedef clSVMAllocARM_t * +clSVMAllocARM_fn CL_API_SUFFIX__VERSION_1_2; typedef void CL_API_CALL clSVMFreeARM_t( cl_context context, void* svm_pointer); -typedef clSVMFreeARM_t *clSVMFreeARM_fn CL_API_SUFFIX__VERSION_1_2; +typedef clSVMFreeARM_t * +clSVMFreeARM_fn CL_API_SUFFIX__VERSION_1_2; typedef cl_int CL_API_CALL clEnqueueSVMFreeARM_t( @@ -2029,7 +2077,8 @@ clEnqueueSVMFreeARM_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueSVMFreeARM_t *clEnqueueSVMFreeARM_fn CL_API_SUFFIX__VERSION_1_2; +typedef clEnqueueSVMFreeARM_t * +clEnqueueSVMFreeARM_fn CL_API_SUFFIX__VERSION_1_2; typedef cl_int CL_API_CALL clEnqueueSVMMemcpyARM_t( @@ -2042,7 +2091,8 @@ clEnqueueSVMMemcpyARM_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueSVMMemcpyARM_t *clEnqueueSVMMemcpyARM_fn CL_API_SUFFIX__VERSION_1_2; +typedef clEnqueueSVMMemcpyARM_t * +clEnqueueSVMMemcpyARM_fn CL_API_SUFFIX__VERSION_1_2; typedef cl_int CL_API_CALL clEnqueueSVMMemFillARM_t( @@ -2055,7 +2105,8 @@ clEnqueueSVMMemFillARM_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueSVMMemFillARM_t *clEnqueueSVMMemFillARM_fn CL_API_SUFFIX__VERSION_1_2; +typedef clEnqueueSVMMemFillARM_t * +clEnqueueSVMMemFillARM_fn CL_API_SUFFIX__VERSION_1_2; typedef cl_int CL_API_CALL clEnqueueSVMMapARM_t( @@ -2068,7 +2119,8 @@ clEnqueueSVMMapARM_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueSVMMapARM_t *clEnqueueSVMMapARM_fn CL_API_SUFFIX__VERSION_1_2; +typedef clEnqueueSVMMapARM_t * +clEnqueueSVMMapARM_fn CL_API_SUFFIX__VERSION_1_2; typedef cl_int CL_API_CALL clEnqueueSVMUnmapARM_t( @@ -2078,7 +2130,8 @@ clEnqueueSVMUnmapARM_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueSVMUnmapARM_t *clEnqueueSVMUnmapARM_fn CL_API_SUFFIX__VERSION_1_2; +typedef clEnqueueSVMUnmapARM_t * +clEnqueueSVMUnmapARM_fn CL_API_SUFFIX__VERSION_1_2; typedef cl_int CL_API_CALL clSetKernelArgSVMPointerARM_t( @@ -2086,7 +2139,8 @@ clSetKernelArgSVMPointerARM_t( cl_uint arg_index, const void* arg_value); -typedef clSetKernelArgSVMPointerARM_t *clSetKernelArgSVMPointerARM_fn CL_API_SUFFIX__VERSION_1_2; +typedef clSetKernelArgSVMPointerARM_t * +clSetKernelArgSVMPointerARM_fn CL_API_SUFFIX__VERSION_1_2; typedef cl_int CL_API_CALL clSetKernelExecInfoARM_t( @@ -2095,7 +2149,8 @@ clSetKernelExecInfoARM_t( size_t param_value_size, const void* param_value); -typedef clSetKernelExecInfoARM_t *clSetKernelExecInfoARM_fn CL_API_SUFFIX__VERSION_1_2; +typedef clSetKernelExecInfoARM_t * +clSetKernelExecInfoARM_fn CL_API_SUFFIX__VERSION_1_2; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -2355,7 +2410,8 @@ clCreateAcceleratorINTEL_t( const void* descriptor, cl_int* errcode_ret); -typedef clCreateAcceleratorINTEL_t *clCreateAcceleratorINTEL_fn CL_API_SUFFIX__VERSION_1_2; +typedef clCreateAcceleratorINTEL_t * +clCreateAcceleratorINTEL_fn CL_API_SUFFIX__VERSION_1_2; typedef cl_int CL_API_CALL clGetAcceleratorInfoINTEL_t( @@ -2365,19 +2421,22 @@ clGetAcceleratorInfoINTEL_t( void* param_value, size_t* param_value_size_ret); -typedef clGetAcceleratorInfoINTEL_t *clGetAcceleratorInfoINTEL_fn CL_API_SUFFIX__VERSION_1_2; +typedef clGetAcceleratorInfoINTEL_t * +clGetAcceleratorInfoINTEL_fn CL_API_SUFFIX__VERSION_1_2; typedef cl_int CL_API_CALL clRetainAcceleratorINTEL_t( cl_accelerator_intel accelerator); -typedef clRetainAcceleratorINTEL_t *clRetainAcceleratorINTEL_fn CL_API_SUFFIX__VERSION_1_2; +typedef clRetainAcceleratorINTEL_t * +clRetainAcceleratorINTEL_fn CL_API_SUFFIX__VERSION_1_2; typedef cl_int CL_API_CALL clReleaseAcceleratorINTEL_t( cl_accelerator_intel accelerator); -typedef clReleaseAcceleratorINTEL_t *clReleaseAcceleratorINTEL_fn CL_API_SUFFIX__VERSION_1_2; +typedef clReleaseAcceleratorINTEL_t * +clReleaseAcceleratorINTEL_fn CL_API_SUFFIX__VERSION_1_2; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -2808,7 +2867,8 @@ clHostMemAllocINTEL_t( cl_uint alignment, cl_int* errcode_ret); -typedef clHostMemAllocINTEL_t *clHostMemAllocINTEL_fn ; +typedef clHostMemAllocINTEL_t * +clHostMemAllocINTEL_fn ; typedef void* CL_API_CALL clDeviceMemAllocINTEL_t( @@ -2819,7 +2879,8 @@ clDeviceMemAllocINTEL_t( cl_uint alignment, cl_int* errcode_ret); -typedef clDeviceMemAllocINTEL_t *clDeviceMemAllocINTEL_fn ; +typedef clDeviceMemAllocINTEL_t * +clDeviceMemAllocINTEL_fn ; typedef void* CL_API_CALL clSharedMemAllocINTEL_t( @@ -2830,21 +2891,24 @@ clSharedMemAllocINTEL_t( cl_uint alignment, cl_int* errcode_ret); -typedef clSharedMemAllocINTEL_t *clSharedMemAllocINTEL_fn ; +typedef clSharedMemAllocINTEL_t * +clSharedMemAllocINTEL_fn ; typedef cl_int CL_API_CALL clMemFreeINTEL_t( cl_context context, void* ptr); -typedef clMemFreeINTEL_t *clMemFreeINTEL_fn ; +typedef clMemFreeINTEL_t * +clMemFreeINTEL_fn ; typedef cl_int CL_API_CALL clMemBlockingFreeINTEL_t( cl_context context, void* ptr); -typedef clMemBlockingFreeINTEL_t *clMemBlockingFreeINTEL_fn ; +typedef clMemBlockingFreeINTEL_t * +clMemBlockingFreeINTEL_fn ; typedef cl_int CL_API_CALL clGetMemAllocInfoINTEL_t( @@ -2855,7 +2919,8 @@ clGetMemAllocInfoINTEL_t( void* param_value, size_t* param_value_size_ret); -typedef clGetMemAllocInfoINTEL_t *clGetMemAllocInfoINTEL_fn ; +typedef clGetMemAllocInfoINTEL_t * +clGetMemAllocInfoINTEL_fn ; typedef cl_int CL_API_CALL clSetKernelArgMemPointerINTEL_t( @@ -2863,7 +2928,8 @@ clSetKernelArgMemPointerINTEL_t( cl_uint arg_index, const void* arg_value); -typedef clSetKernelArgMemPointerINTEL_t *clSetKernelArgMemPointerINTEL_fn ; +typedef clSetKernelArgMemPointerINTEL_t * +clSetKernelArgMemPointerINTEL_fn ; typedef cl_int CL_API_CALL clEnqueueMemFillINTEL_t( @@ -2876,7 +2942,8 @@ clEnqueueMemFillINTEL_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueMemFillINTEL_t *clEnqueueMemFillINTEL_fn ; +typedef clEnqueueMemFillINTEL_t * +clEnqueueMemFillINTEL_fn ; typedef cl_int CL_API_CALL clEnqueueMemcpyINTEL_t( @@ -2889,7 +2956,8 @@ clEnqueueMemcpyINTEL_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueMemcpyINTEL_t *clEnqueueMemcpyINTEL_fn ; +typedef clEnqueueMemcpyINTEL_t * +clEnqueueMemcpyINTEL_fn ; typedef cl_int CL_API_CALL clEnqueueMemAdviseINTEL_t( @@ -2901,7 +2969,8 @@ clEnqueueMemAdviseINTEL_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueMemAdviseINTEL_t *clEnqueueMemAdviseINTEL_fn ; +typedef clEnqueueMemAdviseINTEL_t * +clEnqueueMemAdviseINTEL_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -3003,7 +3072,8 @@ clEnqueueMigrateMemINTEL_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueMigrateMemINTEL_t *clEnqueueMigrateMemINTEL_fn ; +typedef clEnqueueMigrateMemINTEL_t * +clEnqueueMigrateMemINTEL_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -3033,7 +3103,8 @@ clEnqueueMemsetINTEL_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueMemsetINTEL_t *clEnqueueMemsetINTEL_fn ; +typedef clEnqueueMemsetINTEL_t * +clEnqueueMemsetINTEL_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -3081,7 +3152,8 @@ clCreateBufferWithPropertiesINTEL_t( void* host_ptr, cl_int* errcode_ret); -typedef clCreateBufferWithPropertiesINTEL_t *clCreateBufferWithPropertiesINTEL_fn CL_API_SUFFIX__VERSION_1_0; +typedef clCreateBufferWithPropertiesINTEL_t * +clCreateBufferWithPropertiesINTEL_fn CL_API_SUFFIX__VERSION_1_0; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -3124,7 +3196,8 @@ clEnqueueReadHostPipeINTEL_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueReadHostPipeINTEL_t *clEnqueueReadHostPipeINTEL_fn CL_API_SUFFIX__VERSION_1_0; +typedef clEnqueueReadHostPipeINTEL_t * +clEnqueueReadHostPipeINTEL_fn CL_API_SUFFIX__VERSION_1_0; typedef cl_int CL_API_CALL clEnqueueWriteHostPipeINTEL_t( @@ -3138,7 +3211,8 @@ clEnqueueWriteHostPipeINTEL_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueWriteHostPipeINTEL_t *clEnqueueWriteHostPipeINTEL_fn CL_API_SUFFIX__VERSION_1_0; +typedef clEnqueueWriteHostPipeINTEL_t * +clEnqueueWriteHostPipeINTEL_fn CL_API_SUFFIX__VERSION_1_0; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -3284,7 +3358,8 @@ clGetImageRequirementsInfoEXT_t( void* param_value, size_t* param_value_size_ret); -typedef clGetImageRequirementsInfoEXT_t *clGetImageRequirementsInfoEXT_fn CL_API_SUFFIX__VERSION_3_0; +typedef clGetImageRequirementsInfoEXT_t * +clGetImageRequirementsInfoEXT_fn CL_API_SUFFIX__VERSION_3_0; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -3341,7 +3416,8 @@ clGetICDLoaderInfoOCLICD_t( void* param_value, size_t* param_value_size_ret); -typedef clGetICDLoaderInfoOCLICD_t *clGetICDLoaderInfoOCLICD_fn ; +typedef clGetICDLoaderInfoOCLICD_t * +clGetICDLoaderInfoOCLICD_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -3413,7 +3489,8 @@ clSetContentSizeBufferPoCL_t( cl_mem buffer, cl_mem content_size_buffer); -typedef clSetContentSizeBufferPoCL_t *clSetContentSizeBufferPoCL_fn CL_API_SUFFIX__VERSION_1_0; +typedef clSetContentSizeBufferPoCL_t * +clSetContentSizeBufferPoCL_fn CL_API_SUFFIX__VERSION_1_0; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) diff --git a/CL/cl_function_types.h b/CL/cl_function_types.h index e5699af9..7287e775 100644 --- a/CL/cl_function_types.h +++ b/CL/cl_function_types.h @@ -465,6 +465,7 @@ typedef cl_int CL_API_CALL clEnqueueTask_t( cl_event* event); #ifdef CL_VERSION_1_1 + typedef cl_mem CL_API_CALL clCreateSubBuffer_t( cl_mem buffer, cl_mem_flags flags, @@ -541,6 +542,7 @@ typedef cl_int CL_API_CALL clEnqueueCopyBufferRect_t( #endif /* CL_VERSION_1_1 */ #ifdef CL_VERSION_1_2 + typedef cl_int CL_API_CALL clCreateSubDevices_t( cl_device_id in_device, const cl_device_partition_property* properties, @@ -651,6 +653,7 @@ typedef void* CL_API_CALL clGetExtensionFunctionAddressForPlatform_t( #endif /* CL_VERSION_1_2 */ #ifdef CL_VERSION_2_0 + typedef cl_command_queue CL_API_CALL clCreateCommandQueueWithProperties_t( cl_context context, cl_device_id device, @@ -748,6 +751,7 @@ typedef cl_int CL_API_CALL clEnqueueSVMUnmap_t( #endif /* CL_VERSION_2_0 */ #ifdef CL_VERSION_2_1 + typedef cl_int CL_API_CALL clSetDefaultDeviceCommandQueue_t( cl_context context, cl_device_id device, @@ -795,6 +799,7 @@ typedef cl_int CL_API_CALL clEnqueueSVMMigrateMem_t( #endif /* CL_VERSION_2_1 */ #ifdef CL_VERSION_2_2 + typedef cl_int CL_API_CALL clSetProgramSpecializationConstant_t( cl_program program, cl_uint spec_id, @@ -809,6 +814,7 @@ typedef cl_int CL_API_CALL clSetProgramReleaseCallback_t( #endif /* CL_VERSION_2_2 */ #ifdef CL_VERSION_3_0 + typedef cl_int CL_API_CALL clSetContextDestructorCallback_t( cl_context context, void (CL_CALLBACK* pfn_notify)(cl_context context, void* user_data), @@ -833,5 +839,4 @@ typedef cl_mem CL_API_CALL clCreateImageWithProperties_t( #endif /* CL_VERSION_3_0 */ - #endif /* OPENCL_CL_FUNCTION_TYPES_H_ */ diff --git a/CL/cl_gl.h b/CL/cl_gl.h index e17def1f..8fae2eef 100644 --- a/CL/cl_gl.h +++ b/CL/cl_gl.h @@ -99,7 +99,8 @@ clGetGLContextInfoKHR_t( void* param_value, size_t* param_value_size_ret); -typedef clGetGLContextInfoKHR_t *clGetGLContextInfoKHR_fn CL_API_SUFFIX__VERSION_1_0; +typedef clGetGLContextInfoKHR_t * +clGetGLContextInfoKHR_fn CL_API_SUFFIX__VERSION_1_0; typedef cl_mem CL_API_CALL clCreateFromGLBuffer_t( @@ -108,7 +109,8 @@ clCreateFromGLBuffer_t( cl_GLuint bufobj, cl_int* errcode_ret); -typedef clCreateFromGLBuffer_t *clCreateFromGLBuffer_fn CL_API_SUFFIX__VERSION_1_0; +typedef clCreateFromGLBuffer_t * +clCreateFromGLBuffer_fn CL_API_SUFFIX__VERSION_1_0; #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -140,7 +142,8 @@ clCreateFromGLTexture_t( cl_GLuint texture, cl_int* errcode_ret); -typedef clCreateFromGLTexture_t *clCreateFromGLTexture_fn CL_API_SUFFIX__VERSION_1_2; +typedef clCreateFromGLTexture_t * +clCreateFromGLTexture_fn CL_API_SUFFIX__VERSION_1_2; #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -165,7 +168,8 @@ clCreateFromGLRenderbuffer_t( cl_GLuint renderbuffer, cl_int* errcode_ret); -typedef clCreateFromGLRenderbuffer_t *clCreateFromGLRenderbuffer_fn CL_API_SUFFIX__VERSION_1_0; +typedef clCreateFromGLRenderbuffer_t * +clCreateFromGLRenderbuffer_fn CL_API_SUFFIX__VERSION_1_0; typedef cl_int CL_API_CALL clGetGLObjectInfo_t( @@ -173,7 +177,8 @@ clGetGLObjectInfo_t( cl_gl_object_type* gl_object_type, cl_GLuint* gl_object_name); -typedef clGetGLObjectInfo_t *clGetGLObjectInfo_fn CL_API_SUFFIX__VERSION_1_0; +typedef clGetGLObjectInfo_t * +clGetGLObjectInfo_fn CL_API_SUFFIX__VERSION_1_0; typedef cl_int CL_API_CALL clGetGLTextureInfo_t( @@ -183,7 +188,8 @@ clGetGLTextureInfo_t( void* param_value, size_t* param_value_size_ret); -typedef clGetGLTextureInfo_t *clGetGLTextureInfo_fn CL_API_SUFFIX__VERSION_1_0; +typedef clGetGLTextureInfo_t * +clGetGLTextureInfo_fn CL_API_SUFFIX__VERSION_1_0; typedef cl_int CL_API_CALL clEnqueueAcquireGLObjects_t( @@ -194,7 +200,8 @@ clEnqueueAcquireGLObjects_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueAcquireGLObjects_t *clEnqueueAcquireGLObjects_fn CL_API_SUFFIX__VERSION_1_0; +typedef clEnqueueAcquireGLObjects_t * +clEnqueueAcquireGLObjects_fn CL_API_SUFFIX__VERSION_1_0; typedef cl_int CL_API_CALL clEnqueueReleaseGLObjects_t( @@ -205,7 +212,8 @@ clEnqueueReleaseGLObjects_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueReleaseGLObjects_t *clEnqueueReleaseGLObjects_fn CL_API_SUFFIX__VERSION_1_0; +typedef clEnqueueReleaseGLObjects_t * +clEnqueueReleaseGLObjects_fn CL_API_SUFFIX__VERSION_1_0; #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -261,7 +269,8 @@ clCreateFromGLTexture2D_t( cl_GLuint texture, cl_int* errcode_ret); -typedef clCreateFromGLTexture2D_t *clCreateFromGLTexture2D_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED; +typedef clCreateFromGLTexture2D_t * +clCreateFromGLTexture2D_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED; typedef cl_mem CL_API_CALL clCreateFromGLTexture3D_t( @@ -272,7 +281,8 @@ clCreateFromGLTexture3D_t( cl_GLuint texture, cl_int* errcode_ret); -typedef clCreateFromGLTexture3D_t *clCreateFromGLTexture3D_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED; +typedef clCreateFromGLTexture3D_t * +clCreateFromGLTexture3D_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED; #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -315,7 +325,8 @@ clCreateEventFromGLsyncKHR_t( cl_GLsync sync, cl_int* errcode_ret); -typedef clCreateEventFromGLsyncKHR_t *clCreateEventFromGLsyncKHR_fn CL_API_SUFFIX__VERSION_1_1; +typedef clCreateEventFromGLsyncKHR_t * +clCreateEventFromGLsyncKHR_fn CL_API_SUFFIX__VERSION_1_1; #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -374,7 +385,8 @@ clGetSupportedGLTextureFormatsINTEL_t( cl_GLenum* gl_formats, cl_uint* num_texture_formats); -typedef clGetSupportedGLTextureFormatsINTEL_t *clGetSupportedGLTextureFormatsINTEL_fn ; +typedef clGetSupportedGLTextureFormatsINTEL_t * +clGetSupportedGLTextureFormatsINTEL_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) diff --git a/CL/cl_layer.h b/CL/cl_layer.h index 13e4e6bb..a43b8978 100644 --- a/CL/cl_layer.h +++ b/CL/cl_layer.h @@ -71,7 +71,8 @@ clGetLayerInfo_t( void* param_value, size_t* param_value_size_ret); -typedef clGetLayerInfo_t *clGetLayerInfo_fn ; +typedef clGetLayerInfo_t * +clGetLayerInfo_fn ; typedef cl_int CL_API_CALL clInitLayer_t( @@ -80,7 +81,8 @@ clInitLayer_t( cl_uint* num_entries_ret, const cl_icd_dispatch** layer_dispatch_ret); -typedef clInitLayer_t *clInitLayer_fn ; +typedef clInitLayer_t * +clInitLayer_fn ; /* ** The function pointer typedefs prefixed with "pfn_" are provided for @@ -89,9 +91,11 @@ typedef clInitLayer_t *clInitLayer_fn ; ** "_fn" instead, for consistency. */ -typedef clGetLayerInfo_t *pfn_clGetLayerInfo ; +typedef clGetLayerInfo_t * +pfn_clGetLayerInfo ; -typedef clInitLayer_t *pfn_clInitLayer ; +typedef clInitLayer_t * +pfn_clInitLayer ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) diff --git a/CL/cl_va_api_media_sharing_intel.h b/CL/cl_va_api_media_sharing_intel.h index c1256e23..93f5d8bb 100644 --- a/CL/cl_va_api_media_sharing_intel.h +++ b/CL/cl_va_api_media_sharing_intel.h @@ -65,7 +65,8 @@ clGetSupportedVA_APIMediaSurfaceFormatsINTEL_t( VAImageFormat* va_api_formats, cl_uint* num_surface_formats); -typedef clGetSupportedVA_APIMediaSurfaceFormatsINTEL_t *clGetSupportedVA_APIMediaSurfaceFormatsINTEL_fn ; +typedef clGetSupportedVA_APIMediaSurfaceFormatsINTEL_t * +clGetSupportedVA_APIMediaSurfaceFormatsINTEL_fn ; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) @@ -128,7 +129,8 @@ clGetDeviceIDsFromVA_APIMediaAdapterINTEL_t( cl_device_id* devices, cl_uint* num_devices); -typedef clGetDeviceIDsFromVA_APIMediaAdapterINTEL_t *clGetDeviceIDsFromVA_APIMediaAdapterINTEL_fn CL_API_SUFFIX__VERSION_1_2; +typedef clGetDeviceIDsFromVA_APIMediaAdapterINTEL_t * +clGetDeviceIDsFromVA_APIMediaAdapterINTEL_fn CL_API_SUFFIX__VERSION_1_2; typedef cl_mem CL_API_CALL clCreateFromVA_APIMediaSurfaceINTEL_t( @@ -138,7 +140,8 @@ clCreateFromVA_APIMediaSurfaceINTEL_t( cl_uint plane, cl_int* errcode_ret); -typedef clCreateFromVA_APIMediaSurfaceINTEL_t *clCreateFromVA_APIMediaSurfaceINTEL_fn CL_API_SUFFIX__VERSION_1_2; +typedef clCreateFromVA_APIMediaSurfaceINTEL_t * +clCreateFromVA_APIMediaSurfaceINTEL_fn CL_API_SUFFIX__VERSION_1_2; typedef cl_int CL_API_CALL clEnqueueAcquireVA_APIMediaSurfacesINTEL_t( @@ -149,7 +152,8 @@ clEnqueueAcquireVA_APIMediaSurfacesINTEL_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueAcquireVA_APIMediaSurfacesINTEL_t *clEnqueueAcquireVA_APIMediaSurfacesINTEL_fn CL_API_SUFFIX__VERSION_1_2; +typedef clEnqueueAcquireVA_APIMediaSurfacesINTEL_t * +clEnqueueAcquireVA_APIMediaSurfacesINTEL_fn CL_API_SUFFIX__VERSION_1_2; typedef cl_int CL_API_CALL clEnqueueReleaseVA_APIMediaSurfacesINTEL_t( @@ -160,7 +164,8 @@ clEnqueueReleaseVA_APIMediaSurfacesINTEL_t( const cl_event* event_wait_list, cl_event* event); -typedef clEnqueueReleaseVA_APIMediaSurfacesINTEL_t *clEnqueueReleaseVA_APIMediaSurfacesINTEL_fn CL_API_SUFFIX__VERSION_1_2; +typedef clEnqueueReleaseVA_APIMediaSurfacesINTEL_t * +clEnqueueReleaseVA_APIMediaSurfacesINTEL_fn CL_API_SUFFIX__VERSION_1_2; #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) diff --git a/scripts/cl_ext.h.mako b/scripts/cl_ext.h.mako index 70ac096e..5102135e 100644 --- a/scripts/cl_ext.h.mako +++ b/scripts/cl_ext.h.mako @@ -363,7 +363,8 @@ ${api.Name}_t( % endif % endfor -typedef ${api.Name}_t *${api.Name}_fn ${api.Suffix}; +typedef ${api.Name}_t * +${api.Name}_fn ${api.Suffix}; % endfor % if generate_pfn_typedefs: @@ -377,7 +378,8 @@ typedef ${api.Name}_t *${api.Name}_fn ${api.Suffix}; <% api = apisigs[func.get('name')] %> -typedef ${api.Name}_t *pfn_${api.Name} ${api.Suffix}; +typedef ${api.Name}_t * +pfn_${api.Name} ${api.Suffix}; % endfor % endif diff --git a/scripts/cl_function_types.h.mako b/scripts/cl_function_types.h.mako index f08680a9..402fb99f 100644 --- a/scripts/cl_function_types.h.mako +++ b/scripts/cl_function_types.h.mako @@ -38,6 +38,7 @@ def getCParameterStrings(params): %for version, apis in coreapis.items(): % if version != "CL_VERSION_1_0": #ifdef ${version} + % endif % for api in apis: typedef ${api.RetType} CL_API_CALL ${api.Name}_t( @@ -55,5 +56,4 @@ typedef ${api.RetType} CL_API_CALL ${api.Name}_t( % endif %endfor - #endif /* OPENCL_CL_FUNCTION_TYPES_H_ */ From 17d3c1eba5cb9f7b162d389bb08e803d548c7870 Mon Sep 17 00:00:00 2001 From: Brice Videau Date: Tue, 2 May 2023 11:08:52 -0500 Subject: [PATCH 6/8] Add function pointer definitions for core APIs. --- CL/cl_function_types.h | 342 +++++++++++++++++++++++++++++++ scripts/cl_function_types.h.mako | 3 + 2 files changed, 345 insertions(+) diff --git a/CL/cl_function_types.h b/CL/cl_function_types.h index 7287e775..124f53ba 100644 --- a/CL/cl_function_types.h +++ b/CL/cl_function_types.h @@ -26,6 +26,9 @@ typedef cl_int CL_API_CALL clGetPlatformIDs_t( cl_platform_id* platforms, cl_uint* num_platforms); +typedef clGetPlatformIDs_t * +clGetPlatformIDs_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clGetPlatformInfo_t( cl_platform_id platform, cl_platform_info param_name, @@ -33,6 +36,9 @@ typedef cl_int CL_API_CALL clGetPlatformInfo_t( void* param_value, size_t* param_value_size_ret); +typedef clGetPlatformInfo_t * +clGetPlatformInfo_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clGetDeviceIDs_t( cl_platform_id platform, cl_device_type device_type, @@ -40,6 +46,9 @@ typedef cl_int CL_API_CALL clGetDeviceIDs_t( cl_device_id* devices, cl_uint* num_devices); +typedef clGetDeviceIDs_t * +clGetDeviceIDs_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clGetDeviceInfo_t( cl_device_id device, cl_device_info param_name, @@ -47,6 +56,9 @@ typedef cl_int CL_API_CALL clGetDeviceInfo_t( void* param_value, size_t* param_value_size_ret); +typedef clGetDeviceInfo_t * +clGetDeviceInfo_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_context CL_API_CALL clCreateContext_t( const cl_context_properties* properties, cl_uint num_devices, @@ -55,6 +67,9 @@ typedef cl_context CL_API_CALL clCreateContext_t( void* user_data, cl_int* errcode_ret); +typedef clCreateContext_t * +clCreateContext_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_context CL_API_CALL clCreateContextFromType_t( const cl_context_properties* properties, cl_device_type device_type, @@ -62,12 +77,21 @@ typedef cl_context CL_API_CALL clCreateContextFromType_t( void* user_data, cl_int* errcode_ret); +typedef clCreateContextFromType_t * +clCreateContextFromType_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clRetainContext_t( cl_context context); +typedef clRetainContext_t * +clRetainContext_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clReleaseContext_t( cl_context context); +typedef clReleaseContext_t * +clReleaseContext_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clGetContextInfo_t( cl_context context, cl_context_info param_name, @@ -75,12 +99,21 @@ typedef cl_int CL_API_CALL clGetContextInfo_t( void* param_value, size_t* param_value_size_ret); +typedef clGetContextInfo_t * +clGetContextInfo_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clRetainCommandQueue_t( cl_command_queue command_queue); +typedef clRetainCommandQueue_t * +clRetainCommandQueue_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clReleaseCommandQueue_t( cl_command_queue command_queue); +typedef clReleaseCommandQueue_t * +clReleaseCommandQueue_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clGetCommandQueueInfo_t( cl_command_queue command_queue, cl_command_queue_info param_name, @@ -88,6 +121,9 @@ typedef cl_int CL_API_CALL clGetCommandQueueInfo_t( void* param_value, size_t* param_value_size_ret); +typedef clGetCommandQueueInfo_t * +clGetCommandQueueInfo_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_mem CL_API_CALL clCreateBuffer_t( cl_context context, cl_mem_flags flags, @@ -95,12 +131,21 @@ typedef cl_mem CL_API_CALL clCreateBuffer_t( void* host_ptr, cl_int* errcode_ret); +typedef clCreateBuffer_t * +clCreateBuffer_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clRetainMemObject_t( cl_mem memobj); +typedef clRetainMemObject_t * +clRetainMemObject_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clReleaseMemObject_t( cl_mem memobj); +typedef clReleaseMemObject_t * +clReleaseMemObject_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clGetSupportedImageFormats_t( cl_context context, cl_mem_flags flags, @@ -109,6 +154,9 @@ typedef cl_int CL_API_CALL clGetSupportedImageFormats_t( cl_image_format* image_formats, cl_uint* num_image_formats); +typedef clGetSupportedImageFormats_t * +clGetSupportedImageFormats_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clGetMemObjectInfo_t( cl_mem memobj, cl_mem_info param_name, @@ -116,6 +164,9 @@ typedef cl_int CL_API_CALL clGetMemObjectInfo_t( void* param_value, size_t* param_value_size_ret); +typedef clGetMemObjectInfo_t * +clGetMemObjectInfo_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clGetImageInfo_t( cl_mem image, cl_image_info param_name, @@ -123,12 +174,21 @@ typedef cl_int CL_API_CALL clGetImageInfo_t( void* param_value, size_t* param_value_size_ret); +typedef clGetImageInfo_t * +clGetImageInfo_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clRetainSampler_t( cl_sampler sampler); +typedef clRetainSampler_t * +clRetainSampler_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clReleaseSampler_t( cl_sampler sampler); +typedef clReleaseSampler_t * +clReleaseSampler_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clGetSamplerInfo_t( cl_sampler sampler, cl_sampler_info param_name, @@ -136,6 +196,9 @@ typedef cl_int CL_API_CALL clGetSamplerInfo_t( void* param_value, size_t* param_value_size_ret); +typedef clGetSamplerInfo_t * +clGetSamplerInfo_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_program CL_API_CALL clCreateProgramWithSource_t( cl_context context, cl_uint count, @@ -143,6 +206,9 @@ typedef cl_program CL_API_CALL clCreateProgramWithSource_t( const size_t* lengths, cl_int* errcode_ret); +typedef clCreateProgramWithSource_t * +clCreateProgramWithSource_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_program CL_API_CALL clCreateProgramWithBinary_t( cl_context context, cl_uint num_devices, @@ -152,12 +218,21 @@ typedef cl_program CL_API_CALL clCreateProgramWithBinary_t( cl_int* binary_status, cl_int* errcode_ret); +typedef clCreateProgramWithBinary_t * +clCreateProgramWithBinary_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clRetainProgram_t( cl_program program); +typedef clRetainProgram_t * +clRetainProgram_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clReleaseProgram_t( cl_program program); +typedef clReleaseProgram_t * +clReleaseProgram_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clBuildProgram_t( cl_program program, cl_uint num_devices, @@ -166,6 +241,9 @@ typedef cl_int CL_API_CALL clBuildProgram_t( void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data), void* user_data); +typedef clBuildProgram_t * +clBuildProgram_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clGetProgramInfo_t( cl_program program, cl_program_info param_name, @@ -173,6 +251,9 @@ typedef cl_int CL_API_CALL clGetProgramInfo_t( void* param_value, size_t* param_value_size_ret); +typedef clGetProgramInfo_t * +clGetProgramInfo_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clGetProgramBuildInfo_t( cl_program program, cl_device_id device, @@ -181,29 +262,47 @@ typedef cl_int CL_API_CALL clGetProgramBuildInfo_t( void* param_value, size_t* param_value_size_ret); +typedef clGetProgramBuildInfo_t * +clGetProgramBuildInfo_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_kernel CL_API_CALL clCreateKernel_t( cl_program program, const char* kernel_name, cl_int* errcode_ret); +typedef clCreateKernel_t * +clCreateKernel_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clCreateKernelsInProgram_t( cl_program program, cl_uint num_kernels, cl_kernel* kernels, cl_uint* num_kernels_ret); +typedef clCreateKernelsInProgram_t * +clCreateKernelsInProgram_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clRetainKernel_t( cl_kernel kernel); +typedef clRetainKernel_t * +clRetainKernel_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clReleaseKernel_t( cl_kernel kernel); +typedef clReleaseKernel_t * +clReleaseKernel_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clSetKernelArg_t( cl_kernel kernel, cl_uint arg_index, size_t arg_size, const void* arg_value); +typedef clSetKernelArg_t * +clSetKernelArg_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clGetKernelInfo_t( cl_kernel kernel, cl_kernel_info param_name, @@ -211,6 +310,9 @@ typedef cl_int CL_API_CALL clGetKernelInfo_t( void* param_value, size_t* param_value_size_ret); +typedef clGetKernelInfo_t * +clGetKernelInfo_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clGetKernelWorkGroupInfo_t( cl_kernel kernel, cl_device_id device, @@ -219,10 +321,16 @@ typedef cl_int CL_API_CALL clGetKernelWorkGroupInfo_t( void* param_value, size_t* param_value_size_ret); +typedef clGetKernelWorkGroupInfo_t * +clGetKernelWorkGroupInfo_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clWaitForEvents_t( cl_uint num_events, const cl_event* event_list); +typedef clWaitForEvents_t * +clWaitForEvents_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clGetEventInfo_t( cl_event event, cl_event_info param_name, @@ -230,12 +338,21 @@ typedef cl_int CL_API_CALL clGetEventInfo_t( void* param_value, size_t* param_value_size_ret); +typedef clGetEventInfo_t * +clGetEventInfo_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clRetainEvent_t( cl_event event); +typedef clRetainEvent_t * +clRetainEvent_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clReleaseEvent_t( cl_event event); +typedef clReleaseEvent_t * +clReleaseEvent_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clGetEventProfilingInfo_t( cl_event event, cl_profiling_info param_name, @@ -243,12 +360,21 @@ typedef cl_int CL_API_CALL clGetEventProfilingInfo_t( void* param_value, size_t* param_value_size_ret); +typedef clGetEventProfilingInfo_t * +clGetEventProfilingInfo_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clFlush_t( cl_command_queue command_queue); +typedef clFlush_t * +clFlush_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clFinish_t( cl_command_queue command_queue); +typedef clFinish_t * +clFinish_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clEnqueueReadBuffer_t( cl_command_queue command_queue, cl_mem buffer, @@ -260,6 +386,9 @@ typedef cl_int CL_API_CALL clEnqueueReadBuffer_t( const cl_event* event_wait_list, cl_event* event); +typedef clEnqueueReadBuffer_t * +clEnqueueReadBuffer_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clEnqueueWriteBuffer_t( cl_command_queue command_queue, cl_mem buffer, @@ -271,6 +400,9 @@ typedef cl_int CL_API_CALL clEnqueueWriteBuffer_t( const cl_event* event_wait_list, cl_event* event); +typedef clEnqueueWriteBuffer_t * +clEnqueueWriteBuffer_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clEnqueueCopyBuffer_t( cl_command_queue command_queue, cl_mem src_buffer, @@ -282,6 +414,9 @@ typedef cl_int CL_API_CALL clEnqueueCopyBuffer_t( const cl_event* event_wait_list, cl_event* event); +typedef clEnqueueCopyBuffer_t * +clEnqueueCopyBuffer_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clEnqueueReadImage_t( cl_command_queue command_queue, cl_mem image, @@ -295,6 +430,9 @@ typedef cl_int CL_API_CALL clEnqueueReadImage_t( const cl_event* event_wait_list, cl_event* event); +typedef clEnqueueReadImage_t * +clEnqueueReadImage_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clEnqueueWriteImage_t( cl_command_queue command_queue, cl_mem image, @@ -308,6 +446,9 @@ typedef cl_int CL_API_CALL clEnqueueWriteImage_t( const cl_event* event_wait_list, cl_event* event); +typedef clEnqueueWriteImage_t * +clEnqueueWriteImage_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clEnqueueCopyImage_t( cl_command_queue command_queue, cl_mem src_image, @@ -319,6 +460,9 @@ typedef cl_int CL_API_CALL clEnqueueCopyImage_t( const cl_event* event_wait_list, cl_event* event); +typedef clEnqueueCopyImage_t * +clEnqueueCopyImage_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clEnqueueCopyImageToBuffer_t( cl_command_queue command_queue, cl_mem src_image, @@ -330,6 +474,9 @@ typedef cl_int CL_API_CALL clEnqueueCopyImageToBuffer_t( const cl_event* event_wait_list, cl_event* event); +typedef clEnqueueCopyImageToBuffer_t * +clEnqueueCopyImageToBuffer_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clEnqueueCopyBufferToImage_t( cl_command_queue command_queue, cl_mem src_buffer, @@ -341,6 +488,9 @@ typedef cl_int CL_API_CALL clEnqueueCopyBufferToImage_t( const cl_event* event_wait_list, cl_event* event); +typedef clEnqueueCopyBufferToImage_t * +clEnqueueCopyBufferToImage_fn CL_API_SUFFIX__VERSION_1_0; + typedef void* CL_API_CALL clEnqueueMapBuffer_t( cl_command_queue command_queue, cl_mem buffer, @@ -353,6 +503,9 @@ typedef void* CL_API_CALL clEnqueueMapBuffer_t( cl_event* event, cl_int* errcode_ret); +typedef clEnqueueMapBuffer_t * +clEnqueueMapBuffer_fn CL_API_SUFFIX__VERSION_1_0; + typedef void* CL_API_CALL clEnqueueMapImage_t( cl_command_queue command_queue, cl_mem image, @@ -367,6 +520,9 @@ typedef void* CL_API_CALL clEnqueueMapImage_t( cl_event* event, cl_int* errcode_ret); +typedef clEnqueueMapImage_t * +clEnqueueMapImage_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clEnqueueUnmapMemObject_t( cl_command_queue command_queue, cl_mem memobj, @@ -375,6 +531,9 @@ typedef cl_int CL_API_CALL clEnqueueUnmapMemObject_t( const cl_event* event_wait_list, cl_event* event); +typedef clEnqueueUnmapMemObject_t * +clEnqueueUnmapMemObject_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clEnqueueNDRangeKernel_t( cl_command_queue command_queue, cl_kernel kernel, @@ -386,6 +545,9 @@ typedef cl_int CL_API_CALL clEnqueueNDRangeKernel_t( const cl_event* event_wait_list, cl_event* event); +typedef clEnqueueNDRangeKernel_t * +clEnqueueNDRangeKernel_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clEnqueueNativeKernel_t( cl_command_queue command_queue, void (CL_CALLBACK* user_func)(void*), @@ -398,12 +560,18 @@ typedef cl_int CL_API_CALL clEnqueueNativeKernel_t( const cl_event* event_wait_list, cl_event* event); +typedef clEnqueueNativeKernel_t * +clEnqueueNativeKernel_fn CL_API_SUFFIX__VERSION_1_0; + typedef cl_int CL_API_CALL clSetCommandQueueProperty_t( cl_command_queue command_queue, cl_command_queue_properties properties, cl_bool enable, cl_command_queue_properties* old_properties); +typedef clSetCommandQueueProperty_t * +clSetCommandQueueProperty_fn CL_API_SUFFIX__VERSION_1_0_DEPRECATED; + typedef cl_mem CL_API_CALL clCreateImage2D_t( cl_context context, cl_mem_flags flags, @@ -414,6 +582,9 @@ typedef cl_mem CL_API_CALL clCreateImage2D_t( void* host_ptr, cl_int* errcode_ret); +typedef clCreateImage2D_t * +clCreateImage2D_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED; + typedef cl_mem CL_API_CALL clCreateImage3D_t( cl_context context, cl_mem_flags flags, @@ -426,30 +597,51 @@ typedef cl_mem CL_API_CALL clCreateImage3D_t( void* host_ptr, cl_int* errcode_ret); +typedef clCreateImage3D_t * +clCreateImage3D_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED; + typedef cl_int CL_API_CALL clEnqueueMarker_t( cl_command_queue command_queue, cl_event* event); +typedef clEnqueueMarker_t * +clEnqueueMarker_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED; + typedef cl_int CL_API_CALL clEnqueueWaitForEvents_t( cl_command_queue command_queue, cl_uint num_events, const cl_event* event_list); +typedef clEnqueueWaitForEvents_t * +clEnqueueWaitForEvents_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED; + typedef cl_int CL_API_CALL clEnqueueBarrier_t( cl_command_queue command_queue); +typedef clEnqueueBarrier_t * +clEnqueueBarrier_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED; + typedef cl_int CL_API_CALL clUnloadCompiler_t( void ); +typedef clUnloadCompiler_t * +clUnloadCompiler_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED; + typedef void* CL_API_CALL clGetExtensionFunctionAddress_t( const char* func_name); +typedef clGetExtensionFunctionAddress_t * +clGetExtensionFunctionAddress_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED; + typedef cl_command_queue CL_API_CALL clCreateCommandQueue_t( cl_context context, cl_device_id device, cl_command_queue_properties properties, cl_int* errcode_ret); +typedef clCreateCommandQueue_t * +clCreateCommandQueue_fn CL_API_SUFFIX__VERSION_1_2_DEPRECATED; + typedef cl_sampler CL_API_CALL clCreateSampler_t( cl_context context, cl_bool normalized_coords, @@ -457,6 +649,9 @@ typedef cl_sampler CL_API_CALL clCreateSampler_t( cl_filter_mode filter_mode, cl_int* errcode_ret); +typedef clCreateSampler_t * +clCreateSampler_fn CL_API_SUFFIX__VERSION_1_2_DEPRECATED; + typedef cl_int CL_API_CALL clEnqueueTask_t( cl_command_queue command_queue, cl_kernel kernel, @@ -464,6 +659,9 @@ typedef cl_int CL_API_CALL clEnqueueTask_t( const cl_event* event_wait_list, cl_event* event); +typedef clEnqueueTask_t * +clEnqueueTask_fn CL_API_SUFFIX__VERSION_1_2_DEPRECATED; + #ifdef CL_VERSION_1_1 typedef cl_mem CL_API_CALL clCreateSubBuffer_t( @@ -473,25 +671,40 @@ typedef cl_mem CL_API_CALL clCreateSubBuffer_t( const void* buffer_create_info, cl_int* errcode_ret); +typedef clCreateSubBuffer_t * +clCreateSubBuffer_fn CL_API_SUFFIX__VERSION_1_1; + typedef cl_int CL_API_CALL clSetMemObjectDestructorCallback_t( cl_mem memobj, void (CL_CALLBACK* pfn_notify)(cl_mem memobj, void* user_data), void* user_data); +typedef clSetMemObjectDestructorCallback_t * +clSetMemObjectDestructorCallback_fn CL_API_SUFFIX__VERSION_1_1; + typedef cl_event CL_API_CALL clCreateUserEvent_t( cl_context context, cl_int* errcode_ret); +typedef clCreateUserEvent_t * +clCreateUserEvent_fn CL_API_SUFFIX__VERSION_1_1; + typedef cl_int CL_API_CALL clSetUserEventStatus_t( cl_event event, cl_int execution_status); +typedef clSetUserEventStatus_t * +clSetUserEventStatus_fn CL_API_SUFFIX__VERSION_1_1; + typedef cl_int CL_API_CALL clSetEventCallback_t( 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); +typedef clSetEventCallback_t * +clSetEventCallback_fn CL_API_SUFFIX__VERSION_1_1; + typedef cl_int CL_API_CALL clEnqueueReadBufferRect_t( cl_command_queue command_queue, cl_mem buffer, @@ -508,6 +721,9 @@ typedef cl_int CL_API_CALL clEnqueueReadBufferRect_t( const cl_event* event_wait_list, cl_event* event); +typedef clEnqueueReadBufferRect_t * +clEnqueueReadBufferRect_fn CL_API_SUFFIX__VERSION_1_1; + typedef cl_int CL_API_CALL clEnqueueWriteBufferRect_t( cl_command_queue command_queue, cl_mem buffer, @@ -524,6 +740,9 @@ typedef cl_int CL_API_CALL clEnqueueWriteBufferRect_t( const cl_event* event_wait_list, cl_event* event); +typedef clEnqueueWriteBufferRect_t * +clEnqueueWriteBufferRect_fn CL_API_SUFFIX__VERSION_1_1; + typedef cl_int CL_API_CALL clEnqueueCopyBufferRect_t( cl_command_queue command_queue, cl_mem src_buffer, @@ -539,6 +758,9 @@ typedef cl_int CL_API_CALL clEnqueueCopyBufferRect_t( const cl_event* event_wait_list, cl_event* event); +typedef clEnqueueCopyBufferRect_t * +clEnqueueCopyBufferRect_fn CL_API_SUFFIX__VERSION_1_1; + #endif /* CL_VERSION_1_1 */ #ifdef CL_VERSION_1_2 @@ -550,12 +772,21 @@ typedef cl_int CL_API_CALL clCreateSubDevices_t( cl_device_id* out_devices, cl_uint* num_devices_ret); +typedef clCreateSubDevices_t * +clCreateSubDevices_fn CL_API_SUFFIX__VERSION_1_2; + typedef cl_int CL_API_CALL clRetainDevice_t( cl_device_id device); +typedef clRetainDevice_t * +clRetainDevice_fn CL_API_SUFFIX__VERSION_1_2; + typedef cl_int CL_API_CALL clReleaseDevice_t( cl_device_id device); +typedef clReleaseDevice_t * +clReleaseDevice_fn CL_API_SUFFIX__VERSION_1_2; + typedef cl_mem CL_API_CALL clCreateImage_t( cl_context context, cl_mem_flags flags, @@ -564,6 +795,9 @@ typedef cl_mem CL_API_CALL clCreateImage_t( void* host_ptr, cl_int* errcode_ret); +typedef clCreateImage_t * +clCreateImage_fn CL_API_SUFFIX__VERSION_1_2; + typedef cl_program CL_API_CALL clCreateProgramWithBuiltInKernels_t( cl_context context, cl_uint num_devices, @@ -571,6 +805,9 @@ typedef cl_program CL_API_CALL clCreateProgramWithBuiltInKernels_t( const char* kernel_names, cl_int* errcode_ret); +typedef clCreateProgramWithBuiltInKernels_t * +clCreateProgramWithBuiltInKernels_fn CL_API_SUFFIX__VERSION_1_2; + typedef cl_int CL_API_CALL clCompileProgram_t( cl_program program, cl_uint num_devices, @@ -582,6 +819,9 @@ typedef cl_int CL_API_CALL clCompileProgram_t( void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data), void* user_data); +typedef clCompileProgram_t * +clCompileProgram_fn CL_API_SUFFIX__VERSION_1_2; + typedef cl_program CL_API_CALL clLinkProgram_t( cl_context context, cl_uint num_devices, @@ -593,9 +833,15 @@ typedef cl_program CL_API_CALL clLinkProgram_t( void* user_data, cl_int* errcode_ret); +typedef clLinkProgram_t * +clLinkProgram_fn CL_API_SUFFIX__VERSION_1_2; + typedef cl_int CL_API_CALL clUnloadPlatformCompiler_t( cl_platform_id platform); +typedef clUnloadPlatformCompiler_t * +clUnloadPlatformCompiler_fn CL_API_SUFFIX__VERSION_1_2; + typedef cl_int CL_API_CALL clGetKernelArgInfo_t( cl_kernel kernel, cl_uint arg_index, @@ -604,6 +850,9 @@ typedef cl_int CL_API_CALL clGetKernelArgInfo_t( void* param_value, size_t* param_value_size_ret); +typedef clGetKernelArgInfo_t * +clGetKernelArgInfo_fn CL_API_SUFFIX__VERSION_1_2; + typedef cl_int CL_API_CALL clEnqueueFillBuffer_t( cl_command_queue command_queue, cl_mem buffer, @@ -615,6 +864,9 @@ typedef cl_int CL_API_CALL clEnqueueFillBuffer_t( const cl_event* event_wait_list, cl_event* event); +typedef clEnqueueFillBuffer_t * +clEnqueueFillBuffer_fn CL_API_SUFFIX__VERSION_1_2; + typedef cl_int CL_API_CALL clEnqueueFillImage_t( cl_command_queue command_queue, cl_mem image, @@ -625,6 +877,9 @@ typedef cl_int CL_API_CALL clEnqueueFillImage_t( const cl_event* event_wait_list, cl_event* event); +typedef clEnqueueFillImage_t * +clEnqueueFillImage_fn CL_API_SUFFIX__VERSION_1_2; + typedef cl_int CL_API_CALL clEnqueueMigrateMemObjects_t( cl_command_queue command_queue, cl_uint num_mem_objects, @@ -634,22 +889,34 @@ typedef cl_int CL_API_CALL clEnqueueMigrateMemObjects_t( const cl_event* event_wait_list, cl_event* event); +typedef clEnqueueMigrateMemObjects_t * +clEnqueueMigrateMemObjects_fn CL_API_SUFFIX__VERSION_1_2; + typedef cl_int CL_API_CALL clEnqueueMarkerWithWaitList_t( cl_command_queue command_queue, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event); +typedef clEnqueueMarkerWithWaitList_t * +clEnqueueMarkerWithWaitList_fn CL_API_SUFFIX__VERSION_1_2; + typedef cl_int CL_API_CALL clEnqueueBarrierWithWaitList_t( cl_command_queue command_queue, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event); +typedef clEnqueueBarrierWithWaitList_t * +clEnqueueBarrierWithWaitList_fn CL_API_SUFFIX__VERSION_1_2; + typedef void* CL_API_CALL clGetExtensionFunctionAddressForPlatform_t( cl_platform_id platform, const char* func_name); +typedef clGetExtensionFunctionAddressForPlatform_t * +clGetExtensionFunctionAddressForPlatform_fn CL_API_SUFFIX__VERSION_1_2; + #endif /* CL_VERSION_1_2 */ #ifdef CL_VERSION_2_0 @@ -660,6 +927,9 @@ typedef cl_command_queue CL_API_CALL clCreateCommandQueueWithProperties_t( const cl_queue_properties* properties, cl_int* errcode_ret); +typedef clCreateCommandQueueWithProperties_t * +clCreateCommandQueueWithProperties_fn CL_API_SUFFIX__VERSION_2_0; + typedef cl_mem CL_API_CALL clCreatePipe_t( cl_context context, cl_mem_flags flags, @@ -668,6 +938,9 @@ typedef cl_mem CL_API_CALL clCreatePipe_t( const cl_pipe_properties* properties, cl_int* errcode_ret); +typedef clCreatePipe_t * +clCreatePipe_fn CL_API_SUFFIX__VERSION_2_0; + typedef cl_int CL_API_CALL clGetPipeInfo_t( cl_mem pipe, cl_pipe_info param_name, @@ -675,32 +948,50 @@ typedef cl_int CL_API_CALL clGetPipeInfo_t( void* param_value, size_t* param_value_size_ret); +typedef clGetPipeInfo_t * +clGetPipeInfo_fn CL_API_SUFFIX__VERSION_2_0; + typedef void* CL_API_CALL clSVMAlloc_t( cl_context context, cl_svm_mem_flags flags, size_t size, cl_uint alignment); +typedef clSVMAlloc_t * +clSVMAlloc_fn CL_API_SUFFIX__VERSION_2_0; + typedef void CL_API_CALL clSVMFree_t( cl_context context, void* svm_pointer); +typedef clSVMFree_t * +clSVMFree_fn CL_API_SUFFIX__VERSION_2_0; + typedef cl_sampler CL_API_CALL clCreateSamplerWithProperties_t( cl_context context, const cl_sampler_properties* sampler_properties, cl_int* errcode_ret); +typedef clCreateSamplerWithProperties_t * +clCreateSamplerWithProperties_fn CL_API_SUFFIX__VERSION_2_0; + typedef cl_int CL_API_CALL clSetKernelArgSVMPointer_t( cl_kernel kernel, cl_uint arg_index, const void* arg_value); +typedef clSetKernelArgSVMPointer_t * +clSetKernelArgSVMPointer_fn CL_API_SUFFIX__VERSION_2_0; + typedef cl_int CL_API_CALL clSetKernelExecInfo_t( cl_kernel kernel, cl_kernel_exec_info param_name, size_t param_value_size, const void* param_value); +typedef clSetKernelExecInfo_t * +clSetKernelExecInfo_fn CL_API_SUFFIX__VERSION_2_0; + typedef cl_int CL_API_CALL clEnqueueSVMFree_t( cl_command_queue command_queue, cl_uint num_svm_pointers, @@ -711,6 +1002,9 @@ typedef cl_int CL_API_CALL clEnqueueSVMFree_t( const cl_event* event_wait_list, cl_event* event); +typedef clEnqueueSVMFree_t * +clEnqueueSVMFree_fn CL_API_SUFFIX__VERSION_2_0; + typedef cl_int CL_API_CALL clEnqueueSVMMemcpy_t( cl_command_queue command_queue, cl_bool blocking_copy, @@ -721,6 +1015,9 @@ typedef cl_int CL_API_CALL clEnqueueSVMMemcpy_t( const cl_event* event_wait_list, cl_event* event); +typedef clEnqueueSVMMemcpy_t * +clEnqueueSVMMemcpy_fn CL_API_SUFFIX__VERSION_2_0; + typedef cl_int CL_API_CALL clEnqueueSVMMemFill_t( cl_command_queue command_queue, void* svm_ptr, @@ -731,6 +1028,9 @@ typedef cl_int CL_API_CALL clEnqueueSVMMemFill_t( const cl_event* event_wait_list, cl_event* event); +typedef clEnqueueSVMMemFill_t * +clEnqueueSVMMemFill_fn CL_API_SUFFIX__VERSION_2_0; + typedef cl_int CL_API_CALL clEnqueueSVMMap_t( cl_command_queue command_queue, cl_bool blocking_map, @@ -741,6 +1041,9 @@ typedef cl_int CL_API_CALL clEnqueueSVMMap_t( const cl_event* event_wait_list, cl_event* event); +typedef clEnqueueSVMMap_t * +clEnqueueSVMMap_fn CL_API_SUFFIX__VERSION_2_0; + typedef cl_int CL_API_CALL clEnqueueSVMUnmap_t( cl_command_queue command_queue, void* svm_ptr, @@ -748,6 +1051,9 @@ typedef cl_int CL_API_CALL clEnqueueSVMUnmap_t( const cl_event* event_wait_list, cl_event* event); +typedef clEnqueueSVMUnmap_t * +clEnqueueSVMUnmap_fn CL_API_SUFFIX__VERSION_2_0; + #endif /* CL_VERSION_2_0 */ #ifdef CL_VERSION_2_1 @@ -757,25 +1063,40 @@ typedef cl_int CL_API_CALL clSetDefaultDeviceCommandQueue_t( cl_device_id device, cl_command_queue command_queue); +typedef clSetDefaultDeviceCommandQueue_t * +clSetDefaultDeviceCommandQueue_fn CL_API_SUFFIX__VERSION_2_1; + typedef cl_int CL_API_CALL clGetDeviceAndHostTimer_t( cl_device_id device, cl_ulong* device_timestamp, cl_ulong* host_timestamp); +typedef clGetDeviceAndHostTimer_t * +clGetDeviceAndHostTimer_fn CL_API_SUFFIX__VERSION_2_1; + typedef cl_int CL_API_CALL clGetHostTimer_t( cl_device_id device, cl_ulong* host_timestamp); +typedef clGetHostTimer_t * +clGetHostTimer_fn CL_API_SUFFIX__VERSION_2_1; + typedef cl_program CL_API_CALL clCreateProgramWithIL_t( cl_context context, const void* il, size_t length, cl_int* errcode_ret); +typedef clCreateProgramWithIL_t * +clCreateProgramWithIL_fn CL_API_SUFFIX__VERSION_2_1; + typedef cl_kernel CL_API_CALL clCloneKernel_t( cl_kernel source_kernel, cl_int* errcode_ret); +typedef clCloneKernel_t * +clCloneKernel_fn CL_API_SUFFIX__VERSION_2_1; + typedef cl_int CL_API_CALL clGetKernelSubGroupInfo_t( cl_kernel kernel, cl_device_id device, @@ -786,6 +1107,9 @@ typedef cl_int CL_API_CALL clGetKernelSubGroupInfo_t( void* param_value, size_t* param_value_size_ret); +typedef clGetKernelSubGroupInfo_t * +clGetKernelSubGroupInfo_fn CL_API_SUFFIX__VERSION_2_1; + typedef cl_int CL_API_CALL clEnqueueSVMMigrateMem_t( cl_command_queue command_queue, cl_uint num_svm_pointers, @@ -796,6 +1120,9 @@ typedef cl_int CL_API_CALL clEnqueueSVMMigrateMem_t( const cl_event* event_wait_list, cl_event* event); +typedef clEnqueueSVMMigrateMem_t * +clEnqueueSVMMigrateMem_fn CL_API_SUFFIX__VERSION_2_1; + #endif /* CL_VERSION_2_1 */ #ifdef CL_VERSION_2_2 @@ -806,11 +1133,17 @@ typedef cl_int CL_API_CALL clSetProgramSpecializationConstant_t( size_t spec_size, const void* spec_value); +typedef clSetProgramSpecializationConstant_t * +clSetProgramSpecializationConstant_fn CL_API_SUFFIX__VERSION_2_2; + typedef cl_int CL_API_CALL clSetProgramReleaseCallback_t( cl_program program, void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data), void* user_data); +typedef clSetProgramReleaseCallback_t * +clSetProgramReleaseCallback_fn CL_API_SUFFIX__VERSION_2_2_DEPRECATED; + #endif /* CL_VERSION_2_2 */ #ifdef CL_VERSION_3_0 @@ -820,6 +1153,9 @@ typedef cl_int CL_API_CALL clSetContextDestructorCallback_t( void (CL_CALLBACK* pfn_notify)(cl_context context, void* user_data), void* user_data); +typedef clSetContextDestructorCallback_t * +clSetContextDestructorCallback_fn CL_API_SUFFIX__VERSION_3_0; + typedef cl_mem CL_API_CALL clCreateBufferWithProperties_t( cl_context context, const cl_mem_properties* properties, @@ -828,6 +1164,9 @@ typedef cl_mem CL_API_CALL clCreateBufferWithProperties_t( void* host_ptr, cl_int* errcode_ret); +typedef clCreateBufferWithProperties_t * +clCreateBufferWithProperties_fn CL_API_SUFFIX__VERSION_3_0; + typedef cl_mem CL_API_CALL clCreateImageWithProperties_t( cl_context context, const cl_mem_properties* properties, @@ -837,6 +1176,9 @@ typedef cl_mem CL_API_CALL clCreateImageWithProperties_t( void* host_ptr, cl_int* errcode_ret); +typedef clCreateImageWithProperties_t * +clCreateImageWithProperties_fn CL_API_SUFFIX__VERSION_3_0; + #endif /* CL_VERSION_3_0 */ #endif /* OPENCL_CL_FUNCTION_TYPES_H_ */ diff --git a/scripts/cl_function_types.h.mako b/scripts/cl_function_types.h.mako index 402fb99f..7888e148 100644 --- a/scripts/cl_function_types.h.mako +++ b/scripts/cl_function_types.h.mako @@ -50,6 +50,9 @@ typedef ${api.RetType} CL_API_CALL ${api.Name}_t( % endif % endfor +typedef ${api.Name}_t * +${api.Name}_fn ${api.Suffix}; + % endfor % if version != "CL_VERSION_1_0": #endif /* ${version} */ From e001175800862a2108d28718acfaf4dba794575b Mon Sep 17 00:00:00 2001 From: Brice Videau Date: Tue, 2 May 2023 12:02:01 -0500 Subject: [PATCH 7/8] Use newly defined function pointers for core APIs. --- CL/cl_icd.h | 1061 +++++++++++---------------------------------------- 1 file changed, 223 insertions(+), 838 deletions(-) diff --git a/CL/cl_icd.h b/CL/cl_icd.h index 89e7324a..0ec4fc61 100644 --- a/CL/cl_icd.h +++ b/CL/cl_icd.h @@ -33,723 +33,108 @@ extern "C" { #endif -/* - * This file contains pointer type definitions for each of the CL API calls as - * well as a type definition for the dispatch table used by the Khronos ICD - * loader (see cl_khr_icd extension specification for background). - */ +#ifndef CL_VERSION_1_1 -/* API function pointer definitions */ - -// Platform APIs -typedef clGetPlatformIDs_t * -cl_api_clGetPlatformIDs CL_API_SUFFIX__VERSION_1_0; - -typedef clGetPlatformInfo_t * -cl_api_clGetPlatformInfo CL_API_SUFFIX__VERSION_1_0; - -// Device APIs -typedef clGetDeviceIDs_t * -cl_api_clGetDeviceIDs CL_API_SUFFIX__VERSION_1_0; - -typedef clGetDeviceInfo_t * -cl_api_clGetDeviceInfo CL_API_SUFFIX__VERSION_1_0; - -#ifdef CL_VERSION_1_2 - -typedef clCreateSubDevices_t * -cl_api_clCreateSubDevices CL_API_SUFFIX__VERSION_1_2; - -typedef clRetainDevice_t * -cl_api_clRetainDevice CL_API_SUFFIX__VERSION_1_2; - -typedef clReleaseDevice_t * -cl_api_clReleaseDevice CL_API_SUFFIX__VERSION_1_2; - -#else - -typedef void *cl_api_clCreateSubDevices; -typedef void *cl_api_clRetainDevice; -typedef void *cl_api_clReleaseDevice; - -#endif - -// Context APIs -typedef clCreateContext_t * -cl_api_clCreateContext CL_API_SUFFIX__VERSION_1_0; - -typedef clCreateContextFromType_t * -cl_api_clCreateContextFromType CL_API_SUFFIX__VERSION_1_0; - -typedef clRetainContext_t * -cl_api_clRetainContext CL_API_SUFFIX__VERSION_1_0; - -typedef clReleaseContext_t * -cl_api_clReleaseContext CL_API_SUFFIX__VERSION_1_0; - -typedef clGetContextInfo_t * -cl_api_clGetContextInfo CL_API_SUFFIX__VERSION_1_0; - -// Command Queue APIs -typedef clCreateCommandQueue_t * -cl_api_clCreateCommandQueue CL_API_SUFFIX__VERSION_1_0; - -#ifdef CL_VERSION_2_0 - -typedef clCreateCommandQueueWithProperties_t * -cl_api_clCreateCommandQueueWithProperties CL_API_SUFFIX__VERSION_2_0; - -#else - -typedef void *cl_api_clCreateCommandQueueWithProperties; - -#endif - -typedef clRetainCommandQueue_t * -cl_api_clRetainCommandQueue CL_API_SUFFIX__VERSION_1_0; - -typedef clReleaseCommandQueue_t * -cl_api_clReleaseCommandQueue CL_API_SUFFIX__VERSION_1_0; - -typedef clGetCommandQueueInfo_t * -cl_api_clGetCommandQueueInfo CL_API_SUFFIX__VERSION_1_0; - -// Memory Object APIs -typedef clCreateBuffer_t * -cl_api_clCreateBuffer CL_API_SUFFIX__VERSION_1_0; - -#ifdef CL_VERSION_1_2 - -typedef clCreateImage_t * -cl_api_clCreateImage CL_API_SUFFIX__VERSION_1_2; - -#else - -typedef void *cl_api_clCreateImage; - -#endif - -#ifdef CL_VERSION_3_0 - -typedef clCreateBufferWithProperties_t * -cl_api_clCreateBufferWithProperties CL_API_SUFFIX__VERSION_3_0; - -typedef clCreateImageWithProperties_t * -cl_api_clCreateImageWithProperties CL_API_SUFFIX__VERSION_3_0; - -typedef clSetContextDestructorCallback_t * -cl_api_clSetContextDestructorCallback CL_API_SUFFIX__VERSION_3_0; - -#else - -typedef void *cl_api_clCreateBufferWithProperties; -typedef void *cl_api_clCreateImageWithProperties; -typedef void *cl_api_clSetContextDestructorCallback; - -#endif - -typedef clRetainMemObject_t * -cl_api_clRetainMemObject CL_API_SUFFIX__VERSION_1_0; - -typedef clReleaseMemObject_t * -cl_api_clReleaseMemObject CL_API_SUFFIX__VERSION_1_0; - -typedef clGetSupportedImageFormats_t * -cl_api_clGetSupportedImageFormats CL_API_SUFFIX__VERSION_1_0; - -typedef clGetMemObjectInfo_t * -cl_api_clGetMemObjectInfo CL_API_SUFFIX__VERSION_1_0; - -typedef clGetImageInfo_t * -cl_api_clGetImageInfo CL_API_SUFFIX__VERSION_1_0; - -#ifdef CL_VERSION_2_0 - -typedef clCreatePipe_t * -cl_api_clCreatePipe CL_API_SUFFIX__VERSION_2_0; - -typedef clGetPipeInfo_t * -cl_api_clGetPipeInfo CL_API_SUFFIX__VERSION_2_0; - -typedef clSVMAlloc_t * -cl_api_clSVMAlloc CL_API_SUFFIX__VERSION_2_0; - -typedef clSVMFree_t * -cl_api_clSVMFree CL_API_SUFFIX__VERSION_2_0; - -#else - -typedef void *cl_api_clCreatePipe; -typedef void *cl_api_clGetPipeInfo; -typedef void *cl_api_clSVMAlloc; -typedef void *cl_api_clSVMFree; - -#endif - -// Sampler APIs -typedef clCreateSampler_t * -cl_api_clCreateSampler CL_API_SUFFIX__VERSION_1_0; - -typedef clRetainSampler_t * -cl_api_clRetainSampler CL_API_SUFFIX__VERSION_1_0; - -typedef clReleaseSampler_t * -cl_api_clReleaseSampler CL_API_SUFFIX__VERSION_1_0; - -typedef clGetSamplerInfo_t * -cl_api_clGetSamplerInfo CL_API_SUFFIX__VERSION_1_0; - -#ifdef CL_VERSION_2_0 - -typedef clCreateSamplerWithProperties_t * -cl_api_clCreateSamplerWithProperties CL_API_SUFFIX__VERSION_2_0; - -#else - -typedef void *cl_api_clCreateSamplerWithProperties; - -#endif - -// Program Object APIs -typedef clCreateProgramWithSource_t * -cl_api_clCreateProgramWithSource CL_API_SUFFIX__VERSION_1_0; - -typedef clCreateProgramWithBinary_t * -cl_api_clCreateProgramWithBinary CL_API_SUFFIX__VERSION_1_0; - -#ifdef CL_VERSION_1_2 - -typedef clCreateProgramWithBuiltInKernels_t * -cl_api_clCreateProgramWithBuiltInKernels CL_API_SUFFIX__VERSION_1_2; - -#else - -typedef void *cl_api_clCreateProgramWithBuiltInKernels; - -#endif - -typedef clRetainProgram_t * -cl_api_clRetainProgram CL_API_SUFFIX__VERSION_1_0; - -typedef clReleaseProgram_t * -cl_api_clReleaseProgram CL_API_SUFFIX__VERSION_1_0; - -typedef clBuildProgram_t * -cl_api_clBuildProgram CL_API_SUFFIX__VERSION_1_0; - -#ifdef CL_VERSION_1_2 - -typedef clCompileProgram_t * -cl_api_clCompileProgram CL_API_SUFFIX__VERSION_1_2; - -typedef clLinkProgram_t * -cl_api_clLinkProgram CL_API_SUFFIX__VERSION_1_2; - -#else - -typedef void *cl_api_clCompileProgram; -typedef void *cl_api_clLinkProgram; - -#endif - -#ifdef CL_VERSION_2_2 - -typedef clSetProgramSpecializationConstant_t * -cl_api_clSetProgramSpecializationConstant CL_API_SUFFIX__VERSION_2_2; - -typedef clSetProgramReleaseCallback_t * -cl_api_clSetProgramReleaseCallback CL_API_SUFFIX__VERSION_2_2; - -#else - -typedef void *cl_api_clSetProgramSpecializationConstant; -typedef void *cl_api_clSetProgramReleaseCallback; - -#endif - -#ifdef CL_VERSION_1_2 - -typedef clUnloadPlatformCompiler_t * -cl_api_clUnloadPlatformCompiler CL_API_SUFFIX__VERSION_1_2; - -#else - -typedef void *cl_api_clUnloadPlatformCompiler; - -#endif - -typedef clGetProgramInfo_t * -cl_api_clGetProgramInfo CL_API_SUFFIX__VERSION_1_0; - -typedef clGetProgramBuildInfo_t * -cl_api_clGetProgramBuildInfo CL_API_SUFFIX__VERSION_1_0; - -// Kernel Object APIs -typedef clCreateKernel_t * -cl_api_clCreateKernel CL_API_SUFFIX__VERSION_1_0; - -typedef clCreateKernelsInProgram_t * -cl_api_clCreateKernelsInProgram CL_API_SUFFIX__VERSION_1_0; - -typedef clRetainKernel_t * -cl_api_clRetainKernel CL_API_SUFFIX__VERSION_1_0; - -typedef clReleaseKernel_t * -cl_api_clReleaseKernel CL_API_SUFFIX__VERSION_1_0; - -typedef clSetKernelArg_t * -cl_api_clSetKernelArg CL_API_SUFFIX__VERSION_1_0; - -typedef clGetKernelInfo_t * -cl_api_clGetKernelInfo CL_API_SUFFIX__VERSION_1_0; - -#ifdef CL_VERSION_1_2 - -typedef clGetKernelArgInfo_t * -cl_api_clGetKernelArgInfo CL_API_SUFFIX__VERSION_1_2; - -#else - -typedef void *cl_api_clGetKernelArgInfo; - -#endif - -typedef clGetKernelWorkGroupInfo_t * -cl_api_clGetKernelWorkGroupInfo CL_API_SUFFIX__VERSION_1_0; - -#ifdef CL_VERSION_2_0 - -typedef clSetKernelArgSVMPointer_t * -cl_api_clSetKernelArgSVMPointer CL_API_SUFFIX__VERSION_2_0; - -typedef clSetKernelExecInfo_t * -cl_api_clSetKernelExecInfo CL_API_SUFFIX__VERSION_2_0; - -typedef clGetKernelSubGroupInfoKHR_t * -cl_api_clGetKernelSubGroupInfoKHR CL_API_SUFFIX__VERSION_2_0; - -#else - -typedef void *cl_api_clSetKernelArgSVMPointer; -typedef void *cl_api_clSetKernelExecInfo; -typedef void *cl_api_clGetKernelSubGroupInfoKHR; - -#endif - -// Event Object APIs -typedef clWaitForEvents_t * -cl_api_clWaitForEvents CL_API_SUFFIX__VERSION_1_0; - -typedef clGetEventInfo_t * -cl_api_clGetEventInfo CL_API_SUFFIX__VERSION_1_0; - -typedef clRetainEvent_t * -cl_api_clRetainEvent CL_API_SUFFIX__VERSION_1_0; - -typedef clReleaseEvent_t * -cl_api_clReleaseEvent CL_API_SUFFIX__VERSION_1_0; - -// Profiling APIs -typedef clGetEventProfilingInfo_t * -cl_api_clGetEventProfilingInfo CL_API_SUFFIX__VERSION_1_0; - -// Flush and Finish APIs -typedef clFlush_t * -cl_api_clFlush CL_API_SUFFIX__VERSION_1_0; - -typedef clFinish_t * -cl_api_clFinish CL_API_SUFFIX__VERSION_1_0; - -// Enqueued Commands APIs -typedef clEnqueueReadBuffer_t * -cl_api_clEnqueueReadBuffer CL_API_SUFFIX__VERSION_1_0; - -#ifdef CL_VERSION_1_1 - -typedef clEnqueueReadBufferRect_t * -cl_api_clEnqueueReadBufferRect CL_API_SUFFIX__VERSION_1_1; - -#else - -typedef void *cl_api_clEnqueueReadBufferRect; - -#endif - -typedef clEnqueueWriteBuffer_t * -cl_api_clEnqueueWriteBuffer CL_API_SUFFIX__VERSION_1_0; - -#ifdef CL_VERSION_1_1 - -typedef clEnqueueWriteBufferRect_t * -cl_api_clEnqueueWriteBufferRect CL_API_SUFFIX__VERSION_1_1; - -#else - -typedef void *cl_api_clEnqueueWriteBufferRect; +typedef void *clSetEventCallback_fn; +typedef void *clCreateSubBuffer_fn; +typedef void *clSetMemObjectDestructorCallback_fn; +typedef void *clCreateUserEvent_fn; +typedef void *clSetUserEventStatus_fn; +typedef void *clEnqueueReadBufferRect_fn; +typedef void *clEnqueueWriteBufferRect_fn; +typedef void *clEnqueueCopyBufferRect_fn; #endif -#ifdef CL_VERSION_1_2 - -typedef clEnqueueFillBuffer_t * -cl_api_clEnqueueFillBuffer CL_API_SUFFIX__VERSION_1_2; - -#else - -typedef void *cl_api_clEnqueueFillBuffer; +#ifndef CL_VERSION_1_2 + +typedef void *clCreateSubDevices_fn; +typedef void *clRetainDevice_fn; +typedef void *clReleaseDevice_fn; +typedef void *clCreateImage_fn; +typedef void *clCreateProgramWithBuiltInKernels_fn; +typedef void *clCompileProgram_fn; +typedef void *clLinkProgram_fn; +typedef void *clUnloadPlatformCompiler_fn; +typedef void *clGetKernelArgInfo_fn; +typedef void *clEnqueueFillBuffer_fn; +typedef void *clEnqueueFillImage_fn; +typedef void *clEnqueueMigrateMemObjects_fn; +typedef void *clEnqueueMarkerWithWaitList_fn; +typedef void *clEnqueueBarrierWithWaitList_fn; +typedef void *clGetExtensionFunctionAddressForPlatform_fn; +typedef void *clCreateFromGLTexture_fn; #endif -typedef clEnqueueCopyBuffer_t * -cl_api_clEnqueueCopyBuffer CL_API_SUFFIX__VERSION_1_0; - -#ifdef CL_VERSION_1_1 - -typedef clEnqueueCopyBufferRect_t * -cl_api_clEnqueueCopyBufferRect CL_API_SUFFIX__VERSION_1_1; - -#else - -typedef void *cl_api_clEnqueueCopyBufferRect; +#ifndef CL_VERSION_2_0 + +typedef void *clCreateCommandQueueWithProperties_fn; +typedef void *clCreatePipe_fn; +typedef void *clGetPipeInfo_fn; +typedef void *clSVMAlloc_fn; +typedef void *clSVMFree_fn; +typedef void *clEnqueueSVMFree_fn; +typedef void *clEnqueueSVMMemcpy_fn; +typedef void *clEnqueueSVMMemFill_fn; +typedef void *clEnqueueSVMMap_fn; +typedef void *clEnqueueSVMUnmap_fn; +typedef void *clCreateSamplerWithProperties_fn; +typedef void *clSetKernelArgSVMPointer_fn; +typedef void *clSetKernelExecInfo_fn; #endif -typedef clEnqueueReadImage_t * -cl_api_clEnqueueReadImage CL_API_SUFFIX__VERSION_1_0; - -typedef clEnqueueWriteImage_t * -cl_api_clEnqueueWriteImage CL_API_SUFFIX__VERSION_1_0; - -#ifdef CL_VERSION_1_2 - -typedef clEnqueueFillImage_t * -cl_api_clEnqueueFillImage CL_API_SUFFIX__VERSION_1_2; - -#else +#ifndef CL_VERSION_2_1 -typedef void *cl_api_clEnqueueFillImage; +typedef void *clCloneKernel_fn; +typedef void *clCreateProgramWithIL_fn; +typedef void *clEnqueueSVMMigrateMem_fn; +typedef void *clGetDeviceAndHostTimer_fn; +typedef void *clGetHostTimer_fn; +typedef void *clGetKernelSubGroupInfo_fn; +typedef void *clSetDefaultDeviceCommandQueue_fn; #endif -typedef clEnqueueCopyImage_t * -cl_api_clEnqueueCopyImage CL_API_SUFFIX__VERSION_1_0; - -typedef clEnqueueCopyImageToBuffer_t * -cl_api_clEnqueueCopyImageToBuffer CL_API_SUFFIX__VERSION_1_0; - -typedef clEnqueueCopyBufferToImage_t * -cl_api_clEnqueueCopyBufferToImage CL_API_SUFFIX__VERSION_1_0; - -typedef clEnqueueMapBuffer_t * -cl_api_clEnqueueMapBuffer CL_API_SUFFIX__VERSION_1_0; - -typedef clEnqueueMapImage_t * -cl_api_clEnqueueMapImage CL_API_SUFFIX__VERSION_1_0; - -typedef clEnqueueUnmapMemObject_t * -cl_api_clEnqueueUnmapMemObject CL_API_SUFFIX__VERSION_1_0; - -#ifdef CL_VERSION_1_2 - -typedef clEnqueueMigrateMemObjects_t * -cl_api_clEnqueueMigrateMemObjects CL_API_SUFFIX__VERSION_1_2; - -#else +#ifndef CL_VERSION_2_2 -typedef void *cl_api_clEnqueueMigrateMemObjects; +typedef void *clSetProgramReleaseCallback_fn; +typedef void *clSetProgramSpecializationConstant_fn; #endif -typedef clEnqueueNDRangeKernel_t * -cl_api_clEnqueueNDRangeKernel CL_API_SUFFIX__VERSION_1_0; - -typedef clEnqueueTask_t * -cl_api_clEnqueueTask CL_API_SUFFIX__VERSION_1_0; - -typedef clEnqueueNativeKernel_t * -cl_api_clEnqueueNativeKernel CL_API_SUFFIX__VERSION_1_0; - -#ifdef CL_VERSION_1_2 - -typedef clEnqueueMarkerWithWaitList_t * -cl_api_clEnqueueMarkerWithWaitList CL_API_SUFFIX__VERSION_1_2; - -typedef clEnqueueBarrierWithWaitList_t * -cl_api_clEnqueueBarrierWithWaitList CL_API_SUFFIX__VERSION_1_2; - -typedef clGetExtensionFunctionAddressForPlatform_t * -cl_api_clGetExtensionFunctionAddressForPlatform CL_API_SUFFIX__VERSION_1_2; - -#else - -typedef void *cl_api_clEnqueueMarkerWithWaitList; -typedef void *cl_api_clEnqueueBarrierWithWaitList; -typedef void *cl_api_clGetExtensionFunctionAddressForPlatform; - -#endif - -// Shared Virtual Memory APIs - -#ifdef CL_VERSION_2_0 - -typedef clEnqueueSVMFree_t * -cl_api_clEnqueueSVMFree CL_API_SUFFIX__VERSION_2_0; - -typedef clEnqueueSVMMemcpy_t * -cl_api_clEnqueueSVMMemcpy CL_API_SUFFIX__VERSION_2_0; - -typedef clEnqueueSVMMemFill_t * -cl_api_clEnqueueSVMMemFill CL_API_SUFFIX__VERSION_2_0; - -typedef clEnqueueSVMMap_t * -cl_api_clEnqueueSVMMap CL_API_SUFFIX__VERSION_2_0; - -typedef clEnqueueSVMUnmap_t * -cl_api_clEnqueueSVMUnmap CL_API_SUFFIX__VERSION_2_0; - -#else - -typedef void *cl_api_clEnqueueSVMFree; -typedef void *cl_api_clEnqueueSVMMemcpy; -typedef void *cl_api_clEnqueueSVMMemFill; -typedef void *cl_api_clEnqueueSVMMap; -typedef void *cl_api_clEnqueueSVMUnmap; - -#endif - -// Deprecated APIs -typedef clSetCommandQueueProperty_t * -cl_api_clSetCommandQueueProperty CL_API_SUFFIX__VERSION_1_0_DEPRECATED; - -typedef clCreateImage2D_t * -cl_api_clCreateImage2D CL_API_SUFFIX__VERSION_1_1_DEPRECATED; - -typedef clCreateImage3D_t * -cl_api_clCreateImage3D CL_API_SUFFIX__VERSION_1_1_DEPRECATED; - -typedef clUnloadCompiler_t * -cl_api_clUnloadCompiler CL_API_SUFFIX__VERSION_1_1_DEPRECATED; - -typedef clEnqueueMarker_t * -cl_api_clEnqueueMarker CL_API_SUFFIX__VERSION_1_1_DEPRECATED; - -typedef clEnqueueWaitForEvents_t * -cl_api_clEnqueueWaitForEvents CL_API_SUFFIX__VERSION_1_1_DEPRECATED; - -typedef clEnqueueBarrier_t * -cl_api_clEnqueueBarrier CL_API_SUFFIX__VERSION_1_1_DEPRECATED; - -typedef clGetExtensionFunctionAddress_t * -cl_api_clGetExtensionFunctionAddress CL_API_SUFFIX__VERSION_1_1_DEPRECATED; - -// GL and other APIs -typedef clCreateFromGLBuffer_t * -cl_api_clCreateFromGLBuffer CL_API_SUFFIX__VERSION_1_0; - -#if defined(CL_VERSION_1_2) +#ifndef CL_VERSION_3_0 -typedef clCreateFromGLTexture_t * -cl_api_clCreateFromGLTexture CL_API_SUFFIX__VERSION_1_2; - -#else - -typedef void *cl_api_clCreateFromGLTexture; +typedef void *clCreateBufferWithProperties_fn; +typedef void *clCreateImageWithProperties_fn; +typedef void *clSetContextDestructorCallback_fn; #endif -typedef clCreateFromGLTexture2D_t * -cl_api_clCreateFromGLTexture2D CL_API_SUFFIX__VERSION_1_0; - -typedef clCreateFromGLTexture3D_t * -cl_api_clCreateFromGLTexture3D CL_API_SUFFIX__VERSION_1_0; - -typedef clCreateFromGLRenderbuffer_t * -cl_api_clCreateFromGLRenderbuffer CL_API_SUFFIX__VERSION_1_0; - -typedef clGetGLObjectInfo_t * -cl_api_clGetGLObjectInfo CL_API_SUFFIX__VERSION_1_0; - -typedef clGetGLTextureInfo_t * -cl_api_clGetGLTextureInfo CL_API_SUFFIX__VERSION_1_0; - -typedef clEnqueueAcquireGLObjects_t * -cl_api_clEnqueueAcquireGLObjects CL_API_SUFFIX__VERSION_1_0; - -typedef clEnqueueReleaseGLObjects_t * -cl_api_clEnqueueReleaseGLObjects CL_API_SUFFIX__VERSION_1_0; - -/* cl_khr_gl_sharing */ -typedef clGetGLContextInfoKHR_t * -cl_api_clGetGLContextInfoKHR; - -/* cl_khr_gl_event */ -typedef clCreateEventFromGLsyncKHR_t * -cl_api_clCreateEventFromGLsyncKHR; - -#if defined(_WIN32) +#ifndef _WIN32 /* cl_khr_d3d10_sharing */ - -typedef clGetDeviceIDsFromD3D10KHR_t * -cl_api_clGetDeviceIDsFromD3D10KHR CL_API_SUFFIX__VERSION_1_0; - -typedef clCreateFromD3D10BufferKHR_t * -cl_api_clCreateFromD3D10BufferKHR CL_API_SUFFIX__VERSION_1_0; - -typedef clCreateFromD3D10Texture2DKHR_t * -cl_api_clCreateFromD3D10Texture2DKHR CL_API_SUFFIX__VERSION_1_0; - -typedef clCreateFromD3D10Texture3DKHR_t * -cl_api_clCreateFromD3D10Texture3DKHR CL_API_SUFFIX__VERSION_1_0; - -typedef clEnqueueAcquireD3D10ObjectsKHR_t * -cl_api_clEnqueueAcquireD3D10ObjectsKHR CL_API_SUFFIX__VERSION_1_0; - -typedef clEnqueueReleaseD3D10ObjectsKHR_t * -cl_api_clEnqueueReleaseD3D10ObjectsKHR CL_API_SUFFIX__VERSION_1_0; +typedef void *clGetDeviceIDsFromD3D10KHR_fn; +typedef void *clCreateFromD3D10BufferKHR_fn; +typedef void *clCreateFromD3D10Texture2DKHR_fn; +typedef void *clCreateFromD3D10Texture3DKHR_fn; +typedef void *clEnqueueAcquireD3D10ObjectsKHR_fn; +typedef void *clEnqueueReleaseD3D10ObjectsKHR_fn; /* cl_khr_d3d11_sharing */ -typedef clGetDeviceIDsFromD3D11KHR_t * -cl_api_clGetDeviceIDsFromD3D11KHR CL_API_SUFFIX__VERSION_1_2; - -typedef clCreateFromD3D11BufferKHR_t * -cl_api_clCreateFromD3D11BufferKHR CL_API_SUFFIX__VERSION_1_2; - -typedef clCreateFromD3D11Texture2DKHR_t * -cl_api_clCreateFromD3D11Texture2DKHR CL_API_SUFFIX__VERSION_1_2; - -typedef clCreateFromD3D11Texture3DKHR_t * -cl_api_clCreateFromD3D11Texture3DKHR CL_API_SUFFIX__VERSION_1_2; - -typedef clEnqueueAcquireD3D11ObjectsKHR_t * -cl_api_clEnqueueAcquireD3D11ObjectsKHR CL_API_SUFFIX__VERSION_1_2; - -typedef clEnqueueReleaseD3D11ObjectsKHR_t * -cl_api_clEnqueueReleaseD3D11ObjectsKHR CL_API_SUFFIX__VERSION_1_2; +typedef void *clGetDeviceIDsFromD3D11KHR_fn; +typedef void *clCreateFromD3D11BufferKHR_fn; +typedef void *clCreateFromD3D11Texture2DKHR_fn; +typedef void *clCreateFromD3D11Texture3DKHR_fn; +typedef void *clEnqueueAcquireD3D11ObjectsKHR_fn; +typedef void *clEnqueueReleaseD3D11ObjectsKHR_fn; /* cl_khr_dx9_media_sharing */ -typedef clGetDeviceIDsFromDX9MediaAdapterKHR_t * -cl_api_clGetDeviceIDsFromDX9MediaAdapterKHR CL_API_SUFFIX__VERSION_1_2; - -typedef clCreateFromDX9MediaSurfaceKHR_t * -cl_api_clCreateFromDX9MediaSurfaceKHR CL_API_SUFFIX__VERSION_1_2; - -typedef clEnqueueAcquireDX9MediaSurfacesKHR_t * -cl_api_clEnqueueAcquireDX9MediaSurfacesKHR CL_API_SUFFIX__VERSION_1_2; - -typedef clEnqueueReleaseDX9MediaSurfacesKHR_t * -cl_api_clEnqueueReleaseDX9MediaSurfacesKHR CL_API_SUFFIX__VERSION_1_2; - -#else - -/* cl_khr_d3d10_sharing */ -typedef void *cl_api_clGetDeviceIDsFromD3D10KHR; -typedef void *cl_api_clCreateFromD3D10BufferKHR; -typedef void *cl_api_clCreateFromD3D10Texture2DKHR; -typedef void *cl_api_clCreateFromD3D10Texture3DKHR; -typedef void *cl_api_clEnqueueAcquireD3D10ObjectsKHR; -typedef void *cl_api_clEnqueueReleaseD3D10ObjectsKHR; - -/* cl_khr_d3d11_sharing */ -typedef void *cl_api_clGetDeviceIDsFromD3D11KHR; -typedef void *cl_api_clCreateFromD3D11BufferKHR; -typedef void *cl_api_clCreateFromD3D11Texture2DKHR; -typedef void *cl_api_clCreateFromD3D11Texture3DKHR; -typedef void *cl_api_clEnqueueAcquireD3D11ObjectsKHR; -typedef void *cl_api_clEnqueueReleaseD3D11ObjectsKHR; - -/* cl_khr_dx9_media_sharing */ -typedef void *cl_api_clCreateFromDX9MediaSurfaceKHR; -typedef void *cl_api_clEnqueueAcquireDX9MediaSurfacesKHR; -typedef void *cl_api_clEnqueueReleaseDX9MediaSurfacesKHR; -typedef void *cl_api_clGetDeviceIDsFromDX9MediaAdapterKHR; - -#endif - -/* OpenCL 1.1 */ - -#ifdef CL_VERSION_1_1 - -typedef clSetEventCallback_t * -cl_api_clSetEventCallback CL_API_SUFFIX__VERSION_1_1; - -typedef clCreateSubBuffer_t * -cl_api_clCreateSubBuffer CL_API_SUFFIX__VERSION_1_1; - -typedef clSetMemObjectDestructorCallback_t * -cl_api_clSetMemObjectDestructorCallback CL_API_SUFFIX__VERSION_1_1; - -typedef clCreateUserEvent_t * -cl_api_clCreateUserEvent CL_API_SUFFIX__VERSION_1_1; - -typedef clSetUserEventStatus_t * -cl_api_clSetUserEventStatus CL_API_SUFFIX__VERSION_1_1; - -#else - -typedef void *cl_api_clSetEventCallback; -typedef void *cl_api_clCreateSubBuffer; -typedef void *cl_api_clSetMemObjectDestructorCallback; -typedef void *cl_api_clCreateUserEvent; -typedef void *cl_api_clSetUserEventStatus; - -#endif - -typedef clCreateSubDevicesEXT_t * -cl_api_clCreateSubDevicesEXT; - -typedef clRetainDeviceEXT_t * -cl_api_clRetainDeviceEXT CL_API_SUFFIX__VERSION_1_0; - -typedef clReleaseDeviceEXT_t * -cl_api_clReleaseDeviceEXT CL_API_SUFFIX__VERSION_1_0; - -/* cl_khr_egl_image */ -typedef clCreateFromEGLImageKHR_t * -cl_api_clCreateFromEGLImageKHR; - -typedef clEnqueueAcquireEGLObjectsKHR_t * -cl_api_clEnqueueAcquireEGLObjectsKHR; - -typedef clEnqueueReleaseEGLObjectsKHR_t * -cl_api_clEnqueueReleaseEGLObjectsKHR; - -/* cl_khr_egl_event */ -typedef clCreateEventFromEGLSyncKHR_t * -cl_api_clCreateEventFromEGLSyncKHR; - -#ifdef CL_VERSION_2_1 - -typedef clSetDefaultDeviceCommandQueue_t * -cl_api_clSetDefaultDeviceCommandQueue CL_API_SUFFIX__VERSION_2_1; - -typedef clCreateProgramWithIL_t * -cl_api_clCreateProgramWithIL CL_API_SUFFIX__VERSION_2_1; - -typedef clGetKernelSubGroupInfo_t * -cl_api_clGetKernelSubGroupInfo CL_API_SUFFIX__VERSION_2_1; - -typedef clCloneKernel_t * -cl_api_clCloneKernel CL_API_SUFFIX__VERSION_2_1; - -typedef clEnqueueSVMMigrateMem_t * -cl_api_clEnqueueSVMMigrateMem CL_API_SUFFIX__VERSION_2_1; - -typedef clGetDeviceAndHostTimer_t * -cl_api_clGetDeviceAndHostTimer CL_API_SUFFIX__VERSION_2_1; - -typedef clGetHostTimer_t * -cl_api_clGetHostTimer CL_API_SUFFIX__VERSION_2_1; - -#else - -typedef void *cl_api_clSetDefaultDeviceCommandQueue; -typedef void *cl_api_clCreateProgramWithIL; -typedef void *cl_api_clGetKernelSubGroupInfo; -typedef void *cl_api_clCloneKernel; -typedef void *cl_api_clEnqueueSVMMigrateMem; -typedef void *cl_api_clGetDeviceAndHostTimer; -typedef void *cl_api_clGetHostTimer; +typedef void *clCreateFromDX9MediaSurfaceKHR_fn; +typedef void *clEnqueueAcquireDX9MediaSurfacesKHR_fn; +typedef void *clEnqueueReleaseDX9MediaSurfacesKHR_fn; +typedef void *clGetDeviceIDsFromDX9MediaAdapterKHR_fn; #endif @@ -757,187 +142,187 @@ typedef void *cl_api_clGetHostTimer; typedef struct _cl_icd_dispatch { /* OpenCL 1.0 */ - cl_api_clGetPlatformIDs clGetPlatformIDs; - cl_api_clGetPlatformInfo clGetPlatformInfo; - cl_api_clGetDeviceIDs clGetDeviceIDs; - cl_api_clGetDeviceInfo clGetDeviceInfo; - cl_api_clCreateContext clCreateContext; - cl_api_clCreateContextFromType clCreateContextFromType; - cl_api_clRetainContext clRetainContext; - cl_api_clReleaseContext clReleaseContext; - cl_api_clGetContextInfo clGetContextInfo; - cl_api_clCreateCommandQueue clCreateCommandQueue; - cl_api_clRetainCommandQueue clRetainCommandQueue; - cl_api_clReleaseCommandQueue clReleaseCommandQueue; - cl_api_clGetCommandQueueInfo clGetCommandQueueInfo; - cl_api_clSetCommandQueueProperty clSetCommandQueueProperty; - cl_api_clCreateBuffer clCreateBuffer; - cl_api_clCreateImage2D clCreateImage2D; - cl_api_clCreateImage3D clCreateImage3D; - cl_api_clRetainMemObject clRetainMemObject; - cl_api_clReleaseMemObject clReleaseMemObject; - cl_api_clGetSupportedImageFormats clGetSupportedImageFormats; - cl_api_clGetMemObjectInfo clGetMemObjectInfo; - cl_api_clGetImageInfo clGetImageInfo; - cl_api_clCreateSampler clCreateSampler; - cl_api_clRetainSampler clRetainSampler; - cl_api_clReleaseSampler clReleaseSampler; - cl_api_clGetSamplerInfo clGetSamplerInfo; - cl_api_clCreateProgramWithSource clCreateProgramWithSource; - cl_api_clCreateProgramWithBinary clCreateProgramWithBinary; - cl_api_clRetainProgram clRetainProgram; - cl_api_clReleaseProgram clReleaseProgram; - cl_api_clBuildProgram clBuildProgram; - cl_api_clUnloadCompiler clUnloadCompiler; - cl_api_clGetProgramInfo clGetProgramInfo; - cl_api_clGetProgramBuildInfo clGetProgramBuildInfo; - cl_api_clCreateKernel clCreateKernel; - cl_api_clCreateKernelsInProgram clCreateKernelsInProgram; - cl_api_clRetainKernel clRetainKernel; - cl_api_clReleaseKernel clReleaseKernel; - cl_api_clSetKernelArg clSetKernelArg; - cl_api_clGetKernelInfo clGetKernelInfo; - cl_api_clGetKernelWorkGroupInfo clGetKernelWorkGroupInfo; - cl_api_clWaitForEvents clWaitForEvents; - cl_api_clGetEventInfo clGetEventInfo; - cl_api_clRetainEvent clRetainEvent; - cl_api_clReleaseEvent clReleaseEvent; - cl_api_clGetEventProfilingInfo clGetEventProfilingInfo; - cl_api_clFlush clFlush; - cl_api_clFinish clFinish; - cl_api_clEnqueueReadBuffer clEnqueueReadBuffer; - cl_api_clEnqueueWriteBuffer clEnqueueWriteBuffer; - cl_api_clEnqueueCopyBuffer clEnqueueCopyBuffer; - cl_api_clEnqueueReadImage clEnqueueReadImage; - cl_api_clEnqueueWriteImage clEnqueueWriteImage; - cl_api_clEnqueueCopyImage clEnqueueCopyImage; - cl_api_clEnqueueCopyImageToBuffer clEnqueueCopyImageToBuffer; - cl_api_clEnqueueCopyBufferToImage clEnqueueCopyBufferToImage; - cl_api_clEnqueueMapBuffer clEnqueueMapBuffer; - cl_api_clEnqueueMapImage clEnqueueMapImage; - cl_api_clEnqueueUnmapMemObject clEnqueueUnmapMemObject; - cl_api_clEnqueueNDRangeKernel clEnqueueNDRangeKernel; - cl_api_clEnqueueTask clEnqueueTask; - cl_api_clEnqueueNativeKernel clEnqueueNativeKernel; - cl_api_clEnqueueMarker clEnqueueMarker; - cl_api_clEnqueueWaitForEvents clEnqueueWaitForEvents; - cl_api_clEnqueueBarrier clEnqueueBarrier; - cl_api_clGetExtensionFunctionAddress clGetExtensionFunctionAddress; - cl_api_clCreateFromGLBuffer clCreateFromGLBuffer; - cl_api_clCreateFromGLTexture2D clCreateFromGLTexture2D; - cl_api_clCreateFromGLTexture3D clCreateFromGLTexture3D; - cl_api_clCreateFromGLRenderbuffer clCreateFromGLRenderbuffer; - cl_api_clGetGLObjectInfo clGetGLObjectInfo; - cl_api_clGetGLTextureInfo clGetGLTextureInfo; - cl_api_clEnqueueAcquireGLObjects clEnqueueAcquireGLObjects; - cl_api_clEnqueueReleaseGLObjects clEnqueueReleaseGLObjects; - cl_api_clGetGLContextInfoKHR clGetGLContextInfoKHR; + clGetPlatformIDs_fn clGetPlatformIDs; + clGetPlatformInfo_fn clGetPlatformInfo; + clGetDeviceIDs_fn clGetDeviceIDs; + clGetDeviceInfo_fn clGetDeviceInfo; + clCreateContext_fn clCreateContext; + clCreateContextFromType_fn clCreateContextFromType; + clRetainContext_fn clRetainContext; + clReleaseContext_fn clReleaseContext; + clGetContextInfo_fn clGetContextInfo; + clCreateCommandQueue_fn clCreateCommandQueue; + clRetainCommandQueue_fn clRetainCommandQueue; + clReleaseCommandQueue_fn clReleaseCommandQueue; + clGetCommandQueueInfo_fn clGetCommandQueueInfo; + clSetCommandQueueProperty_fn clSetCommandQueueProperty; + clCreateBuffer_fn clCreateBuffer; + clCreateImage2D_fn clCreateImage2D; + clCreateImage3D_fn clCreateImage3D; + clRetainMemObject_fn clRetainMemObject; + clReleaseMemObject_fn clReleaseMemObject; + clGetSupportedImageFormats_fn clGetSupportedImageFormats; + clGetMemObjectInfo_fn clGetMemObjectInfo; + clGetImageInfo_fn clGetImageInfo; + clCreateSampler_fn clCreateSampler; + clRetainSampler_fn clRetainSampler; + clReleaseSampler_fn clReleaseSampler; + clGetSamplerInfo_fn clGetSamplerInfo; + clCreateProgramWithSource_fn clCreateProgramWithSource; + clCreateProgramWithBinary_fn clCreateProgramWithBinary; + clRetainProgram_fn clRetainProgram; + clReleaseProgram_fn clReleaseProgram; + clBuildProgram_fn clBuildProgram; + clUnloadCompiler_fn clUnloadCompiler; + clGetProgramInfo_fn clGetProgramInfo; + clGetProgramBuildInfo_fn clGetProgramBuildInfo; + clCreateKernel_fn clCreateKernel; + clCreateKernelsInProgram_fn clCreateKernelsInProgram; + clRetainKernel_fn clRetainKernel; + clReleaseKernel_fn clReleaseKernel; + clSetKernelArg_fn clSetKernelArg; + clGetKernelInfo_fn clGetKernelInfo; + clGetKernelWorkGroupInfo_fn clGetKernelWorkGroupInfo; + clWaitForEvents_fn clWaitForEvents; + clGetEventInfo_fn clGetEventInfo; + clRetainEvent_fn clRetainEvent; + clReleaseEvent_fn clReleaseEvent; + clGetEventProfilingInfo_fn clGetEventProfilingInfo; + clFlush_fn clFlush; + clFinish_fn clFinish; + clEnqueueReadBuffer_fn clEnqueueReadBuffer; + clEnqueueWriteBuffer_fn clEnqueueWriteBuffer; + clEnqueueCopyBuffer_fn clEnqueueCopyBuffer; + clEnqueueReadImage_fn clEnqueueReadImage; + clEnqueueWriteImage_fn clEnqueueWriteImage; + clEnqueueCopyImage_fn clEnqueueCopyImage; + clEnqueueCopyImageToBuffer_fn clEnqueueCopyImageToBuffer; + clEnqueueCopyBufferToImage_fn clEnqueueCopyBufferToImage; + clEnqueueMapBuffer_fn clEnqueueMapBuffer; + clEnqueueMapImage_fn clEnqueueMapImage; + clEnqueueUnmapMemObject_fn clEnqueueUnmapMemObject; + clEnqueueNDRangeKernel_fn clEnqueueNDRangeKernel; + clEnqueueTask_fn clEnqueueTask; + clEnqueueNativeKernel_fn clEnqueueNativeKernel; + clEnqueueMarker_fn clEnqueueMarker; + clEnqueueWaitForEvents_fn clEnqueueWaitForEvents; + clEnqueueBarrier_fn clEnqueueBarrier; + clGetExtensionFunctionAddress_fn clGetExtensionFunctionAddress; + clCreateFromGLBuffer_fn clCreateFromGLBuffer; + clCreateFromGLTexture2D_fn clCreateFromGLTexture2D; + clCreateFromGLTexture3D_fn clCreateFromGLTexture3D; + clCreateFromGLRenderbuffer_fn clCreateFromGLRenderbuffer; + clGetGLObjectInfo_fn clGetGLObjectInfo; + clGetGLTextureInfo_fn clGetGLTextureInfo; + clEnqueueAcquireGLObjects_fn clEnqueueAcquireGLObjects; + clEnqueueReleaseGLObjects_fn clEnqueueReleaseGLObjects; + clGetGLContextInfoKHR_fn clGetGLContextInfoKHR; /* cl_khr_d3d10_sharing */ - cl_api_clGetDeviceIDsFromD3D10KHR clGetDeviceIDsFromD3D10KHR; - cl_api_clCreateFromD3D10BufferKHR clCreateFromD3D10BufferKHR; - cl_api_clCreateFromD3D10Texture2DKHR clCreateFromD3D10Texture2DKHR; - cl_api_clCreateFromD3D10Texture3DKHR clCreateFromD3D10Texture3DKHR; - cl_api_clEnqueueAcquireD3D10ObjectsKHR clEnqueueAcquireD3D10ObjectsKHR; - cl_api_clEnqueueReleaseD3D10ObjectsKHR clEnqueueReleaseD3D10ObjectsKHR; + clGetDeviceIDsFromD3D10KHR_fn clGetDeviceIDsFromD3D10KHR; + clCreateFromD3D10BufferKHR_fn clCreateFromD3D10BufferKHR; + clCreateFromD3D10Texture2DKHR_fn clCreateFromD3D10Texture2DKHR; + clCreateFromD3D10Texture3DKHR_fn clCreateFromD3D10Texture3DKHR; + clEnqueueAcquireD3D10ObjectsKHR_fn clEnqueueAcquireD3D10ObjectsKHR; + clEnqueueReleaseD3D10ObjectsKHR_fn clEnqueueReleaseD3D10ObjectsKHR; /* OpenCL 1.1 */ - cl_api_clSetEventCallback clSetEventCallback; - cl_api_clCreateSubBuffer clCreateSubBuffer; - cl_api_clSetMemObjectDestructorCallback clSetMemObjectDestructorCallback; - cl_api_clCreateUserEvent clCreateUserEvent; - cl_api_clSetUserEventStatus clSetUserEventStatus; - cl_api_clEnqueueReadBufferRect clEnqueueReadBufferRect; - cl_api_clEnqueueWriteBufferRect clEnqueueWriteBufferRect; - cl_api_clEnqueueCopyBufferRect clEnqueueCopyBufferRect; + clSetEventCallback_fn clSetEventCallback; + clCreateSubBuffer_fn clCreateSubBuffer; + clSetMemObjectDestructorCallback_fn clSetMemObjectDestructorCallback; + clCreateUserEvent_fn clCreateUserEvent; + clSetUserEventStatus_fn clSetUserEventStatus; + clEnqueueReadBufferRect_fn clEnqueueReadBufferRect; + clEnqueueWriteBufferRect_fn clEnqueueWriteBufferRect; + clEnqueueCopyBufferRect_fn clEnqueueCopyBufferRect; /* cl_ext_device_fission */ - cl_api_clCreateSubDevicesEXT clCreateSubDevicesEXT; - cl_api_clRetainDeviceEXT clRetainDeviceEXT; - cl_api_clReleaseDeviceEXT clReleaseDeviceEXT; + clCreateSubDevicesEXT_fn clCreateSubDevicesEXT; + clRetainDeviceEXT_fn clRetainDeviceEXT; + clReleaseDeviceEXT_fn clReleaseDeviceEXT; /* cl_khr_gl_event */ - cl_api_clCreateEventFromGLsyncKHR clCreateEventFromGLsyncKHR; + clCreateEventFromGLsyncKHR_fn clCreateEventFromGLsyncKHR; /* OpenCL 1.2 */ - cl_api_clCreateSubDevices clCreateSubDevices; - cl_api_clRetainDevice clRetainDevice; - cl_api_clReleaseDevice clReleaseDevice; - cl_api_clCreateImage clCreateImage; - cl_api_clCreateProgramWithBuiltInKernels clCreateProgramWithBuiltInKernels; - cl_api_clCompileProgram clCompileProgram; - cl_api_clLinkProgram clLinkProgram; - cl_api_clUnloadPlatformCompiler clUnloadPlatformCompiler; - cl_api_clGetKernelArgInfo clGetKernelArgInfo; - cl_api_clEnqueueFillBuffer clEnqueueFillBuffer; - cl_api_clEnqueueFillImage clEnqueueFillImage; - cl_api_clEnqueueMigrateMemObjects clEnqueueMigrateMemObjects; - cl_api_clEnqueueMarkerWithWaitList clEnqueueMarkerWithWaitList; - cl_api_clEnqueueBarrierWithWaitList clEnqueueBarrierWithWaitList; - cl_api_clGetExtensionFunctionAddressForPlatform + clCreateSubDevices_fn clCreateSubDevices; + clRetainDevice_fn clRetainDevice; + clReleaseDevice_fn clReleaseDevice; + clCreateImage_fn clCreateImage; + clCreateProgramWithBuiltInKernels_fn clCreateProgramWithBuiltInKernels; + clCompileProgram_fn clCompileProgram; + clLinkProgram_fn clLinkProgram; + clUnloadPlatformCompiler_fn clUnloadPlatformCompiler; + clGetKernelArgInfo_fn clGetKernelArgInfo; + clEnqueueFillBuffer_fn clEnqueueFillBuffer; + clEnqueueFillImage_fn clEnqueueFillImage; + clEnqueueMigrateMemObjects_fn clEnqueueMigrateMemObjects; + clEnqueueMarkerWithWaitList_fn clEnqueueMarkerWithWaitList; + clEnqueueBarrierWithWaitList_fn clEnqueueBarrierWithWaitList; + clGetExtensionFunctionAddressForPlatform_fn clGetExtensionFunctionAddressForPlatform; - cl_api_clCreateFromGLTexture clCreateFromGLTexture; + clCreateFromGLTexture_fn clCreateFromGLTexture; /* cl_khr_d3d11_sharing */ - cl_api_clGetDeviceIDsFromD3D11KHR clGetDeviceIDsFromD3D11KHR; - cl_api_clCreateFromD3D11BufferKHR clCreateFromD3D11BufferKHR; - cl_api_clCreateFromD3D11Texture2DKHR clCreateFromD3D11Texture2DKHR; - cl_api_clCreateFromD3D11Texture3DKHR clCreateFromD3D11Texture3DKHR; - cl_api_clCreateFromDX9MediaSurfaceKHR clCreateFromDX9MediaSurfaceKHR; - cl_api_clEnqueueAcquireD3D11ObjectsKHR clEnqueueAcquireD3D11ObjectsKHR; - cl_api_clEnqueueReleaseD3D11ObjectsKHR clEnqueueReleaseD3D11ObjectsKHR; + clGetDeviceIDsFromD3D11KHR_fn clGetDeviceIDsFromD3D11KHR; + clCreateFromD3D11BufferKHR_fn clCreateFromD3D11BufferKHR; + clCreateFromD3D11Texture2DKHR_fn clCreateFromD3D11Texture2DKHR; + clCreateFromD3D11Texture3DKHR_fn clCreateFromD3D11Texture3DKHR; + clCreateFromDX9MediaSurfaceKHR_fn clCreateFromDX9MediaSurfaceKHR; + clEnqueueAcquireD3D11ObjectsKHR_fn clEnqueueAcquireD3D11ObjectsKHR; + clEnqueueReleaseD3D11ObjectsKHR_fn clEnqueueReleaseD3D11ObjectsKHR; /* cl_khr_dx9_media_sharing */ - cl_api_clGetDeviceIDsFromDX9MediaAdapterKHR + clGetDeviceIDsFromDX9MediaAdapterKHR_fn clGetDeviceIDsFromDX9MediaAdapterKHR; - cl_api_clEnqueueAcquireDX9MediaSurfacesKHR + clEnqueueAcquireDX9MediaSurfacesKHR_fn clEnqueueAcquireDX9MediaSurfacesKHR; - cl_api_clEnqueueReleaseDX9MediaSurfacesKHR + clEnqueueReleaseDX9MediaSurfacesKHR_fn clEnqueueReleaseDX9MediaSurfacesKHR; /* cl_khr_egl_image */ - cl_api_clCreateFromEGLImageKHR clCreateFromEGLImageKHR; - cl_api_clEnqueueAcquireEGLObjectsKHR clEnqueueAcquireEGLObjectsKHR; - cl_api_clEnqueueReleaseEGLObjectsKHR clEnqueueReleaseEGLObjectsKHR; + clCreateFromEGLImageKHR_fn clCreateFromEGLImageKHR; + clEnqueueAcquireEGLObjectsKHR_fn clEnqueueAcquireEGLObjectsKHR; + clEnqueueReleaseEGLObjectsKHR_fn clEnqueueReleaseEGLObjectsKHR; /* cl_khr_egl_event */ - cl_api_clCreateEventFromEGLSyncKHR clCreateEventFromEGLSyncKHR; + clCreateEventFromEGLSyncKHR_fn clCreateEventFromEGLSyncKHR; /* OpenCL 2.0 */ - cl_api_clCreateCommandQueueWithProperties clCreateCommandQueueWithProperties; - cl_api_clCreatePipe clCreatePipe; - cl_api_clGetPipeInfo clGetPipeInfo; - cl_api_clSVMAlloc clSVMAlloc; - cl_api_clSVMFree clSVMFree; - cl_api_clEnqueueSVMFree clEnqueueSVMFree; - cl_api_clEnqueueSVMMemcpy clEnqueueSVMMemcpy; - cl_api_clEnqueueSVMMemFill clEnqueueSVMMemFill; - cl_api_clEnqueueSVMMap clEnqueueSVMMap; - cl_api_clEnqueueSVMUnmap clEnqueueSVMUnmap; - cl_api_clCreateSamplerWithProperties clCreateSamplerWithProperties; - cl_api_clSetKernelArgSVMPointer clSetKernelArgSVMPointer; - cl_api_clSetKernelExecInfo clSetKernelExecInfo; + clCreateCommandQueueWithProperties_fn clCreateCommandQueueWithProperties; + clCreatePipe_fn clCreatePipe; + clGetPipeInfo_fn clGetPipeInfo; + clSVMAlloc_fn clSVMAlloc; + clSVMFree_fn clSVMFree; + clEnqueueSVMFree_fn clEnqueueSVMFree; + clEnqueueSVMMemcpy_fn clEnqueueSVMMemcpy; + clEnqueueSVMMemFill_fn clEnqueueSVMMemFill; + clEnqueueSVMMap_fn clEnqueueSVMMap; + clEnqueueSVMUnmap_fn clEnqueueSVMUnmap; + clCreateSamplerWithProperties_fn clCreateSamplerWithProperties; + clSetKernelArgSVMPointer_fn clSetKernelArgSVMPointer; + clSetKernelExecInfo_fn clSetKernelExecInfo; /* cl_khr_sub_groups */ - cl_api_clGetKernelSubGroupInfoKHR clGetKernelSubGroupInfoKHR; + clGetKernelSubGroupInfoKHR_fn clGetKernelSubGroupInfoKHR; /* OpenCL 2.1 */ - cl_api_clCloneKernel clCloneKernel; - cl_api_clCreateProgramWithIL clCreateProgramWithIL; - cl_api_clEnqueueSVMMigrateMem clEnqueueSVMMigrateMem; - cl_api_clGetDeviceAndHostTimer clGetDeviceAndHostTimer; - cl_api_clGetHostTimer clGetHostTimer; - cl_api_clGetKernelSubGroupInfo clGetKernelSubGroupInfo; - cl_api_clSetDefaultDeviceCommandQueue clSetDefaultDeviceCommandQueue; + clCloneKernel_fn clCloneKernel; + clCreateProgramWithIL_fn clCreateProgramWithIL; + clEnqueueSVMMigrateMem_fn clEnqueueSVMMigrateMem; + clGetDeviceAndHostTimer_fn clGetDeviceAndHostTimer; + clGetHostTimer_fn clGetHostTimer; + clGetKernelSubGroupInfo_fn clGetKernelSubGroupInfo; + clSetDefaultDeviceCommandQueue_fn clSetDefaultDeviceCommandQueue; /* OpenCL 2.2 */ - cl_api_clSetProgramReleaseCallback clSetProgramReleaseCallback; - cl_api_clSetProgramSpecializationConstant clSetProgramSpecializationConstant; + clSetProgramReleaseCallback_fn clSetProgramReleaseCallback; + clSetProgramSpecializationConstant_fn clSetProgramSpecializationConstant; /* OpenCL 3.0 */ - cl_api_clCreateBufferWithProperties clCreateBufferWithProperties; - cl_api_clCreateImageWithProperties clCreateImageWithProperties; - cl_api_clSetContextDestructorCallback clSetContextDestructorCallback; + clCreateBufferWithProperties_fn clCreateBufferWithProperties; + clCreateImageWithProperties_fn clCreateImageWithProperties; + clSetContextDestructorCallback_fn clSetContextDestructorCallback; } cl_icd_dispatch; From 6e60896f918bc6654d27455e35063efcf0bbe24b Mon Sep 17 00:00:00 2001 From: Brice Videau Date: Tue, 2 May 2023 12:27:55 -0500 Subject: [PATCH 8/8] Only use function types for icd dispatch table. --- CL/cl_icd.h | 496 +++++++++++++++++++++++++--------------------------- 1 file changed, 239 insertions(+), 257 deletions(-) diff --git a/CL/cl_icd.h b/CL/cl_icd.h index 0ec4fc61..435ad483 100644 --- a/CL/cl_icd.h +++ b/CL/cl_icd.h @@ -33,296 +33,278 @@ extern "C" { #endif -#ifndef CL_VERSION_1_1 - -typedef void *clSetEventCallback_fn; -typedef void *clCreateSubBuffer_fn; -typedef void *clSetMemObjectDestructorCallback_fn; -typedef void *clCreateUserEvent_fn; -typedef void *clSetUserEventStatus_fn; -typedef void *clEnqueueReadBufferRect_fn; -typedef void *clEnqueueWriteBufferRect_fn; -typedef void *clEnqueueCopyBufferRect_fn; - -#endif - -#ifndef CL_VERSION_1_2 - -typedef void *clCreateSubDevices_fn; -typedef void *clRetainDevice_fn; -typedef void *clReleaseDevice_fn; -typedef void *clCreateImage_fn; -typedef void *clCreateProgramWithBuiltInKernels_fn; -typedef void *clCompileProgram_fn; -typedef void *clLinkProgram_fn; -typedef void *clUnloadPlatformCompiler_fn; -typedef void *clGetKernelArgInfo_fn; -typedef void *clEnqueueFillBuffer_fn; -typedef void *clEnqueueFillImage_fn; -typedef void *clEnqueueMigrateMemObjects_fn; -typedef void *clEnqueueMarkerWithWaitList_fn; -typedef void *clEnqueueBarrierWithWaitList_fn; -typedef void *clGetExtensionFunctionAddressForPlatform_fn; -typedef void *clCreateFromGLTexture_fn; - -#endif - -#ifndef CL_VERSION_2_0 - -typedef void *clCreateCommandQueueWithProperties_fn; -typedef void *clCreatePipe_fn; -typedef void *clGetPipeInfo_fn; -typedef void *clSVMAlloc_fn; -typedef void *clSVMFree_fn; -typedef void *clEnqueueSVMFree_fn; -typedef void *clEnqueueSVMMemcpy_fn; -typedef void *clEnqueueSVMMemFill_fn; -typedef void *clEnqueueSVMMap_fn; -typedef void *clEnqueueSVMUnmap_fn; -typedef void *clCreateSamplerWithProperties_fn; -typedef void *clSetKernelArgSVMPointer_fn; -typedef void *clSetKernelExecInfo_fn; - -#endif - -#ifndef CL_VERSION_2_1 - -typedef void *clCloneKernel_fn; -typedef void *clCreateProgramWithIL_fn; -typedef void *clEnqueueSVMMigrateMem_fn; -typedef void *clGetDeviceAndHostTimer_fn; -typedef void *clGetHostTimer_fn; -typedef void *clGetKernelSubGroupInfo_fn; -typedef void *clSetDefaultDeviceCommandQueue_fn; - -#endif - -#ifndef CL_VERSION_2_2 - -typedef void *clSetProgramReleaseCallback_fn; -typedef void *clSetProgramSpecializationConstant_fn; - -#endif - -#ifndef CL_VERSION_3_0 - -typedef void *clCreateBufferWithProperties_fn; -typedef void *clCreateImageWithProperties_fn; -typedef void *clSetContextDestructorCallback_fn; - -#endif - -#ifndef _WIN32 - -/* cl_khr_d3d10_sharing */ -typedef void *clGetDeviceIDsFromD3D10KHR_fn; -typedef void *clCreateFromD3D10BufferKHR_fn; -typedef void *clCreateFromD3D10Texture2DKHR_fn; -typedef void *clCreateFromD3D10Texture3DKHR_fn; -typedef void *clEnqueueAcquireD3D10ObjectsKHR_fn; -typedef void *clEnqueueReleaseD3D10ObjectsKHR_fn; - -/* cl_khr_d3d11_sharing */ -typedef void *clGetDeviceIDsFromD3D11KHR_fn; -typedef void *clCreateFromD3D11BufferKHR_fn; -typedef void *clCreateFromD3D11Texture2DKHR_fn; -typedef void *clCreateFromD3D11Texture3DKHR_fn; -typedef void *clEnqueueAcquireD3D11ObjectsKHR_fn; -typedef void *clEnqueueReleaseD3D11ObjectsKHR_fn; - -/* cl_khr_dx9_media_sharing */ -typedef void *clCreateFromDX9MediaSurfaceKHR_fn; -typedef void *clEnqueueAcquireDX9MediaSurfacesKHR_fn; -typedef void *clEnqueueReleaseDX9MediaSurfacesKHR_fn; -typedef void *clGetDeviceIDsFromDX9MediaAdapterKHR_fn; - -#endif - /* Vendor dispatch table structure */ typedef struct _cl_icd_dispatch { /* OpenCL 1.0 */ - clGetPlatformIDs_fn clGetPlatformIDs; - clGetPlatformInfo_fn clGetPlatformInfo; - clGetDeviceIDs_fn clGetDeviceIDs; - clGetDeviceInfo_fn clGetDeviceInfo; - clCreateContext_fn clCreateContext; - clCreateContextFromType_fn clCreateContextFromType; - clRetainContext_fn clRetainContext; - clReleaseContext_fn clReleaseContext; - clGetContextInfo_fn clGetContextInfo; - clCreateCommandQueue_fn clCreateCommandQueue; - clRetainCommandQueue_fn clRetainCommandQueue; - clReleaseCommandQueue_fn clReleaseCommandQueue; - clGetCommandQueueInfo_fn clGetCommandQueueInfo; - clSetCommandQueueProperty_fn clSetCommandQueueProperty; - clCreateBuffer_fn clCreateBuffer; - clCreateImage2D_fn clCreateImage2D; - clCreateImage3D_fn clCreateImage3D; - clRetainMemObject_fn clRetainMemObject; - clReleaseMemObject_fn clReleaseMemObject; - clGetSupportedImageFormats_fn clGetSupportedImageFormats; - clGetMemObjectInfo_fn clGetMemObjectInfo; - clGetImageInfo_fn clGetImageInfo; - clCreateSampler_fn clCreateSampler; - clRetainSampler_fn clRetainSampler; - clReleaseSampler_fn clReleaseSampler; - clGetSamplerInfo_fn clGetSamplerInfo; - clCreateProgramWithSource_fn clCreateProgramWithSource; - clCreateProgramWithBinary_fn clCreateProgramWithBinary; - clRetainProgram_fn clRetainProgram; - clReleaseProgram_fn clReleaseProgram; - clBuildProgram_fn clBuildProgram; - clUnloadCompiler_fn clUnloadCompiler; - clGetProgramInfo_fn clGetProgramInfo; - clGetProgramBuildInfo_fn clGetProgramBuildInfo; - clCreateKernel_fn clCreateKernel; - clCreateKernelsInProgram_fn clCreateKernelsInProgram; - clRetainKernel_fn clRetainKernel; - clReleaseKernel_fn clReleaseKernel; - clSetKernelArg_fn clSetKernelArg; - clGetKernelInfo_fn clGetKernelInfo; - clGetKernelWorkGroupInfo_fn clGetKernelWorkGroupInfo; - clWaitForEvents_fn clWaitForEvents; - clGetEventInfo_fn clGetEventInfo; - clRetainEvent_fn clRetainEvent; - clReleaseEvent_fn clReleaseEvent; - clGetEventProfilingInfo_fn clGetEventProfilingInfo; - clFlush_fn clFlush; - clFinish_fn clFinish; - clEnqueueReadBuffer_fn clEnqueueReadBuffer; - clEnqueueWriteBuffer_fn clEnqueueWriteBuffer; - clEnqueueCopyBuffer_fn clEnqueueCopyBuffer; - clEnqueueReadImage_fn clEnqueueReadImage; - clEnqueueWriteImage_fn clEnqueueWriteImage; - clEnqueueCopyImage_fn clEnqueueCopyImage; - clEnqueueCopyImageToBuffer_fn clEnqueueCopyImageToBuffer; - clEnqueueCopyBufferToImage_fn clEnqueueCopyBufferToImage; - clEnqueueMapBuffer_fn clEnqueueMapBuffer; - clEnqueueMapImage_fn clEnqueueMapImage; - clEnqueueUnmapMemObject_fn clEnqueueUnmapMemObject; - clEnqueueNDRangeKernel_fn clEnqueueNDRangeKernel; - clEnqueueTask_fn clEnqueueTask; - clEnqueueNativeKernel_fn clEnqueueNativeKernel; - clEnqueueMarker_fn clEnqueueMarker; - clEnqueueWaitForEvents_fn clEnqueueWaitForEvents; - clEnqueueBarrier_fn clEnqueueBarrier; - clGetExtensionFunctionAddress_fn clGetExtensionFunctionAddress; - clCreateFromGLBuffer_fn clCreateFromGLBuffer; - clCreateFromGLTexture2D_fn clCreateFromGLTexture2D; - clCreateFromGLTexture3D_fn clCreateFromGLTexture3D; - clCreateFromGLRenderbuffer_fn clCreateFromGLRenderbuffer; - clGetGLObjectInfo_fn clGetGLObjectInfo; - clGetGLTextureInfo_fn clGetGLTextureInfo; - clEnqueueAcquireGLObjects_fn clEnqueueAcquireGLObjects; - clEnqueueReleaseGLObjects_fn clEnqueueReleaseGLObjects; - clGetGLContextInfoKHR_fn clGetGLContextInfoKHR; + clGetPlatformIDs_t *clGetPlatformIDs; + clGetPlatformInfo_t *clGetPlatformInfo; + clGetDeviceIDs_t *clGetDeviceIDs; + clGetDeviceInfo_t *clGetDeviceInfo; + clCreateContext_t *clCreateContext; + clCreateContextFromType_t *clCreateContextFromType; + clRetainContext_t *clRetainContext; + clReleaseContext_t *clReleaseContext; + clGetContextInfo_t *clGetContextInfo; + clCreateCommandQueue_t *clCreateCommandQueue; + clRetainCommandQueue_t *clRetainCommandQueue; + clReleaseCommandQueue_t *clReleaseCommandQueue; + clGetCommandQueueInfo_t *clGetCommandQueueInfo; + clSetCommandQueueProperty_t *clSetCommandQueueProperty; + clCreateBuffer_t *clCreateBuffer; + clCreateImage2D_t *clCreateImage2D; + clCreateImage3D_t *clCreateImage3D; + clRetainMemObject_t *clRetainMemObject; + clReleaseMemObject_t *clReleaseMemObject; + clGetSupportedImageFormats_t *clGetSupportedImageFormats; + clGetMemObjectInfo_t *clGetMemObjectInfo; + clGetImageInfo_t *clGetImageInfo; + clCreateSampler_t *clCreateSampler; + clRetainSampler_t *clRetainSampler; + clReleaseSampler_t *clReleaseSampler; + clGetSamplerInfo_t *clGetSamplerInfo; + clCreateProgramWithSource_t *clCreateProgramWithSource; + clCreateProgramWithBinary_t *clCreateProgramWithBinary; + clRetainProgram_t *clRetainProgram; + clReleaseProgram_t *clReleaseProgram; + clBuildProgram_t *clBuildProgram; + clUnloadCompiler_t *clUnloadCompiler; + clGetProgramInfo_t *clGetProgramInfo; + clGetProgramBuildInfo_t *clGetProgramBuildInfo; + clCreateKernel_t *clCreateKernel; + clCreateKernelsInProgram_t *clCreateKernelsInProgram; + clRetainKernel_t *clRetainKernel; + clReleaseKernel_t *clReleaseKernel; + clSetKernelArg_t *clSetKernelArg; + clGetKernelInfo_t *clGetKernelInfo; + clGetKernelWorkGroupInfo_t *clGetKernelWorkGroupInfo; + clWaitForEvents_t *clWaitForEvents; + clGetEventInfo_t *clGetEventInfo; + clRetainEvent_t *clRetainEvent; + clReleaseEvent_t *clReleaseEvent; + clGetEventProfilingInfo_t *clGetEventProfilingInfo; + clFlush_t *clFlush; + clFinish_t *clFinish; + clEnqueueReadBuffer_t *clEnqueueReadBuffer; + clEnqueueWriteBuffer_t *clEnqueueWriteBuffer; + clEnqueueCopyBuffer_t *clEnqueueCopyBuffer; + clEnqueueReadImage_t *clEnqueueReadImage; + clEnqueueWriteImage_t *clEnqueueWriteImage; + clEnqueueCopyImage_t *clEnqueueCopyImage; + clEnqueueCopyImageToBuffer_t *clEnqueueCopyImageToBuffer; + clEnqueueCopyBufferToImage_t *clEnqueueCopyBufferToImage; + clEnqueueMapBuffer_t *clEnqueueMapBuffer; + clEnqueueMapImage_t *clEnqueueMapImage; + clEnqueueUnmapMemObject_t *clEnqueueUnmapMemObject; + clEnqueueNDRangeKernel_t *clEnqueueNDRangeKernel; + clEnqueueTask_t *clEnqueueTask; + clEnqueueNativeKernel_t *clEnqueueNativeKernel; + clEnqueueMarker_t *clEnqueueMarker; + clEnqueueWaitForEvents_t *clEnqueueWaitForEvents; + clEnqueueBarrier_t *clEnqueueBarrier; + clGetExtensionFunctionAddress_t *clGetExtensionFunctionAddress; + clCreateFromGLBuffer_t *clCreateFromGLBuffer; + clCreateFromGLTexture2D_t *clCreateFromGLTexture2D; + clCreateFromGLTexture3D_t *clCreateFromGLTexture3D; + clCreateFromGLRenderbuffer_t *clCreateFromGLRenderbuffer; + clGetGLObjectInfo_t *clGetGLObjectInfo; + clGetGLTextureInfo_t *clGetGLTextureInfo; + clEnqueueAcquireGLObjects_t *clEnqueueAcquireGLObjects; + clEnqueueReleaseGLObjects_t *clEnqueueReleaseGLObjects; + clGetGLContextInfoKHR_t *clGetGLContextInfoKHR; /* cl_khr_d3d10_sharing */ - clGetDeviceIDsFromD3D10KHR_fn clGetDeviceIDsFromD3D10KHR; - clCreateFromD3D10BufferKHR_fn clCreateFromD3D10BufferKHR; - clCreateFromD3D10Texture2DKHR_fn clCreateFromD3D10Texture2DKHR; - clCreateFromD3D10Texture3DKHR_fn clCreateFromD3D10Texture3DKHR; - clEnqueueAcquireD3D10ObjectsKHR_fn clEnqueueAcquireD3D10ObjectsKHR; - clEnqueueReleaseD3D10ObjectsKHR_fn clEnqueueReleaseD3D10ObjectsKHR; +#ifdef _WIN32 + clGetDeviceIDsFromD3D10KHR_t *clGetDeviceIDsFromD3D10KHR; + clCreateFromD3D10BufferKHR_t *clCreateFromD3D10BufferKHR; + clCreateFromD3D10Texture2DKHR_t *clCreateFromD3D10Texture2DKHR; + clCreateFromD3D10Texture3DKHR_t *clCreateFromD3D10Texture3DKHR; + clEnqueueAcquireD3D10ObjectsKHR_t *clEnqueueAcquireD3D10ObjectsKHR; + clEnqueueReleaseD3D10ObjectsKHR_t *clEnqueueReleaseD3D10ObjectsKHR; +#else + void *clGetDeviceIDsFromD3D10KHR; + void *clCreateFromD3D10BufferKHR; + void *clCreateFromD3D10Texture2DKHR; + void *clCreateFromD3D10Texture3DKHR; + void *clEnqueueAcquireD3D10ObjectsKHR; + void *clEnqueueReleaseD3D10ObjectsKHR; +#endif /* OpenCL 1.1 */ - clSetEventCallback_fn clSetEventCallback; - clCreateSubBuffer_fn clCreateSubBuffer; - clSetMemObjectDestructorCallback_fn clSetMemObjectDestructorCallback; - clCreateUserEvent_fn clCreateUserEvent; - clSetUserEventStatus_fn clSetUserEventStatus; - clEnqueueReadBufferRect_fn clEnqueueReadBufferRect; - clEnqueueWriteBufferRect_fn clEnqueueWriteBufferRect; - clEnqueueCopyBufferRect_fn clEnqueueCopyBufferRect; +#ifdef CL_VERSION_1_1 + clSetEventCallback_t *clSetEventCallback; + clCreateSubBuffer_t *clCreateSubBuffer; + clSetMemObjectDestructorCallback_t *clSetMemObjectDestructorCallback; + clCreateUserEvent_t *clCreateUserEvent; + clSetUserEventStatus_t *clSetUserEventStatus; + clEnqueueReadBufferRect_t *clEnqueueReadBufferRect; + clEnqueueWriteBufferRect_t *clEnqueueWriteBufferRect; + clEnqueueCopyBufferRect_t *clEnqueueCopyBufferRect; +#else + void *clSetEventCallback; + void *clCreateSubBuffer; + void *clSetMemObjectDestructorCallback; + void *clCreateUserEvent; + void *clSetUserEventStatus; + void *clEnqueueReadBufferRect; + void *clEnqueueWriteBufferRect; + void *clEnqueueCopyBufferRect; +#endif /* cl_ext_device_fission */ - clCreateSubDevicesEXT_fn clCreateSubDevicesEXT; - clRetainDeviceEXT_fn clRetainDeviceEXT; - clReleaseDeviceEXT_fn clReleaseDeviceEXT; + clCreateSubDevicesEXT_t *clCreateSubDevicesEXT; + clRetainDeviceEXT_t *clRetainDeviceEXT; + clReleaseDeviceEXT_t *clReleaseDeviceEXT; /* cl_khr_gl_event */ - clCreateEventFromGLsyncKHR_fn clCreateEventFromGLsyncKHR; + clCreateEventFromGLsyncKHR_t *clCreateEventFromGLsyncKHR; /* OpenCL 1.2 */ - clCreateSubDevices_fn clCreateSubDevices; - clRetainDevice_fn clRetainDevice; - clReleaseDevice_fn clReleaseDevice; - clCreateImage_fn clCreateImage; - clCreateProgramWithBuiltInKernels_fn clCreateProgramWithBuiltInKernels; - clCompileProgram_fn clCompileProgram; - clLinkProgram_fn clLinkProgram; - clUnloadPlatformCompiler_fn clUnloadPlatformCompiler; - clGetKernelArgInfo_fn clGetKernelArgInfo; - clEnqueueFillBuffer_fn clEnqueueFillBuffer; - clEnqueueFillImage_fn clEnqueueFillImage; - clEnqueueMigrateMemObjects_fn clEnqueueMigrateMemObjects; - clEnqueueMarkerWithWaitList_fn clEnqueueMarkerWithWaitList; - clEnqueueBarrierWithWaitList_fn clEnqueueBarrierWithWaitList; - clGetExtensionFunctionAddressForPlatform_fn +#ifdef CL_VERSION_1_2 + clCreateSubDevices_t *clCreateSubDevices; + clRetainDevice_t *clRetainDevice; + clReleaseDevice_t *clReleaseDevice; + clCreateImage_t *clCreateImage; + clCreateProgramWithBuiltInKernels_t *clCreateProgramWithBuiltInKernels; + clCompileProgram_t *clCompileProgram; + clLinkProgram_t *clLinkProgram; + clUnloadPlatformCompiler_t *clUnloadPlatformCompiler; + clGetKernelArgInfo_t *clGetKernelArgInfo; + clEnqueueFillBuffer_t *clEnqueueFillBuffer; + clEnqueueFillImage_t *clEnqueueFillImage; + clEnqueueMigrateMemObjects_t *clEnqueueMigrateMemObjects; + clEnqueueMarkerWithWaitList_t *clEnqueueMarkerWithWaitList; + clEnqueueBarrierWithWaitList_t *clEnqueueBarrierWithWaitList; + clGetExtensionFunctionAddressForPlatform_t * clGetExtensionFunctionAddressForPlatform; - clCreateFromGLTexture_fn clCreateFromGLTexture; - - /* cl_khr_d3d11_sharing */ - clGetDeviceIDsFromD3D11KHR_fn clGetDeviceIDsFromD3D11KHR; - clCreateFromD3D11BufferKHR_fn clCreateFromD3D11BufferKHR; - clCreateFromD3D11Texture2DKHR_fn clCreateFromD3D11Texture2DKHR; - clCreateFromD3D11Texture3DKHR_fn clCreateFromD3D11Texture3DKHR; - clCreateFromDX9MediaSurfaceKHR_fn clCreateFromDX9MediaSurfaceKHR; - clEnqueueAcquireD3D11ObjectsKHR_fn clEnqueueAcquireD3D11ObjectsKHR; - clEnqueueReleaseD3D11ObjectsKHR_fn clEnqueueReleaseD3D11ObjectsKHR; + clCreateFromGLTexture_t *clCreateFromGLTexture; +#else + void *clCreateSubDevices; + void *clRetainDevice; + void *clReleaseDevice; + void *clCreateImage; + void *clCreateProgramWithBuiltInKernels; + void *clCompileProgram; + void *clLinkProgram; + void *clUnloadPlatformCompiler; + void *clGetKernelArgInfo; + void *clEnqueueFillBuffer; + void *clEnqueueFillImage; + void *clEnqueueMigrateMemObjects; + void *clEnqueueMarkerWithWaitList; + void *clEnqueueBarrierWithWaitList; + void *clGetExtensionFunctionAddressForPlatform; + void *clCreateFromGLTexture; +#endif - /* cl_khr_dx9_media_sharing */ - clGetDeviceIDsFromDX9MediaAdapterKHR_fn + /* cl_khr_d3d11_sharing and cl_khr_dx9_media_sharing */ +#ifdef _WIN32 + clGetDeviceIDsFromD3D11KHR_t *clGetDeviceIDsFromD3D11KHR; + clCreateFromD3D11BufferKHR_t *clCreateFromD3D11BufferKHR; + clCreateFromD3D11Texture2DKHR_t *clCreateFromD3D11Texture2DKHR; + clCreateFromD3D11Texture3DKHR_t *clCreateFromD3D11Texture3DKHR; + clCreateFromDX9MediaSurfaceKHR_t *clCreateFromDX9MediaSurfaceKHR; + clEnqueueAcquireD3D11ObjectsKHR_t *clEnqueueAcquireD3D11ObjectsKHR; + clEnqueueReleaseD3D11ObjectsKHR_t *clEnqueueReleaseD3D11ObjectsKHR; + clGetDeviceIDsFromDX9MediaAdapterKHR_t * clGetDeviceIDsFromDX9MediaAdapterKHR; - clEnqueueAcquireDX9MediaSurfacesKHR_fn + clEnqueueAcquireDX9MediaSurfacesKHR_t * clEnqueueAcquireDX9MediaSurfacesKHR; - clEnqueueReleaseDX9MediaSurfacesKHR_fn + clEnqueueReleaseDX9MediaSurfacesKHR_t * clEnqueueReleaseDX9MediaSurfacesKHR; +#else + void *clGetDeviceIDsFromD3D11KHR; + void *clCreateFromD3D11BufferKHR; + void *clCreateFromD3D11Texture2DKHR; + void *clCreateFromD3D11Texture3DKHR; + void *clCreateFromDX9MediaSurfaceKHR; + void *clEnqueueAcquireD3D11ObjectsKHR; + void *clEnqueueReleaseD3D11ObjectsKHR; + void *clGetDeviceIDsFromDX9MediaAdapterKHR; + void *clEnqueueAcquireDX9MediaSurfacesKHR; + void *clEnqueueReleaseDX9MediaSurfacesKHR; +#endif /* cl_khr_egl_image */ - clCreateFromEGLImageKHR_fn clCreateFromEGLImageKHR; - clEnqueueAcquireEGLObjectsKHR_fn clEnqueueAcquireEGLObjectsKHR; - clEnqueueReleaseEGLObjectsKHR_fn clEnqueueReleaseEGLObjectsKHR; + clCreateFromEGLImageKHR_t *clCreateFromEGLImageKHR; + clEnqueueAcquireEGLObjectsKHR_t *clEnqueueAcquireEGLObjectsKHR; + clEnqueueReleaseEGLObjectsKHR_t *clEnqueueReleaseEGLObjectsKHR; /* cl_khr_egl_event */ - clCreateEventFromEGLSyncKHR_fn clCreateEventFromEGLSyncKHR; + clCreateEventFromEGLSyncKHR_t *clCreateEventFromEGLSyncKHR; /* OpenCL 2.0 */ - clCreateCommandQueueWithProperties_fn clCreateCommandQueueWithProperties; - clCreatePipe_fn clCreatePipe; - clGetPipeInfo_fn clGetPipeInfo; - clSVMAlloc_fn clSVMAlloc; - clSVMFree_fn clSVMFree; - clEnqueueSVMFree_fn clEnqueueSVMFree; - clEnqueueSVMMemcpy_fn clEnqueueSVMMemcpy; - clEnqueueSVMMemFill_fn clEnqueueSVMMemFill; - clEnqueueSVMMap_fn clEnqueueSVMMap; - clEnqueueSVMUnmap_fn clEnqueueSVMUnmap; - clCreateSamplerWithProperties_fn clCreateSamplerWithProperties; - clSetKernelArgSVMPointer_fn clSetKernelArgSVMPointer; - clSetKernelExecInfo_fn clSetKernelExecInfo; +#ifdef CL_VERSION_2_0 + clCreateCommandQueueWithProperties_t *clCreateCommandQueueWithProperties; + clCreatePipe_t *clCreatePipe; + clGetPipeInfo_t *clGetPipeInfo; + clSVMAlloc_t *clSVMAlloc; + clSVMFree_t *clSVMFree; + clEnqueueSVMFree_t *clEnqueueSVMFree; + clEnqueueSVMMemcpy_t *clEnqueueSVMMemcpy; + clEnqueueSVMMemFill_t *clEnqueueSVMMemFill; + clEnqueueSVMMap_t *clEnqueueSVMMap; + clEnqueueSVMUnmap_t *clEnqueueSVMUnmap; + clCreateSamplerWithProperties_t *clCreateSamplerWithProperties; + clSetKernelArgSVMPointer_t *clSetKernelArgSVMPointer; + clSetKernelExecInfo_t *clSetKernelExecInfo; +#else + void *clCreateCommandQueueWithProperties; + void *clCreatePipe; + void *clGetPipeInfo; + void *clSVMAlloc; + void *clSVMFree; + void *clEnqueueSVMFree; + void *clEnqueueSVMMemcpy; + void *clEnqueueSVMMemFill; + void *clEnqueueSVMMap; + void *clEnqueueSVMUnmap; + void *clCreateSamplerWithProperties; + void *clSetKernelArgSVMPointer; + void *clSetKernelExecInfo; +#endif /* cl_khr_sub_groups */ - clGetKernelSubGroupInfoKHR_fn clGetKernelSubGroupInfoKHR; + clGetKernelSubGroupInfoKHR_t *clGetKernelSubGroupInfoKHR; /* OpenCL 2.1 */ - clCloneKernel_fn clCloneKernel; - clCreateProgramWithIL_fn clCreateProgramWithIL; - clEnqueueSVMMigrateMem_fn clEnqueueSVMMigrateMem; - clGetDeviceAndHostTimer_fn clGetDeviceAndHostTimer; - clGetHostTimer_fn clGetHostTimer; - clGetKernelSubGroupInfo_fn clGetKernelSubGroupInfo; - clSetDefaultDeviceCommandQueue_fn clSetDefaultDeviceCommandQueue; +#ifdef CL_VERSION_2_1 + clCloneKernel_t *clCloneKernel; + clCreateProgramWithIL_t *clCreateProgramWithIL; + clEnqueueSVMMigrateMem_t *clEnqueueSVMMigrateMem; + clGetDeviceAndHostTimer_t *clGetDeviceAndHostTimer; + clGetHostTimer_t *clGetHostTimer; + clGetKernelSubGroupInfo_t *clGetKernelSubGroupInfo; + clSetDefaultDeviceCommandQueue_t *clSetDefaultDeviceCommandQueue; +#else + void *clCloneKernel; + void *clCreateProgramWithIL; + void *clEnqueueSVMMigrateMem; + void *clGetDeviceAndHostTimer; + void *clGetHostTimer; + void *clGetKernelSubGroupInfo; + void *clSetDefaultDeviceCommandQueue; +#endif /* OpenCL 2.2 */ - clSetProgramReleaseCallback_fn clSetProgramReleaseCallback; - clSetProgramSpecializationConstant_fn clSetProgramSpecializationConstant; +#ifdef CL_VERSION_2_2 + clSetProgramReleaseCallback_t *clSetProgramReleaseCallback; + clSetProgramSpecializationConstant_t *clSetProgramSpecializationConstant; +#else + void *clSetProgramReleaseCallback; + void *clSetProgramSpecializationConstant; +#endif /* OpenCL 3.0 */ - clCreateBufferWithProperties_fn clCreateBufferWithProperties; - clCreateImageWithProperties_fn clCreateImageWithProperties; - clSetContextDestructorCallback_fn clSetContextDestructorCallback; +#ifdef CL_VERSION_3_0 + clCreateBufferWithProperties_t *clCreateBufferWithProperties; + clCreateImageWithProperties_t *clCreateImageWithProperties; + clSetContextDestructorCallback_t *clSetContextDestructorCallback; +#else + void *clCreateBufferWithProperties; + void *clCreateImageWithProperties; + void *clSetContextDestructorCallback; +#endif } cl_icd_dispatch;