make style

This commit is contained in:
Philippe Teuwen
2021-01-14 11:39:45 +01:00
parent 2fbdada593
commit f2bc066858
33 changed files with 4734 additions and 5173 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -75,50 +75,50 @@ typedef cl_uint cl_d3d10_device_set_khr;
/******************************************************************************/
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D10KHR_fn)(
typedef CL_API_ENTRY cl_int(CL_API_CALL *clGetDeviceIDsFromD3D10KHR_fn)(
cl_platform_id platform,
cl_d3d10_device_source_khr d3d_device_source,
void * d3d_object,
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_device_id *devices,
cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10BufferKHR_fn)(
typedef CL_API_ENTRY cl_mem(CL_API_CALL *clCreateFromD3D10BufferKHR_fn)(
cl_context context,
cl_mem_flags flags,
ID3D10Buffer * resource,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
ID3D10Buffer *resource,
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture2DKHR_fn)(
typedef CL_API_ENTRY cl_mem(CL_API_CALL *clCreateFromD3D10Texture2DKHR_fn)(
cl_context context,
cl_mem_flags flags,
ID3D10Texture2D * resource,
ID3D10Texture2D *resource,
UINT subresource,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture3DKHR_fn)(
typedef CL_API_ENTRY cl_mem(CL_API_CALL *clCreateFromD3D10Texture3DKHR_fn)(
cl_context context,
cl_mem_flags flags,
ID3D10Texture3D * resource,
ID3D10Texture3D *resource,
UINT subresource,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D10ObjectsKHR_fn)(
typedef CL_API_ENTRY cl_int(CL_API_CALL *clEnqueueAcquireD3D10ObjectsKHR_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * 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_1_0;
const cl_event *event_wait_list,
cl_event *event) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D10ObjectsKHR_fn)(
typedef CL_API_ENTRY cl_int(CL_API_CALL *clEnqueueReleaseD3D10ObjectsKHR_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * 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_1_0;
const cl_event *event_wait_list,
cl_event *event) CL_API_SUFFIX__VERSION_1_0;
#ifdef __cplusplus
}

View File

@@ -75,50 +75,50 @@ typedef cl_uint cl_d3d11_device_set_khr;
/******************************************************************************/
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D11KHR_fn)(
typedef CL_API_ENTRY cl_int(CL_API_CALL *clGetDeviceIDsFromD3D11KHR_fn)(
cl_platform_id platform,
cl_d3d11_device_source_khr d3d_device_source,
void * d3d_object,
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_device_id *devices,
cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11BufferKHR_fn)(
typedef CL_API_ENTRY cl_mem(CL_API_CALL *clCreateFromD3D11BufferKHR_fn)(
cl_context context,
cl_mem_flags flags,
ID3D11Buffer * resource,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
ID3D11Buffer *resource,
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11Texture2DKHR_fn)(
typedef CL_API_ENTRY cl_mem(CL_API_CALL *clCreateFromD3D11Texture2DKHR_fn)(
cl_context context,
cl_mem_flags flags,
ID3D11Texture2D * resource,
ID3D11Texture2D *resource,
UINT subresource,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11Texture3DKHR_fn)(
typedef CL_API_ENTRY cl_mem(CL_API_CALL *clCreateFromD3D11Texture3DKHR_fn)(
cl_context context,
cl_mem_flags flags,
ID3D11Texture3D * resource,
ID3D11Texture3D *resource,
UINT subresource,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D11ObjectsKHR_fn)(
typedef CL_API_ENTRY cl_int(CL_API_CALL *clEnqueueAcquireD3D11ObjectsKHR_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * 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_1_2;
const cl_event *event_wait_list,
cl_event *event) CL_API_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D11ObjectsKHR_fn)(
typedef CL_API_ENTRY cl_int(CL_API_CALL *clEnqueueReleaseD3D11ObjectsKHR_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * 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_1_2;
const cl_event *event_wait_list,
cl_event *event) CL_API_SUFFIX__VERSION_1_2;
#ifdef __cplusplus
}

View File

@@ -30,11 +30,10 @@ extern "C" {
typedef cl_uint cl_dx9_media_adapter_type_khr;
typedef cl_uint cl_dx9_media_adapter_set_khr;
#if defined(_WIN32)
#include <d3d9.h>
typedef struct _cl_dx9_surface_info_khr
{
typedef struct _cl_dx9_surface_info_khr {
IDirect3DSurface9 *resource;
HANDLE shared_handle;
} cl_dx9_surface_info_khr;
@@ -76,39 +75,39 @@ typedef struct _cl_dx9_surface_info_khr
/******************************************************************************/
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromDX9MediaAdapterKHR_fn)(
typedef CL_API_ENTRY cl_int(CL_API_CALL *clGetDeviceIDsFromDX9MediaAdapterKHR_fn)(
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_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) CL_API_SUFFIX__VERSION_1_2;
cl_device_id *devices,
cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromDX9MediaSurfaceKHR_fn)(
typedef CL_API_ENTRY cl_mem(CL_API_CALL *clCreateFromDX9MediaSurfaceKHR_fn)(
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;
void *surface_info,
cl_uint plane,
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireDX9MediaSurfacesKHR_fn)(
typedef CL_API_ENTRY cl_int(CL_API_CALL *clEnqueueAcquireDX9MediaSurfacesKHR_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * 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_1_2;
const cl_event *event_wait_list,
cl_event *event) CL_API_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseDX9MediaSurfacesKHR_fn)(
typedef CL_API_ENTRY cl_int(CL_API_CALL *clEnqueueReleaseDX9MediaSurfacesKHR_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * 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_1_2;
const cl_event *event_wait_list,
cl_event *event) CL_API_SUFFIX__VERSION_1_2;
#ifdef __cplusplus
}

View File

@@ -96,71 +96,71 @@ extern CL_API_ENTRY cl_int CL_API_CALL
clGetDeviceIDsFromDX9INTEL(
cl_platform_id platform,
cl_dx9_device_source_intel dx9_device_source,
void* dx9_object,
void *dx9_object,
cl_dx9_device_set_intel dx9_device_set,
cl_uint num_entries,
cl_device_id* devices,
cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_1;
cl_device_id *devices,
cl_uint *num_devices) CL_EXT_SUFFIX__VERSION_1_1;
typedef CL_API_ENTRY cl_int (CL_API_CALL* clGetDeviceIDsFromDX9INTEL_fn)(
typedef CL_API_ENTRY cl_int(CL_API_CALL *clGetDeviceIDsFromDX9INTEL_fn)(
cl_platform_id platform,
cl_dx9_device_source_intel dx9_device_source,
void* dx9_object,
void *dx9_object,
cl_dx9_device_set_intel dx9_device_set,
cl_uint num_entries,
cl_device_id* devices,
cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_1;
cl_device_id *devices,
cl_uint *num_devices) CL_EXT_SUFFIX__VERSION_1_1;
extern CL_API_ENTRY cl_mem CL_API_CALL
clCreateFromDX9MediaSurfaceINTEL(
cl_context context,
cl_mem_flags flags,
IDirect3DSurface9* resource,
IDirect3DSurface9 *resource,
HANDLE sharedHandle,
UINT plane,
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_1;
cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_1;
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromDX9MediaSurfaceINTEL_fn)(
typedef CL_API_ENTRY cl_mem(CL_API_CALL *clCreateFromDX9MediaSurfaceINTEL_fn)(
cl_context context,
cl_mem_flags flags,
IDirect3DSurface9* resource,
IDirect3DSurface9 *resource,
HANDLE sharedHandle,
UINT plane,
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_1;
cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_1;
extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueAcquireDX9ObjectsINTEL(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem* mem_objects,
const cl_mem *mem_objects,
cl_uint num_events_in_wait_list,
const cl_event* event_wait_list,
cl_event* event) CL_EXT_SUFFIX__VERSION_1_1;
const cl_event *event_wait_list,
cl_event *event) CL_EXT_SUFFIX__VERSION_1_1;
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireDX9ObjectsINTEL_fn)(
typedef CL_API_ENTRY cl_int(CL_API_CALL *clEnqueueAcquireDX9ObjectsINTEL_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem* mem_objects,
const cl_mem *mem_objects,
cl_uint num_events_in_wait_list,
const cl_event* event_wait_list,
cl_event* event) CL_EXT_SUFFIX__VERSION_1_1;
const cl_event *event_wait_list,
cl_event *event) CL_EXT_SUFFIX__VERSION_1_1;
extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueReleaseDX9ObjectsINTEL(
cl_command_queue command_queue,
cl_uint num_objects,
cl_mem* mem_objects,
cl_mem *mem_objects,
cl_uint num_events_in_wait_list,
const cl_event* event_wait_list,
cl_event* event) CL_EXT_SUFFIX__VERSION_1_1;
const cl_event *event_wait_list,
cl_event *event) CL_EXT_SUFFIX__VERSION_1_1;
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseDX9ObjectsINTEL_fn)(
typedef CL_API_ENTRY cl_int(CL_API_CALL *clEnqueueReleaseDX9ObjectsINTEL_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
cl_mem* mem_objects,
cl_mem *mem_objects,
cl_uint num_events_in_wait_list,
const cl_event* event_wait_list,
cl_event* event) CL_EXT_SUFFIX__VERSION_1_1;
const cl_event *event_wait_list,
cl_event *event) CL_EXT_SUFFIX__VERSION_1_1;
#ifdef __cplusplus
}

View File

@@ -34,13 +34,13 @@ extern "C" {
#define CL_EGL_RESOURCE_NOT_ACQUIRED_KHR -1092
/* CLeglImageKHR is an opaque handle to an EGLImage */
typedef void* CLeglImageKHR;
typedef void *CLeglImageKHR;
/* CLeglDisplayKHR is an opaque handle to an EGLDisplay */
typedef void* CLeglDisplayKHR;
typedef void *CLeglDisplayKHR;
/* CLeglSyncKHR is an opaque handle to an EGLSync object */
typedef void* CLeglSyncKHR;
typedef void *CLeglSyncKHR;
/* properties passed to clCreateFromEGLImageKHR */
typedef intptr_t cl_egl_image_properties_khr;
@@ -53,50 +53,50 @@ clCreateFromEGLImageKHR(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;
const cl_egl_image_properties_khr *properties,
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromEGLImageKHR_fn)(
typedef CL_API_ENTRY cl_mem(CL_API_CALL *clCreateFromEGLImageKHR_fn)(
cl_context context,
CLeglDisplayKHR egldisplay,
CLeglImageKHR eglimage,
cl_mem_flags flags,
const cl_egl_image_properties_khr * properties,
cl_int * errcode_ret);
const cl_egl_image_properties_khr *properties,
cl_int *errcode_ret);
extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueAcquireEGLObjectsKHR(cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * 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_1_0;
const cl_event *event_wait_list,
cl_event *event) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireEGLObjectsKHR_fn)(
typedef CL_API_ENTRY cl_int(CL_API_CALL *clEnqueueAcquireEGLObjectsKHR_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * mem_objects,
const cl_mem *mem_objects,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
cl_event * event);
const cl_event *event_wait_list,
cl_event *event);
extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueReleaseEGLObjectsKHR(cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * 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_1_0;
const cl_event *event_wait_list,
cl_event *event) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseEGLObjectsKHR_fn)(
typedef CL_API_ENTRY cl_int(CL_API_CALL *clEnqueueReleaseEGLObjectsKHR_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * mem_objects,
const cl_mem *mem_objects,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
cl_event * event);
const cl_event *event_wait_list,
cl_event *event);
#define cl_khr_egl_event 1
@@ -105,13 +105,13 @@ extern CL_API_ENTRY cl_event CL_API_CALL
clCreateEventFromEGLSyncKHR(cl_context context,
CLeglSyncKHR sync,
CLeglDisplayKHR display,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_event (CL_API_CALL *clCreateEventFromEGLSyncKHR_fn)(
typedef CL_API_ENTRY cl_event(CL_API_CALL *clCreateEventFromEGLSyncKHR_fn)(
cl_context context,
CLeglSyncKHR sync,
CLeglDisplayKHR display,
cl_int * errcode_ret);
cl_int *errcode_ret);
#ifdef __cplusplus
}

View File

@@ -54,9 +54,9 @@ extern "C" {
* before using.
*/
#define cl_APPLE_SetMemObjectDestructor 1
cl_int CL_API_ENTRY clSetMemObjectDestructorAPPLE( cl_mem memobj,
void (* pfn_notify)(cl_mem memobj, void * user_data),
void * user_data) CL_EXT_SUFFIX__VERSION_1_0;
cl_int CL_API_ENTRY clSetMemObjectDestructorAPPLE(cl_mem memobj,
void (* pfn_notify)(cl_mem memobj, void *user_data),
void *user_data) CL_EXT_SUFFIX__VERSION_1_0;
/* Context Logging Functions
@@ -68,22 +68,22 @@ cl_int CL_API_ENTRY clSetMemObjectDestructorAPPLE( cl_mem memobj,
* clLogMessagesToSystemLog forwards on all log messages to the Apple System Logger
*/
#define cl_APPLE_ContextLoggingFunctions 1
extern void CL_API_ENTRY clLogMessagesToSystemLogAPPLE( const char * errstr,
const void * private_info,
size_t cb,
void * user_data) CL_EXT_SUFFIX__VERSION_1_0;
extern void CL_API_ENTRY clLogMessagesToSystemLogAPPLE(const char *errstr,
const void *private_info,
size_t cb,
void *user_data) CL_EXT_SUFFIX__VERSION_1_0;
/* clLogMessagesToStdout sends all log messages to the file descriptor stdout */
extern void CL_API_ENTRY clLogMessagesToStdoutAPPLE( const char * errstr,
const void * private_info,
size_t cb,
void * user_data) CL_EXT_SUFFIX__VERSION_1_0;
extern void CL_API_ENTRY clLogMessagesToStdoutAPPLE(const char *errstr,
const void *private_info,
size_t cb,
void *user_data) CL_EXT_SUFFIX__VERSION_1_0;
/* clLogMessagesToStderr sends all log messages to the file descriptor stderr */
extern void CL_API_ENTRY clLogMessagesToStderrAPPLE( const char * errstr,
const void * private_info,
size_t cb,
void * user_data) CL_EXT_SUFFIX__VERSION_1_0;
extern void CL_API_ENTRY clLogMessagesToStderrAPPLE(const char *errstr,
const void *private_info,
size_t cb,
void *user_data) CL_EXT_SUFFIX__VERSION_1_0;
/************************
@@ -99,13 +99,13 @@ extern void CL_API_ENTRY clLogMessagesToStderrAPPLE( const char * errstr,
extern CL_API_ENTRY cl_int CL_API_CALL
clIcdGetPlatformIDsKHR(cl_uint num_entries,
cl_platform_id * platforms,
cl_uint * num_platforms);
cl_platform_id *platforms,
cl_uint *num_platforms);
typedef CL_API_ENTRY cl_int
(CL_API_CALL *clIcdGetPlatformIDsKHR_fn)(cl_uint num_entries,
cl_platform_id * platforms,
cl_uint * num_platforms);
cl_platform_id *platforms,
cl_uint *num_platforms);
/*******************************
@@ -125,15 +125,15 @@ typedef CL_API_ENTRY cl_int
extern CL_API_ENTRY cl_program CL_API_CALL
clCreateProgramWithILKHR(cl_context context,
const void * il,
const void *il,
size_t length,
cl_int * errcode_ret);
cl_int *errcode_ret);
typedef CL_API_ENTRY cl_program
(CL_API_CALL *clCreateProgramWithILKHR_fn)(cl_context context,
const void * il,
const void *il,
size_t length,
cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
/* Extension: cl_khr_image2d_from_buffer
*
@@ -203,14 +203,14 @@ typedef cl_properties cl_queue_properties_khr;
extern CL_API_ENTRY cl_command_queue CL_API_CALL
clCreateCommandQueueWithPropertiesKHR(cl_context context,
cl_device_id device,
const cl_queue_properties_khr* properties,
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
const cl_queue_properties_khr *properties,
cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_command_queue
(CL_API_CALL *clCreateCommandQueueWithPropertiesKHR_fn)(cl_context context,
cl_device_id device,
const cl_queue_properties_khr* properties,
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
const cl_queue_properties_khr *properties,
cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
/******************************************
@@ -282,17 +282,17 @@ typedef CL_API_ENTRY cl_int
typedef cl_ulong cl_device_partition_property_ext;
extern CL_API_ENTRY cl_int CL_API_CALL
clCreateSubDevicesEXT(cl_device_id in_device,
const cl_device_partition_property_ext * properties,
const cl_device_partition_property_ext *properties,
cl_uint num_entries,
cl_device_id * out_devices,
cl_uint * num_devices) CL_EXT_SUFFIX__VERSION_1_1;
cl_device_id *out_devices,
cl_uint *num_devices) CL_EXT_SUFFIX__VERSION_1_1;
typedef CL_API_ENTRY cl_int
(CL_API_CALL * clCreateSubDevicesEXT_fn)(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_EXT_SUFFIX__VERSION_1_1;
(CL_API_CALL *clCreateSubDevicesEXT_fn)(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_EXT_SUFFIX__VERSION_1_1;
/* cl_device_partition_property_ext */
#define CL_DEVICE_PARTITION_EQUALLY_EXT 0x4050
@@ -340,20 +340,20 @@ typedef cl_bitfield cl_mem_migration_flags_ext;
extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueMigrateMemObjectEXT(cl_command_queue command_queue,
cl_uint num_mem_objects,
const cl_mem * 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);
const cl_event *event_wait_list,
cl_event *event);
typedef CL_API_ENTRY cl_int
(CL_API_CALL *clEnqueueMigrateMemObjectEXT_fn)(cl_command_queue command_queue,
cl_uint num_mem_objects,
const cl_mem * 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);
const cl_event *event_wait_list,
cl_event *event);
/*********************************
@@ -391,8 +391,7 @@ clGetDeviceImageInfoQCOM(cl_device_id device,
void *param_value,
size_t *param_value_size_ret);
typedef struct _cl_mem_ext_host_ptr
{
typedef struct _cl_mem_ext_host_ptr {
/* Type of external memory allocation. */
/* Legal values will be defined in layered extensions. */
cl_uint allocation_type;
@@ -417,8 +416,7 @@ typedef struct _cl_mem_ext_host_ptr
#define CL_MEM_ION_HOST_PTR_QCOM 0x40A8
typedef struct _cl_mem_ion_host_ptr
{
typedef struct _cl_mem_ion_host_ptr {
/* Type of external memory allocation. */
/* Must be CL_MEM_ION_HOST_PTR_QCOM for ION allocations. */
cl_mem_ext_host_ptr ext_host_ptr;
@@ -427,7 +425,7 @@ typedef struct _cl_mem_ion_host_ptr
int ion_filedesc;
/* Host pointer to the ION allocated memory */
void* ion_hostptr;
void *ion_hostptr;
} cl_mem_ion_host_ptr;
@@ -438,14 +436,13 @@ typedef struct _cl_mem_ion_host_ptr
#define CL_MEM_ANDROID_NATIVE_BUFFER_HOST_PTR_QCOM 0x40C6
typedef struct _cl_mem_android_native_buffer_host_ptr
{
typedef struct _cl_mem_android_native_buffer_host_ptr {
/* Type of external memory allocation. */
/* Must be CL_MEM_ANDROID_NATIVE_BUFFER_HOST_PTR_QCOM for Android native buffers. */
cl_mem_ext_host_ptr ext_host_ptr;
/* Virtual pointer to the android native buffer */
void* anb_ptr;
void *anb_ptr;
} cl_mem_android_native_buffer_host_ptr;
@@ -487,18 +484,18 @@ typedef struct _cl_mem_android_native_buffer_host_ptr
extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueAcquireGrallocObjectsIMG(cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * mem_objects,
const cl_mem *mem_objects,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
const cl_event *event_wait_list,
cl_event *event) CL_EXT_SUFFIX__VERSION_1_2;
extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueReleaseGrallocObjectsIMG(cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * mem_objects,
const cl_mem *mem_objects,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
const cl_event *event_wait_list,
cl_event *event) CL_EXT_SUFFIX__VERSION_1_2;
/******************************************
* cl_img_generate_mipmap extension *
@@ -524,7 +521,7 @@ clEnqueueGenerateMipmapIMG(cl_command_queue command_queue,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event) CL_EXT_SUFFIX__VERSION_1_2;
/******************************************
* cl_img_mem_properties extension *
******************************************/
@@ -561,20 +558,20 @@ 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,
const void *input_value,
size_t param_value_size,
void * param_value,
size_t * param_value_size_ret) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED;
void *param_value,
size_t *param_value_size_ret) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED;
typedef CL_API_ENTRY cl_int
(CL_API_CALL * clGetKernelSubGroupInfoKHR_fn)(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_EXT_SUFFIX__VERSION_2_0_DEPRECATED;
(CL_API_CALL *clGetKernelSubGroupInfoKHR_fn)(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_EXT_SUFFIX__VERSION_2_0_DEPRECATED;
/*********************************
@@ -661,8 +658,7 @@ typedef cl_uint cl_version_khr;
#define CL_NAME_VERSION_MAX_NAME_SIZE_KHR 64
typedef struct _cl_name_version_khr
{
typedef struct _cl_name_version_khr {
cl_version_khr version;
char name[CL_NAME_VERSION_MAX_NAME_SIZE_KHR];
} cl_name_version_khr;
@@ -739,12 +735,12 @@ typedef intptr_t cl_import_properties_arm;
* function clCreateBuffer.
*/
extern CL_API_ENTRY cl_mem CL_API_CALL
clImportMemoryARM( cl_context context,
cl_mem_flags flags,
const cl_import_properties_arm *properties,
void *memory,
size_t size,
cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_0;
clImportMemoryARM(cl_context context,
cl_mem_flags flags,
const cl_import_properties_arm *properties,
void *memory,
size_t size,
cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_0;
/******************************************
@@ -783,7 +779,7 @@ typedef cl_bitfield cl_svm_mem_flags_arm;
typedef cl_uint cl_kernel_exec_info_arm;
typedef cl_bitfield cl_device_svm_capabilities_arm;
extern CL_API_ENTRY void * CL_API_CALL
extern CL_API_ENTRY void *CL_API_CALL
clSVMAllocARM(cl_context context,
cl_svm_mem_flags_arm flags,
size_t size,
@@ -791,68 +787,68 @@ clSVMAllocARM(cl_context context,
extern CL_API_ENTRY void CL_API_CALL
clSVMFreeARM(cl_context context,
void * svm_pointer) CL_EXT_SUFFIX__VERSION_1_2;
void *svm_pointer) CL_EXT_SUFFIX__VERSION_1_2;
extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueSVMFreeARM(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,
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_EXT_SUFFIX__VERSION_1_2;
const cl_event *event_wait_list,
cl_event *event) CL_EXT_SUFFIX__VERSION_1_2;
extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueSVMMemcpyARM(cl_command_queue command_queue,
cl_bool blocking_copy,
void * dst_ptr,
const void * src_ptr,
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_EXT_SUFFIX__VERSION_1_2;
const cl_event *event_wait_list,
cl_event *event) CL_EXT_SUFFIX__VERSION_1_2;
extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueSVMMemFillARM(cl_command_queue command_queue,
void * svm_ptr,
const void * pattern,
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_EXT_SUFFIX__VERSION_1_2;
const cl_event *event_wait_list,
cl_event *event) CL_EXT_SUFFIX__VERSION_1_2;
extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueSVMMapARM(cl_command_queue command_queue,
cl_bool blocking_map,
cl_map_flags flags,
void * svm_ptr,
void *svm_ptr,
size_t size,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
const cl_event *event_wait_list,
cl_event *event) CL_EXT_SUFFIX__VERSION_1_2;
extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueSVMUnmapARM(cl_command_queue command_queue,
void * svm_ptr,
void *svm_ptr,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
cl_event * event) CL_EXT_SUFFIX__VERSION_1_2;
const cl_event *event_wait_list,
cl_event *event) CL_EXT_SUFFIX__VERSION_1_2;
extern CL_API_ENTRY cl_int CL_API_CALL
clSetKernelArgSVMPointerARM(cl_kernel kernel,
cl_uint arg_index,
const void * arg_value) CL_EXT_SUFFIX__VERSION_1_2;
const void *arg_value) CL_EXT_SUFFIX__VERSION_1_2;
extern CL_API_ENTRY cl_int CL_API_CALL
clSetKernelExecInfoARM(cl_kernel kernel,
cl_kernel_exec_info_arm param_name,
size_t param_value_size,
const void * param_value) CL_EXT_SUFFIX__VERSION_1_2;
const void *param_value) CL_EXT_SUFFIX__VERSION_1_2;
/********************************
* cl_arm_get_core_id extension *

View File

@@ -75,7 +75,7 @@ extern "C" {
#define cl_intel_motion_estimation 1
#define cl_intel_advanced_motion_estimation 1
typedef struct _cl_accelerator_intel* cl_accelerator_intel;
typedef struct _cl_accelerator_intel *cl_accelerator_intel;
typedef cl_uint cl_accelerator_type_intel;
typedef cl_uint cl_accelerator_info_intel;
@@ -171,43 +171,43 @@ clCreateAcceleratorINTEL(
cl_context context,
cl_accelerator_type_intel accelerator_type,
size_t descriptor_size,
const void* descriptor,
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
const void *descriptor,
cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_accelerator_intel (CL_API_CALL *clCreateAcceleratorINTEL_fn)(
typedef CL_API_ENTRY cl_accelerator_intel(CL_API_CALL *clCreateAcceleratorINTEL_fn)(
cl_context context,
cl_accelerator_type_intel accelerator_type,
size_t descriptor_size,
const void* descriptor,
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
const void *descriptor,
cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
extern CL_API_ENTRY cl_int CL_API_CALL
clGetAcceleratorInfoINTEL(
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_EXT_SUFFIX__VERSION_1_2;
void *param_value,
size_t *param_value_size_ret) CL_EXT_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetAcceleratorInfoINTEL_fn)(
typedef CL_API_ENTRY cl_int(CL_API_CALL *clGetAcceleratorInfoINTEL_fn)(
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_EXT_SUFFIX__VERSION_1_2;
void *param_value,
size_t *param_value_size_ret) CL_EXT_SUFFIX__VERSION_1_2;
extern CL_API_ENTRY cl_int CL_API_CALL
clRetainAcceleratorINTEL(
cl_accelerator_intel accelerator) CL_EXT_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_int (CL_API_CALL *clRetainAcceleratorINTEL_fn)(
typedef CL_API_ENTRY cl_int(CL_API_CALL *clRetainAcceleratorINTEL_fn)(
cl_accelerator_intel accelerator) CL_EXT_SUFFIX__VERSION_1_2;
extern CL_API_ENTRY cl_int CL_API_CALL
clReleaseAcceleratorINTEL(
cl_accelerator_intel accelerator) CL_EXT_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_int (CL_API_CALL *clReleaseAcceleratorINTEL_fn)(
typedef CL_API_ENTRY cl_int(CL_API_CALL *clReleaseAcceleratorINTEL_fn)(
cl_accelerator_intel accelerator) CL_EXT_SUFFIX__VERSION_1_2;
/******************************************
@@ -472,171 +472,171 @@ typedef cl_uint cl_mem_advice_intel;
#define CL_COMMAND_MIGRATEMEM_INTEL 0x4206
#define CL_COMMAND_MEMADVISE_INTEL 0x4207
extern CL_API_ENTRY void* CL_API_CALL
extern CL_API_ENTRY void *CL_API_CALL
clHostMemAllocINTEL(
cl_context context,
const cl_mem_properties_intel* properties,
size_t size,
cl_uint alignment,
cl_int* errcode_ret);
cl_context context,
const cl_mem_properties_intel *properties,
size_t size,
cl_uint alignment,
cl_int *errcode_ret);
typedef CL_API_ENTRY void* (CL_API_CALL *
clHostMemAllocINTEL_fn)(
cl_context context,
const cl_mem_properties_intel* properties,
size_t size,
cl_uint alignment,
cl_int* errcode_ret);
typedef CL_API_ENTRY void *(CL_API_CALL *
clHostMemAllocINTEL_fn)(
cl_context context,
const cl_mem_properties_intel *properties,
size_t size,
cl_uint alignment,
cl_int *errcode_ret);
extern CL_API_ENTRY void* CL_API_CALL
extern CL_API_ENTRY void *CL_API_CALL
clDeviceMemAllocINTEL(
cl_context context,
cl_device_id device,
const cl_mem_properties_intel* properties,
size_t size,
cl_uint alignment,
cl_int* errcode_ret);
cl_context context,
cl_device_id device,
const cl_mem_properties_intel *properties,
size_t size,
cl_uint alignment,
cl_int *errcode_ret);
typedef CL_API_ENTRY void* (CL_API_CALL *
clDeviceMemAllocINTEL_fn)(
cl_context context,
cl_device_id device,
const cl_mem_properties_intel* properties,
size_t size,
cl_uint alignment,
cl_int* errcode_ret);
typedef CL_API_ENTRY void *(CL_API_CALL *
clDeviceMemAllocINTEL_fn)(
cl_context context,
cl_device_id device,
const cl_mem_properties_intel *properties,
size_t size,
cl_uint alignment,
cl_int *errcode_ret);
extern CL_API_ENTRY void* CL_API_CALL
extern CL_API_ENTRY void *CL_API_CALL
clSharedMemAllocINTEL(
cl_context context,
cl_device_id device,
const cl_mem_properties_intel* properties,
size_t size,
cl_uint alignment,
cl_int* errcode_ret);
cl_context context,
cl_device_id device,
const cl_mem_properties_intel *properties,
size_t size,
cl_uint alignment,
cl_int *errcode_ret);
typedef CL_API_ENTRY void* (CL_API_CALL *
clSharedMemAllocINTEL_fn)(
cl_context context,
cl_device_id device,
const cl_mem_properties_intel* properties,
size_t size,
cl_uint alignment,
cl_int* errcode_ret);
typedef CL_API_ENTRY void *(CL_API_CALL *
clSharedMemAllocINTEL_fn)(
cl_context context,
cl_device_id device,
const cl_mem_properties_intel *properties,
size_t size,
cl_uint alignment,
cl_int *errcode_ret);
extern CL_API_ENTRY cl_int CL_API_CALL
clMemFreeINTEL(
cl_context context,
void* ptr);
cl_context context,
void *ptr);
typedef CL_API_ENTRY cl_int (CL_API_CALL *
clMemFreeINTEL_fn)(
cl_context context,
void* ptr);
typedef CL_API_ENTRY cl_int(CL_API_CALL *
clMemFreeINTEL_fn)(
cl_context context,
void *ptr);
extern CL_API_ENTRY cl_int CL_API_CALL
clMemBlockingFreeINTEL(
cl_context context,
void* ptr);
cl_context context,
void *ptr);
typedef CL_API_ENTRY cl_int (CL_API_CALL *
clMemBlockingFreeINTEL_fn)(
cl_context context,
void* ptr);
typedef CL_API_ENTRY cl_int(CL_API_CALL *
clMemBlockingFreeINTEL_fn)(
cl_context context,
void *ptr);
extern CL_API_ENTRY cl_int CL_API_CALL
clGetMemAllocInfoINTEL(
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);
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);
typedef CL_API_ENTRY cl_int (CL_API_CALL *
clGetMemAllocInfoINTEL_fn)(
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);
typedef CL_API_ENTRY cl_int(CL_API_CALL *
clGetMemAllocInfoINTEL_fn)(
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);
extern CL_API_ENTRY cl_int CL_API_CALL
clSetKernelArgMemPointerINTEL(
cl_kernel kernel,
cl_uint arg_index,
const void* arg_value);
cl_kernel kernel,
cl_uint arg_index,
const void *arg_value);
typedef CL_API_ENTRY cl_int (CL_API_CALL *
clSetKernelArgMemPointerINTEL_fn)(
cl_kernel kernel,
cl_uint arg_index,
const void* arg_value);
typedef CL_API_ENTRY cl_int(CL_API_CALL *
clSetKernelArgMemPointerINTEL_fn)(
cl_kernel kernel,
cl_uint arg_index,
const void *arg_value);
extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueMemsetINTEL( /* Deprecated */
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_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);
typedef CL_API_ENTRY cl_int (CL_API_CALL *
clEnqueueMemsetINTEL_fn)( /* Deprecated */
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);
typedef CL_API_ENTRY cl_int(CL_API_CALL *
clEnqueueMemsetINTEL_fn)( /* Deprecated */
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);
extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueMemFillINTEL(
cl_command_queue command_queue,
void* dst_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_command_queue command_queue,
void *dst_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_API_ENTRY cl_int (CL_API_CALL *
clEnqueueMemFillINTEL_fn)(
cl_command_queue command_queue,
void* dst_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_API_ENTRY cl_int(CL_API_CALL *
clEnqueueMemFillINTEL_fn)(
cl_command_queue command_queue,
void *dst_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);
extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueMemcpyINTEL(
cl_command_queue command_queue,
cl_bool blocking,
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_command_queue command_queue,
cl_bool blocking,
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_API_ENTRY cl_int (CL_API_CALL *
clEnqueueMemcpyINTEL_fn)(
cl_command_queue command_queue,
cl_bool blocking,
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_API_ENTRY cl_int(CL_API_CALL *
clEnqueueMemcpyINTEL_fn)(
cl_command_queue command_queue,
cl_bool blocking,
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);
#ifdef CL_VERSION_1_2
@@ -645,45 +645,45 @@ clEnqueueMemcpyINTEL_fn)(
extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueMigrateMemINTEL(
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_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);
typedef CL_API_ENTRY cl_int (CL_API_CALL *
clEnqueueMigrateMemINTEL_fn)(
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);
typedef CL_API_ENTRY cl_int(CL_API_CALL *
clEnqueueMigrateMemINTEL_fn)(
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);
#endif
extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueMemAdviseINTEL(
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_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);
typedef CL_API_ENTRY cl_int (CL_API_CALL *
clEnqueueMemAdviseINTEL_fn)(
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);
typedef CL_API_ENTRY cl_int(CL_API_CALL *
clEnqueueMemAdviseINTEL_fn)(
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_intel_create_buffer_with_properties extension *
@@ -694,20 +694,20 @@ clEnqueueMemAdviseINTEL_fn)(
extern CL_API_ENTRY cl_mem CL_API_CALL
clCreateBufferWithPropertiesINTEL(
cl_context context,
const cl_mem_properties_intel* properties,
const cl_mem_properties_intel *properties,
cl_mem_flags flags,
size_t size,
void * host_ptr,
cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_0;
void *host_ptr,
cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_mem (CL_API_CALL *
clCreateBufferWithPropertiesINTEL_fn)(
cl_context context,
const cl_mem_properties_intel* properties,
cl_mem_flags flags,
size_t size,
void * host_ptr,
cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_mem(CL_API_CALL *
clCreateBufferWithPropertiesINTEL_fn)(
cl_context context,
const cl_mem_properties_intel *properties,
cl_mem_flags flags,
size_t size,
void *host_ptr,
cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_0;
/******************************************
* cl_intel_mem_channel_property extension *

View File

@@ -52,7 +52,7 @@ extern CL_API_ENTRY cl_mem CL_API_CALL
clCreateFromGLBuffer(cl_context context,
cl_mem_flags flags,
cl_GLuint bufobj,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
#ifdef CL_VERSION_1_2
@@ -62,7 +62,7 @@ clCreateFromGLTexture(cl_context context,
cl_GLenum target,
cl_GLint miplevel,
cl_GLuint texture,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2;
#endif
@@ -70,35 +70,35 @@ extern CL_API_ENTRY cl_mem CL_API_CALL
clCreateFromGLRenderbuffer(cl_context context,
cl_mem_flags flags,
cl_GLuint renderbuffer,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0;
extern CL_API_ENTRY cl_int CL_API_CALL
clGetGLObjectInfo(cl_mem memobj,
cl_gl_object_type * gl_object_type,
cl_GLuint * gl_object_name) CL_API_SUFFIX__VERSION_1_0;
cl_gl_object_type *gl_object_type,
cl_GLuint *gl_object_name) CL_API_SUFFIX__VERSION_1_0;
extern CL_API_ENTRY cl_int CL_API_CALL
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;
void *param_value,
size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueAcquireGLObjects(cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * 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_1_0;
const cl_event *event_wait_list,
cl_event *event) CL_API_SUFFIX__VERSION_1_0;
extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueReleaseGLObjects(cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * 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_1_0;
const cl_event *event_wait_list,
cl_event *event) CL_API_SUFFIX__VERSION_1_0;
/* Deprecated OpenCL 1.1 APIs */
@@ -108,7 +108,7 @@ clCreateFromGLTexture2D(cl_context context,
cl_GLenum target,
cl_GLint miplevel,
cl_GLuint texture,
cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
clCreateFromGLTexture3D(cl_context context,
@@ -116,7 +116,7 @@ clCreateFromGLTexture3D(cl_context context,
cl_GLenum target,
cl_GLint miplevel,
cl_GLuint texture,
cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
/* cl_khr_gl_sharing extension */
@@ -139,18 +139,18 @@ typedef cl_uint cl_gl_context_info;
#define CL_CGL_SHAREGROUP_KHR 0x200C
extern CL_API_ENTRY cl_int CL_API_CALL
clGetGLContextInfoKHR(const cl_context_properties * properties,
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) CL_API_SUFFIX__VERSION_1_0;
void *param_value,
size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetGLContextInfoKHR_fn)(
const cl_context_properties * properties,
typedef CL_API_ENTRY cl_int(CL_API_CALL *clGetGLContextInfoKHR_fn)(
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);
void *param_value,
size_t *param_value_size_ret);
#ifdef __cplusplus
}

View File

@@ -23,7 +23,7 @@ extern "C" {
#include <CL/cl_gl.h>
/*
/*
* cl_khr_gl_event extension
*/
#define CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR 0x200D
@@ -31,7 +31,7 @@ extern "C" {
extern CL_API_ENTRY cl_event CL_API_CALL
clCreateEventFromGLsyncKHR(cl_context context,
cl_GLsync sync,
cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1;
cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_1;
#ifdef __cplusplus
}

View File

@@ -41,12 +41,11 @@ extern "C" {
/**
* Rounding mode used when converting to cl_half.
*/
typedef enum
{
CL_HALF_RTE, // round to nearest even
CL_HALF_RTZ, // round towards zero
CL_HALF_RTP, // round towards positive infinity
CL_HALF_RTN, // round towards negative infinity
typedef enum {
CL_HALF_RTE, // round to nearest even
CL_HALF_RTZ, // round towards zero
CL_HALF_RTP, // round towards positive infinity
CL_HALF_RTN, // round towards negative infinity
} cl_half_rounding_mode;
@@ -59,372 +58,317 @@ typedef enum
* Utility to deal with values that overflow when converting to half precision.
*/
static inline cl_half cl_half_handle_overflow(cl_half_rounding_mode rounding_mode,
uint16_t sign)
{
if (rounding_mode == CL_HALF_RTZ)
{
// Round overflow towards zero -> largest finite number (preserving sign)
return (sign << 15) | CL_HALF_MAX_FINITE_MAG;
}
else if (rounding_mode == CL_HALF_RTP && sign)
{
// Round negative overflow towards positive infinity -> most negative finite number
return (1 << 15) | CL_HALF_MAX_FINITE_MAG;
}
else if (rounding_mode == CL_HALF_RTN && !sign)
{
// Round positive overflow towards negative infinity -> largest finite number
return CL_HALF_MAX_FINITE_MAG;
}
uint16_t sign) {
if (rounding_mode == CL_HALF_RTZ) {
// Round overflow towards zero -> largest finite number (preserving sign)
return (sign << 15) | CL_HALF_MAX_FINITE_MAG;
} else if (rounding_mode == CL_HALF_RTP && sign) {
// Round negative overflow towards positive infinity -> most negative finite number
return (1 << 15) | CL_HALF_MAX_FINITE_MAG;
} else if (rounding_mode == CL_HALF_RTN && !sign) {
// Round positive overflow towards negative infinity -> largest finite number
return CL_HALF_MAX_FINITE_MAG;
}
// Overflow to infinity
return (sign << 15) | CL_HALF_EXP_MASK;
// Overflow to infinity
return (sign << 15) | CL_HALF_EXP_MASK;
}
/*
* Utility to deal with values that underflow when converting to half precision.
*/
static inline cl_half cl_half_handle_underflow(cl_half_rounding_mode rounding_mode,
uint16_t sign)
{
if (rounding_mode == CL_HALF_RTP && !sign)
{
// Round underflow towards positive infinity -> smallest positive value
return (sign << 15) | 1;
}
else if (rounding_mode == CL_HALF_RTN && sign)
{
// Round underflow towards negative infinity -> largest negative value
return (sign << 15) | 1;
}
uint16_t sign) {
if (rounding_mode == CL_HALF_RTP && !sign) {
// Round underflow towards positive infinity -> smallest positive value
return (sign << 15) | 1;
} else if (rounding_mode == CL_HALF_RTN && sign) {
// Round underflow towards negative infinity -> largest negative value
return (sign << 15) | 1;
}
// Flush to zero
return (sign << 15);
// Flush to zero
return (sign << 15);
}
/**
* Convert a cl_float to a cl_half.
*/
static inline cl_half cl_half_from_float(cl_float f, cl_half_rounding_mode rounding_mode)
{
// Type-punning to get direct access to underlying bits
union
{
cl_float f;
uint32_t i;
} f32;
f32.f = f;
static inline cl_half cl_half_from_float(cl_float f, cl_half_rounding_mode rounding_mode) {
// Type-punning to get direct access to underlying bits
union {
cl_float f;
uint32_t i;
} f32;
f32.f = f;
// Extract sign bit
uint16_t sign = f32.i >> 31;
// Extract sign bit
uint16_t sign = f32.i >> 31;
// Extract FP32 exponent and mantissa
uint32_t f_exp = (f32.i >> (CL_FLT_MANT_DIG - 1)) & 0xFF;
uint32_t f_mant = f32.i & ((1 << (CL_FLT_MANT_DIG - 1)) - 1);
// Extract FP32 exponent and mantissa
uint32_t f_exp = (f32.i >> (CL_FLT_MANT_DIG - 1)) & 0xFF;
uint32_t f_mant = f32.i & ((1 << (CL_FLT_MANT_DIG - 1)) - 1);
// Remove FP32 exponent bias
int32_t exp = f_exp - CL_FLT_MAX_EXP + 1;
// Remove FP32 exponent bias
int32_t exp = f_exp - CL_FLT_MAX_EXP + 1;
// Add FP16 exponent bias
uint16_t h_exp = (uint16_t)(exp + CL_HALF_MAX_EXP - 1);
// Add FP16 exponent bias
uint16_t h_exp = (uint16_t)(exp + CL_HALF_MAX_EXP - 1);
// Position of the bit that will become the FP16 mantissa LSB
uint32_t lsb_pos = CL_FLT_MANT_DIG - CL_HALF_MANT_DIG;
// Position of the bit that will become the FP16 mantissa LSB
uint32_t lsb_pos = CL_FLT_MANT_DIG - CL_HALF_MANT_DIG;
// Check for NaN / infinity
if (f_exp == 0xFF)
{
if (f_mant)
{
// NaN -> propagate mantissa and silence it
uint16_t h_mant = (uint16_t)(f_mant >> lsb_pos);
h_mant |= 0x200;
return (sign << 15) | CL_HALF_EXP_MASK | h_mant;
// Check for NaN / infinity
if (f_exp == 0xFF) {
if (f_mant) {
// NaN -> propagate mantissa and silence it
uint16_t h_mant = (uint16_t)(f_mant >> lsb_pos);
h_mant |= 0x200;
return (sign << 15) | CL_HALF_EXP_MASK | h_mant;
} else {
// Infinity -> zero mantissa
return (sign << 15) | CL_HALF_EXP_MASK;
}
}
else
{
// Infinity -> zero mantissa
return (sign << 15) | CL_HALF_EXP_MASK;
// Check for zero
if (!f_exp && !f_mant) {
return (sign << 15);
}
}
// Check for zero
if (!f_exp && !f_mant)
{
return (sign << 15);
}
// Check for overflow
if (exp >= CL_HALF_MAX_EXP) {
return cl_half_handle_overflow(rounding_mode, sign);
}
// Check for overflow
if (exp >= CL_HALF_MAX_EXP)
{
return cl_half_handle_overflow(rounding_mode, sign);
}
// Check for underflow
if (exp < (CL_HALF_MIN_EXP - CL_HALF_MANT_DIG - 1)) {
return cl_half_handle_underflow(rounding_mode, sign);
}
// Check for underflow
if (exp < (CL_HALF_MIN_EXP - CL_HALF_MANT_DIG - 1))
{
return cl_half_handle_underflow(rounding_mode, sign);
}
// Check for value that will become denormal
if (exp < -14) {
// Denormal -> include the implicit 1 from the FP32 mantissa
h_exp = 0;
f_mant |= 1 << (CL_FLT_MANT_DIG - 1);
// Check for value that will become denormal
if (exp < -14)
{
// Denormal -> include the implicit 1 from the FP32 mantissa
h_exp = 0;
f_mant |= 1 << (CL_FLT_MANT_DIG - 1);
// Mantissa shift amount depends on exponent
lsb_pos = -exp + (CL_FLT_MANT_DIG - 25);
}
// Mantissa shift amount depends on exponent
lsb_pos = -exp + (CL_FLT_MANT_DIG - 25);
}
// Generate FP16 mantissa by shifting FP32 mantissa
uint16_t h_mant = (uint16_t)(f_mant >> lsb_pos);
// Generate FP16 mantissa by shifting FP32 mantissa
uint16_t h_mant = (uint16_t)(f_mant >> lsb_pos);
// Check whether we need to round
uint32_t halfway = 1 << (lsb_pos - 1);
uint32_t mask = (halfway << 1) - 1;
switch (rounding_mode) {
case CL_HALF_RTE:
if ((f_mant & mask) > halfway) {
// More than halfway -> round up
h_mant += 1;
} else if ((f_mant & mask) == halfway) {
// Exactly halfway -> round to nearest even
if (h_mant & 0x1)
h_mant += 1;
}
break;
case CL_HALF_RTZ:
// Mantissa has already been truncated -> do nothing
break;
case CL_HALF_RTP:
if ((f_mant & mask) && !sign) {
// Round positive numbers up
h_mant += 1;
}
break;
case CL_HALF_RTN:
if ((f_mant & mask) && sign) {
// Round negative numbers down
h_mant += 1;
}
break;
}
// Check whether we need to round
uint32_t halfway = 1 << (lsb_pos - 1);
uint32_t mask = (halfway << 1) - 1;
switch (rounding_mode)
{
case CL_HALF_RTE:
if ((f_mant & mask) > halfway)
{
// More than halfway -> round up
h_mant += 1;
}
else if ((f_mant & mask) == halfway)
{
// Exactly halfway -> round to nearest even
if (h_mant & 0x1)
h_mant += 1;
}
break;
case CL_HALF_RTZ:
// Mantissa has already been truncated -> do nothing
break;
case CL_HALF_RTP:
if ((f_mant & mask) && !sign)
{
// Round positive numbers up
h_mant += 1;
}
break;
case CL_HALF_RTN:
if ((f_mant & mask) && sign)
{
// Round negative numbers down
h_mant += 1;
}
break;
}
// Check for mantissa overflow
if (h_mant & 0x400) {
h_exp += 1;
h_mant = 0;
}
// Check for mantissa overflow
if (h_mant & 0x400)
{
h_exp += 1;
h_mant = 0;
}
return (sign << 15) | (h_exp << 10) | h_mant;
return (sign << 15) | (h_exp << 10) | h_mant;
}
/**
* Convert a cl_double to a cl_half.
*/
static inline cl_half cl_half_from_double(cl_double d, cl_half_rounding_mode rounding_mode)
{
// Type-punning to get direct access to underlying bits
union
{
cl_double d;
uint64_t i;
} f64;
f64.d = d;
static inline cl_half cl_half_from_double(cl_double d, cl_half_rounding_mode rounding_mode) {
// Type-punning to get direct access to underlying bits
union {
cl_double d;
uint64_t i;
} f64;
f64.d = d;
// Extract sign bit
uint16_t sign = f64.i >> 63;
// Extract sign bit
uint16_t sign = f64.i >> 63;
// Extract FP64 exponent and mantissa
uint64_t d_exp = (f64.i >> (CL_DBL_MANT_DIG - 1)) & 0x7FF;
uint64_t d_mant = f64.i & (((uint64_t)1 << (CL_DBL_MANT_DIG - 1)) - 1);
// Extract FP64 exponent and mantissa
uint64_t d_exp = (f64.i >> (CL_DBL_MANT_DIG - 1)) & 0x7FF;
uint64_t d_mant = f64.i & (((uint64_t)1 << (CL_DBL_MANT_DIG - 1)) - 1);
// Remove FP64 exponent bias
int64_t exp = d_exp - CL_DBL_MAX_EXP + 1;
// Remove FP64 exponent bias
int64_t exp = d_exp - CL_DBL_MAX_EXP + 1;
// Add FP16 exponent bias
uint16_t h_exp = (uint16_t)(exp + CL_HALF_MAX_EXP - 1);
// Add FP16 exponent bias
uint16_t h_exp = (uint16_t)(exp + CL_HALF_MAX_EXP - 1);
// Position of the bit that will become the FP16 mantissa LSB
uint32_t lsb_pos = CL_DBL_MANT_DIG - CL_HALF_MANT_DIG;
// Position of the bit that will become the FP16 mantissa LSB
uint32_t lsb_pos = CL_DBL_MANT_DIG - CL_HALF_MANT_DIG;
// Check for NaN / infinity
if (d_exp == 0x7FF)
{
if (d_mant)
{
// NaN -> propagate mantissa and silence it
uint16_t h_mant = (uint16_t)(d_mant >> lsb_pos);
h_mant |= 0x200;
return (sign << 15) | CL_HALF_EXP_MASK | h_mant;
// Check for NaN / infinity
if (d_exp == 0x7FF) {
if (d_mant) {
// NaN -> propagate mantissa and silence it
uint16_t h_mant = (uint16_t)(d_mant >> lsb_pos);
h_mant |= 0x200;
return (sign << 15) | CL_HALF_EXP_MASK | h_mant;
} else {
// Infinity -> zero mantissa
return (sign << 15) | CL_HALF_EXP_MASK;
}
}
else
{
// Infinity -> zero mantissa
return (sign << 15) | CL_HALF_EXP_MASK;
// Check for zero
if (!d_exp && !d_mant) {
return (sign << 15);
}
}
// Check for zero
if (!d_exp && !d_mant)
{
return (sign << 15);
}
// Check for overflow
if (exp >= CL_HALF_MAX_EXP) {
return cl_half_handle_overflow(rounding_mode, sign);
}
// Check for overflow
if (exp >= CL_HALF_MAX_EXP)
{
return cl_half_handle_overflow(rounding_mode, sign);
}
// Check for underflow
if (exp < (CL_HALF_MIN_EXP - CL_HALF_MANT_DIG - 1)) {
return cl_half_handle_underflow(rounding_mode, sign);
}
// Check for underflow
if (exp < (CL_HALF_MIN_EXP - CL_HALF_MANT_DIG - 1))
{
return cl_half_handle_underflow(rounding_mode, sign);
}
// Check for value that will become denormal
if (exp < -14) {
// Include the implicit 1 from the FP64 mantissa
h_exp = 0;
d_mant |= (uint64_t)1 << (CL_DBL_MANT_DIG - 1);
// Check for value that will become denormal
if (exp < -14)
{
// Include the implicit 1 from the FP64 mantissa
h_exp = 0;
d_mant |= (uint64_t)1 << (CL_DBL_MANT_DIG - 1);
// Mantissa shift amount depends on exponent
lsb_pos = (uint32_t)(-exp + (CL_DBL_MANT_DIG - 25));
}
// Mantissa shift amount depends on exponent
lsb_pos = (uint32_t)(-exp + (CL_DBL_MANT_DIG - 25));
}
// Generate FP16 mantissa by shifting FP64 mantissa
uint16_t h_mant = (uint16_t)(d_mant >> lsb_pos);
// Generate FP16 mantissa by shifting FP64 mantissa
uint16_t h_mant = (uint16_t)(d_mant >> lsb_pos);
// Check whether we need to round
uint64_t halfway = (uint64_t)1 << (lsb_pos - 1);
uint64_t mask = (halfway << 1) - 1;
switch (rounding_mode) {
case CL_HALF_RTE:
if ((d_mant & mask) > halfway) {
// More than halfway -> round up
h_mant += 1;
} else if ((d_mant & mask) == halfway) {
// Exactly halfway -> round to nearest even
if (h_mant & 0x1)
h_mant += 1;
}
break;
case CL_HALF_RTZ:
// Mantissa has already been truncated -> do nothing
break;
case CL_HALF_RTP:
if ((d_mant & mask) && !sign) {
// Round positive numbers up
h_mant += 1;
}
break;
case CL_HALF_RTN:
if ((d_mant & mask) && sign) {
// Round negative numbers down
h_mant += 1;
}
break;
}
// Check whether we need to round
uint64_t halfway = (uint64_t)1 << (lsb_pos - 1);
uint64_t mask = (halfway << 1) - 1;
switch (rounding_mode)
{
case CL_HALF_RTE:
if ((d_mant & mask) > halfway)
{
// More than halfway -> round up
h_mant += 1;
}
else if ((d_mant & mask) == halfway)
{
// Exactly halfway -> round to nearest even
if (h_mant & 0x1)
h_mant += 1;
}
break;
case CL_HALF_RTZ:
// Mantissa has already been truncated -> do nothing
break;
case CL_HALF_RTP:
if ((d_mant & mask) && !sign)
{
// Round positive numbers up
h_mant += 1;
}
break;
case CL_HALF_RTN:
if ((d_mant & mask) && sign)
{
// Round negative numbers down
h_mant += 1;
}
break;
}
// Check for mantissa overflow
if (h_mant & 0x400) {
h_exp += 1;
h_mant = 0;
}
// Check for mantissa overflow
if (h_mant & 0x400)
{
h_exp += 1;
h_mant = 0;
}
return (sign << 15) | (h_exp << 10) | h_mant;
return (sign << 15) | (h_exp << 10) | h_mant;
}
/**
* Convert a cl_half to a cl_float.
*/
static inline cl_float cl_half_to_float(cl_half h)
{
// Type-punning to get direct access to underlying bits
union
{
cl_float f;
uint32_t i;
} f32;
static inline cl_float cl_half_to_float(cl_half h) {
// Type-punning to get direct access to underlying bits
union {
cl_float f;
uint32_t i;
} f32;
// Extract sign bit
uint16_t sign = h >> 15;
// Extract sign bit
uint16_t sign = h >> 15;
// Extract FP16 exponent and mantissa
uint16_t h_exp = (h >> (CL_HALF_MANT_DIG - 1)) & 0x1F;
uint16_t h_mant = h & 0x3FF;
// Extract FP16 exponent and mantissa
uint16_t h_exp = (h >> (CL_HALF_MANT_DIG - 1)) & 0x1F;
uint16_t h_mant = h & 0x3FF;
// Remove FP16 exponent bias
int32_t exp = h_exp - CL_HALF_MAX_EXP + 1;
// Remove FP16 exponent bias
int32_t exp = h_exp - CL_HALF_MAX_EXP + 1;
// Add FP32 exponent bias
uint32_t f_exp = exp + CL_FLT_MAX_EXP - 1;
// Add FP32 exponent bias
uint32_t f_exp = exp + CL_FLT_MAX_EXP - 1;
// Check for NaN / infinity
if (h_exp == 0x1F)
{
if (h_mant)
{
// NaN -> propagate mantissa and silence it
uint32_t f_mant = h_mant << (CL_FLT_MANT_DIG - CL_HALF_MANT_DIG);
f_mant |= 0x400000;
f32.i = (sign << 31) | 0x7F800000 | f_mant;
return f32.f;
// Check for NaN / infinity
if (h_exp == 0x1F) {
if (h_mant) {
// NaN -> propagate mantissa and silence it
uint32_t f_mant = h_mant << (CL_FLT_MANT_DIG - CL_HALF_MANT_DIG);
f_mant |= 0x400000;
f32.i = (sign << 31) | 0x7F800000 | f_mant;
return f32.f;
} else {
// Infinity -> zero mantissa
f32.i = (sign << 31) | 0x7F800000;
return f32.f;
}
}
else
{
// Infinity -> zero mantissa
f32.i = (sign << 31) | 0x7F800000;
return f32.f;
}
}
// Check for zero / denormal
if (h_exp == 0)
{
if (h_mant == 0)
{
// Zero -> zero exponent
f_exp = 0;
// Check for zero / denormal
if (h_exp == 0) {
if (h_mant == 0) {
// Zero -> zero exponent
f_exp = 0;
} else {
// Denormal -> normalize it
// - Shift mantissa to make most-significant 1 implicit
// - Adjust exponent accordingly
uint32_t shift = 0;
while ((h_mant & 0x400) == 0) {
h_mant <<= 1;
shift++;
}
h_mant &= 0x3FF;
f_exp -= shift - 1;
}
}
else
{
// Denormal -> normalize it
// - Shift mantissa to make most-significant 1 implicit
// - Adjust exponent accordingly
uint32_t shift = 0;
while ((h_mant & 0x400) == 0)
{
h_mant <<= 1;
shift++;
}
h_mant &= 0x3FF;
f_exp -= shift - 1;
}
}
f32.i = (sign << 31) | (f_exp << 23) | (h_mant << 13);
return f32.f;
f32.i = (sign << 31) | (f_exp << 23) | (h_mant << 13);
return f32.f;
}

View File

@@ -163,10 +163,10 @@ typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateImageWithProperties)(
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 CL_API_ENTRY cl_int(CL_API_CALL* cl_api_clSetContextDestructorCallback)(
typedef CL_API_ENTRY 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;
void(CL_CALLBACK *pfn_notify)(cl_context context, void *user_data),
void *user_data) CL_API_SUFFIX__VERSION_3_0;
#else
@@ -428,10 +428,10 @@ typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetEventInfo)(
void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clRetainEvent)(cl_event event)
CL_API_SUFFIX__VERSION_1_0;
CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clReleaseEvent)(cl_event event)
CL_API_SUFFIX__VERSION_1_0;
CL_API_SUFFIX__VERSION_1_0;
// Profiling APIs
typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clGetEventProfilingInfo)(
@@ -637,8 +637,8 @@ typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueBarrierWithWaitList)(
typedef CL_API_ENTRY void *(
CL_API_CALL *cl_api_clGetExtensionFunctionAddressForPlatform)(
cl_platform_id platform,
const char *function_name)CL_API_SUFFIX__VERSION_1_2;
cl_platform_id platform,
const char *function_name)CL_API_SUFFIX__VERSION_1_2;
#else
@@ -704,7 +704,7 @@ typedef void *cl_api_clEnqueueSVMUnmap;
typedef CL_API_ENTRY 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_EXT_SUFFIX__VERSION_1_0_DEPRECATED;
CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED;
typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateImage2D)(
cl_context context, cl_mem_flags flags, const cl_image_format *image_format,
@@ -718,7 +718,7 @@ typedef CL_API_ENTRY cl_mem(CL_API_CALL *cl_api_clCreateImage3D)(
cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clUnloadCompiler)(void)
CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
typedef CL_API_ENTRY cl_int(CL_API_CALL *cl_api_clEnqueueMarker)(
cl_command_queue command_queue,
@@ -1102,188 +1102,188 @@ typedef void *cl_api_clGetHostTimer;
/* Vendor dispatch table struture */
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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* cl_ext_device_fission */
cl_api_clCreateSubDevicesEXT clCreateSubDevicesEXT;
cl_api_clRetainDeviceEXT clRetainDeviceEXT;
cl_api_clReleaseDeviceEXT clReleaseDeviceEXT;
/* cl_ext_device_fission */
cl_api_clCreateSubDevicesEXT clCreateSubDevicesEXT;
cl_api_clRetainDeviceEXT clRetainDeviceEXT;
cl_api_clReleaseDeviceEXT clReleaseDeviceEXT;
/* cl_khr_gl_event */
cl_api_clCreateEventFromGLsyncKHR clCreateEventFromGLsyncKHR;
/* cl_khr_gl_event */
cl_api_clCreateEventFromGLsyncKHR 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
clGetExtensionFunctionAddressForPlatform;
cl_api_clCreateFromGLTexture clCreateFromGLTexture;
/* 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
clGetExtensionFunctionAddressForPlatform;
cl_api_clCreateFromGLTexture 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;
/* 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;
/* cl_khr_dx9_media_sharing */
cl_api_clGetDeviceIDsFromDX9MediaAdapterKHR
clGetDeviceIDsFromDX9MediaAdapterKHR;
cl_api_clEnqueueAcquireDX9MediaSurfacesKHR
clEnqueueAcquireDX9MediaSurfacesKHR;
cl_api_clEnqueueReleaseDX9MediaSurfacesKHR
clEnqueueReleaseDX9MediaSurfacesKHR;
/* cl_khr_dx9_media_sharing */
cl_api_clGetDeviceIDsFromDX9MediaAdapterKHR
clGetDeviceIDsFromDX9MediaAdapterKHR;
cl_api_clEnqueueAcquireDX9MediaSurfacesKHR
clEnqueueAcquireDX9MediaSurfacesKHR;
cl_api_clEnqueueReleaseDX9MediaSurfacesKHR
clEnqueueReleaseDX9MediaSurfacesKHR;
/* cl_khr_egl_image */
cl_api_clCreateFromEGLImageKHR clCreateFromEGLImageKHR;
cl_api_clEnqueueAcquireEGLObjectsKHR clEnqueueAcquireEGLObjectsKHR;
cl_api_clEnqueueReleaseEGLObjectsKHR clEnqueueReleaseEGLObjectsKHR;
/* cl_khr_egl_image */
cl_api_clCreateFromEGLImageKHR clCreateFromEGLImageKHR;
cl_api_clEnqueueAcquireEGLObjectsKHR clEnqueueAcquireEGLObjectsKHR;
cl_api_clEnqueueReleaseEGLObjectsKHR clEnqueueReleaseEGLObjectsKHR;
/* cl_khr_egl_event */
cl_api_clCreateEventFromEGLSyncKHR clCreateEventFromEGLSyncKHR;
/* cl_khr_egl_event */
cl_api_clCreateEventFromEGLSyncKHR 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;
/* 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;
/* cl_khr_sub_groups */
cl_api_clGetKernelSubGroupInfoKHR clGetKernelSubGroupInfoKHR;
/* cl_khr_sub_groups */
cl_api_clGetKernelSubGroupInfoKHR 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;
/* 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;
/* OpenCL 2.2 */
cl_api_clSetProgramReleaseCallback clSetProgramReleaseCallback;
cl_api_clSetProgramSpecializationConstant clSetProgramSpecializationConstant;
/* OpenCL 2.2 */
cl_api_clSetProgramReleaseCallback clSetProgramReleaseCallback;
cl_api_clSetProgramSpecializationConstant clSetProgramSpecializationConstant;
/* OpenCL 3.0 */
cl_api_clCreateBufferWithProperties clCreateBufferWithProperties;
cl_api_clCreateImageWithProperties clCreateImageWithProperties;
cl_api_clSetContextDestructorCallback clSetContextDestructorCallback;
/* OpenCL 3.0 */
cl_api_clCreateBufferWithProperties clCreateBufferWithProperties;
cl_api_clCreateImageWithProperties clCreateImageWithProperties;
cl_api_clSetContextDestructorCallback clSetContextDestructorCallback;
} cl_icd_dispatch;

File diff suppressed because it is too large Load Diff

View File

@@ -88,69 +88,69 @@ extern CL_API_ENTRY cl_int CL_API_CALL
clGetDeviceIDsFromVA_APIMediaAdapterINTEL(
cl_platform_id platform,
cl_va_api_device_source_intel media_adapter_type,
void* media_adapter,
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_EXT_SUFFIX__VERSION_1_2;
cl_device_id *devices,
cl_uint *num_devices) CL_EXT_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_int (CL_API_CALL * clGetDeviceIDsFromVA_APIMediaAdapterINTEL_fn)(
typedef CL_API_ENTRY cl_int(CL_API_CALL *clGetDeviceIDsFromVA_APIMediaAdapterINTEL_fn)(
cl_platform_id platform,
cl_va_api_device_source_intel media_adapter_type,
void* media_adapter,
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_EXT_SUFFIX__VERSION_1_2;
cl_device_id *devices,
cl_uint *num_devices) CL_EXT_SUFFIX__VERSION_1_2;
extern CL_API_ENTRY cl_mem CL_API_CALL
clCreateFromVA_APIMediaSurfaceINTEL(
cl_context context,
cl_mem_flags flags,
VASurfaceID* surface,
VASurfaceID *surface,
cl_uint plane,
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_mem (CL_API_CALL * clCreateFromVA_APIMediaSurfaceINTEL_fn)(
typedef CL_API_ENTRY cl_mem(CL_API_CALL *clCreateFromVA_APIMediaSurfaceINTEL_fn)(
cl_context context,
cl_mem_flags flags,
VASurfaceID* surface,
VASurfaceID *surface,
cl_uint plane,
cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueAcquireVA_APIMediaSurfacesINTEL(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem* mem_objects,
const cl_mem *mem_objects,
cl_uint num_events_in_wait_list,
const cl_event* event_wait_list,
cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
const cl_event *event_wait_list,
cl_event *event) CL_EXT_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireVA_APIMediaSurfacesINTEL_fn)(
typedef CL_API_ENTRY cl_int(CL_API_CALL *clEnqueueAcquireVA_APIMediaSurfacesINTEL_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem* mem_objects,
const cl_mem *mem_objects,
cl_uint num_events_in_wait_list,
const cl_event* event_wait_list,
cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
const cl_event *event_wait_list,
cl_event *event) CL_EXT_SUFFIX__VERSION_1_2;
extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueReleaseVA_APIMediaSurfacesINTEL(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem* mem_objects,
const cl_mem *mem_objects,
cl_uint num_events_in_wait_list,
const cl_event* event_wait_list,
cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
const cl_event *event_wait_list,
cl_event *event) CL_EXT_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseVA_APIMediaSurfacesINTEL_fn)(
typedef CL_API_ENTRY cl_int(CL_API_CALL *clEnqueueReleaseVA_APIMediaSurfacesINTEL_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem* mem_objects,
const cl_mem *mem_objects,
cl_uint num_events_in_wait_list,
const cl_event* event_wait_list,
cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
const cl_event *event_wait_list,
cl_event *event) CL_EXT_SUFFIX__VERSION_1_2;
#ifdef __cplusplus
}