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