Caffe2 - C++ API
A deep learning, cross platform ML framework
cl.h
1 /*******************************************************************************
2  * Copyright (c) 2008 - 2012 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_command_queue_properties;
59 typedef intptr_t cl_device_partition_property;
60 typedef cl_bitfield cl_device_affinity_domain;
61 
62 typedef intptr_t cl_context_properties;
63 typedef cl_uint cl_context_info;
64 typedef cl_uint cl_command_queue_info;
65 typedef cl_uint cl_channel_order;
66 typedef cl_uint cl_channel_type;
67 typedef cl_bitfield cl_mem_flags;
68 typedef cl_uint cl_mem_object_type;
69 typedef cl_uint cl_mem_info;
70 typedef cl_bitfield cl_mem_migration_flags;
71 typedef cl_uint cl_image_info;
72 typedef cl_uint cl_buffer_create_type;
73 typedef cl_uint cl_addressing_mode;
74 typedef cl_uint cl_filter_mode;
75 typedef cl_uint cl_sampler_info;
76 typedef cl_bitfield cl_map_flags;
77 typedef cl_uint cl_program_info;
78 typedef cl_uint cl_program_build_info;
79 typedef cl_uint cl_program_binary_type;
80 typedef cl_int cl_build_status;
81 typedef cl_uint cl_kernel_info;
82 typedef cl_uint cl_kernel_arg_info;
83 typedef cl_uint cl_kernel_arg_address_qualifier;
84 typedef cl_uint cl_kernel_arg_access_qualifier;
85 typedef cl_bitfield cl_kernel_arg_type_qualifier;
86 typedef cl_uint cl_kernel_work_group_info;
87 typedef cl_uint cl_event_info;
88 typedef cl_uint cl_command_type;
89 typedef cl_uint cl_profiling_info;
90 
91 
92 typedef struct _cl_image_format {
93  cl_channel_order image_channel_order;
94  cl_channel_type image_channel_data_type;
96 
97 typedef struct _cl_image_desc {
98  cl_mem_object_type image_type;
99  size_t image_width;
100  size_t image_height;
101  size_t image_depth;
102  size_t image_array_size;
103  size_t image_row_pitch;
104  size_t image_slice_pitch;
105  cl_uint num_mip_levels;
106  cl_uint num_samples;
107  cl_mem buffer;
108 } cl_image_desc;
109 
110 typedef struct _cl_buffer_region {
111  size_t origin;
112  size_t size;
114 
115 
116 /******************************************************************************/
117 
118 /* Error Codes */
119 #define CL_SUCCESS 0
120 #define CL_DEVICE_NOT_FOUND -1
121 #define CL_DEVICE_NOT_AVAILABLE -2
122 #define CL_COMPILER_NOT_AVAILABLE -3
123 #define CL_MEM_OBJECT_ALLOCATION_FAILURE -4
124 #define CL_OUT_OF_RESOURCES -5
125 #define CL_OUT_OF_HOST_MEMORY -6
126 #define CL_PROFILING_INFO_NOT_AVAILABLE -7
127 #define CL_MEM_COPY_OVERLAP -8
128 #define CL_IMAGE_FORMAT_MISMATCH -9
129 #define CL_IMAGE_FORMAT_NOT_SUPPORTED -10
130 #define CL_BUILD_PROGRAM_FAILURE -11
131 #define CL_MAP_FAILURE -12
132 #define CL_MISALIGNED_SUB_BUFFER_OFFSET -13
133 #define CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST -14
134 #define CL_COMPILE_PROGRAM_FAILURE -15
135 #define CL_LINKER_NOT_AVAILABLE -16
136 #define CL_LINK_PROGRAM_FAILURE -17
137 #define CL_DEVICE_PARTITION_FAILED -18
138 #define CL_KERNEL_ARG_INFO_NOT_AVAILABLE -19
139 
140 #define CL_INVALID_VALUE -30
141 #define CL_INVALID_DEVICE_TYPE -31
142 #define CL_INVALID_PLATFORM -32
143 #define CL_INVALID_DEVICE -33
144 #define CL_INVALID_CONTEXT -34
145 #define CL_INVALID_QUEUE_PROPERTIES -35
146 #define CL_INVALID_COMMAND_QUEUE -36
147 #define CL_INVALID_HOST_PTR -37
148 #define CL_INVALID_MEM_OBJECT -38
149 #define CL_INVALID_IMAGE_FORMAT_DESCRIPTOR -39
150 #define CL_INVALID_IMAGE_SIZE -40
151 #define CL_INVALID_SAMPLER -41
152 #define CL_INVALID_BINARY -42
153 #define CL_INVALID_BUILD_OPTIONS -43
154 #define CL_INVALID_PROGRAM -44
155 #define CL_INVALID_PROGRAM_EXECUTABLE -45
156 #define CL_INVALID_KERNEL_NAME -46
157 #define CL_INVALID_KERNEL_DEFINITION -47
158 #define CL_INVALID_KERNEL -48
159 #define CL_INVALID_ARG_INDEX -49
160 #define CL_INVALID_ARG_VALUE -50
161 #define CL_INVALID_ARG_SIZE -51
162 #define CL_INVALID_KERNEL_ARGS -52
163 #define CL_INVALID_WORK_DIMENSION -53
164 #define CL_INVALID_WORK_GROUP_SIZE -54
165 #define CL_INVALID_WORK_ITEM_SIZE -55
166 #define CL_INVALID_GLOBAL_OFFSET -56
167 #define CL_INVALID_EVENT_WAIT_LIST -57
168 #define CL_INVALID_EVENT -58
169 #define CL_INVALID_OPERATION -59
170 #define CL_INVALID_GL_OBJECT -60
171 #define CL_INVALID_BUFFER_SIZE -61
172 #define CL_INVALID_MIP_LEVEL -62
173 #define CL_INVALID_GLOBAL_WORK_SIZE -63
174 #define CL_INVALID_PROPERTY -64
175 #define CL_INVALID_IMAGE_DESCRIPTOR -65
176 #define CL_INVALID_COMPILER_OPTIONS -66
177 #define CL_INVALID_LINKER_OPTIONS -67
178 #define CL_INVALID_DEVICE_PARTITION_COUNT -68
179 
180 /* OpenCL Version */
181 #define CL_VERSION_1_0 1
182 #define CL_VERSION_1_1 1
183 #define CL_VERSION_1_2 1
184 
185 /* cl_bool */
186 #define CL_FALSE 0
187 #define CL_TRUE 1
188 #define CL_BLOCKING CL_TRUE
189 #define CL_NON_BLOCKING CL_FALSE
190 
191 /* cl_platform_info */
192 #define CL_PLATFORM_PROFILE 0x0900
193 #define CL_PLATFORM_VERSION 0x0901
194 #define CL_PLATFORM_NAME 0x0902
195 #define CL_PLATFORM_VENDOR 0x0903
196 #define CL_PLATFORM_EXTENSIONS 0x0904
197 
198 /* cl_device_type - bitfield */
199 #define CL_DEVICE_TYPE_DEFAULT (1 << 0)
200 #define CL_DEVICE_TYPE_CPU (1 << 1)
201 #define CL_DEVICE_TYPE_GPU (1 << 2)
202 #define CL_DEVICE_TYPE_ACCELERATOR (1 << 3)
203 #define CL_DEVICE_TYPE_CUSTOM (1 << 4)
204 #define CL_DEVICE_TYPE_ALL 0xFFFFFFFF
205 
206 /* cl_device_info */
207 #define CL_DEVICE_TYPE 0x1000
208 #define CL_DEVICE_VENDOR_ID 0x1001
209 #define CL_DEVICE_MAX_COMPUTE_UNITS 0x1002
210 #define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS 0x1003
211 #define CL_DEVICE_MAX_WORK_GROUP_SIZE 0x1004
212 #define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005
213 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR 0x1006
214 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT 0x1007
215 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT 0x1008
216 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG 0x1009
217 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT 0x100A
218 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE 0x100B
219 #define CL_DEVICE_MAX_CLOCK_FREQUENCY 0x100C
220 #define CL_DEVICE_ADDRESS_BITS 0x100D
221 #define CL_DEVICE_MAX_READ_IMAGE_ARGS 0x100E
222 #define CL_DEVICE_MAX_WRITE_IMAGE_ARGS 0x100F
223 #define CL_DEVICE_MAX_MEM_ALLOC_SIZE 0x1010
224 #define CL_DEVICE_IMAGE2D_MAX_WIDTH 0x1011
225 #define CL_DEVICE_IMAGE2D_MAX_HEIGHT 0x1012
226 #define CL_DEVICE_IMAGE3D_MAX_WIDTH 0x1013
227 #define CL_DEVICE_IMAGE3D_MAX_HEIGHT 0x1014
228 #define CL_DEVICE_IMAGE3D_MAX_DEPTH 0x1015
229 #define CL_DEVICE_IMAGE_SUPPORT 0x1016
230 #define CL_DEVICE_MAX_PARAMETER_SIZE 0x1017
231 #define CL_DEVICE_MAX_SAMPLERS 0x1018
232 #define CL_DEVICE_MEM_BASE_ADDR_ALIGN 0x1019
233 #define CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE 0x101A
234 #define CL_DEVICE_SINGLE_FP_CONFIG 0x101B
235 #define CL_DEVICE_GLOBAL_MEM_CACHE_TYPE 0x101C
236 #define CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE 0x101D
237 #define CL_DEVICE_GLOBAL_MEM_CACHE_SIZE 0x101E
238 #define CL_DEVICE_GLOBAL_MEM_SIZE 0x101F
239 #define CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE 0x1020
240 #define CL_DEVICE_MAX_CONSTANT_ARGS 0x1021
241 #define CL_DEVICE_LOCAL_MEM_TYPE 0x1022
242 #define CL_DEVICE_LOCAL_MEM_SIZE 0x1023
243 #define CL_DEVICE_ERROR_CORRECTION_SUPPORT 0x1024
244 #define CL_DEVICE_PROFILING_TIMER_RESOLUTION 0x1025
245 #define CL_DEVICE_ENDIAN_LITTLE 0x1026
246 #define CL_DEVICE_AVAILABLE 0x1027
247 #define CL_DEVICE_COMPILER_AVAILABLE 0x1028
248 #define CL_DEVICE_EXECUTION_CAPABILITIES 0x1029
249 #define CL_DEVICE_QUEUE_PROPERTIES 0x102A
250 #define CL_DEVICE_NAME 0x102B
251 #define CL_DEVICE_VENDOR 0x102C
252 #define CL_DRIVER_VERSION 0x102D
253 #define CL_DEVICE_PROFILE 0x102E
254 #define CL_DEVICE_VERSION 0x102F
255 #define CL_DEVICE_EXTENSIONS 0x1030
256 #define CL_DEVICE_PLATFORM 0x1031
257 #define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032
258 /* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG */
259 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034
260 #define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035
261 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036
262 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT 0x1037
263 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT 0x1038
264 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG 0x1039
265 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT 0x103A
266 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE 0x103B
267 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF 0x103C
268 #define CL_DEVICE_OPENCL_C_VERSION 0x103D
269 #define CL_DEVICE_LINKER_AVAILABLE 0x103E
270 #define CL_DEVICE_BUILT_IN_KERNELS 0x103F
271 #define CL_DEVICE_IMAGE_MAX_BUFFER_SIZE 0x1040
272 #define CL_DEVICE_IMAGE_MAX_ARRAY_SIZE 0x1041
273 #define CL_DEVICE_PARENT_DEVICE 0x1042
274 #define CL_DEVICE_PARTITION_MAX_SUB_DEVICES 0x1043
275 #define CL_DEVICE_PARTITION_PROPERTIES 0x1044
276 #define CL_DEVICE_PARTITION_AFFINITY_DOMAIN 0x1045
277 #define CL_DEVICE_PARTITION_TYPE 0x1046
278 #define CL_DEVICE_REFERENCE_COUNT 0x1047
279 #define CL_DEVICE_PREFERRED_INTEROP_USER_SYNC 0x1048
280 #define CL_DEVICE_PRINTF_BUFFER_SIZE 0x1049
281 #define CL_DEVICE_IMAGE_PITCH_ALIGNMENT 0x104A
282 #define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT 0x104B
283 
284 /* cl_device_fp_config - bitfield */
285 #define CL_FP_DENORM (1 << 0)
286 #define CL_FP_INF_NAN (1 << 1)
287 #define CL_FP_ROUND_TO_NEAREST (1 << 2)
288 #define CL_FP_ROUND_TO_ZERO (1 << 3)
289 #define CL_FP_ROUND_TO_INF (1 << 4)
290 #define CL_FP_FMA (1 << 5)
291 #define CL_FP_SOFT_FLOAT (1 << 6)
292 #define CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT (1 << 7)
293 
294 /* cl_device_mem_cache_type */
295 #define CL_NONE 0x0
296 #define CL_READ_ONLY_CACHE 0x1
297 #define CL_READ_WRITE_CACHE 0x2
298 
299 /* cl_device_local_mem_type */
300 #define CL_LOCAL 0x1
301 #define CL_GLOBAL 0x2
302 
303 /* cl_device_exec_capabilities - bitfield */
304 #define CL_EXEC_KERNEL (1 << 0)
305 #define CL_EXEC_NATIVE_KERNEL (1 << 1)
306 
307 /* cl_command_queue_properties - bitfield */
308 #define CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE (1 << 0)
309 #define CL_QUEUE_PROFILING_ENABLE (1 << 1)
310 
311 /* cl_context_info */
312 #define CL_CONTEXT_REFERENCE_COUNT 0x1080
313 #define CL_CONTEXT_DEVICES 0x1081
314 #define CL_CONTEXT_PROPERTIES 0x1082
315 #define CL_CONTEXT_NUM_DEVICES 0x1083
316 
317 /* cl_context_properties */
318 #define CL_CONTEXT_PLATFORM 0x1084
319 #define CL_CONTEXT_INTEROP_USER_SYNC 0x1085
320 
321 /* cl_device_partition_property */
322 #define CL_DEVICE_PARTITION_EQUALLY 0x1086
323 #define CL_DEVICE_PARTITION_BY_COUNTS 0x1087
324 #define CL_DEVICE_PARTITION_BY_COUNTS_LIST_END 0x0
325 #define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN 0x1088
326 
327 /* cl_device_affinity_domain */
328 #define CL_DEVICE_AFFINITY_DOMAIN_NUMA (1 << 0)
329 #define CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE (1 << 1)
330 #define CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE (1 << 2)
331 #define CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE (1 << 3)
332 #define CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE (1 << 4)
333 #define CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE (1 << 5)
334 
335 /* cl_command_queue_info */
336 #define CL_QUEUE_CONTEXT 0x1090
337 #define CL_QUEUE_DEVICE 0x1091
338 #define CL_QUEUE_REFERENCE_COUNT 0x1092
339 #define CL_QUEUE_PROPERTIES 0x1093
340 
341 /* cl_mem_flags - bitfield */
342 #define CL_MEM_READ_WRITE (1 << 0)
343 #define CL_MEM_WRITE_ONLY (1 << 1)
344 #define CL_MEM_READ_ONLY (1 << 2)
345 #define CL_MEM_USE_HOST_PTR (1 << 3)
346 #define CL_MEM_ALLOC_HOST_PTR (1 << 4)
347 #define CL_MEM_COPY_HOST_PTR (1 << 5)
348 // reserved (1 << 6)
349 #define CL_MEM_HOST_WRITE_ONLY (1 << 7)
350 #define CL_MEM_HOST_READ_ONLY (1 << 8)
351 #define CL_MEM_HOST_NO_ACCESS (1 << 9)
352 
353 /* cl_mem_migration_flags - bitfield */
354 #define CL_MIGRATE_MEM_OBJECT_HOST (1 << 0)
355 #define CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED (1 << 1)
356 
357 /* cl_channel_order */
358 #define CL_R 0x10B0
359 #define CL_A 0x10B1
360 #define CL_RG 0x10B2
361 #define CL_RA 0x10B3
362 #define CL_RGB 0x10B4
363 #define CL_RGBA 0x10B5
364 #define CL_BGRA 0x10B6
365 #define CL_ARGB 0x10B7
366 #define CL_INTENSITY 0x10B8
367 #define CL_LUMINANCE 0x10B9
368 #define CL_Rx 0x10BA
369 #define CL_RGx 0x10BB
370 #define CL_RGBx 0x10BC
371 #define CL_DEPTH 0x10BD
372 #define CL_DEPTH_STENCIL 0x10BE
373 
374 /* cl_channel_type */
375 #define CL_SNORM_INT8 0x10D0
376 #define CL_SNORM_INT16 0x10D1
377 #define CL_UNORM_INT8 0x10D2
378 #define CL_UNORM_INT16 0x10D3
379 #define CL_UNORM_SHORT_565 0x10D4
380 #define CL_UNORM_SHORT_555 0x10D5
381 #define CL_UNORM_INT_101010 0x10D6
382 #define CL_SIGNED_INT8 0x10D7
383 #define CL_SIGNED_INT16 0x10D8
384 #define CL_SIGNED_INT32 0x10D9
385 #define CL_UNSIGNED_INT8 0x10DA
386 #define CL_UNSIGNED_INT16 0x10DB
387 #define CL_UNSIGNED_INT32 0x10DC
388 #define CL_HALF_FLOAT 0x10DD
389 #define CL_FLOAT 0x10DE
390 #define CL_UNORM_INT24 0x10DF
391 
392 /* cl_mem_object_type */
393 #define CL_MEM_OBJECT_BUFFER 0x10F0
394 #define CL_MEM_OBJECT_IMAGE2D 0x10F1
395 #define CL_MEM_OBJECT_IMAGE3D 0x10F2
396 #define CL_MEM_OBJECT_IMAGE2D_ARRAY 0x10F3
397 #define CL_MEM_OBJECT_IMAGE1D 0x10F4
398 #define CL_MEM_OBJECT_IMAGE1D_ARRAY 0x10F5
399 #define CL_MEM_OBJECT_IMAGE1D_BUFFER 0x10F6
400 
401 /* cl_mem_info */
402 #define CL_MEM_TYPE 0x1100
403 #define CL_MEM_FLAGS 0x1101
404 #define CL_MEM_SIZE 0x1102
405 #define CL_MEM_HOST_PTR 0x1103
406 #define CL_MEM_MAP_COUNT 0x1104
407 #define CL_MEM_REFERENCE_COUNT 0x1105
408 #define CL_MEM_CONTEXT 0x1106
409 #define CL_MEM_ASSOCIATED_MEMOBJECT 0x1107
410 #define CL_MEM_OFFSET 0x1108
411 
412 /* cl_image_info */
413 #define CL_IMAGE_FORMAT 0x1110
414 #define CL_IMAGE_ELEMENT_SIZE 0x1111
415 #define CL_IMAGE_ROW_PITCH 0x1112
416 #define CL_IMAGE_SLICE_PITCH 0x1113
417 #define CL_IMAGE_WIDTH 0x1114
418 #define CL_IMAGE_HEIGHT 0x1115
419 #define CL_IMAGE_DEPTH 0x1116
420 #define CL_IMAGE_ARRAY_SIZE 0x1117
421 #define CL_IMAGE_BUFFER 0x1118
422 #define CL_IMAGE_NUM_MIP_LEVELS 0x1119
423 #define CL_IMAGE_NUM_SAMPLES 0x111A
424 
425 /* cl_addressing_mode */
426 #define CL_ADDRESS_NONE 0x1130
427 #define CL_ADDRESS_CLAMP_TO_EDGE 0x1131
428 #define CL_ADDRESS_CLAMP 0x1132
429 #define CL_ADDRESS_REPEAT 0x1133
430 #define CL_ADDRESS_MIRRORED_REPEAT 0x1134
431 
432 /* cl_filter_mode */
433 #define CL_FILTER_NEAREST 0x1140
434 #define CL_FILTER_LINEAR 0x1141
435 
436 /* cl_sampler_info */
437 #define CL_SAMPLER_REFERENCE_COUNT 0x1150
438 #define CL_SAMPLER_CONTEXT 0x1151
439 #define CL_SAMPLER_NORMALIZED_COORDS 0x1152
440 #define CL_SAMPLER_ADDRESSING_MODE 0x1153
441 #define CL_SAMPLER_FILTER_MODE 0x1154
442 
443 /* cl_map_flags - bitfield */
444 #define CL_MAP_READ (1 << 0)
445 #define CL_MAP_WRITE (1 << 1)
446 #define CL_MAP_WRITE_INVALIDATE_REGION (1 << 2)
447 
448 /* cl_program_info */
449 #define CL_PROGRAM_REFERENCE_COUNT 0x1160
450 #define CL_PROGRAM_CONTEXT 0x1161
451 #define CL_PROGRAM_NUM_DEVICES 0x1162
452 #define CL_PROGRAM_DEVICES 0x1163
453 #define CL_PROGRAM_SOURCE 0x1164
454 #define CL_PROGRAM_BINARY_SIZES 0x1165
455 #define CL_PROGRAM_BINARIES 0x1166
456 #define CL_PROGRAM_NUM_KERNELS 0x1167
457 #define CL_PROGRAM_KERNEL_NAMES 0x1168
458 
459 /* cl_program_build_info */
460 #define CL_PROGRAM_BUILD_STATUS 0x1181
461 #define CL_PROGRAM_BUILD_OPTIONS 0x1182
462 #define CL_PROGRAM_BUILD_LOG 0x1183
463 #define CL_PROGRAM_BINARY_TYPE 0x1184
464 
465 /* cl_program_binary_type */
466 #define CL_PROGRAM_BINARY_TYPE_NONE 0x0
467 #define CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT 0x1
468 #define CL_PROGRAM_BINARY_TYPE_LIBRARY 0x2
469 #define CL_PROGRAM_BINARY_TYPE_EXECUTABLE 0x4
470 
471 /* cl_build_status */
472 #define CL_BUILD_SUCCESS 0
473 #define CL_BUILD_NONE -1
474 #define CL_BUILD_ERROR -2
475 #define CL_BUILD_IN_PROGRESS -3
476 
477 /* cl_kernel_info */
478 #define CL_KERNEL_FUNCTION_NAME 0x1190
479 #define CL_KERNEL_NUM_ARGS 0x1191
480 #define CL_KERNEL_REFERENCE_COUNT 0x1192
481 #define CL_KERNEL_CONTEXT 0x1193
482 #define CL_KERNEL_PROGRAM 0x1194
483 #define CL_KERNEL_ATTRIBUTES 0x1195
484 
485 /* cl_kernel_arg_info */
486 #define CL_KERNEL_ARG_ADDRESS_QUALIFIER 0x1196
487 #define CL_KERNEL_ARG_ACCESS_QUALIFIER 0x1197
488 #define CL_KERNEL_ARG_TYPE_NAME 0x1198
489 #define CL_KERNEL_ARG_TYPE_QUALIFIER 0x1199
490 #define CL_KERNEL_ARG_NAME 0x119A
491 
492 /* cl_kernel_arg_address_qualifier */
493 #define CL_KERNEL_ARG_ADDRESS_GLOBAL 0x119B
494 #define CL_KERNEL_ARG_ADDRESS_LOCAL 0x119C
495 #define CL_KERNEL_ARG_ADDRESS_CONSTANT 0x119D
496 #define CL_KERNEL_ARG_ADDRESS_PRIVATE 0x119E
497 
498 /* cl_kernel_arg_access_qualifier */
499 #define CL_KERNEL_ARG_ACCESS_READ_ONLY 0x11A0
500 #define CL_KERNEL_ARG_ACCESS_WRITE_ONLY 0x11A1
501 #define CL_KERNEL_ARG_ACCESS_READ_WRITE 0x11A2
502 #define CL_KERNEL_ARG_ACCESS_NONE 0x11A3
503 
504 /* cl_kernel_arg_type_qualifer */
505 #define CL_KERNEL_ARG_TYPE_NONE 0
506 #define CL_KERNEL_ARG_TYPE_CONST (1 << 0)
507 #define CL_KERNEL_ARG_TYPE_RESTRICT (1 << 1)
508 #define CL_KERNEL_ARG_TYPE_VOLATILE (1 << 2)
509 
510 /* cl_kernel_work_group_info */
511 #define CL_KERNEL_WORK_GROUP_SIZE 0x11B0
512 #define CL_KERNEL_COMPILE_WORK_GROUP_SIZE 0x11B1
513 #define CL_KERNEL_LOCAL_MEM_SIZE 0x11B2
514 #define CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x11B3
515 #define CL_KERNEL_PRIVATE_MEM_SIZE 0x11B4
516 #define CL_KERNEL_GLOBAL_WORK_SIZE 0x11B5
517 
518 /* cl_event_info */
519 #define CL_EVENT_COMMAND_QUEUE 0x11D0
520 #define CL_EVENT_COMMAND_TYPE 0x11D1
521 #define CL_EVENT_REFERENCE_COUNT 0x11D2
522 #define CL_EVENT_COMMAND_EXECUTION_STATUS 0x11D3
523 #define CL_EVENT_CONTEXT 0x11D4
524 
525 /* cl_command_type */
526 #define CL_COMMAND_NDRANGE_KERNEL 0x11F0
527 #define CL_COMMAND_TASK 0x11F1
528 #define CL_COMMAND_NATIVE_KERNEL 0x11F2
529 #define CL_COMMAND_READ_BUFFER 0x11F3
530 #define CL_COMMAND_WRITE_BUFFER 0x11F4
531 #define CL_COMMAND_COPY_BUFFER 0x11F5
532 #define CL_COMMAND_READ_IMAGE 0x11F6
533 #define CL_COMMAND_WRITE_IMAGE 0x11F7
534 #define CL_COMMAND_COPY_IMAGE 0x11F8
535 #define CL_COMMAND_COPY_IMAGE_TO_BUFFER 0x11F9
536 #define CL_COMMAND_COPY_BUFFER_TO_IMAGE 0x11FA
537 #define CL_COMMAND_MAP_BUFFER 0x11FB
538 #define CL_COMMAND_MAP_IMAGE 0x11FC
539 #define CL_COMMAND_UNMAP_MEM_OBJECT 0x11FD
540 #define CL_COMMAND_MARKER 0x11FE
541 #define CL_COMMAND_ACQUIRE_GL_OBJECTS 0x11FF
542 #define CL_COMMAND_RELEASE_GL_OBJECTS 0x1200
543 #define CL_COMMAND_READ_BUFFER_RECT 0x1201
544 #define CL_COMMAND_WRITE_BUFFER_RECT 0x1202
545 #define CL_COMMAND_COPY_BUFFER_RECT 0x1203
546 #define CL_COMMAND_USER 0x1204
547 #define CL_COMMAND_BARRIER 0x1205
548 #define CL_COMMAND_MIGRATE_MEM_OBJECTS 0x1206
549 #define CL_COMMAND_FILL_BUFFER 0x1207
550 #define CL_COMMAND_FILL_IMAGE 0x1208
551 
552 /* command execution status */
553 #define CL_COMPLETE 0x0
554 #define CL_RUNNING 0x1
555 #define CL_SUBMITTED 0x2
556 #define CL_QUEUED 0x3
557 
558 /* cl_buffer_create_type */
559 #define CL_BUFFER_CREATE_TYPE_REGION 0x1220
560 
561 /* cl_profiling_info */
562 #define CL_PROFILING_COMMAND_QUEUED 0x1280
563 #define CL_PROFILING_COMMAND_SUBMIT 0x1281
564 #define CL_PROFILING_COMMAND_START 0x1282
565 #define CL_PROFILING_COMMAND_END 0x1283
566 
567 /********************************************************************************************************/
568 
569 /* Platform API */
570 extern CL_API_ENTRY cl_int CL_API_CALL
571 clGetPlatformIDs(cl_uint /* num_entries */,
572  cl_platform_id * /* platforms */,
573  cl_uint * /* num_platforms */) CL_API_SUFFIX__VERSION_1_0;
574 
575 extern CL_API_ENTRY cl_int CL_API_CALL
576 clGetPlatformInfo(cl_platform_id /* platform */,
577  cl_platform_info /* param_name */,
578  size_t /* param_value_size */,
579  void * /* param_value */,
580  size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
581 
582 /* Device APIs */
583 extern CL_API_ENTRY cl_int CL_API_CALL
584 clGetDeviceIDs(cl_platform_id /* platform */,
585  cl_device_type /* device_type */,
586  cl_uint /* num_entries */,
587  cl_device_id * /* devices */,
588  cl_uint * /* num_devices */) CL_API_SUFFIX__VERSION_1_0;
589 
590 extern CL_API_ENTRY cl_int CL_API_CALL
591 clGetDeviceInfo(cl_device_id /* device */,
592  cl_device_info /* param_name */,
593  size_t /* param_value_size */,
594  void * /* param_value */,
595  size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
596 
597 extern CL_API_ENTRY cl_int CL_API_CALL
598 clCreateSubDevices(cl_device_id /* in_device */,
599  const cl_device_partition_property * /* properties */,
600  cl_uint /* num_devices */,
601  cl_device_id * /* out_devices */,
602  cl_uint * /* num_devices_ret */) CL_API_SUFFIX__VERSION_1_2;
603 
604 extern CL_API_ENTRY cl_int CL_API_CALL
605 clRetainDevice(cl_device_id /* device */) CL_API_SUFFIX__VERSION_1_2;
606 
607 extern CL_API_ENTRY cl_int CL_API_CALL
608 clReleaseDevice(cl_device_id /* device */) CL_API_SUFFIX__VERSION_1_2;
609 
610 /* Context APIs */
611 extern CL_API_ENTRY cl_context CL_API_CALL
612 clCreateContext(const cl_context_properties * /* properties */,
613  cl_uint /* num_devices */,
614  const cl_device_id * /* devices */,
615  void (CL_CALLBACK * /* pfn_notify */)(const char *, const void *, size_t, void *),
616  void * /* user_data */,
617  cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
618 
619 extern CL_API_ENTRY cl_context CL_API_CALL
620 clCreateContextFromType(const cl_context_properties * /* properties */,
621  cl_device_type /* device_type */,
622  void (CL_CALLBACK * /* pfn_notify*/ )(const char *, const void *, size_t, void *),
623  void * /* user_data */,
624  cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
625 
626 extern CL_API_ENTRY cl_int CL_API_CALL
627 clRetainContext(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0;
628 
629 extern CL_API_ENTRY cl_int CL_API_CALL
630 clReleaseContext(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0;
631 
632 extern CL_API_ENTRY cl_int CL_API_CALL
633 clGetContextInfo(cl_context /* context */,
634  cl_context_info /* param_name */,
635  size_t /* param_value_size */,
636  void * /* param_value */,
637  size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
638 
639 /* Command Queue APIs */
640 extern CL_API_ENTRY cl_command_queue CL_API_CALL
641 clCreateCommandQueue(cl_context /* context */,
642  cl_device_id /* device */,
643  cl_command_queue_properties /* properties */,
644  cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
645 
646 extern CL_API_ENTRY cl_int CL_API_CALL
647 clRetainCommandQueue(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
648 
649 extern CL_API_ENTRY cl_int CL_API_CALL
650 clReleaseCommandQueue(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
651 
652 extern CL_API_ENTRY cl_int CL_API_CALL
653 clGetCommandQueueInfo(cl_command_queue /* command_queue */,
654  cl_command_queue_info /* param_name */,
655  size_t /* param_value_size */,
656  void * /* param_value */,
657  size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
658 
659 /* Memory Object APIs */
660 extern CL_API_ENTRY cl_mem CL_API_CALL
661 clCreateBuffer(cl_context /* context */,
662  cl_mem_flags /* flags */,
663  size_t /* size */,
664  void * /* host_ptr */,
665  cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
666 
667 extern CL_API_ENTRY cl_mem CL_API_CALL
668 clCreateSubBuffer(cl_mem /* buffer */,
669  cl_mem_flags /* flags */,
670  cl_buffer_create_type /* buffer_create_type */,
671  const void * /* buffer_create_info */,
672  cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
673 
674 extern CL_API_ENTRY cl_mem CL_API_CALL
675 clCreateImage(cl_context /* context */,
676  cl_mem_flags /* flags */,
677  const cl_image_format * /* image_format */,
678  const cl_image_desc * /* image_desc */,
679  void * /* host_ptr */,
680  cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2;
681 
682 extern CL_API_ENTRY cl_int CL_API_CALL
683 clRetainMemObject(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0;
684 
685 extern CL_API_ENTRY cl_int CL_API_CALL
686 clReleaseMemObject(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0;
687 
688 extern CL_API_ENTRY cl_int CL_API_CALL
689 clGetSupportedImageFormats(cl_context /* context */,
690  cl_mem_flags /* flags */,
691  cl_mem_object_type /* image_type */,
692  cl_uint /* num_entries */,
693  cl_image_format * /* image_formats */,
694  cl_uint * /* num_image_formats */) CL_API_SUFFIX__VERSION_1_0;
695 
696 extern CL_API_ENTRY cl_int CL_API_CALL
697 clGetMemObjectInfo(cl_mem /* memobj */,
698  cl_mem_info /* param_name */,
699  size_t /* param_value_size */,
700  void * /* param_value */,
701  size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
702 
703 extern CL_API_ENTRY cl_int CL_API_CALL
704 clGetImageInfo(cl_mem /* image */,
705  cl_image_info /* param_name */,
706  size_t /* param_value_size */,
707  void * /* param_value */,
708  size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
709 
710 extern CL_API_ENTRY cl_int CL_API_CALL
711 clSetMemObjectDestructorCallback( cl_mem /* memobj */,
712  void (CL_CALLBACK * /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/),
713  void * /*user_data */ ) CL_API_SUFFIX__VERSION_1_1;
714 
715 /* Sampler APIs */
716 extern CL_API_ENTRY cl_sampler CL_API_CALL
717 clCreateSampler(cl_context /* context */,
718  cl_bool /* normalized_coords */,
719  cl_addressing_mode /* addressing_mode */,
720  cl_filter_mode /* filter_mode */,
721  cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
722 
723 extern CL_API_ENTRY cl_int CL_API_CALL
724 clRetainSampler(cl_sampler /* sampler */) CL_API_SUFFIX__VERSION_1_0;
725 
726 extern CL_API_ENTRY cl_int CL_API_CALL
727 clReleaseSampler(cl_sampler /* sampler */) CL_API_SUFFIX__VERSION_1_0;
728 
729 extern CL_API_ENTRY cl_int CL_API_CALL
730 clGetSamplerInfo(cl_sampler /* sampler */,
731  cl_sampler_info /* param_name */,
732  size_t /* param_value_size */,
733  void * /* param_value */,
734  size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
735 
736 /* Program Object APIs */
737 extern CL_API_ENTRY cl_program CL_API_CALL
738 clCreateProgramWithSource(cl_context /* context */,
739  cl_uint /* count */,
740  const char ** /* strings */,
741  const size_t * /* lengths */,
742  cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
743 
744 extern CL_API_ENTRY cl_program CL_API_CALL
745 clCreateProgramWithBinary(cl_context /* context */,
746  cl_uint /* num_devices */,
747  const cl_device_id * /* device_list */,
748  const size_t * /* lengths */,
749  const unsigned char ** /* binaries */,
750  cl_int * /* binary_status */,
751  cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
752 
753 extern CL_API_ENTRY cl_program CL_API_CALL
754 clCreateProgramWithBuiltInKernels(cl_context /* context */,
755  cl_uint /* num_devices */,
756  const cl_device_id * /* device_list */,
757  const char * /* kernel_names */,
758  cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2;
759 
760 extern CL_API_ENTRY cl_int CL_API_CALL
761 clRetainProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0;
762 
763 extern CL_API_ENTRY cl_int CL_API_CALL
764 clReleaseProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0;
765 
766 extern CL_API_ENTRY cl_int CL_API_CALL
767 clBuildProgram(cl_program /* program */,
768  cl_uint /* num_devices */,
769  const cl_device_id * /* device_list */,
770  const char * /* options */,
771  void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */),
772  void * /* user_data */) CL_API_SUFFIX__VERSION_1_0;
773 
774 extern CL_API_ENTRY cl_int CL_API_CALL
775 clCompileProgram(cl_program /* program */,
776  cl_uint /* num_devices */,
777  const cl_device_id * /* device_list */,
778  const char * /* options */,
779  cl_uint /* num_input_headers */,
780  const cl_program * /* input_headers */,
781  const char ** /* header_include_names */,
782  void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */),
783  void * /* user_data */) CL_API_SUFFIX__VERSION_1_2;
784 
785 extern CL_API_ENTRY cl_program CL_API_CALL
786 clLinkProgram(cl_context /* context */,
787  cl_uint /* num_devices */,
788  const cl_device_id * /* device_list */,
789  const char * /* options */,
790  cl_uint /* num_input_programs */,
791  const cl_program * /* input_programs */,
792  void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */),
793  void * /* user_data */,
794  cl_int * /* errcode_ret */ ) CL_API_SUFFIX__VERSION_1_2;
795 
796 
797 extern CL_API_ENTRY cl_int CL_API_CALL
798 clUnloadPlatformCompiler(cl_platform_id /* platform */) CL_API_SUFFIX__VERSION_1_2;
799 
800 extern CL_API_ENTRY cl_int CL_API_CALL
801 clGetProgramInfo(cl_program /* program */,
802  cl_program_info /* param_name */,
803  size_t /* param_value_size */,
804  void * /* param_value */,
805  size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
806 
807 extern CL_API_ENTRY cl_int CL_API_CALL
808 clGetProgramBuildInfo(cl_program /* program */,
809  cl_device_id /* device */,
810  cl_program_build_info /* param_name */,
811  size_t /* param_value_size */,
812  void * /* param_value */,
813  size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
814 
815 /* Kernel Object APIs */
816 extern CL_API_ENTRY cl_kernel CL_API_CALL
817 clCreateKernel(cl_program /* program */,
818  const char * /* kernel_name */,
819  cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
820 
821 extern CL_API_ENTRY cl_int CL_API_CALL
822 clCreateKernelsInProgram(cl_program /* program */,
823  cl_uint /* num_kernels */,
824  cl_kernel * /* kernels */,
825  cl_uint * /* num_kernels_ret */) CL_API_SUFFIX__VERSION_1_0;
826 
827 extern CL_API_ENTRY cl_int CL_API_CALL
828 clRetainKernel(cl_kernel /* kernel */) CL_API_SUFFIX__VERSION_1_0;
829 
830 extern CL_API_ENTRY cl_int CL_API_CALL
831 clReleaseKernel(cl_kernel /* kernel */) CL_API_SUFFIX__VERSION_1_0;
832 
833 extern CL_API_ENTRY cl_int CL_API_CALL
834 clSetKernelArg(cl_kernel /* kernel */,
835  cl_uint /* arg_index */,
836  size_t /* arg_size */,
837  const void * /* arg_value */) CL_API_SUFFIX__VERSION_1_0;
838 
839 extern CL_API_ENTRY cl_int CL_API_CALL
840 clGetKernelInfo(cl_kernel /* kernel */,
841  cl_kernel_info /* param_name */,
842  size_t /* param_value_size */,
843  void * /* param_value */,
844  size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
845 
846 extern CL_API_ENTRY cl_int CL_API_CALL
847 clGetKernelArgInfo(cl_kernel /* kernel */,
848  cl_uint /* arg_indx */,
849  cl_kernel_arg_info /* param_name */,
850  size_t /* param_value_size */,
851  void * /* param_value */,
852  size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_2;
853 
854 extern CL_API_ENTRY cl_int CL_API_CALL
855 clGetKernelWorkGroupInfo(cl_kernel /* kernel */,
856  cl_device_id /* device */,
857  cl_kernel_work_group_info /* param_name */,
858  size_t /* param_value_size */,
859  void * /* param_value */,
860  size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
861 
862 /* Event Object APIs */
863 extern CL_API_ENTRY cl_int CL_API_CALL
864 clWaitForEvents(cl_uint /* num_events */,
865  const cl_event * /* event_list */) CL_API_SUFFIX__VERSION_1_0;
866 
867 extern CL_API_ENTRY cl_int CL_API_CALL
868 clGetEventInfo(cl_event /* event */,
869  cl_event_info /* param_name */,
870  size_t /* param_value_size */,
871  void * /* param_value */,
872  size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
873 
874 extern CL_API_ENTRY cl_event CL_API_CALL
875 clCreateUserEvent(cl_context /* context */,
876  cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
877 
878 extern CL_API_ENTRY cl_int CL_API_CALL
879 clRetainEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0;
880 
881 extern CL_API_ENTRY cl_int CL_API_CALL
882 clReleaseEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0;
883 
884 extern CL_API_ENTRY cl_int CL_API_CALL
885 clSetUserEventStatus(cl_event /* event */,
886  cl_int /* execution_status */) CL_API_SUFFIX__VERSION_1_1;
887 
888 extern CL_API_ENTRY cl_int CL_API_CALL
889 clSetEventCallback( cl_event /* event */,
890  cl_int /* command_exec_callback_type */,
891  void (CL_CALLBACK * /* pfn_notify */)(cl_event, cl_int, void *),
892  void * /* user_data */) CL_API_SUFFIX__VERSION_1_1;
893 
894 /* Profiling APIs */
895 extern CL_API_ENTRY cl_int CL_API_CALL
896 clGetEventProfilingInfo(cl_event /* event */,
897  cl_profiling_info /* param_name */,
898  size_t /* param_value_size */,
899  void * /* param_value */,
900  size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
901 
902 /* Flush and Finish APIs */
903 extern CL_API_ENTRY cl_int CL_API_CALL
904 clFlush(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
905 
906 extern CL_API_ENTRY cl_int CL_API_CALL
907 clFinish(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
908 
909 /* Enqueued Commands APIs */
910 extern CL_API_ENTRY cl_int CL_API_CALL
911 clEnqueueReadBuffer(cl_command_queue /* command_queue */,
912  cl_mem /* buffer */,
913  cl_bool /* blocking_read */,
914  size_t /* offset */,
915  size_t /* size */,
916  void * /* ptr */,
917  cl_uint /* num_events_in_wait_list */,
918  const cl_event * /* event_wait_list */,
919  cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
920 
921 extern CL_API_ENTRY cl_int CL_API_CALL
922 clEnqueueReadBufferRect(cl_command_queue /* command_queue */,
923  cl_mem /* buffer */,
924  cl_bool /* blocking_read */,
925  const size_t * /* buffer_offset */,
926  const size_t * /* host_offset */,
927  const size_t * /* region */,
928  size_t /* buffer_row_pitch */,
929  size_t /* buffer_slice_pitch */,
930  size_t /* host_row_pitch */,
931  size_t /* host_slice_pitch */,
932  void * /* ptr */,
933  cl_uint /* num_events_in_wait_list */,
934  const cl_event * /* event_wait_list */,
935  cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1;
936 
937 extern CL_API_ENTRY cl_int CL_API_CALL
938 clEnqueueWriteBuffer(cl_command_queue /* command_queue */,
939  cl_mem /* buffer */,
940  cl_bool /* blocking_write */,
941  size_t /* offset */,
942  size_t /* size */,
943  const void * /* ptr */,
944  cl_uint /* num_events_in_wait_list */,
945  const cl_event * /* event_wait_list */,
946  cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
947 
948 extern CL_API_ENTRY cl_int CL_API_CALL
949 clEnqueueWriteBufferRect(cl_command_queue /* command_queue */,
950  cl_mem /* buffer */,
951  cl_bool /* blocking_write */,
952  const size_t * /* buffer_offset */,
953  const size_t * /* host_offset */,
954  const size_t * /* region */,
955  size_t /* buffer_row_pitch */,
956  size_t /* buffer_slice_pitch */,
957  size_t /* host_row_pitch */,
958  size_t /* host_slice_pitch */,
959  const void * /* ptr */,
960  cl_uint /* num_events_in_wait_list */,
961  const cl_event * /* event_wait_list */,
962  cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1;
963 
964 extern CL_API_ENTRY cl_int CL_API_CALL
965 clEnqueueFillBuffer(cl_command_queue /* command_queue */,
966  cl_mem /* buffer */,
967  const void * /* pattern */,
968  size_t /* pattern_size */,
969  size_t /* offset */,
970  size_t /* size */,
971  cl_uint /* num_events_in_wait_list */,
972  const cl_event * /* event_wait_list */,
973  cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2;
974 
975 extern CL_API_ENTRY cl_int CL_API_CALL
976 clEnqueueCopyBuffer(cl_command_queue /* command_queue */,
977  cl_mem /* src_buffer */,
978  cl_mem /* dst_buffer */,
979  size_t /* src_offset */,
980  size_t /* dst_offset */,
981  size_t /* size */,
982  cl_uint /* num_events_in_wait_list */,
983  const cl_event * /* event_wait_list */,
984  cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
985 
986 extern CL_API_ENTRY cl_int CL_API_CALL
987 clEnqueueCopyBufferRect(cl_command_queue /* command_queue */,
988  cl_mem /* src_buffer */,
989  cl_mem /* dst_buffer */,
990  const size_t * /* src_origin */,
991  const size_t * /* dst_origin */,
992  const size_t * /* region */,
993  size_t /* src_row_pitch */,
994  size_t /* src_slice_pitch */,
995  size_t /* dst_row_pitch */,
996  size_t /* dst_slice_pitch */,
997  cl_uint /* num_events_in_wait_list */,
998  const cl_event * /* event_wait_list */,
999  cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1;
1000 
1001 extern CL_API_ENTRY cl_int CL_API_CALL
1002 clEnqueueReadImage(cl_command_queue /* command_queue */,
1003  cl_mem /* image */,
1004  cl_bool /* blocking_read */,
1005  const size_t * /* origin[3] */,
1006  const size_t * /* region[3] */,
1007  size_t /* row_pitch */,
1008  size_t /* slice_pitch */,
1009  void * /* ptr */,
1010  cl_uint /* num_events_in_wait_list */,
1011  const cl_event * /* event_wait_list */,
1012  cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
1013 
1014 extern CL_API_ENTRY cl_int CL_API_CALL
1015 clEnqueueWriteImage(cl_command_queue /* command_queue */,
1016  cl_mem /* image */,
1017  cl_bool /* blocking_write */,
1018  const size_t * /* origin[3] */,
1019  const size_t * /* region[3] */,
1020  size_t /* input_row_pitch */,
1021  size_t /* input_slice_pitch */,
1022  const void * /* ptr */,
1023  cl_uint /* num_events_in_wait_list */,
1024  const cl_event * /* event_wait_list */,
1025  cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
1026 
1027 extern CL_API_ENTRY cl_int CL_API_CALL
1028 clEnqueueFillImage(cl_command_queue /* command_queue */,
1029  cl_mem /* image */,
1030  const void * /* fill_color */,
1031  const size_t * /* origin[3] */,
1032  const size_t * /* region[3] */,
1033  cl_uint /* num_events_in_wait_list */,
1034  const cl_event * /* event_wait_list */,
1035  cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2;
1036 
1037 extern CL_API_ENTRY cl_int CL_API_CALL
1038 clEnqueueCopyImage(cl_command_queue /* command_queue */,
1039  cl_mem /* src_image */,
1040  cl_mem /* dst_image */,
1041  const size_t * /* src_origin[3] */,
1042  const size_t * /* dst_origin[3] */,
1043  const size_t * /* region[3] */,
1044  cl_uint /* num_events_in_wait_list */,
1045  const cl_event * /* event_wait_list */,
1046  cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
1047 
1048 extern CL_API_ENTRY cl_int CL_API_CALL
1049 clEnqueueCopyImageToBuffer(cl_command_queue /* command_queue */,
1050  cl_mem /* src_image */,
1051  cl_mem /* dst_buffer */,
1052  const size_t * /* src_origin[3] */,
1053  const size_t * /* region[3] */,
1054  size_t /* dst_offset */,
1055  cl_uint /* num_events_in_wait_list */,
1056  const cl_event * /* event_wait_list */,
1057  cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
1058 
1059 extern CL_API_ENTRY cl_int CL_API_CALL
1060 clEnqueueCopyBufferToImage(cl_command_queue /* command_queue */,
1061  cl_mem /* src_buffer */,
1062  cl_mem /* dst_image */,
1063  size_t /* src_offset */,
1064  const size_t * /* dst_origin[3] */,
1065  const size_t * /* region[3] */,
1066  cl_uint /* num_events_in_wait_list */,
1067  const cl_event * /* event_wait_list */,
1068  cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
1069 
1070 extern CL_API_ENTRY void * CL_API_CALL
1071 clEnqueueMapBuffer(cl_command_queue /* command_queue */,
1072  cl_mem /* buffer */,
1073  cl_bool /* blocking_map */,
1074  cl_map_flags /* map_flags */,
1075  size_t /* offset */,
1076  size_t /* size */,
1077  cl_uint /* num_events_in_wait_list */,
1078  const cl_event * /* event_wait_list */,
1079  cl_event * /* event */,
1080  cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
1081 
1082 extern CL_API_ENTRY void * CL_API_CALL
1083 clEnqueueMapImage(cl_command_queue /* command_queue */,
1084  cl_mem /* image */,
1085  cl_bool /* blocking_map */,
1086  cl_map_flags /* map_flags */,
1087  const size_t * /* origin[3] */,
1088  const size_t * /* region[3] */,
1089  size_t * /* image_row_pitch */,
1090  size_t * /* image_slice_pitch */,
1091  cl_uint /* num_events_in_wait_list */,
1092  const cl_event * /* event_wait_list */,
1093  cl_event * /* event */,
1094  cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
1095 
1096 extern CL_API_ENTRY cl_int CL_API_CALL
1097 clEnqueueUnmapMemObject(cl_command_queue /* command_queue */,
1098  cl_mem /* memobj */,
1099  void * /* mapped_ptr */,
1100  cl_uint /* num_events_in_wait_list */,
1101  const cl_event * /* event_wait_list */,
1102  cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
1103 
1104 extern CL_API_ENTRY cl_int CL_API_CALL
1105 clEnqueueMigrateMemObjects(cl_command_queue /* command_queue */,
1106  cl_uint /* num_mem_objects */,
1107  const cl_mem * /* mem_objects */,
1108  cl_mem_migration_flags /* flags */,
1109  cl_uint /* num_events_in_wait_list */,
1110  const cl_event * /* event_wait_list */,
1111  cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2;
1112 
1113 extern CL_API_ENTRY cl_int CL_API_CALL
1114 clEnqueueNDRangeKernel(cl_command_queue /* command_queue */,
1115  cl_kernel /* kernel */,
1116  cl_uint /* work_dim */,
1117  const size_t * /* global_work_offset */,
1118  const size_t * /* global_work_size */,
1119  const size_t * /* local_work_size */,
1120  cl_uint /* num_events_in_wait_list */,
1121  const cl_event * /* event_wait_list */,
1122  cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
1123 
1124 extern CL_API_ENTRY cl_int CL_API_CALL
1125 clEnqueueTask(cl_command_queue /* command_queue */,
1126  cl_kernel /* kernel */,
1127  cl_uint /* num_events_in_wait_list */,
1128  const cl_event * /* event_wait_list */,
1129  cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
1130 
1131 extern CL_API_ENTRY cl_int CL_API_CALL
1132 clEnqueueNativeKernel(cl_command_queue /* command_queue */,
1133  void (CL_CALLBACK * /*user_func*/)(void *),
1134  void * /* args */,
1135  size_t /* cb_args */,
1136  cl_uint /* num_mem_objects */,
1137  const cl_mem * /* mem_list */,
1138  const void ** /* args_mem_loc */,
1139  cl_uint /* num_events_in_wait_list */,
1140  const cl_event * /* event_wait_list */,
1141  cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
1142 
1143 extern CL_API_ENTRY cl_int CL_API_CALL
1144 clEnqueueMarkerWithWaitList(cl_command_queue /* command_queue */,
1145  cl_uint /* num_events_in_wait_list */,
1146  const cl_event * /* event_wait_list */,
1147  cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2;
1148 
1149 extern CL_API_ENTRY cl_int CL_API_CALL
1150 clEnqueueBarrierWithWaitList(cl_command_queue /* command_queue */,
1151  cl_uint /* num_events_in_wait_list */,
1152  const cl_event * /* event_wait_list */,
1153  cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2;
1154 
1155 
1156 /* Extension function access
1157  *
1158  * Returns the extension function address for the given function name,
1159  * or NULL if a valid function can not be found. The client must
1160  * check to make sure the address is not NULL, before using or
1161  * calling the returned function address.
1162  */
1163 extern CL_API_ENTRY void * CL_API_CALL
1164 clGetExtensionFunctionAddressForPlatform(cl_platform_id /* platform */,
1165  const char * /* func_name */) CL_API_SUFFIX__VERSION_1_2;
1166 
1167 
1168 // Deprecated OpenCL 1.1 APIs
1169 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
1170 clCreateImage2D(cl_context /* context */,
1171  cl_mem_flags /* flags */,
1172  const cl_image_format * /* image_format */,
1173  size_t /* image_width */,
1174  size_t /* image_height */,
1175  size_t /* image_row_pitch */,
1176  void * /* host_ptr */,
1177  cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
1178 
1179 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
1180 clCreateImage3D(cl_context /* context */,
1181  cl_mem_flags /* flags */,
1182  const cl_image_format * /* image_format */,
1183  size_t /* image_width */,
1184  size_t /* image_height */,
1185  size_t /* image_depth */,
1186  size_t /* image_row_pitch */,
1187  size_t /* image_slice_pitch */,
1188  void * /* host_ptr */,
1189  cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
1190 
1191 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
1192 clEnqueueMarker(cl_command_queue /* command_queue */,
1193  cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
1194 
1195 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
1196 clEnqueueWaitForEvents(cl_command_queue /* command_queue */,
1197  cl_uint /* num_events */,
1198  const cl_event * /* event_list */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
1199 
1200 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
1201 clEnqueueBarrier(cl_command_queue /* command_queue */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
1202 
1203 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
1204 clUnloadCompiler(void) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
1205 
1206 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED void * CL_API_CALL
1207 clGetExtensionFunctionAddress(const char * /* func_name */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
1208 
1209 #ifdef __cplusplus
1210 }
1211 #endif
1212 
1213 #endif /* __OPENCL_CL_H */