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