Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1 | /******************************************************************************* |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 2 | * Copyright (c) 2008-2019 The Khronos Group Inc. |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 3 | * |
| 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 5 | * copy of this software and/or associated documentation files (the |
| 6 | * "Materials"), to deal in the Materials without restriction, including |
| 7 | * without limitation the rights to use, copy, modify, merge, publish, |
| 8 | * distribute, sublicense, and/or sell copies of the Materials, and to |
| 9 | * permit persons to whom the Materials are furnished to do so, subject to |
| 10 | * the following conditions: |
| 11 | * |
| 12 | * The above copyright notice and this permission notice shall be included |
| 13 | * in all copies or substantial portions of the Materials. |
| 14 | * |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 15 | * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS |
| 16 | * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS |
| 17 | * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT |
| 18 | * https://www.khronos.org/registry/ |
| 19 | * |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 20 | * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| 23 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
| 24 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
| 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
| 26 | * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. |
| 27 | ******************************************************************************/ |
| 28 | |
| 29 | #ifndef __OPENCL_CL_H |
| 30 | #define __OPENCL_CL_H |
| 31 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 32 | #include <CL/cl_version.h> |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 33 | #include <CL/cl_platform.h> |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 34 | |
| 35 | #ifdef __cplusplus |
| 36 | extern "C" { |
| 37 | #endif |
| 38 | |
| 39 | /******************************************************************************/ |
| 40 | |
| 41 | typedef struct _cl_platform_id * cl_platform_id; |
| 42 | typedef struct _cl_device_id * cl_device_id; |
| 43 | typedef struct _cl_context * cl_context; |
| 44 | typedef struct _cl_command_queue * cl_command_queue; |
| 45 | typedef struct _cl_mem * cl_mem; |
| 46 | typedef struct _cl_program * cl_program; |
| 47 | typedef struct _cl_kernel * cl_kernel; |
| 48 | typedef struct _cl_event * cl_event; |
| 49 | typedef struct _cl_sampler * cl_sampler; |
| 50 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 51 | typedef cl_uint cl_bool; /* WARNING! Unlike cl_ types in cl_platform.h, cl_bool is not guaranteed to be the same size as the bool in kernels. */ |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 52 | typedef cl_ulong cl_bitfield; |
| 53 | typedef cl_bitfield cl_device_type; |
| 54 | typedef cl_uint cl_platform_info; |
| 55 | typedef cl_uint cl_device_info; |
| 56 | typedef cl_bitfield cl_device_fp_config; |
| 57 | typedef cl_uint cl_device_mem_cache_type; |
| 58 | typedef cl_uint cl_device_local_mem_type; |
| 59 | typedef cl_bitfield cl_device_exec_capabilities; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 60 | #ifdef CL_VERSION_2_0 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 61 | typedef cl_bitfield cl_device_svm_capabilities; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 62 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 63 | typedef cl_bitfield cl_command_queue_properties; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 64 | #ifdef CL_VERSION_1_2 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 65 | typedef intptr_t cl_device_partition_property; |
| 66 | typedef cl_bitfield cl_device_affinity_domain; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 67 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 68 | |
| 69 | typedef intptr_t cl_context_properties; |
| 70 | typedef cl_uint cl_context_info; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 71 | #ifdef CL_VERSION_2_0 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 72 | typedef cl_bitfield cl_queue_properties; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 73 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 74 | typedef cl_uint cl_command_queue_info; |
| 75 | typedef cl_uint cl_channel_order; |
| 76 | typedef cl_uint cl_channel_type; |
| 77 | typedef cl_bitfield cl_mem_flags; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 78 | #ifdef CL_VERSION_2_0 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 79 | typedef cl_bitfield cl_svm_mem_flags; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 80 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 81 | typedef cl_uint cl_mem_object_type; |
| 82 | typedef cl_uint cl_mem_info; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 83 | #ifdef CL_VERSION_1_2 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 84 | typedef cl_bitfield cl_mem_migration_flags; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 85 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 86 | typedef cl_uint cl_image_info; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 87 | #ifdef CL_VERSION_1_1 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 88 | typedef cl_uint cl_buffer_create_type; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 89 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 90 | typedef cl_uint cl_addressing_mode; |
| 91 | typedef cl_uint cl_filter_mode; |
| 92 | typedef cl_uint cl_sampler_info; |
| 93 | typedef cl_bitfield cl_map_flags; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 94 | #ifdef CL_VERSION_2_0 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 95 | typedef intptr_t cl_pipe_properties; |
| 96 | typedef cl_uint cl_pipe_info; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 97 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 98 | typedef cl_uint cl_program_info; |
| 99 | typedef cl_uint cl_program_build_info; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 100 | #ifdef CL_VERSION_1_2 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 101 | typedef cl_uint cl_program_binary_type; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 102 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 103 | typedef cl_int cl_build_status; |
| 104 | typedef cl_uint cl_kernel_info; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 105 | #ifdef CL_VERSION_1_2 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 106 | typedef cl_uint cl_kernel_arg_info; |
| 107 | typedef cl_uint cl_kernel_arg_address_qualifier; |
| 108 | typedef cl_uint cl_kernel_arg_access_qualifier; |
| 109 | typedef cl_bitfield cl_kernel_arg_type_qualifier; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 110 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 111 | typedef cl_uint cl_kernel_work_group_info; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 112 | #ifdef CL_VERSION_2_1 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 113 | typedef cl_uint cl_kernel_sub_group_info; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 114 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 115 | typedef cl_uint cl_event_info; |
| 116 | typedef cl_uint cl_command_type; |
| 117 | typedef cl_uint cl_profiling_info; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 118 | #ifdef CL_VERSION_2_0 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 119 | typedef cl_bitfield cl_sampler_properties; |
| 120 | typedef cl_uint cl_kernel_exec_info; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 121 | #endif |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 122 | #ifdef CL_EXPERIMENTAL |
| 123 | typedef cl_bitfield cl_device_atomic_capabilities; |
| 124 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 125 | |
| 126 | typedef struct _cl_image_format { |
| 127 | cl_channel_order image_channel_order; |
| 128 | cl_channel_type image_channel_data_type; |
| 129 | } cl_image_format; |
| 130 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 131 | #ifdef CL_VERSION_1_2 |
| 132 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 133 | typedef struct _cl_image_desc { |
| 134 | cl_mem_object_type image_type; |
| 135 | size_t image_width; |
| 136 | size_t image_height; |
| 137 | size_t image_depth; |
| 138 | size_t image_array_size; |
| 139 | size_t image_row_pitch; |
| 140 | size_t image_slice_pitch; |
| 141 | cl_uint num_mip_levels; |
| 142 | cl_uint num_samples; |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 143 | #ifdef CL_VERSION_2_0 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 144 | #ifdef __GNUC__ |
| 145 | __extension__ /* Prevents warnings about anonymous union in -pedantic builds */ |
| 146 | #endif |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 147 | #ifdef _MSC_VER |
| 148 | #pragma warning( push ) |
| 149 | #pragma warning( disable : 4201 ) /* Prevents warning about nameless struct/union in /W4 /Za builds */ |
| 150 | #endif |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 151 | union { |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 152 | #endif |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 153 | cl_mem buffer; |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 154 | #ifdef CL_VERSION_2_0 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 155 | cl_mem mem_object; |
| 156 | }; |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 157 | #ifdef _MSC_VER |
| 158 | #pragma warning( pop ) |
| 159 | #endif |
| 160 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 161 | } cl_image_desc; |
| 162 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 163 | #endif |
| 164 | |
| 165 | #ifdef CL_VERSION_1_1 |
| 166 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 167 | typedef struct _cl_buffer_region { |
| 168 | size_t origin; |
| 169 | size_t size; |
| 170 | } cl_buffer_region; |
| 171 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 172 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 173 | |
| 174 | /******************************************************************************/ |
| 175 | |
| 176 | /* Error Codes */ |
| 177 | #define CL_SUCCESS 0 |
| 178 | #define CL_DEVICE_NOT_FOUND -1 |
| 179 | #define CL_DEVICE_NOT_AVAILABLE -2 |
| 180 | #define CL_COMPILER_NOT_AVAILABLE -3 |
| 181 | #define CL_MEM_OBJECT_ALLOCATION_FAILURE -4 |
| 182 | #define CL_OUT_OF_RESOURCES -5 |
| 183 | #define CL_OUT_OF_HOST_MEMORY -6 |
| 184 | #define CL_PROFILING_INFO_NOT_AVAILABLE -7 |
| 185 | #define CL_MEM_COPY_OVERLAP -8 |
| 186 | #define CL_IMAGE_FORMAT_MISMATCH -9 |
| 187 | #define CL_IMAGE_FORMAT_NOT_SUPPORTED -10 |
| 188 | #define CL_BUILD_PROGRAM_FAILURE -11 |
| 189 | #define CL_MAP_FAILURE -12 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 190 | #ifdef CL_VERSION_1_1 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 191 | #define CL_MISALIGNED_SUB_BUFFER_OFFSET -13 |
| 192 | #define CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST -14 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 193 | #endif |
| 194 | #ifdef CL_VERSION_1_2 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 195 | #define CL_COMPILE_PROGRAM_FAILURE -15 |
| 196 | #define CL_LINKER_NOT_AVAILABLE -16 |
| 197 | #define CL_LINK_PROGRAM_FAILURE -17 |
| 198 | #define CL_DEVICE_PARTITION_FAILED -18 |
| 199 | #define CL_KERNEL_ARG_INFO_NOT_AVAILABLE -19 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 200 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 201 | |
| 202 | #define CL_INVALID_VALUE -30 |
| 203 | #define CL_INVALID_DEVICE_TYPE -31 |
| 204 | #define CL_INVALID_PLATFORM -32 |
| 205 | #define CL_INVALID_DEVICE -33 |
| 206 | #define CL_INVALID_CONTEXT -34 |
| 207 | #define CL_INVALID_QUEUE_PROPERTIES -35 |
| 208 | #define CL_INVALID_COMMAND_QUEUE -36 |
| 209 | #define CL_INVALID_HOST_PTR -37 |
| 210 | #define CL_INVALID_MEM_OBJECT -38 |
| 211 | #define CL_INVALID_IMAGE_FORMAT_DESCRIPTOR -39 |
| 212 | #define CL_INVALID_IMAGE_SIZE -40 |
| 213 | #define CL_INVALID_SAMPLER -41 |
| 214 | #define CL_INVALID_BINARY -42 |
| 215 | #define CL_INVALID_BUILD_OPTIONS -43 |
| 216 | #define CL_INVALID_PROGRAM -44 |
| 217 | #define CL_INVALID_PROGRAM_EXECUTABLE -45 |
| 218 | #define CL_INVALID_KERNEL_NAME -46 |
| 219 | #define CL_INVALID_KERNEL_DEFINITION -47 |
| 220 | #define CL_INVALID_KERNEL -48 |
| 221 | #define CL_INVALID_ARG_INDEX -49 |
| 222 | #define CL_INVALID_ARG_VALUE -50 |
| 223 | #define CL_INVALID_ARG_SIZE -51 |
| 224 | #define CL_INVALID_KERNEL_ARGS -52 |
| 225 | #define CL_INVALID_WORK_DIMENSION -53 |
| 226 | #define CL_INVALID_WORK_GROUP_SIZE -54 |
| 227 | #define CL_INVALID_WORK_ITEM_SIZE -55 |
| 228 | #define CL_INVALID_GLOBAL_OFFSET -56 |
| 229 | #define CL_INVALID_EVENT_WAIT_LIST -57 |
| 230 | #define CL_INVALID_EVENT -58 |
| 231 | #define CL_INVALID_OPERATION -59 |
| 232 | #define CL_INVALID_GL_OBJECT -60 |
| 233 | #define CL_INVALID_BUFFER_SIZE -61 |
| 234 | #define CL_INVALID_MIP_LEVEL -62 |
| 235 | #define CL_INVALID_GLOBAL_WORK_SIZE -63 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 236 | #ifdef CL_VERSION_1_1 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 237 | #define CL_INVALID_PROPERTY -64 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 238 | #endif |
| 239 | #ifdef CL_VERSION_1_2 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 240 | #define CL_INVALID_IMAGE_DESCRIPTOR -65 |
| 241 | #define CL_INVALID_COMPILER_OPTIONS -66 |
| 242 | #define CL_INVALID_LINKER_OPTIONS -67 |
| 243 | #define CL_INVALID_DEVICE_PARTITION_COUNT -68 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 244 | #endif |
| 245 | #ifdef CL_VERSION_2_0 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 246 | #define CL_INVALID_PIPE_SIZE -69 |
| 247 | #define CL_INVALID_DEVICE_QUEUE -70 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 248 | #endif |
| 249 | #ifdef CL_VERSION_2_2 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 250 | #define CL_INVALID_SPEC_ID -71 |
| 251 | #define CL_MAX_SIZE_RESTRICTION_EXCEEDED -72 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 252 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 253 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 254 | |
| 255 | /* cl_bool */ |
| 256 | #define CL_FALSE 0 |
| 257 | #define CL_TRUE 1 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 258 | #ifdef CL_VERSION_1_2 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 259 | #define CL_BLOCKING CL_TRUE |
| 260 | #define CL_NON_BLOCKING CL_FALSE |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 261 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 262 | |
| 263 | /* cl_platform_info */ |
| 264 | #define CL_PLATFORM_PROFILE 0x0900 |
| 265 | #define CL_PLATFORM_VERSION 0x0901 |
| 266 | #define CL_PLATFORM_NAME 0x0902 |
| 267 | #define CL_PLATFORM_VENDOR 0x0903 |
| 268 | #define CL_PLATFORM_EXTENSIONS 0x0904 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 269 | #ifdef CL_VERSION_2_1 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 270 | #define CL_PLATFORM_HOST_TIMER_RESOLUTION 0x0905 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 271 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 272 | |
| 273 | /* cl_device_type - bitfield */ |
| 274 | #define CL_DEVICE_TYPE_DEFAULT (1 << 0) |
| 275 | #define CL_DEVICE_TYPE_CPU (1 << 1) |
| 276 | #define CL_DEVICE_TYPE_GPU (1 << 2) |
| 277 | #define CL_DEVICE_TYPE_ACCELERATOR (1 << 3) |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 278 | #ifdef CL_VERSION_1_2 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 279 | #define CL_DEVICE_TYPE_CUSTOM (1 << 4) |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 280 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 281 | #define CL_DEVICE_TYPE_ALL 0xFFFFFFFF |
| 282 | |
| 283 | /* cl_device_info */ |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 284 | #define CL_DEVICE_TYPE 0x1000 |
| 285 | #define CL_DEVICE_VENDOR_ID 0x1001 |
| 286 | #define CL_DEVICE_MAX_COMPUTE_UNITS 0x1002 |
| 287 | #define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS 0x1003 |
| 288 | #define CL_DEVICE_MAX_WORK_GROUP_SIZE 0x1004 |
| 289 | #define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005 |
| 290 | #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR 0x1006 |
| 291 | #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT 0x1007 |
| 292 | #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT 0x1008 |
| 293 | #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG 0x1009 |
| 294 | #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT 0x100A |
| 295 | #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE 0x100B |
| 296 | #define CL_DEVICE_MAX_CLOCK_FREQUENCY 0x100C |
| 297 | #define CL_DEVICE_ADDRESS_BITS 0x100D |
| 298 | #define CL_DEVICE_MAX_READ_IMAGE_ARGS 0x100E |
| 299 | #define CL_DEVICE_MAX_WRITE_IMAGE_ARGS 0x100F |
| 300 | #define CL_DEVICE_MAX_MEM_ALLOC_SIZE 0x1010 |
| 301 | #define CL_DEVICE_IMAGE2D_MAX_WIDTH 0x1011 |
| 302 | #define CL_DEVICE_IMAGE2D_MAX_HEIGHT 0x1012 |
| 303 | #define CL_DEVICE_IMAGE3D_MAX_WIDTH 0x1013 |
| 304 | #define CL_DEVICE_IMAGE3D_MAX_HEIGHT 0x1014 |
| 305 | #define CL_DEVICE_IMAGE3D_MAX_DEPTH 0x1015 |
| 306 | #define CL_DEVICE_IMAGE_SUPPORT 0x1016 |
| 307 | #define CL_DEVICE_MAX_PARAMETER_SIZE 0x1017 |
| 308 | #define CL_DEVICE_MAX_SAMPLERS 0x1018 |
| 309 | #define CL_DEVICE_MEM_BASE_ADDR_ALIGN 0x1019 |
| 310 | #define CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE 0x101A |
| 311 | #define CL_DEVICE_SINGLE_FP_CONFIG 0x101B |
| 312 | #define CL_DEVICE_GLOBAL_MEM_CACHE_TYPE 0x101C |
| 313 | #define CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE 0x101D |
| 314 | #define CL_DEVICE_GLOBAL_MEM_CACHE_SIZE 0x101E |
| 315 | #define CL_DEVICE_GLOBAL_MEM_SIZE 0x101F |
| 316 | #define CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE 0x1020 |
| 317 | #define CL_DEVICE_MAX_CONSTANT_ARGS 0x1021 |
| 318 | #define CL_DEVICE_LOCAL_MEM_TYPE 0x1022 |
| 319 | #define CL_DEVICE_LOCAL_MEM_SIZE 0x1023 |
| 320 | #define CL_DEVICE_ERROR_CORRECTION_SUPPORT 0x1024 |
| 321 | #define CL_DEVICE_PROFILING_TIMER_RESOLUTION 0x1025 |
| 322 | #define CL_DEVICE_ENDIAN_LITTLE 0x1026 |
| 323 | #define CL_DEVICE_AVAILABLE 0x1027 |
| 324 | #define CL_DEVICE_COMPILER_AVAILABLE 0x1028 |
| 325 | #define CL_DEVICE_EXECUTION_CAPABILITIES 0x1029 |
| 326 | #define CL_DEVICE_QUEUE_PROPERTIES 0x102A /* deprecated */ |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 327 | #ifdef CL_VERSION_2_0 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 328 | #define CL_DEVICE_QUEUE_ON_HOST_PROPERTIES 0x102A |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 329 | #endif |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 330 | #define CL_DEVICE_NAME 0x102B |
| 331 | #define CL_DEVICE_VENDOR 0x102C |
| 332 | #define CL_DRIVER_VERSION 0x102D |
| 333 | #define CL_DEVICE_PROFILE 0x102E |
| 334 | #define CL_DEVICE_VERSION 0x102F |
| 335 | #define CL_DEVICE_EXTENSIONS 0x1030 |
| 336 | #define CL_DEVICE_PLATFORM 0x1031 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 337 | #ifdef CL_VERSION_1_2 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 338 | #define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 339 | #endif |
| 340 | /* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG which is already defined in "cl_ext.h" */ |
| 341 | #ifdef CL_VERSION_1_1 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 342 | #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034 |
| 343 | #define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035 /* deprecated */ |
| 344 | #define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036 |
| 345 | #define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT 0x1037 |
| 346 | #define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT 0x1038 |
| 347 | #define CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG 0x1039 |
| 348 | #define CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT 0x103A |
| 349 | #define CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE 0x103B |
| 350 | #define CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF 0x103C |
| 351 | #define CL_DEVICE_OPENCL_C_VERSION 0x103D |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 352 | #endif |
| 353 | #ifdef CL_VERSION_1_2 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 354 | #define CL_DEVICE_LINKER_AVAILABLE 0x103E |
| 355 | #define CL_DEVICE_BUILT_IN_KERNELS 0x103F |
| 356 | #define CL_DEVICE_IMAGE_MAX_BUFFER_SIZE 0x1040 |
| 357 | #define CL_DEVICE_IMAGE_MAX_ARRAY_SIZE 0x1041 |
| 358 | #define CL_DEVICE_PARENT_DEVICE 0x1042 |
| 359 | #define CL_DEVICE_PARTITION_MAX_SUB_DEVICES 0x1043 |
| 360 | #define CL_DEVICE_PARTITION_PROPERTIES 0x1044 |
| 361 | #define CL_DEVICE_PARTITION_AFFINITY_DOMAIN 0x1045 |
| 362 | #define CL_DEVICE_PARTITION_TYPE 0x1046 |
| 363 | #define CL_DEVICE_REFERENCE_COUNT 0x1047 |
| 364 | #define CL_DEVICE_PREFERRED_INTEROP_USER_SYNC 0x1048 |
| 365 | #define CL_DEVICE_PRINTF_BUFFER_SIZE 0x1049 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 366 | #endif |
| 367 | #ifdef CL_VERSION_2_0 |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 368 | #define CL_DEVICE_IMAGE_PITCH_ALIGNMENT 0x104A |
| 369 | #define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT 0x104B |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 370 | #define CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS 0x104C |
| 371 | #define CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE 0x104D |
| 372 | #define CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES 0x104E |
| 373 | #define CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE 0x104F |
| 374 | #define CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE 0x1050 |
| 375 | #define CL_DEVICE_MAX_ON_DEVICE_QUEUES 0x1051 |
| 376 | #define CL_DEVICE_MAX_ON_DEVICE_EVENTS 0x1052 |
| 377 | #define CL_DEVICE_SVM_CAPABILITIES 0x1053 |
| 378 | #define CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE 0x1054 |
| 379 | #define CL_DEVICE_MAX_PIPE_ARGS 0x1055 |
| 380 | #define CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS 0x1056 |
| 381 | #define CL_DEVICE_PIPE_MAX_PACKET_SIZE 0x1057 |
| 382 | #define CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT 0x1058 |
| 383 | #define CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT 0x1059 |
| 384 | #define CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT 0x105A |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 385 | #endif |
| 386 | #ifdef CL_VERSION_2_1 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 387 | #define CL_DEVICE_IL_VERSION 0x105B |
| 388 | #define CL_DEVICE_MAX_NUM_SUB_GROUPS 0x105C |
| 389 | #define CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS 0x105D |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 390 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 391 | |
| 392 | /* cl_device_fp_config - bitfield */ |
| 393 | #define CL_FP_DENORM (1 << 0) |
| 394 | #define CL_FP_INF_NAN (1 << 1) |
| 395 | #define CL_FP_ROUND_TO_NEAREST (1 << 2) |
| 396 | #define CL_FP_ROUND_TO_ZERO (1 << 3) |
| 397 | #define CL_FP_ROUND_TO_INF (1 << 4) |
| 398 | #define CL_FP_FMA (1 << 5) |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 399 | #ifdef CL_VERSION_1_1 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 400 | #define CL_FP_SOFT_FLOAT (1 << 6) |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 401 | #endif |
| 402 | #ifdef CL_VERSION_1_2 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 403 | #define CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT (1 << 7) |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 404 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 405 | |
| 406 | /* cl_device_mem_cache_type */ |
| 407 | #define CL_NONE 0x0 |
| 408 | #define CL_READ_ONLY_CACHE 0x1 |
| 409 | #define CL_READ_WRITE_CACHE 0x2 |
| 410 | |
| 411 | /* cl_device_local_mem_type */ |
| 412 | #define CL_LOCAL 0x1 |
| 413 | #define CL_GLOBAL 0x2 |
| 414 | |
| 415 | /* cl_device_exec_capabilities - bitfield */ |
| 416 | #define CL_EXEC_KERNEL (1 << 0) |
| 417 | #define CL_EXEC_NATIVE_KERNEL (1 << 1) |
| 418 | |
| 419 | /* cl_command_queue_properties - bitfield */ |
| 420 | #define CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE (1 << 0) |
| 421 | #define CL_QUEUE_PROFILING_ENABLE (1 << 1) |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 422 | #ifdef CL_VERSION_2_0 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 423 | #define CL_QUEUE_ON_DEVICE (1 << 2) |
| 424 | #define CL_QUEUE_ON_DEVICE_DEFAULT (1 << 3) |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 425 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 426 | |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 427 | /* cl_context_info */ |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 428 | #define CL_CONTEXT_REFERENCE_COUNT 0x1080 |
| 429 | #define CL_CONTEXT_DEVICES 0x1081 |
| 430 | #define CL_CONTEXT_PROPERTIES 0x1082 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 431 | #ifdef CL_VERSION_1_1 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 432 | #define CL_CONTEXT_NUM_DEVICES 0x1083 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 433 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 434 | |
| 435 | /* cl_context_properties */ |
| 436 | #define CL_CONTEXT_PLATFORM 0x1084 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 437 | #ifdef CL_VERSION_1_2 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 438 | #define CL_CONTEXT_INTEROP_USER_SYNC 0x1085 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 439 | #endif |
| 440 | |
| 441 | #ifdef CL_VERSION_1_2 |
| 442 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 443 | /* cl_device_partition_property */ |
| 444 | #define CL_DEVICE_PARTITION_EQUALLY 0x1086 |
| 445 | #define CL_DEVICE_PARTITION_BY_COUNTS 0x1087 |
| 446 | #define CL_DEVICE_PARTITION_BY_COUNTS_LIST_END 0x0 |
| 447 | #define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN 0x1088 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 448 | |
| 449 | #endif |
| 450 | |
| 451 | #ifdef CL_VERSION_1_2 |
| 452 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 453 | /* cl_device_affinity_domain */ |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 454 | #define CL_DEVICE_AFFINITY_DOMAIN_NUMA (1 << 0) |
| 455 | #define CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE (1 << 1) |
| 456 | #define CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE (1 << 2) |
| 457 | #define CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE (1 << 3) |
| 458 | #define CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE (1 << 4) |
| 459 | #define CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE (1 << 5) |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 460 | |
| 461 | #endif |
| 462 | |
| 463 | #ifdef CL_VERSION_2_0 |
| 464 | |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 465 | /* cl_device_svm_capabilities */ |
| 466 | #define CL_DEVICE_SVM_COARSE_GRAIN_BUFFER (1 << 0) |
| 467 | #define CL_DEVICE_SVM_FINE_GRAIN_BUFFER (1 << 1) |
| 468 | #define CL_DEVICE_SVM_FINE_GRAIN_SYSTEM (1 << 2) |
| 469 | #define CL_DEVICE_SVM_ATOMICS (1 << 3) |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 470 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 471 | #endif |
| 472 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 473 | /* cl_command_queue_info */ |
| 474 | #define CL_QUEUE_CONTEXT 0x1090 |
| 475 | #define CL_QUEUE_DEVICE 0x1091 |
| 476 | #define CL_QUEUE_REFERENCE_COUNT 0x1092 |
| 477 | #define CL_QUEUE_PROPERTIES 0x1093 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 478 | #ifdef CL_VERSION_2_0 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 479 | #define CL_QUEUE_SIZE 0x1094 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 480 | #endif |
| 481 | #ifdef CL_VERSION_2_1 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 482 | #define CL_QUEUE_DEVICE_DEFAULT 0x1095 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 483 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 484 | |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 485 | /* cl_mem_flags and cl_svm_mem_flags - bitfield */ |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 486 | #define CL_MEM_READ_WRITE (1 << 0) |
| 487 | #define CL_MEM_WRITE_ONLY (1 << 1) |
| 488 | #define CL_MEM_READ_ONLY (1 << 2) |
| 489 | #define CL_MEM_USE_HOST_PTR (1 << 3) |
| 490 | #define CL_MEM_ALLOC_HOST_PTR (1 << 4) |
| 491 | #define CL_MEM_COPY_HOST_PTR (1 << 5) |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 492 | /* reserved (1 << 6) */ |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 493 | #ifdef CL_VERSION_1_2 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 494 | #define CL_MEM_HOST_WRITE_ONLY (1 << 7) |
| 495 | #define CL_MEM_HOST_READ_ONLY (1 << 8) |
| 496 | #define CL_MEM_HOST_NO_ACCESS (1 << 9) |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 497 | #endif |
| 498 | #ifdef CL_VERSION_2_0 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 499 | #define CL_MEM_SVM_FINE_GRAIN_BUFFER (1 << 10) /* used by cl_svm_mem_flags only */ |
| 500 | #define CL_MEM_SVM_ATOMICS (1 << 11) /* used by cl_svm_mem_flags only */ |
| 501 | #define CL_MEM_KERNEL_READ_AND_WRITE (1 << 12) |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 502 | #endif |
| 503 | |
| 504 | #ifdef CL_VERSION_1_2 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 505 | |
| 506 | /* cl_mem_migration_flags - bitfield */ |
| 507 | #define CL_MIGRATE_MEM_OBJECT_HOST (1 << 0) |
| 508 | #define CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED (1 << 1) |
| 509 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 510 | #endif |
| 511 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 512 | /* cl_channel_order */ |
| 513 | #define CL_R 0x10B0 |
| 514 | #define CL_A 0x10B1 |
| 515 | #define CL_RG 0x10B2 |
| 516 | #define CL_RA 0x10B3 |
| 517 | #define CL_RGB 0x10B4 |
| 518 | #define CL_RGBA 0x10B5 |
| 519 | #define CL_BGRA 0x10B6 |
| 520 | #define CL_ARGB 0x10B7 |
| 521 | #define CL_INTENSITY 0x10B8 |
| 522 | #define CL_LUMINANCE 0x10B9 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 523 | #ifdef CL_VERSION_1_1 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 524 | #define CL_Rx 0x10BA |
| 525 | #define CL_RGx 0x10BB |
| 526 | #define CL_RGBx 0x10BC |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 527 | #endif |
| 528 | #ifdef CL_VERSION_1_2 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 529 | #define CL_DEPTH 0x10BD |
| 530 | #define CL_DEPTH_STENCIL 0x10BE |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 531 | #endif |
| 532 | #ifdef CL_VERSION_2_0 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 533 | #define CL_sRGB 0x10BF |
| 534 | #define CL_sRGBx 0x10C0 |
| 535 | #define CL_sRGBA 0x10C1 |
| 536 | #define CL_sBGRA 0x10C2 |
| 537 | #define CL_ABGR 0x10C3 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 538 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 539 | |
| 540 | /* cl_channel_type */ |
| 541 | #define CL_SNORM_INT8 0x10D0 |
| 542 | #define CL_SNORM_INT16 0x10D1 |
| 543 | #define CL_UNORM_INT8 0x10D2 |
| 544 | #define CL_UNORM_INT16 0x10D3 |
| 545 | #define CL_UNORM_SHORT_565 0x10D4 |
| 546 | #define CL_UNORM_SHORT_555 0x10D5 |
| 547 | #define CL_UNORM_INT_101010 0x10D6 |
| 548 | #define CL_SIGNED_INT8 0x10D7 |
| 549 | #define CL_SIGNED_INT16 0x10D8 |
| 550 | #define CL_SIGNED_INT32 0x10D9 |
| 551 | #define CL_UNSIGNED_INT8 0x10DA |
| 552 | #define CL_UNSIGNED_INT16 0x10DB |
| 553 | #define CL_UNSIGNED_INT32 0x10DC |
| 554 | #define CL_HALF_FLOAT 0x10DD |
| 555 | #define CL_FLOAT 0x10DE |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 556 | #ifdef CL_VERSION_1_2 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 557 | #define CL_UNORM_INT24 0x10DF |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 558 | #endif |
| 559 | #ifdef CL_VERSION_2_1 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 560 | #define CL_UNORM_INT_101010_2 0x10E0 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 561 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 562 | |
| 563 | /* cl_mem_object_type */ |
| 564 | #define CL_MEM_OBJECT_BUFFER 0x10F0 |
| 565 | #define CL_MEM_OBJECT_IMAGE2D 0x10F1 |
| 566 | #define CL_MEM_OBJECT_IMAGE3D 0x10F2 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 567 | #ifdef CL_VERSION_1_2 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 568 | #define CL_MEM_OBJECT_IMAGE2D_ARRAY 0x10F3 |
| 569 | #define CL_MEM_OBJECT_IMAGE1D 0x10F4 |
| 570 | #define CL_MEM_OBJECT_IMAGE1D_ARRAY 0x10F5 |
| 571 | #define CL_MEM_OBJECT_IMAGE1D_BUFFER 0x10F6 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 572 | #endif |
| 573 | #ifdef CL_VERSION_2_0 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 574 | #define CL_MEM_OBJECT_PIPE 0x10F7 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 575 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 576 | |
| 577 | /* cl_mem_info */ |
| 578 | #define CL_MEM_TYPE 0x1100 |
| 579 | #define CL_MEM_FLAGS 0x1101 |
| 580 | #define CL_MEM_SIZE 0x1102 |
| 581 | #define CL_MEM_HOST_PTR 0x1103 |
| 582 | #define CL_MEM_MAP_COUNT 0x1104 |
| 583 | #define CL_MEM_REFERENCE_COUNT 0x1105 |
| 584 | #define CL_MEM_CONTEXT 0x1106 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 585 | #ifdef CL_VERSION_1_1 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 586 | #define CL_MEM_ASSOCIATED_MEMOBJECT 0x1107 |
| 587 | #define CL_MEM_OFFSET 0x1108 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 588 | #endif |
| 589 | #ifdef CL_VERSION_2_0 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 590 | #define CL_MEM_USES_SVM_POINTER 0x1109 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 591 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 592 | |
| 593 | /* cl_image_info */ |
| 594 | #define CL_IMAGE_FORMAT 0x1110 |
| 595 | #define CL_IMAGE_ELEMENT_SIZE 0x1111 |
| 596 | #define CL_IMAGE_ROW_PITCH 0x1112 |
| 597 | #define CL_IMAGE_SLICE_PITCH 0x1113 |
| 598 | #define CL_IMAGE_WIDTH 0x1114 |
| 599 | #define CL_IMAGE_HEIGHT 0x1115 |
| 600 | #define CL_IMAGE_DEPTH 0x1116 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 601 | #ifdef CL_VERSION_1_2 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 602 | #define CL_IMAGE_ARRAY_SIZE 0x1117 |
| 603 | #define CL_IMAGE_BUFFER 0x1118 |
| 604 | #define CL_IMAGE_NUM_MIP_LEVELS 0x1119 |
| 605 | #define CL_IMAGE_NUM_SAMPLES 0x111A |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 606 | #endif |
| 607 | |
| 608 | #ifdef CL_VERSION_2_0 |
| 609 | |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 610 | /* cl_pipe_info */ |
| 611 | #define CL_PIPE_PACKET_SIZE 0x1120 |
| 612 | #define CL_PIPE_MAX_PACKETS 0x1121 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 613 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 614 | #endif |
| 615 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 616 | /* cl_addressing_mode */ |
| 617 | #define CL_ADDRESS_NONE 0x1130 |
| 618 | #define CL_ADDRESS_CLAMP_TO_EDGE 0x1131 |
| 619 | #define CL_ADDRESS_CLAMP 0x1132 |
| 620 | #define CL_ADDRESS_REPEAT 0x1133 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 621 | #ifdef CL_VERSION_1_1 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 622 | #define CL_ADDRESS_MIRRORED_REPEAT 0x1134 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 623 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 624 | |
| 625 | /* cl_filter_mode */ |
| 626 | #define CL_FILTER_NEAREST 0x1140 |
| 627 | #define CL_FILTER_LINEAR 0x1141 |
| 628 | |
| 629 | /* cl_sampler_info */ |
| 630 | #define CL_SAMPLER_REFERENCE_COUNT 0x1150 |
| 631 | #define CL_SAMPLER_CONTEXT 0x1151 |
| 632 | #define CL_SAMPLER_NORMALIZED_COORDS 0x1152 |
| 633 | #define CL_SAMPLER_ADDRESSING_MODE 0x1153 |
| 634 | #define CL_SAMPLER_FILTER_MODE 0x1154 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 635 | #ifdef CL_VERSION_2_0 |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 636 | /* These enumerants are for the cl_khr_mipmap_image extension. |
| 637 | They have since been added to cl_ext.h with an appropriate |
| 638 | KHR suffix, but are left here for backwards compatibility. */ |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 639 | #define CL_SAMPLER_MIP_FILTER_MODE 0x1155 |
| 640 | #define CL_SAMPLER_LOD_MIN 0x1156 |
| 641 | #define CL_SAMPLER_LOD_MAX 0x1157 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 642 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 643 | |
| 644 | /* cl_map_flags - bitfield */ |
| 645 | #define CL_MAP_READ (1 << 0) |
| 646 | #define CL_MAP_WRITE (1 << 1) |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 647 | #ifdef CL_VERSION_1_2 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 648 | #define CL_MAP_WRITE_INVALIDATE_REGION (1 << 2) |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 649 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 650 | |
| 651 | /* cl_program_info */ |
| 652 | #define CL_PROGRAM_REFERENCE_COUNT 0x1160 |
| 653 | #define CL_PROGRAM_CONTEXT 0x1161 |
| 654 | #define CL_PROGRAM_NUM_DEVICES 0x1162 |
| 655 | #define CL_PROGRAM_DEVICES 0x1163 |
| 656 | #define CL_PROGRAM_SOURCE 0x1164 |
| 657 | #define CL_PROGRAM_BINARY_SIZES 0x1165 |
| 658 | #define CL_PROGRAM_BINARIES 0x1166 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 659 | #ifdef CL_VERSION_1_2 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 660 | #define CL_PROGRAM_NUM_KERNELS 0x1167 |
| 661 | #define CL_PROGRAM_KERNEL_NAMES 0x1168 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 662 | #endif |
| 663 | #ifdef CL_VERSION_2_1 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 664 | #define CL_PROGRAM_IL 0x1169 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 665 | #endif |
| 666 | #ifdef CL_VERSION_2_2 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 667 | #define CL_PROGRAM_SCOPE_GLOBAL_CTORS_PRESENT 0x116A |
| 668 | #define CL_PROGRAM_SCOPE_GLOBAL_DTORS_PRESENT 0x116B |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 669 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 670 | |
| 671 | /* cl_program_build_info */ |
| 672 | #define CL_PROGRAM_BUILD_STATUS 0x1181 |
| 673 | #define CL_PROGRAM_BUILD_OPTIONS 0x1182 |
| 674 | #define CL_PROGRAM_BUILD_LOG 0x1183 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 675 | #ifdef CL_VERSION_1_2 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 676 | #define CL_PROGRAM_BINARY_TYPE 0x1184 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 677 | #endif |
| 678 | #ifdef CL_VERSION_2_0 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 679 | #define CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE 0x1185 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 680 | #endif |
| 681 | |
| 682 | #ifdef CL_VERSION_1_2 |
| 683 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 684 | /* cl_program_binary_type */ |
| 685 | #define CL_PROGRAM_BINARY_TYPE_NONE 0x0 |
| 686 | #define CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT 0x1 |
| 687 | #define CL_PROGRAM_BINARY_TYPE_LIBRARY 0x2 |
| 688 | #define CL_PROGRAM_BINARY_TYPE_EXECUTABLE 0x4 |
| 689 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 690 | #endif |
| 691 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 692 | /* cl_build_status */ |
| 693 | #define CL_BUILD_SUCCESS 0 |
| 694 | #define CL_BUILD_NONE -1 |
| 695 | #define CL_BUILD_ERROR -2 |
| 696 | #define CL_BUILD_IN_PROGRESS -3 |
| 697 | |
| 698 | /* cl_kernel_info */ |
| 699 | #define CL_KERNEL_FUNCTION_NAME 0x1190 |
| 700 | #define CL_KERNEL_NUM_ARGS 0x1191 |
| 701 | #define CL_KERNEL_REFERENCE_COUNT 0x1192 |
| 702 | #define CL_KERNEL_CONTEXT 0x1193 |
| 703 | #define CL_KERNEL_PROGRAM 0x1194 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 704 | #ifdef CL_VERSION_1_2 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 705 | #define CL_KERNEL_ATTRIBUTES 0x1195 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 706 | #endif |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 707 | |
| 708 | #ifdef CL_VERSION_1_2 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 709 | |
| 710 | /* cl_kernel_arg_info */ |
| 711 | #define CL_KERNEL_ARG_ADDRESS_QUALIFIER 0x1196 |
| 712 | #define CL_KERNEL_ARG_ACCESS_QUALIFIER 0x1197 |
| 713 | #define CL_KERNEL_ARG_TYPE_NAME 0x1198 |
| 714 | #define CL_KERNEL_ARG_TYPE_QUALIFIER 0x1199 |
| 715 | #define CL_KERNEL_ARG_NAME 0x119A |
| 716 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 717 | #endif |
| 718 | |
| 719 | #ifdef CL_VERSION_1_2 |
| 720 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 721 | /* cl_kernel_arg_address_qualifier */ |
| 722 | #define CL_KERNEL_ARG_ADDRESS_GLOBAL 0x119B |
| 723 | #define CL_KERNEL_ARG_ADDRESS_LOCAL 0x119C |
| 724 | #define CL_KERNEL_ARG_ADDRESS_CONSTANT 0x119D |
| 725 | #define CL_KERNEL_ARG_ADDRESS_PRIVATE 0x119E |
| 726 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 727 | #endif |
| 728 | |
| 729 | #ifdef CL_VERSION_1_2 |
| 730 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 731 | /* cl_kernel_arg_access_qualifier */ |
| 732 | #define CL_KERNEL_ARG_ACCESS_READ_ONLY 0x11A0 |
| 733 | #define CL_KERNEL_ARG_ACCESS_WRITE_ONLY 0x11A1 |
| 734 | #define CL_KERNEL_ARG_ACCESS_READ_WRITE 0x11A2 |
| 735 | #define CL_KERNEL_ARG_ACCESS_NONE 0x11A3 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 736 | |
| 737 | #endif |
| 738 | |
| 739 | #ifdef CL_VERSION_1_2 |
| 740 | |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 741 | /* cl_kernel_arg_type_qualifier */ |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 742 | #define CL_KERNEL_ARG_TYPE_NONE 0 |
| 743 | #define CL_KERNEL_ARG_TYPE_CONST (1 << 0) |
| 744 | #define CL_KERNEL_ARG_TYPE_RESTRICT (1 << 1) |
| 745 | #define CL_KERNEL_ARG_TYPE_VOLATILE (1 << 2) |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 746 | #ifdef CL_VERSION_2_0 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 747 | #define CL_KERNEL_ARG_TYPE_PIPE (1 << 3) |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 748 | #endif |
| 749 | |
| 750 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 751 | |
| 752 | /* cl_kernel_work_group_info */ |
| 753 | #define CL_KERNEL_WORK_GROUP_SIZE 0x11B0 |
| 754 | #define CL_KERNEL_COMPILE_WORK_GROUP_SIZE 0x11B1 |
| 755 | #define CL_KERNEL_LOCAL_MEM_SIZE 0x11B2 |
| 756 | #define CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x11B3 |
| 757 | #define CL_KERNEL_PRIVATE_MEM_SIZE 0x11B4 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 758 | #ifdef CL_VERSION_1_2 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 759 | #define CL_KERNEL_GLOBAL_WORK_SIZE 0x11B5 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 760 | #endif |
| 761 | |
| 762 | #ifdef CL_VERSION_2_1 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 763 | |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 764 | /* cl_kernel_sub_group_info */ |
| 765 | #define CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE 0x2033 |
| 766 | #define CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE 0x2034 |
| 767 | #define CL_KERNEL_LOCAL_SIZE_FOR_SUB_GROUP_COUNT 0x11B8 |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 768 | #define CL_KERNEL_MAX_NUM_SUB_GROUPS 0x11B9 |
| 769 | #define CL_KERNEL_COMPILE_NUM_SUB_GROUPS 0x11BA |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 770 | |
| 771 | #endif |
| 772 | |
| 773 | #ifdef CL_VERSION_2_0 |
| 774 | |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 775 | /* cl_kernel_exec_info */ |
| 776 | #define CL_KERNEL_EXEC_INFO_SVM_PTRS 0x11B6 |
| 777 | #define CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM 0x11B7 |
| 778 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 779 | #endif |
| 780 | |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 781 | /* cl_event_info */ |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 782 | #define CL_EVENT_COMMAND_QUEUE 0x11D0 |
| 783 | #define CL_EVENT_COMMAND_TYPE 0x11D1 |
| 784 | #define CL_EVENT_REFERENCE_COUNT 0x11D2 |
| 785 | #define CL_EVENT_COMMAND_EXECUTION_STATUS 0x11D3 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 786 | #ifdef CL_VERSION_1_1 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 787 | #define CL_EVENT_CONTEXT 0x11D4 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 788 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 789 | |
| 790 | /* cl_command_type */ |
| 791 | #define CL_COMMAND_NDRANGE_KERNEL 0x11F0 |
| 792 | #define CL_COMMAND_TASK 0x11F1 |
| 793 | #define CL_COMMAND_NATIVE_KERNEL 0x11F2 |
| 794 | #define CL_COMMAND_READ_BUFFER 0x11F3 |
| 795 | #define CL_COMMAND_WRITE_BUFFER 0x11F4 |
| 796 | #define CL_COMMAND_COPY_BUFFER 0x11F5 |
| 797 | #define CL_COMMAND_READ_IMAGE 0x11F6 |
| 798 | #define CL_COMMAND_WRITE_IMAGE 0x11F7 |
| 799 | #define CL_COMMAND_COPY_IMAGE 0x11F8 |
| 800 | #define CL_COMMAND_COPY_IMAGE_TO_BUFFER 0x11F9 |
| 801 | #define CL_COMMAND_COPY_BUFFER_TO_IMAGE 0x11FA |
| 802 | #define CL_COMMAND_MAP_BUFFER 0x11FB |
| 803 | #define CL_COMMAND_MAP_IMAGE 0x11FC |
| 804 | #define CL_COMMAND_UNMAP_MEM_OBJECT 0x11FD |
| 805 | #define CL_COMMAND_MARKER 0x11FE |
| 806 | #define CL_COMMAND_ACQUIRE_GL_OBJECTS 0x11FF |
| 807 | #define CL_COMMAND_RELEASE_GL_OBJECTS 0x1200 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 808 | #ifdef CL_VERSION_1_1 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 809 | #define CL_COMMAND_READ_BUFFER_RECT 0x1201 |
| 810 | #define CL_COMMAND_WRITE_BUFFER_RECT 0x1202 |
| 811 | #define CL_COMMAND_COPY_BUFFER_RECT 0x1203 |
| 812 | #define CL_COMMAND_USER 0x1204 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 813 | #endif |
| 814 | #ifdef CL_VERSION_1_2 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 815 | #define CL_COMMAND_BARRIER 0x1205 |
| 816 | #define CL_COMMAND_MIGRATE_MEM_OBJECTS 0x1206 |
| 817 | #define CL_COMMAND_FILL_BUFFER 0x1207 |
| 818 | #define CL_COMMAND_FILL_IMAGE 0x1208 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 819 | #endif |
| 820 | #ifdef CL_VERSION_2_0 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 821 | #define CL_COMMAND_SVM_FREE 0x1209 |
| 822 | #define CL_COMMAND_SVM_MEMCPY 0x120A |
| 823 | #define CL_COMMAND_SVM_MEMFILL 0x120B |
| 824 | #define CL_COMMAND_SVM_MAP 0x120C |
| 825 | #define CL_COMMAND_SVM_UNMAP 0x120D |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 826 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 827 | |
| 828 | /* command execution status */ |
| 829 | #define CL_COMPLETE 0x0 |
| 830 | #define CL_RUNNING 0x1 |
| 831 | #define CL_SUBMITTED 0x2 |
| 832 | #define CL_QUEUED 0x3 |
| 833 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 834 | #ifdef CL_VERSION_1_1 |
| 835 | |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 836 | /* cl_buffer_create_type */ |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 837 | #define CL_BUFFER_CREATE_TYPE_REGION 0x1220 |
| 838 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 839 | #endif |
| 840 | |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 841 | /* cl_profiling_info */ |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 842 | #define CL_PROFILING_COMMAND_QUEUED 0x1280 |
| 843 | #define CL_PROFILING_COMMAND_SUBMIT 0x1281 |
| 844 | #define CL_PROFILING_COMMAND_START 0x1282 |
| 845 | #define CL_PROFILING_COMMAND_END 0x1283 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 846 | #ifdef CL_VERSION_2_0 |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 847 | #define CL_PROFILING_COMMAND_COMPLETE 0x1284 |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 848 | #endif |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 849 | |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 850 | #ifdef CL_EXPERIMENTAL |
| 851 | |
| 852 | /* cl_device_atomic_capabilities - bitfield */ |
| 853 | #define CL_DEVICE_ATOMIC_ORDER_RELAXED (1 << 0) |
| 854 | #define CL_DEVICE_ATOMIC_ORDER_ACQ_REL (1 << 1) |
| 855 | #define CL_DEVICE_ATOMIC_ORDER_SEQ_CST (1 << 2) |
| 856 | #define CL_DEVICE_ATOMIC_SCOPE_WORK_ITEM (1 << 3) |
| 857 | #define CL_DEVICE_ATOMIC_SCOPE_WORK_GROUP (1 << 4) |
| 858 | #define CL_DEVICE_ATOMIC_SCOPE_DEVICE (1 << 5) |
| 859 | #define CL_DEVICE_ATOMIC_SCOPE_ALL_SVM_DEVICES (1 << 6) |
| 860 | |
| 861 | /* cl_device_info */ |
| 862 | #define CL_DEVICE_ATOMIC_MEMORY_CAPABILITIES 0x1063 |
| 863 | #define CL_DEVICE_ATOMIC_FENCE_CAPABILITIES 0x1064 |
| 864 | #define CL_DEVICE_NON_UNIFORM_WORK_GROUP_SUPPORT 0x1065 |
| 865 | #define CL_DEVICE_OPENCL_C_VERSIONS 0x1066 |
| 866 | #define CL_DEVICE_MAX_WRITE_IMAGE3D_ARGS 0x1067 |
| 867 | #define CL_DEVICE_WORK_GROUP_COLLECTIVE_FUNCTIONS_SUPPORT 0x1068 |
| 868 | #define CL_DEVICE_GENERIC_ADDRESS_SPACE_SUPPORT 0x1069 |
| 869 | /* 0x106A to 0x106E - Reserved for upcoming KHR extension */ |
| 870 | #define CL_DEVICE_OPENCL_C_FEATURES 0x106F |
| 871 | |
| 872 | /* cl_command_type */ |
| 873 | #define CL_COMMAND_SVM_MIGRATE_MEM 0x120E |
| 874 | |
| 875 | #endif |
| 876 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 877 | /********************************************************************************************************/ |
| 878 | |
| 879 | /* Platform API */ |
| 880 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 881 | clGetPlatformIDs(cl_uint num_entries, |
| 882 | cl_platform_id * platforms, |
| 883 | cl_uint * num_platforms) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 884 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 885 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 886 | clGetPlatformInfo(cl_platform_id platform, |
| 887 | cl_platform_info param_name, |
| 888 | size_t param_value_size, |
| 889 | void * param_value, |
| 890 | size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 891 | |
| 892 | /* Device APIs */ |
| 893 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 894 | clGetDeviceIDs(cl_platform_id platform, |
| 895 | cl_device_type device_type, |
| 896 | cl_uint num_entries, |
| 897 | cl_device_id * devices, |
| 898 | cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 899 | |
| 900 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 901 | clGetDeviceInfo(cl_device_id device, |
| 902 | cl_device_info param_name, |
| 903 | size_t param_value_size, |
| 904 | void * param_value, |
| 905 | size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 906 | |
| 907 | #ifdef CL_VERSION_1_2 |
| 908 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 909 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 910 | clCreateSubDevices(cl_device_id in_device, |
| 911 | const cl_device_partition_property * properties, |
| 912 | cl_uint num_devices, |
| 913 | cl_device_id * out_devices, |
| 914 | cl_uint * num_devices_ret) CL_API_SUFFIX__VERSION_1_2; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 915 | |
| 916 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 917 | clRetainDevice(cl_device_id device) CL_API_SUFFIX__VERSION_1_2; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 918 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 919 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 920 | clReleaseDevice(cl_device_id device) CL_API_SUFFIX__VERSION_1_2; |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 921 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 922 | #endif |
| 923 | |
| 924 | #ifdef CL_VERSION_2_1 |
| 925 | |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 926 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 927 | clSetDefaultDeviceCommandQueue(cl_context context, |
| 928 | cl_device_id device, |
| 929 | cl_command_queue command_queue) CL_API_SUFFIX__VERSION_2_1; |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 930 | |
| 931 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 932 | clGetDeviceAndHostTimer(cl_device_id device, |
| 933 | cl_ulong* device_timestamp, |
| 934 | cl_ulong* host_timestamp) CL_API_SUFFIX__VERSION_2_1; |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 935 | |
| 936 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 937 | clGetHostTimer(cl_device_id device, |
| 938 | cl_ulong * host_timestamp) CL_API_SUFFIX__VERSION_2_1; |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 939 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 940 | #endif |
| 941 | |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 942 | /* Context APIs */ |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 943 | extern CL_API_ENTRY cl_context CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 944 | clCreateContext(const cl_context_properties * properties, |
| 945 | cl_uint num_devices, |
| 946 | const cl_device_id * devices, |
| 947 | void (CL_CALLBACK * pfn_notify)(const char * errinfo, |
| 948 | const void * private_info, |
| 949 | size_t cb, |
| 950 | void * user_data), |
| 951 | void * user_data, |
| 952 | cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 953 | |
| 954 | extern CL_API_ENTRY cl_context CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 955 | clCreateContextFromType(const cl_context_properties * properties, |
| 956 | cl_device_type device_type, |
| 957 | void (CL_CALLBACK * pfn_notify)(const char * errinfo, |
| 958 | const void * private_info, |
| 959 | size_t cb, |
| 960 | void * user_data), |
| 961 | void * user_data, |
| 962 | cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 963 | |
| 964 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 965 | clRetainContext(cl_context context) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 966 | |
| 967 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 968 | clReleaseContext(cl_context context) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 969 | |
| 970 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 971 | clGetContextInfo(cl_context context, |
| 972 | cl_context_info param_name, |
| 973 | size_t param_value_size, |
| 974 | void * param_value, |
| 975 | size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 976 | |
| 977 | /* Command Queue APIs */ |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 978 | |
| 979 | #ifdef CL_VERSION_2_0 |
| 980 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 981 | extern CL_API_ENTRY cl_command_queue CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 982 | clCreateCommandQueueWithProperties(cl_context context, |
| 983 | cl_device_id device, |
| 984 | const cl_queue_properties * properties, |
| 985 | cl_int * errcode_ret) CL_API_SUFFIX__VERSION_2_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 986 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 987 | #endif |
| 988 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 989 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 990 | clRetainCommandQueue(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 991 | |
| 992 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 993 | clReleaseCommandQueue(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 994 | |
| 995 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 996 | clGetCommandQueueInfo(cl_command_queue command_queue, |
| 997 | cl_command_queue_info param_name, |
| 998 | size_t param_value_size, |
| 999 | void * param_value, |
| 1000 | size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1001 | |
| 1002 | /* Memory Object APIs */ |
| 1003 | extern CL_API_ENTRY cl_mem CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1004 | clCreateBuffer(cl_context context, |
| 1005 | cl_mem_flags flags, |
| 1006 | size_t size, |
| 1007 | void * host_ptr, |
| 1008 | cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1009 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1010 | #ifdef CL_VERSION_1_1 |
| 1011 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1012 | extern CL_API_ENTRY cl_mem CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1013 | clCreateSubBuffer(cl_mem buffer, |
| 1014 | cl_mem_flags flags, |
| 1015 | cl_buffer_create_type buffer_create_type, |
| 1016 | const void * buffer_create_info, |
| 1017 | cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_1; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1018 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1019 | #endif |
| 1020 | |
| 1021 | #ifdef CL_VERSION_1_2 |
| 1022 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1023 | extern CL_API_ENTRY cl_mem CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1024 | clCreateImage(cl_context context, |
| 1025 | cl_mem_flags flags, |
| 1026 | const cl_image_format * image_format, |
| 1027 | const cl_image_desc * image_desc, |
| 1028 | void * host_ptr, |
| 1029 | cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1030 | |
| 1031 | #endif |
| 1032 | |
| 1033 | #ifdef CL_VERSION_2_0 |
| 1034 | |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1035 | extern CL_API_ENTRY cl_mem CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1036 | clCreatePipe(cl_context context, |
| 1037 | cl_mem_flags flags, |
| 1038 | cl_uint pipe_packet_size, |
| 1039 | cl_uint pipe_max_packets, |
| 1040 | const cl_pipe_properties * properties, |
| 1041 | cl_int * errcode_ret) CL_API_SUFFIX__VERSION_2_0; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1042 | |
| 1043 | #endif |
| 1044 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1045 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1046 | clRetainMemObject(cl_mem memobj) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1047 | |
| 1048 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1049 | clReleaseMemObject(cl_mem memobj) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1050 | |
| 1051 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1052 | clGetSupportedImageFormats(cl_context context, |
| 1053 | cl_mem_flags flags, |
| 1054 | cl_mem_object_type image_type, |
| 1055 | cl_uint num_entries, |
| 1056 | cl_image_format * image_formats, |
| 1057 | cl_uint * num_image_formats) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1058 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1059 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1060 | clGetMemObjectInfo(cl_mem memobj, |
| 1061 | cl_mem_info param_name, |
| 1062 | size_t param_value_size, |
| 1063 | void * param_value, |
| 1064 | size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1065 | |
| 1066 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1067 | clGetImageInfo(cl_mem image, |
| 1068 | cl_image_info param_name, |
| 1069 | size_t param_value_size, |
| 1070 | void * param_value, |
| 1071 | size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1072 | |
| 1073 | #ifdef CL_VERSION_2_0 |
| 1074 | |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1075 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1076 | clGetPipeInfo(cl_mem pipe, |
| 1077 | cl_pipe_info param_name, |
| 1078 | size_t param_value_size, |
| 1079 | void * param_value, |
| 1080 | size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_2_0; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1081 | |
| 1082 | #endif |
| 1083 | |
| 1084 | #ifdef CL_VERSION_1_1 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1085 | |
| 1086 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1087 | clSetMemObjectDestructorCallback(cl_mem memobj, |
| 1088 | void (CL_CALLBACK * pfn_notify)(cl_mem memobj, |
| 1089 | void * user_data), |
| 1090 | void * user_data) CL_API_SUFFIX__VERSION_1_1; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1091 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1092 | #endif |
| 1093 | |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1094 | /* SVM Allocation APIs */ |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1095 | |
| 1096 | #ifdef CL_VERSION_2_0 |
| 1097 | |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1098 | extern CL_API_ENTRY void * CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1099 | clSVMAlloc(cl_context context, |
| 1100 | cl_svm_mem_flags flags, |
| 1101 | size_t size, |
| 1102 | cl_uint alignment) CL_API_SUFFIX__VERSION_2_0; |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1103 | |
| 1104 | extern CL_API_ENTRY void CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1105 | clSVMFree(cl_context context, |
| 1106 | void * svm_pointer) CL_API_SUFFIX__VERSION_2_0; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1107 | |
| 1108 | #endif |
| 1109 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1110 | /* Sampler APIs */ |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1111 | |
| 1112 | #ifdef CL_VERSION_2_0 |
| 1113 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1114 | extern CL_API_ENTRY cl_sampler CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1115 | clCreateSamplerWithProperties(cl_context context, |
| 1116 | const cl_sampler_properties * sampler_properties, |
| 1117 | cl_int * errcode_ret) CL_API_SUFFIX__VERSION_2_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1118 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1119 | #endif |
| 1120 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1121 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1122 | clRetainSampler(cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1123 | |
| 1124 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1125 | clReleaseSampler(cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1126 | |
| 1127 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1128 | clGetSamplerInfo(cl_sampler sampler, |
| 1129 | cl_sampler_info param_name, |
| 1130 | size_t param_value_size, |
| 1131 | void * param_value, |
| 1132 | size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1133 | |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1134 | /* Program Object APIs */ |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1135 | extern CL_API_ENTRY cl_program CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1136 | clCreateProgramWithSource(cl_context context, |
| 1137 | cl_uint count, |
| 1138 | const char ** strings, |
| 1139 | const size_t * lengths, |
| 1140 | cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1141 | |
| 1142 | extern CL_API_ENTRY cl_program CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1143 | clCreateProgramWithBinary(cl_context context, |
| 1144 | cl_uint num_devices, |
| 1145 | const cl_device_id * device_list, |
| 1146 | const size_t * lengths, |
| 1147 | const unsigned char ** binaries, |
| 1148 | cl_int * binary_status, |
| 1149 | cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1150 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1151 | #ifdef CL_VERSION_1_2 |
| 1152 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1153 | extern CL_API_ENTRY cl_program CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1154 | clCreateProgramWithBuiltInKernels(cl_context context, |
| 1155 | cl_uint num_devices, |
| 1156 | const cl_device_id * device_list, |
| 1157 | const char * kernel_names, |
| 1158 | cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1159 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1160 | #endif |
| 1161 | |
| 1162 | #ifdef CL_VERSION_2_1 |
| 1163 | |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1164 | extern CL_API_ENTRY cl_program CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1165 | clCreateProgramWithIL(cl_context context, |
| 1166 | const void* il, |
| 1167 | size_t length, |
| 1168 | cl_int* errcode_ret) CL_API_SUFFIX__VERSION_2_1; |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1169 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1170 | #endif |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1171 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1172 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1173 | clRetainProgram(cl_program program) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1174 | |
| 1175 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1176 | clReleaseProgram(cl_program program) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1177 | |
| 1178 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1179 | clBuildProgram(cl_program program, |
| 1180 | cl_uint num_devices, |
| 1181 | const cl_device_id * device_list, |
| 1182 | const char * options, |
| 1183 | void (CL_CALLBACK * pfn_notify)(cl_program program, |
| 1184 | void * user_data), |
| 1185 | void * user_data) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1186 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1187 | #ifdef CL_VERSION_1_2 |
| 1188 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1189 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1190 | clCompileProgram(cl_program program, |
| 1191 | cl_uint num_devices, |
| 1192 | const cl_device_id * device_list, |
| 1193 | const char * options, |
| 1194 | cl_uint num_input_headers, |
| 1195 | const cl_program * input_headers, |
| 1196 | const char ** header_include_names, |
| 1197 | void (CL_CALLBACK * pfn_notify)(cl_program program, |
| 1198 | void * user_data), |
| 1199 | void * user_data) CL_API_SUFFIX__VERSION_1_2; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1200 | |
| 1201 | extern CL_API_ENTRY cl_program CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1202 | clLinkProgram(cl_context context, |
| 1203 | cl_uint num_devices, |
| 1204 | const cl_device_id * device_list, |
| 1205 | const char * options, |
| 1206 | cl_uint num_input_programs, |
| 1207 | const cl_program * input_programs, |
| 1208 | void (CL_CALLBACK * pfn_notify)(cl_program program, |
| 1209 | void * user_data), |
| 1210 | void * user_data, |
| 1211 | cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1212 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1213 | #endif |
| 1214 | |
| 1215 | #ifdef CL_VERSION_2_2 |
| 1216 | |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1217 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1218 | clSetProgramReleaseCallback(cl_program program, |
| 1219 | void (CL_CALLBACK * pfn_notify)(cl_program program, |
| 1220 | void * user_data), |
| 1221 | void * user_data) CL_API_SUFFIX__VERSION_2_2; |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1222 | |
| 1223 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1224 | clSetProgramSpecializationConstant(cl_program program, |
| 1225 | cl_uint spec_id, |
| 1226 | size_t spec_size, |
| 1227 | const void* spec_value) CL_API_SUFFIX__VERSION_2_2; |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1228 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1229 | #endif |
| 1230 | |
| 1231 | #ifdef CL_VERSION_1_2 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1232 | |
| 1233 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1234 | clUnloadPlatformCompiler(cl_platform_id platform) CL_API_SUFFIX__VERSION_1_2; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1235 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1236 | #endif |
| 1237 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1238 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1239 | clGetProgramInfo(cl_program program, |
| 1240 | cl_program_info param_name, |
| 1241 | size_t param_value_size, |
| 1242 | void * param_value, |
| 1243 | size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1244 | |
| 1245 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1246 | clGetProgramBuildInfo(cl_program program, |
| 1247 | cl_device_id device, |
| 1248 | cl_program_build_info param_name, |
| 1249 | size_t param_value_size, |
| 1250 | void * param_value, |
| 1251 | size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1252 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1253 | /* Kernel Object APIs */ |
| 1254 | extern CL_API_ENTRY cl_kernel CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1255 | clCreateKernel(cl_program program, |
| 1256 | const char * kernel_name, |
| 1257 | cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1258 | |
| 1259 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1260 | clCreateKernelsInProgram(cl_program program, |
| 1261 | cl_uint num_kernels, |
| 1262 | cl_kernel * kernels, |
| 1263 | cl_uint * num_kernels_ret) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1264 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1265 | #ifdef CL_VERSION_2_1 |
| 1266 | |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1267 | extern CL_API_ENTRY cl_kernel CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1268 | clCloneKernel(cl_kernel source_kernel, |
| 1269 | cl_int* errcode_ret) CL_API_SUFFIX__VERSION_2_1; |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1270 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1271 | #endif |
| 1272 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1273 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1274 | clRetainKernel(cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1275 | |
| 1276 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1277 | clReleaseKernel(cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1278 | |
| 1279 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1280 | clSetKernelArg(cl_kernel kernel, |
| 1281 | cl_uint arg_index, |
| 1282 | size_t arg_size, |
| 1283 | const void * arg_value) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1284 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1285 | #ifdef CL_VERSION_2_0 |
| 1286 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1287 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1288 | clSetKernelArgSVMPointer(cl_kernel kernel, |
| 1289 | cl_uint arg_index, |
| 1290 | const void * arg_value) CL_API_SUFFIX__VERSION_2_0; |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1291 | |
| 1292 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1293 | clSetKernelExecInfo(cl_kernel kernel, |
| 1294 | cl_kernel_exec_info param_name, |
| 1295 | size_t param_value_size, |
| 1296 | const void * param_value) CL_API_SUFFIX__VERSION_2_0; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1297 | |
| 1298 | #endif |
| 1299 | |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1300 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1301 | clGetKernelInfo(cl_kernel kernel, |
| 1302 | cl_kernel_info param_name, |
| 1303 | size_t param_value_size, |
| 1304 | void * param_value, |
| 1305 | size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1306 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1307 | #ifdef CL_VERSION_1_2 |
| 1308 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1309 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1310 | clGetKernelArgInfo(cl_kernel kernel, |
| 1311 | cl_uint arg_indx, |
| 1312 | cl_kernel_arg_info param_name, |
| 1313 | size_t param_value_size, |
| 1314 | void * param_value, |
| 1315 | size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_2; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1316 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1317 | #endif |
| 1318 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1319 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1320 | clGetKernelWorkGroupInfo(cl_kernel kernel, |
| 1321 | cl_device_id device, |
| 1322 | cl_kernel_work_group_info param_name, |
| 1323 | size_t param_value_size, |
| 1324 | void * param_value, |
| 1325 | size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1326 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1327 | #ifdef CL_VERSION_2_1 |
| 1328 | |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1329 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1330 | clGetKernelSubGroupInfo(cl_kernel kernel, |
| 1331 | cl_device_id device, |
| 1332 | cl_kernel_sub_group_info param_name, |
| 1333 | size_t input_value_size, |
| 1334 | const void* input_value, |
| 1335 | size_t param_value_size, |
| 1336 | void* param_value, |
| 1337 | size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_2_1; |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1338 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1339 | #endif |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1340 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1341 | /* Event Object APIs */ |
| 1342 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1343 | clWaitForEvents(cl_uint num_events, |
| 1344 | const cl_event * event_list) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1345 | |
| 1346 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1347 | clGetEventInfo(cl_event event, |
| 1348 | cl_event_info param_name, |
| 1349 | size_t param_value_size, |
| 1350 | void * param_value, |
| 1351 | size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1352 | |
| 1353 | #ifdef CL_VERSION_1_1 |
| 1354 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1355 | extern CL_API_ENTRY cl_event CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1356 | clCreateUserEvent(cl_context context, |
| 1357 | cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_1; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1358 | |
| 1359 | #endif |
| 1360 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1361 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1362 | clRetainEvent(cl_event event) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1363 | |
| 1364 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1365 | clReleaseEvent(cl_event event) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1366 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1367 | #ifdef CL_VERSION_1_1 |
| 1368 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1369 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1370 | clSetUserEventStatus(cl_event event, |
| 1371 | cl_int execution_status) CL_API_SUFFIX__VERSION_1_1; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1372 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1373 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1374 | clSetEventCallback(cl_event event, |
| 1375 | cl_int command_exec_callback_type, |
| 1376 | void (CL_CALLBACK * pfn_notify)(cl_event event, |
| 1377 | cl_int event_command_status, |
| 1378 | void * user_data), |
| 1379 | void * user_data) CL_API_SUFFIX__VERSION_1_1; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1380 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1381 | #endif |
| 1382 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1383 | /* Profiling APIs */ |
| 1384 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1385 | clGetEventProfilingInfo(cl_event event, |
| 1386 | cl_profiling_info param_name, |
| 1387 | size_t param_value_size, |
| 1388 | void * param_value, |
| 1389 | size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1390 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1391 | /* Flush and Finish APIs */ |
| 1392 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1393 | clFlush(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1394 | |
| 1395 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1396 | clFinish(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1397 | |
| 1398 | /* Enqueued Commands APIs */ |
| 1399 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1400 | clEnqueueReadBuffer(cl_command_queue command_queue, |
| 1401 | cl_mem buffer, |
| 1402 | cl_bool blocking_read, |
| 1403 | size_t offset, |
| 1404 | size_t size, |
| 1405 | void * ptr, |
| 1406 | cl_uint num_events_in_wait_list, |
| 1407 | const cl_event * event_wait_list, |
| 1408 | cl_event * event) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1409 | |
| 1410 | #ifdef CL_VERSION_1_1 |
| 1411 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1412 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1413 | clEnqueueReadBufferRect(cl_command_queue command_queue, |
| 1414 | cl_mem buffer, |
| 1415 | cl_bool blocking_read, |
| 1416 | const size_t * buffer_offset, |
| 1417 | const size_t * host_offset, |
| 1418 | const size_t * region, |
| 1419 | size_t buffer_row_pitch, |
| 1420 | size_t buffer_slice_pitch, |
| 1421 | size_t host_row_pitch, |
| 1422 | size_t host_slice_pitch, |
| 1423 | void * ptr, |
| 1424 | cl_uint num_events_in_wait_list, |
| 1425 | const cl_event * event_wait_list, |
| 1426 | cl_event * event) CL_API_SUFFIX__VERSION_1_1; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1427 | |
| 1428 | #endif |
| 1429 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1430 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1431 | clEnqueueWriteBuffer(cl_command_queue command_queue, |
| 1432 | cl_mem buffer, |
| 1433 | cl_bool blocking_write, |
| 1434 | size_t offset, |
| 1435 | size_t size, |
| 1436 | const void * ptr, |
| 1437 | cl_uint num_events_in_wait_list, |
| 1438 | const cl_event * event_wait_list, |
| 1439 | cl_event * event) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1440 | |
| 1441 | #ifdef CL_VERSION_1_1 |
| 1442 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1443 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1444 | clEnqueueWriteBufferRect(cl_command_queue command_queue, |
| 1445 | cl_mem buffer, |
| 1446 | cl_bool blocking_write, |
| 1447 | const size_t * buffer_offset, |
| 1448 | const size_t * host_offset, |
| 1449 | const size_t * region, |
| 1450 | size_t buffer_row_pitch, |
| 1451 | size_t buffer_slice_pitch, |
| 1452 | size_t host_row_pitch, |
| 1453 | size_t host_slice_pitch, |
| 1454 | const void * ptr, |
| 1455 | cl_uint num_events_in_wait_list, |
| 1456 | const cl_event * event_wait_list, |
| 1457 | cl_event * event) CL_API_SUFFIX__VERSION_1_1; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1458 | |
| 1459 | #endif |
| 1460 | |
| 1461 | #ifdef CL_VERSION_1_2 |
| 1462 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1463 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1464 | clEnqueueFillBuffer(cl_command_queue command_queue, |
| 1465 | cl_mem buffer, |
| 1466 | const void * pattern, |
| 1467 | size_t pattern_size, |
| 1468 | size_t offset, |
| 1469 | size_t size, |
| 1470 | cl_uint num_events_in_wait_list, |
| 1471 | const cl_event * event_wait_list, |
| 1472 | cl_event * event) CL_API_SUFFIX__VERSION_1_2; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1473 | |
| 1474 | #endif |
| 1475 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1476 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1477 | clEnqueueCopyBuffer(cl_command_queue command_queue, |
| 1478 | cl_mem src_buffer, |
| 1479 | cl_mem dst_buffer, |
| 1480 | size_t src_offset, |
| 1481 | size_t dst_offset, |
| 1482 | size_t size, |
| 1483 | cl_uint num_events_in_wait_list, |
| 1484 | const cl_event * event_wait_list, |
| 1485 | cl_event * event) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1486 | |
| 1487 | #ifdef CL_VERSION_1_1 |
| 1488 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1489 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1490 | clEnqueueCopyBufferRect(cl_command_queue command_queue, |
| 1491 | cl_mem src_buffer, |
| 1492 | cl_mem dst_buffer, |
| 1493 | const size_t * src_origin, |
| 1494 | const size_t * dst_origin, |
| 1495 | const size_t * region, |
| 1496 | size_t src_row_pitch, |
| 1497 | size_t src_slice_pitch, |
| 1498 | size_t dst_row_pitch, |
| 1499 | size_t dst_slice_pitch, |
| 1500 | cl_uint num_events_in_wait_list, |
| 1501 | const cl_event * event_wait_list, |
| 1502 | cl_event * event) CL_API_SUFFIX__VERSION_1_1; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1503 | |
| 1504 | #endif |
| 1505 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1506 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1507 | clEnqueueReadImage(cl_command_queue command_queue, |
| 1508 | cl_mem image, |
| 1509 | cl_bool blocking_read, |
| 1510 | const size_t * origin, |
| 1511 | const size_t * region, |
| 1512 | size_t row_pitch, |
| 1513 | size_t slice_pitch, |
| 1514 | void * ptr, |
| 1515 | cl_uint num_events_in_wait_list, |
| 1516 | const cl_event * event_wait_list, |
| 1517 | cl_event * event) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1518 | |
| 1519 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1520 | clEnqueueWriteImage(cl_command_queue command_queue, |
| 1521 | cl_mem image, |
| 1522 | cl_bool blocking_write, |
| 1523 | const size_t * origin, |
| 1524 | const size_t * region, |
| 1525 | size_t input_row_pitch, |
| 1526 | size_t input_slice_pitch, |
| 1527 | const void * ptr, |
| 1528 | cl_uint num_events_in_wait_list, |
| 1529 | const cl_event * event_wait_list, |
| 1530 | cl_event * event) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1531 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1532 | #ifdef CL_VERSION_1_2 |
| 1533 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1534 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1535 | clEnqueueFillImage(cl_command_queue command_queue, |
| 1536 | cl_mem image, |
| 1537 | const void * fill_color, |
| 1538 | const size_t * origin, |
| 1539 | const size_t * region, |
| 1540 | cl_uint num_events_in_wait_list, |
| 1541 | const cl_event * event_wait_list, |
| 1542 | cl_event * event) CL_API_SUFFIX__VERSION_1_2; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1543 | |
| 1544 | #endif |
| 1545 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1546 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1547 | clEnqueueCopyImage(cl_command_queue command_queue, |
| 1548 | cl_mem src_image, |
| 1549 | cl_mem dst_image, |
| 1550 | const size_t * src_origin, |
| 1551 | const size_t * dst_origin, |
| 1552 | const size_t * region, |
| 1553 | cl_uint num_events_in_wait_list, |
| 1554 | const cl_event * event_wait_list, |
| 1555 | cl_event * event) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1556 | |
| 1557 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1558 | clEnqueueCopyImageToBuffer(cl_command_queue command_queue, |
| 1559 | cl_mem src_image, |
| 1560 | cl_mem dst_buffer, |
| 1561 | const size_t * src_origin, |
| 1562 | const size_t * region, |
| 1563 | size_t dst_offset, |
| 1564 | cl_uint num_events_in_wait_list, |
| 1565 | const cl_event * event_wait_list, |
| 1566 | cl_event * event) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1567 | |
| 1568 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1569 | clEnqueueCopyBufferToImage(cl_command_queue command_queue, |
| 1570 | cl_mem src_buffer, |
| 1571 | cl_mem dst_image, |
| 1572 | size_t src_offset, |
| 1573 | const size_t * dst_origin, |
| 1574 | const size_t * region, |
| 1575 | cl_uint num_events_in_wait_list, |
| 1576 | const cl_event * event_wait_list, |
| 1577 | cl_event * event) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1578 | |
| 1579 | extern CL_API_ENTRY void * CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1580 | clEnqueueMapBuffer(cl_command_queue command_queue, |
| 1581 | cl_mem buffer, |
| 1582 | cl_bool blocking_map, |
| 1583 | cl_map_flags map_flags, |
| 1584 | size_t offset, |
| 1585 | size_t size, |
| 1586 | cl_uint num_events_in_wait_list, |
| 1587 | const cl_event * event_wait_list, |
| 1588 | cl_event * event, |
| 1589 | cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1590 | |
| 1591 | extern CL_API_ENTRY void * CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1592 | clEnqueueMapImage(cl_command_queue command_queue, |
| 1593 | cl_mem image, |
| 1594 | cl_bool blocking_map, |
| 1595 | cl_map_flags map_flags, |
| 1596 | const size_t * origin, |
| 1597 | const size_t * region, |
| 1598 | size_t * image_row_pitch, |
| 1599 | size_t * image_slice_pitch, |
| 1600 | cl_uint num_events_in_wait_list, |
| 1601 | const cl_event * event_wait_list, |
| 1602 | cl_event * event, |
| 1603 | cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1604 | |
| 1605 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1606 | clEnqueueUnmapMemObject(cl_command_queue command_queue, |
| 1607 | cl_mem memobj, |
| 1608 | void * mapped_ptr, |
| 1609 | cl_uint num_events_in_wait_list, |
| 1610 | const cl_event * event_wait_list, |
| 1611 | cl_event * event) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1612 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1613 | #ifdef CL_VERSION_1_2 |
| 1614 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1615 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1616 | clEnqueueMigrateMemObjects(cl_command_queue command_queue, |
| 1617 | cl_uint num_mem_objects, |
| 1618 | const cl_mem * mem_objects, |
| 1619 | cl_mem_migration_flags flags, |
| 1620 | cl_uint num_events_in_wait_list, |
| 1621 | const cl_event * event_wait_list, |
| 1622 | cl_event * event) CL_API_SUFFIX__VERSION_1_2; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1623 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1624 | #endif |
| 1625 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1626 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1627 | clEnqueueNDRangeKernel(cl_command_queue command_queue, |
| 1628 | cl_kernel kernel, |
| 1629 | cl_uint work_dim, |
| 1630 | const size_t * global_work_offset, |
| 1631 | const size_t * global_work_size, |
| 1632 | const size_t * local_work_size, |
| 1633 | cl_uint num_events_in_wait_list, |
| 1634 | const cl_event * event_wait_list, |
| 1635 | cl_event * event) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1636 | |
| 1637 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1638 | clEnqueueNativeKernel(cl_command_queue command_queue, |
| 1639 | void (CL_CALLBACK * user_func)(void *), |
| 1640 | void * args, |
| 1641 | size_t cb_args, |
| 1642 | cl_uint num_mem_objects, |
| 1643 | const cl_mem * mem_list, |
| 1644 | const void ** args_mem_loc, |
| 1645 | cl_uint num_events_in_wait_list, |
| 1646 | const cl_event * event_wait_list, |
| 1647 | cl_event * event) CL_API_SUFFIX__VERSION_1_0; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1648 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1649 | #ifdef CL_VERSION_1_2 |
| 1650 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1651 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1652 | clEnqueueMarkerWithWaitList(cl_command_queue command_queue, |
| 1653 | cl_uint num_events_in_wait_list, |
| 1654 | const cl_event * event_wait_list, |
| 1655 | cl_event * event) CL_API_SUFFIX__VERSION_1_2; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1656 | |
| 1657 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1658 | clEnqueueBarrierWithWaitList(cl_command_queue command_queue, |
| 1659 | cl_uint num_events_in_wait_list, |
| 1660 | const cl_event * event_wait_list, |
| 1661 | cl_event * event) CL_API_SUFFIX__VERSION_1_2; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1662 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1663 | #endif |
| 1664 | |
| 1665 | #ifdef CL_VERSION_2_0 |
| 1666 | |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1667 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1668 | clEnqueueSVMFree(cl_command_queue command_queue, |
| 1669 | cl_uint num_svm_pointers, |
| 1670 | void * svm_pointers[], |
| 1671 | void (CL_CALLBACK * pfn_free_func)(cl_command_queue queue, |
| 1672 | cl_uint num_svm_pointers, |
| 1673 | void * svm_pointers[], |
| 1674 | void * user_data), |
| 1675 | void * user_data, |
| 1676 | cl_uint num_events_in_wait_list, |
| 1677 | const cl_event * event_wait_list, |
| 1678 | cl_event * event) CL_API_SUFFIX__VERSION_2_0; |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1679 | |
| 1680 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1681 | clEnqueueSVMMemcpy(cl_command_queue command_queue, |
| 1682 | cl_bool blocking_copy, |
| 1683 | void * dst_ptr, |
| 1684 | const void * src_ptr, |
| 1685 | size_t size, |
| 1686 | cl_uint num_events_in_wait_list, |
| 1687 | const cl_event * event_wait_list, |
| 1688 | cl_event * event) CL_API_SUFFIX__VERSION_2_0; |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1689 | |
| 1690 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1691 | clEnqueueSVMMemFill(cl_command_queue command_queue, |
| 1692 | void * svm_ptr, |
| 1693 | const void * pattern, |
| 1694 | size_t pattern_size, |
| 1695 | size_t size, |
| 1696 | cl_uint num_events_in_wait_list, |
| 1697 | const cl_event * event_wait_list, |
| 1698 | cl_event * event) CL_API_SUFFIX__VERSION_2_0; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1699 | |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1700 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1701 | clEnqueueSVMMap(cl_command_queue command_queue, |
| 1702 | cl_bool blocking_map, |
| 1703 | cl_map_flags flags, |
| 1704 | void * svm_ptr, |
| 1705 | size_t size, |
| 1706 | cl_uint num_events_in_wait_list, |
| 1707 | const cl_event * event_wait_list, |
| 1708 | cl_event * event) CL_API_SUFFIX__VERSION_2_0; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1709 | |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1710 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1711 | clEnqueueSVMUnmap(cl_command_queue command_queue, |
| 1712 | void * svm_ptr, |
| 1713 | cl_uint num_events_in_wait_list, |
| 1714 | const cl_event * event_wait_list, |
| 1715 | cl_event * event) CL_API_SUFFIX__VERSION_2_0; |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1716 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1717 | #endif |
| 1718 | |
| 1719 | #ifdef CL_VERSION_2_1 |
| 1720 | |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1721 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1722 | clEnqueueSVMMigrateMem(cl_command_queue command_queue, |
| 1723 | cl_uint num_svm_pointers, |
| 1724 | const void ** svm_pointers, |
| 1725 | const size_t * sizes, |
| 1726 | cl_mem_migration_flags flags, |
| 1727 | cl_uint num_events_in_wait_list, |
| 1728 | const cl_event * event_wait_list, |
| 1729 | cl_event * event) CL_API_SUFFIX__VERSION_2_1; |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1730 | |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1731 | #endif |
| 1732 | |
| 1733 | #ifdef CL_VERSION_1_2 |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1734 | |
| 1735 | /* Extension function access |
| 1736 | * |
| 1737 | * Returns the extension function address for the given function name, |
| 1738 | * or NULL if a valid function can not be found. The client must |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1739 | * check to make sure the address is not NULL, before using or |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1740 | * calling the returned function address. |
| 1741 | */ |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1742 | extern CL_API_ENTRY void * CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1743 | clGetExtensionFunctionAddressForPlatform(cl_platform_id platform, |
| 1744 | const char * func_name) CL_API_SUFFIX__VERSION_1_2; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1745 | |
| 1746 | #endif |
| 1747 | |
| 1748 | #ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS |
| 1749 | /* |
| 1750 | * WARNING: |
| 1751 | * This API introduces mutable state into the OpenCL implementation. It has been REMOVED |
| 1752 | * to better facilitate thread safety. The 1.0 API is not thread safe. It is not tested by the |
| 1753 | * OpenCL 1.1 conformance test, and consequently may not work or may not work dependably. |
| 1754 | * It is likely to be non-performant. Use of this API is not advised. Use at your own risk. |
| 1755 | * |
| 1756 | * Software developers previously relying on this API are instructed to set the command queue |
| 1757 | * properties when creating the queue, instead. |
| 1758 | */ |
| 1759 | extern CL_API_ENTRY cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1760 | clSetCommandQueueProperty(cl_command_queue command_queue, |
| 1761 | cl_command_queue_properties properties, |
| 1762 | cl_bool enable, |
| 1763 | cl_command_queue_properties * old_properties) CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1764 | #endif /* CL_USE_DEPRECATED_OPENCL_1_0_APIS */ |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1765 | |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1766 | /* Deprecated OpenCL 1.1 APIs */ |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1767 | extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1768 | clCreateImage2D(cl_context context, |
| 1769 | cl_mem_flags flags, |
| 1770 | const cl_image_format * image_format, |
| 1771 | size_t image_width, |
| 1772 | size_t image_height, |
| 1773 | size_t image_row_pitch, |
| 1774 | void * host_ptr, |
| 1775 | cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1776 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1777 | extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1778 | clCreateImage3D(cl_context context, |
| 1779 | cl_mem_flags flags, |
| 1780 | const cl_image_format * image_format, |
| 1781 | size_t image_width, |
| 1782 | size_t image_height, |
| 1783 | size_t image_depth, |
| 1784 | size_t image_row_pitch, |
| 1785 | size_t image_slice_pitch, |
| 1786 | void * host_ptr, |
| 1787 | cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1788 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1789 | extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1790 | clEnqueueMarker(cl_command_queue command_queue, |
| 1791 | cl_event * event) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1792 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1793 | extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1794 | clEnqueueWaitForEvents(cl_command_queue command_queue, |
| 1795 | cl_uint num_events, |
| 1796 | const cl_event * event_list) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1797 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1798 | extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1799 | clEnqueueBarrier(cl_command_queue command_queue) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1800 | |
| 1801 | extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL |
| 1802 | clUnloadCompiler(void) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1803 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1804 | extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED void * CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1805 | clGetExtensionFunctionAddress(const char * func_name) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1806 | |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1807 | /* Deprecated OpenCL 2.0 APIs */ |
| 1808 | extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_command_queue CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1809 | clCreateCommandQueue(cl_context context, |
| 1810 | cl_device_id device, |
| 1811 | cl_command_queue_properties properties, |
| 1812 | cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1813 | |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1814 | extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_sampler CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1815 | clCreateSampler(cl_context context, |
| 1816 | cl_bool normalized_coords, |
| 1817 | cl_addressing_mode addressing_mode, |
| 1818 | cl_filter_mode filter_mode, |
| 1819 | cl_int * errcode_ret) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1820 | |
Pablo Tello | e86a09f | 2018-01-11 15:44:48 +0000 | [diff] [blame] | 1821 | extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_int CL_API_CALL |
Sheri Zhang | 67354e0 | 2021-06-30 16:08:29 +0100 | [diff] [blame^] | 1822 | clEnqueueTask(cl_command_queue command_queue, |
| 1823 | cl_kernel kernel, |
| 1824 | cl_uint num_events_in_wait_list, |
| 1825 | const cl_event * event_wait_list, |
| 1826 | cl_event * event) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED; |
Anthony Barbier | 8b2fdc9 | 2018-08-09 11:42:38 +0100 | [diff] [blame] | 1827 | |
Anthony Barbier | 6ff3b19 | 2017-09-04 18:44:23 +0100 | [diff] [blame] | 1828 | #ifdef __cplusplus |
| 1829 | } |
| 1830 | #endif |
| 1831 | |
| 1832 | #endif /* __OPENCL_CL_H */ |