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