summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Ashbaugh <ben.ashbaugh@intel.com>2021-11-22 08:38:57 -0800
committerGitHub <noreply@github.com>2021-11-22 08:38:57 -0800
commite3cd57376dada061bc6d5f9edfce2ea631b81214 (patch)
tree379380ee9d85fee9cae2a9c5507e958f47f6b7d5
parent92c9108be0d450e6372bfedd06e867eb1ae36aae (diff)
downloadOpenCL-Headers-e3cd57376dada061bc6d5f9edfce2ea631b81214.tar.gz
OpenCL-Headers-e3cd57376dada061bc6d5f9edfce2ea631b81214.tar.bz2
OpenCL-Headers-e3cd57376dada061bc6d5f9edfce2ea631b81214.zip
update headers for cl_intel_unified_shared_memory (#184)
-rw-r--r--CL/cl_ext.h425
1 files changed, 214 insertions, 211 deletions
diff --git a/CL/cl_ext.h b/CL/cl_ext.h
index e97ddc0..2a68cf1 100644
--- a/CL/cl_ext.h
+++ b/CL/cl_ext.h
@@ -2059,57 +2059,47 @@ typedef cl_uint cl_diagnostics_verbose_level;
/*******************************************
* cl_intel_unified_shared_memory extension *
********************************************/
-
-/* These APIs are in sync with Revision Q of the cl_intel_unified_shared_memory spec! */
-
#define cl_intel_unified_shared_memory 1
-/* cl_device_info */
-#define CL_DEVICE_HOST_MEM_CAPABILITIES_INTEL 0x4190
-#define CL_DEVICE_DEVICE_MEM_CAPABILITIES_INTEL 0x4191
-#define CL_DEVICE_SINGLE_DEVICE_SHARED_MEM_CAPABILITIES_INTEL 0x4192
-#define CL_DEVICE_CROSS_DEVICE_SHARED_MEM_CAPABILITIES_INTEL 0x4193
-#define CL_DEVICE_SHARED_SYSTEM_MEM_CAPABILITIES_INTEL 0x4194
+typedef cl_bitfield cl_device_unified_shared_memory_capabilities_intel;
+typedef cl_properties cl_mem_properties_intel;
+typedef cl_bitfield cl_mem_alloc_flags_intel;
+typedef cl_uint cl_mem_info_intel;
+typedef cl_uint cl_unified_shared_memory_type_intel;
+typedef cl_uint cl_mem_advice_intel;
-typedef cl_bitfield cl_device_unified_shared_memory_capabilities_intel;
+/* cl_device_info */
+#define CL_DEVICE_HOST_MEM_CAPABILITIES_INTEL 0x4190
+#define CL_DEVICE_DEVICE_MEM_CAPABILITIES_INTEL 0x4191
+#define CL_DEVICE_SINGLE_DEVICE_SHARED_MEM_CAPABILITIES_INTEL 0x4192
+#define CL_DEVICE_CROSS_DEVICE_SHARED_MEM_CAPABILITIES_INTEL 0x4193
+#define CL_DEVICE_SHARED_SYSTEM_MEM_CAPABILITIES_INTEL 0x4194
/* cl_device_unified_shared_memory_capabilities_intel - bitfield */
-#define CL_UNIFIED_SHARED_MEMORY_ACCESS_INTEL (1 << 0)
-#define CL_UNIFIED_SHARED_MEMORY_ATOMIC_ACCESS_INTEL (1 << 1)
-#define CL_UNIFIED_SHARED_MEMORY_CONCURRENT_ACCESS_INTEL (1 << 2)
+#define CL_UNIFIED_SHARED_MEMORY_ACCESS_INTEL (1 << 0)
+#define CL_UNIFIED_SHARED_MEMORY_ATOMIC_ACCESS_INTEL (1 << 1)
+#define CL_UNIFIED_SHARED_MEMORY_CONCURRENT_ACCESS_INTEL (1 << 2)
#define CL_UNIFIED_SHARED_MEMORY_CONCURRENT_ATOMIC_ACCESS_INTEL (1 << 3)
-typedef cl_properties cl_mem_properties_intel;
-
/* cl_mem_properties_intel */
-#define CL_MEM_ALLOC_FLAGS_INTEL 0x4195
-
-typedef cl_bitfield cl_mem_alloc_flags_intel;
+#define CL_MEM_ALLOC_FLAGS_INTEL 0x4195
/* cl_mem_alloc_flags_intel - bitfield */
-#define CL_MEM_ALLOC_WRITE_COMBINED_INTEL (1 << 0)
-
-typedef cl_uint cl_mem_info_intel;
+#define CL_MEM_ALLOC_WRITE_COMBINED_INTEL (1 << 0)
+#define CL_MEM_ALLOC_INITIAL_PLACEMENT_DEVICE_INTEL (1 << 1)
+#define CL_MEM_ALLOC_INITIAL_PLACEMENT_HOST_INTEL (1 << 2)
/* cl_mem_alloc_info_intel */
-#define CL_MEM_ALLOC_TYPE_INTEL 0x419A
-#define CL_MEM_ALLOC_BASE_PTR_INTEL 0x419B
-#define CL_MEM_ALLOC_SIZE_INTEL 0x419C
-#define CL_MEM_ALLOC_DEVICE_INTEL 0x419D
-/* Enum values 0x419E-0x419F are reserved for future queries. */
-
-typedef cl_uint cl_unified_shared_memory_type_intel;
+#define CL_MEM_ALLOC_TYPE_INTEL 0x419A
+#define CL_MEM_ALLOC_BASE_PTR_INTEL 0x419B
+#define CL_MEM_ALLOC_SIZE_INTEL 0x419C
+#define CL_MEM_ALLOC_DEVICE_INTEL 0x419D
/* cl_unified_shared_memory_type_intel */
-#define CL_MEM_TYPE_UNKNOWN_INTEL 0x4196
-#define CL_MEM_TYPE_HOST_INTEL 0x4197
-#define CL_MEM_TYPE_DEVICE_INTEL 0x4198
-#define CL_MEM_TYPE_SHARED_INTEL 0x4199
-
-typedef cl_uint cl_mem_advice_intel;
-
-/* cl_mem_advice_intel */
-/* Enum values 0x4208-0x420F are reserved for future memory advices. */
+#define CL_MEM_TYPE_UNKNOWN_INTEL 0x4196
+#define CL_MEM_TYPE_HOST_INTEL 0x4197
+#define CL_MEM_TYPE_DEVICE_INTEL 0x4198
+#define CL_MEM_TYPE_SHARED_INTEL 0x4199
/* cl_kernel_exec_info */
#define CL_KERNEL_EXEC_INFO_INDIRECT_HOST_ACCESS_INTEL 0x4200
@@ -2118,223 +2108,236 @@ typedef cl_uint cl_mem_advice_intel;
#define CL_KERNEL_EXEC_INFO_USM_PTRS_INTEL 0x4203
/* cl_command_type */
-#define CL_COMMAND_MEMFILL_INTEL 0x4204
-#define CL_COMMAND_MEMCPY_INTEL 0x4205
-#define CL_COMMAND_MIGRATEMEM_INTEL 0x4206
-#define CL_COMMAND_MEMADVISE_INTEL 0x4207
+#define CL_COMMAND_MEMFILL_INTEL 0x4204
+#define CL_COMMAND_MEMCPY_INTEL 0x4205
+#define CL_COMMAND_MIGRATEMEM_INTEL 0x4206
+#define CL_COMMAND_MEMADVISE_INTEL 0x4207
-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);
typedef 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
-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,
+ const cl_mem_properties_intel* properties,
+ size_t size,
+ cl_uint alignment,
+ cl_int* errcode_ret) ;
typedef 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
-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 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,
+ cl_device_id device,
+ const cl_mem_properties_intel* properties,
+ size_t size,
+ cl_uint alignment,
+ cl_int* errcode_ret) ;
typedef 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_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,
+ void* ptr) ;
typedef 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_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_int (CL_API_CALL *
clSetKernelArgMemPointerINTEL_fn)(
- cl_kernel kernel,
- cl_uint arg_index,
- const void* arg_value);
+ 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);
+typedef 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_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);
+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_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) ;
+
+#ifndef CL_NO_PROTOTYPES
+
+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) ;
+
+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) ;
+
+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) ;
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);
+clMemFreeINTEL(
+ cl_context context,
+ void* ptr) ;
-typedef 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
+clMemBlockingFreeINTEL(
+ cl_context context,
+ void* ptr) ;
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);
+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) ;
-typedef 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);
+extern CL_API_ENTRY cl_int CL_API_CALL
+clSetKernelArgMemPointerINTEL(
+ cl_kernel kernel,
+ cl_uint arg_index,
+ const void* arg_value) ;
-#ifdef CL_VERSION_1_2
+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) ;
-/* Because these APIs use cl_mem_migration_flags, they require
- OpenCL 1.2: */
+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) ;
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);
+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) ;
+
+#endif /* CL_NO_PROTOTYPES */
+
+#if defined(CL_VERSION_1_2)
+/* Requires OpenCL 1.2 for cl_mem_migration_flags: */
typedef 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);
+ 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
+#ifndef CL_NO_PROTOTYPES
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);
+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) ;
+
+#endif /* CL_NO_PROTOTYPES */
+
+#endif /* defined(CL_VERSION_1_2) */
+
+/* deprecated, use clEnqueueMemFillINTEL instead */
typedef 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);
+clEnqueueMemsetINTEL_fn)(
+ 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) ;
+
+#ifndef CL_NO_PROTOTYPES
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueMemsetINTEL(
+ 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) ;
+
+#endif /* CL_NO_PROTOTYPES */
/***************************************************
* cl_intel_create_buffer_with_properties extension *