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