1 /*******************************************************************************
2 * Copyright (c) 2008-2019 The Khronos Group Inc.
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:
12 * The above copyright notice and this permission notice shall be included
13 * in all copies or substantial portions of the Materials.
15 * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
16 * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
17 * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
18 * https://www.khronos.org/registry/
20 * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
27 ******************************************************************************/
32 #include <CL/cl_version.h>
33 #include <CL/cl_platform.h>
39 /******************************************************************************/
41 typedef struct _cl_platform_id
* cl_platform_id
;
42 typedef struct _cl_device_id
* cl_device_id
;
43 typedef struct _cl_context
* cl_context
;
44 typedef struct _cl_command_queue
* cl_command_queue
;
45 typedef struct _cl_mem
* cl_mem
;
46 typedef struct _cl_program
* cl_program
;
47 typedef struct _cl_kernel
* cl_kernel
;
48 typedef struct _cl_event
* cl_event
;
49 typedef struct _cl_sampler
* cl_sampler
;
51 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. */
52 typedef cl_ulong cl_bitfield
;
53 typedef cl_bitfield cl_device_type
;
54 typedef cl_uint cl_platform_info
;
55 typedef cl_uint cl_device_info
;
56 typedef cl_bitfield cl_device_fp_config
;
57 typedef cl_uint cl_device_mem_cache_type
;
58 typedef cl_uint cl_device_local_mem_type
;
59 typedef cl_bitfield cl_device_exec_capabilities
;
61 typedef cl_bitfield cl_device_svm_capabilities
;
63 typedef cl_bitfield cl_command_queue_properties
;
65 typedef intptr_t cl_device_partition_property
;
66 typedef cl_bitfield cl_device_affinity_domain
;
69 typedef intptr_t cl_context_properties
;
70 typedef cl_uint cl_context_info
;
72 typedef cl_bitfield cl_queue_properties
;
74 typedef cl_uint cl_command_queue_info
;
75 typedef cl_uint cl_channel_order
;
76 typedef cl_uint cl_channel_type
;
77 typedef cl_bitfield cl_mem_flags
;
79 typedef cl_bitfield cl_svm_mem_flags
;
81 typedef cl_uint cl_mem_object_type
;
82 typedef cl_uint cl_mem_info
;
84 typedef cl_bitfield cl_mem_migration_flags
;
86 typedef cl_uint cl_image_info
;
88 typedef cl_uint cl_buffer_create_type
;
90 typedef cl_uint cl_addressing_mode
;
91 typedef cl_uint cl_filter_mode
;
92 typedef cl_uint cl_sampler_info
;
93 typedef cl_bitfield cl_map_flags
;
95 typedef intptr_t cl_pipe_properties
;
96 typedef cl_uint cl_pipe_info
;
98 typedef cl_uint cl_program_info
;
99 typedef cl_uint cl_program_build_info
;
100 #ifdef CL_VERSION_1_2
101 typedef cl_uint cl_program_binary_type
;
103 typedef cl_int cl_build_status
;
104 typedef cl_uint cl_kernel_info
;
105 #ifdef CL_VERSION_1_2
106 typedef cl_uint cl_kernel_arg_info
;
107 typedef cl_uint cl_kernel_arg_address_qualifier
;
108 typedef cl_uint cl_kernel_arg_access_qualifier
;
109 typedef cl_bitfield cl_kernel_arg_type_qualifier
;
111 typedef cl_uint cl_kernel_work_group_info
;
112 #ifdef CL_VERSION_2_1
113 typedef cl_uint cl_kernel_sub_group_info
;
115 typedef cl_uint cl_event_info
;
116 typedef cl_uint cl_command_type
;
117 typedef cl_uint cl_profiling_info
;
118 #ifdef CL_VERSION_2_0
119 typedef cl_bitfield cl_sampler_properties
;
120 typedef cl_uint cl_kernel_exec_info
;
123 typedef struct _cl_image_format
{
124 cl_channel_order image_channel_order
;
125 cl_channel_type image_channel_data_type
;
128 #ifdef CL_VERSION_1_2
130 typedef struct _cl_image_desc
{
131 cl_mem_object_type image_type
;
135 size_t image_array_size
;
136 size_t image_row_pitch
;
137 size_t image_slice_pitch
;
138 cl_uint num_mip_levels
;
140 #ifdef CL_VERSION_2_0
142 __extension__
/* Prevents warnings about anonymous union in -pedantic builds */
145 #pragma warning( push )
146 #pragma warning( disable : 4201 ) /* Prevents warning about nameless struct/union in /W4 /Za builds */
151 #ifdef CL_VERSION_2_0
155 #pragma warning( pop )
162 #ifdef CL_VERSION_1_1
164 typedef struct _cl_buffer_region
{
171 /******************************************************************************/
175 #define CL_DEVICE_NOT_FOUND -1
176 #define CL_DEVICE_NOT_AVAILABLE -2
177 #define CL_COMPILER_NOT_AVAILABLE -3
178 #define CL_MEM_OBJECT_ALLOCATION_FAILURE -4
179 #define CL_OUT_OF_RESOURCES -5
180 #define CL_OUT_OF_HOST_MEMORY -6
181 #define CL_PROFILING_INFO_NOT_AVAILABLE -7
182 #define CL_MEM_COPY_OVERLAP -8
183 #define CL_IMAGE_FORMAT_MISMATCH -9
184 #define CL_IMAGE_FORMAT_NOT_SUPPORTED -10
185 #define CL_BUILD_PROGRAM_FAILURE -11
186 #define CL_MAP_FAILURE -12
187 #ifdef CL_VERSION_1_1
188 #define CL_MISALIGNED_SUB_BUFFER_OFFSET -13
189 #define CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST -14
191 #ifdef CL_VERSION_1_2
192 #define CL_COMPILE_PROGRAM_FAILURE -15
193 #define CL_LINKER_NOT_AVAILABLE -16
194 #define CL_LINK_PROGRAM_FAILURE -17
195 #define CL_DEVICE_PARTITION_FAILED -18
196 #define CL_KERNEL_ARG_INFO_NOT_AVAILABLE -19
199 #define CL_INVALID_VALUE -30
200 #define CL_INVALID_DEVICE_TYPE -31
201 #define CL_INVALID_PLATFORM -32
202 #define CL_INVALID_DEVICE -33
203 #define CL_INVALID_CONTEXT -34
204 #define CL_INVALID_QUEUE_PROPERTIES -35
205 #define CL_INVALID_COMMAND_QUEUE -36
206 #define CL_INVALID_HOST_PTR -37
207 #define CL_INVALID_MEM_OBJECT -38
208 #define CL_INVALID_IMAGE_FORMAT_DESCRIPTOR -39
209 #define CL_INVALID_IMAGE_SIZE -40
210 #define CL_INVALID_SAMPLER -41
211 #define CL_INVALID_BINARY -42
212 #define CL_INVALID_BUILD_OPTIONS -43
213 #define CL_INVALID_PROGRAM -44
214 #define CL_INVALID_PROGRAM_EXECUTABLE -45
215 #define CL_INVALID_KERNEL_NAME -46
216 #define CL_INVALID_KERNEL_DEFINITION -47
217 #define CL_INVALID_KERNEL -48
218 #define CL_INVALID_ARG_INDEX -49
219 #define CL_INVALID_ARG_VALUE -50
220 #define CL_INVALID_ARG_SIZE -51
221 #define CL_INVALID_KERNEL_ARGS -52
222 #define CL_INVALID_WORK_DIMENSION -53
223 #define CL_INVALID_WORK_GROUP_SIZE -54
224 #define CL_INVALID_WORK_ITEM_SIZE -55
225 #define CL_INVALID_GLOBAL_OFFSET -56
226 #define CL_INVALID_EVENT_WAIT_LIST -57
227 #define CL_INVALID_EVENT -58
228 #define CL_INVALID_OPERATION -59
229 #define CL_INVALID_GL_OBJECT -60
230 #define CL_INVALID_BUFFER_SIZE -61
231 #define CL_INVALID_MIP_LEVEL -62
232 #define CL_INVALID_GLOBAL_WORK_SIZE -63
233 #ifdef CL_VERSION_1_1
234 #define CL_INVALID_PROPERTY -64
236 #ifdef CL_VERSION_1_2
237 #define CL_INVALID_IMAGE_DESCRIPTOR -65
238 #define CL_INVALID_COMPILER_OPTIONS -66
239 #define CL_INVALID_LINKER_OPTIONS -67
240 #define CL_INVALID_DEVICE_PARTITION_COUNT -68
242 #ifdef CL_VERSION_2_0
243 #define CL_INVALID_PIPE_SIZE -69
244 #define CL_INVALID_DEVICE_QUEUE -70
246 #ifdef CL_VERSION_2_2
247 #define CL_INVALID_SPEC_ID -71
248 #define CL_MAX_SIZE_RESTRICTION_EXCEEDED -72
255 #ifdef CL_VERSION_1_2
256 #define CL_BLOCKING CL_TRUE
257 #define CL_NON_BLOCKING CL_FALSE
260 /* cl_platform_info */
261 #define CL_PLATFORM_PROFILE 0x0900
262 #define CL_PLATFORM_VERSION 0x0901
263 #define CL_PLATFORM_NAME 0x0902
264 #define CL_PLATFORM_VENDOR 0x0903
265 #define CL_PLATFORM_EXTENSIONS 0x0904
266 #ifdef CL_VERSION_2_1
267 #define CL_PLATFORM_HOST_TIMER_RESOLUTION 0x0905
270 /* cl_device_type - bitfield */
271 #define CL_DEVICE_TYPE_DEFAULT (1 << 0)
272 #define CL_DEVICE_TYPE_CPU (1 << 1)
273 #define CL_DEVICE_TYPE_GPU (1 << 2)
274 #define CL_DEVICE_TYPE_ACCELERATOR (1 << 3)
275 #ifdef CL_VERSION_1_2
276 #define CL_DEVICE_TYPE_CUSTOM (1 << 4)
278 #define CL_DEVICE_TYPE_ALL 0xFFFFFFFF
281 #define CL_DEVICE_TYPE 0x1000
282 #define CL_DEVICE_VENDOR_ID 0x1001
283 #define CL_DEVICE_MAX_COMPUTE_UNITS 0x1002
284 #define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS 0x1003
285 #define CL_DEVICE_MAX_WORK_GROUP_SIZE 0x1004
286 #define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005
287 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR 0x1006
288 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT 0x1007
289 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT 0x1008
290 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG 0x1009
291 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT 0x100A
292 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE 0x100B
293 #define CL_DEVICE_MAX_CLOCK_FREQUENCY 0x100C
294 #define CL_DEVICE_ADDRESS_BITS 0x100D
295 #define CL_DEVICE_MAX_READ_IMAGE_ARGS 0x100E
296 #define CL_DEVICE_MAX_WRITE_IMAGE_ARGS 0x100F
297 #define CL_DEVICE_MAX_MEM_ALLOC_SIZE 0x1010
298 #define CL_DEVICE_IMAGE2D_MAX_WIDTH 0x1011
299 #define CL_DEVICE_IMAGE2D_MAX_HEIGHT 0x1012
300 #define CL_DEVICE_IMAGE3D_MAX_WIDTH 0x1013
301 #define CL_DEVICE_IMAGE3D_MAX_HEIGHT 0x1014
302 #define CL_DEVICE_IMAGE3D_MAX_DEPTH 0x1015
303 #define CL_DEVICE_IMAGE_SUPPORT 0x1016
304 #define CL_DEVICE_MAX_PARAMETER_SIZE 0x1017
305 #define CL_DEVICE_MAX_SAMPLERS 0x1018
306 #define CL_DEVICE_MEM_BASE_ADDR_ALIGN 0x1019
307 #define CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE 0x101A
308 #define CL_DEVICE_SINGLE_FP_CONFIG 0x101B
309 #define CL_DEVICE_GLOBAL_MEM_CACHE_TYPE 0x101C
310 #define CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE 0x101D
311 #define CL_DEVICE_GLOBAL_MEM_CACHE_SIZE 0x101E
312 #define CL_DEVICE_GLOBAL_MEM_SIZE 0x101F
313 #define CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE 0x1020
314 #define CL_DEVICE_MAX_CONSTANT_ARGS 0x1021
315 #define CL_DEVICE_LOCAL_MEM_TYPE 0x1022
316 #define CL_DEVICE_LOCAL_MEM_SIZE 0x1023
317 #define CL_DEVICE_ERROR_CORRECTION_SUPPORT 0x1024
318 #define CL_DEVICE_PROFILING_TIMER_RESOLUTION 0x1025
319 #define CL_DEVICE_ENDIAN_LITTLE 0x1026
320 #define CL_DEVICE_AVAILABLE 0x1027
321 #define CL_DEVICE_COMPILER_AVAILABLE 0x1028
322 #define CL_DEVICE_EXECUTION_CAPABILITIES 0x1029
323 #define CL_DEVICE_QUEUE_PROPERTIES 0x102A /* deprecated */
324 #ifdef CL_VERSION_2_0
325 #define CL_DEVICE_QUEUE_ON_HOST_PROPERTIES 0x102A
327 #define CL_DEVICE_NAME 0x102B
328 #define CL_DEVICE_VENDOR 0x102C
329 #define CL_DRIVER_VERSION 0x102D
330 #define CL_DEVICE_PROFILE 0x102E
331 #define CL_DEVICE_VERSION 0x102F
332 #define CL_DEVICE_EXTENSIONS 0x1030
333 #define CL_DEVICE_PLATFORM 0x1031
334 #ifdef CL_VERSION_1_2
335 #define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032
337 /* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG which is already defined in "cl_ext.h" */
338 #ifdef CL_VERSION_1_1
339 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034
340 #define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035 /* deprecated */
341 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036
342 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT 0x1037
343 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT 0x1038
344 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG 0x1039
345 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT 0x103A
346 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE 0x103B
347 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF 0x103C
348 #define CL_DEVICE_OPENCL_C_VERSION 0x103D
350 #ifdef CL_VERSION_1_2
351 #define CL_DEVICE_LINKER_AVAILABLE 0x103E
352 #define CL_DEVICE_BUILT_IN_KERNELS 0x103F
353 #define CL_DEVICE_IMAGE_MAX_BUFFER_SIZE 0x1040
354 #define CL_DEVICE_IMAGE_MAX_ARRAY_SIZE 0x1041
355 #define CL_DEVICE_PARENT_DEVICE 0x1042
356 #define CL_DEVICE_PARTITION_MAX_SUB_DEVICES 0x1043
357 #define CL_DEVICE_PARTITION_PROPERTIES 0x1044
358 #define CL_DEVICE_PARTITION_AFFINITY_DOMAIN 0x1045
359 #define CL_DEVICE_PARTITION_TYPE 0x1046
360 #define CL_DEVICE_REFERENCE_COUNT 0x1047
361 #define CL_DEVICE_PREFERRED_INTEROP_USER_SYNC 0x1048
362 #define CL_DEVICE_PRINTF_BUFFER_SIZE 0x1049
364 #ifdef CL_VERSION_2_0
365 #define CL_DEVICE_IMAGE_PITCH_ALIGNMENT 0x104A
366 #define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT 0x104B
367 #define CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS 0x104C
368 #define CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE 0x104D
369 #define CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES 0x104E
370 #define CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE 0x104F
371 #define CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE 0x1050
372 #define CL_DEVICE_MAX_ON_DEVICE_QUEUES 0x1051
373 #define CL_DEVICE_MAX_ON_DEVICE_EVENTS 0x1052
374 #define CL_DEVICE_SVM_CAPABILITIES 0x1053
375 #define CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE 0x1054
376 #define CL_DEVICE_MAX_PIPE_ARGS 0x1055
377 #define CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS 0x1056
378 #define CL_DEVICE_PIPE_MAX_PACKET_SIZE 0x1057
379 #define CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT 0x1058
380 #define CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT 0x1059
381 #define CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT 0x105A
383 #ifdef CL_VERSION_2_1
384 #define CL_DEVICE_IL_VERSION 0x105B
385 #define CL_DEVICE_MAX_NUM_SUB_GROUPS 0x105C
386 #define CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS 0x105D
389 /* cl_device_fp_config - bitfield */
390 #define CL_FP_DENORM (1 << 0)
391 #define CL_FP_INF_NAN (1 << 1)
392 #define CL_FP_ROUND_TO_NEAREST (1 << 2)
393 #define CL_FP_ROUND_TO_ZERO (1 << 3)
394 #define CL_FP_ROUND_TO_INF (1 << 4)
395 #define CL_FP_FMA (1 << 5)
396 #ifdef CL_VERSION_1_1
397 #define CL_FP_SOFT_FLOAT (1 << 6)
399 #ifdef CL_VERSION_1_2
400 #define CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT (1 << 7)
403 /* cl_device_mem_cache_type */
405 #define CL_READ_ONLY_CACHE 0x1
406 #define CL_READ_WRITE_CACHE 0x2
408 /* cl_device_local_mem_type */
410 #define CL_GLOBAL 0x2
412 /* cl_device_exec_capabilities - bitfield */
413 #define CL_EXEC_KERNEL (1 << 0)
414 #define CL_EXEC_NATIVE_KERNEL (1 << 1)
416 /* cl_command_queue_properties - bitfield */
417 #define CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE (1 << 0)
418 #define CL_QUEUE_PROFILING_ENABLE (1 << 1)
419 #ifdef CL_VERSION_2_0
420 #define CL_QUEUE_ON_DEVICE (1 << 2)
421 #define CL_QUEUE_ON_DEVICE_DEFAULT (1 << 3)
424 /* cl_context_info */
425 #define CL_CONTEXT_REFERENCE_COUNT 0x1080
426 #define CL_CONTEXT_DEVICES 0x1081
427 #define CL_CONTEXT_PROPERTIES 0x1082
428 #ifdef CL_VERSION_1_1
429 #define CL_CONTEXT_NUM_DEVICES 0x1083
432 /* cl_context_properties */
433 #define CL_CONTEXT_PLATFORM 0x1084
434 #ifdef CL_VERSION_1_2
435 #define CL_CONTEXT_INTEROP_USER_SYNC 0x1085
438 #ifdef CL_VERSION_1_2
440 /* cl_device_partition_property */
441 #define CL_DEVICE_PARTITION_EQUALLY 0x1086
442 #define CL_DEVICE_PARTITION_BY_COUNTS 0x1087
443 #define CL_DEVICE_PARTITION_BY_COUNTS_LIST_END 0x0
444 #define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN 0x1088
448 #ifdef CL_VERSION_1_2
450 /* cl_device_affinity_domain */
451 #define CL_DEVICE_AFFINITY_DOMAIN_NUMA (1 << 0)
452 #define CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE (1 << 1)
453 #define CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE (1 << 2)
454 #define CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE (1 << 3)
455 #define CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE (1 << 4)
456 #define CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE (1 << 5)
460 #ifdef CL_VERSION_2_0
462 /* cl_device_svm_capabilities */
463 #define CL_DEVICE_SVM_COARSE_GRAIN_BUFFER (1 << 0)
464 #define CL_DEVICE_SVM_FINE_GRAIN_BUFFER (1 << 1)
465 #define CL_DEVICE_SVM_FINE_GRAIN_SYSTEM (1 << 2)
466 #define CL_DEVICE_SVM_ATOMICS (1 << 3)
470 /* cl_command_queue_info */
471 #define CL_QUEUE_CONTEXT 0x1090
472 #define CL_QUEUE_DEVICE 0x1091
473 #define CL_QUEUE_REFERENCE_COUNT 0x1092
474 #define CL_QUEUE_PROPERTIES 0x1093
475 #ifdef CL_VERSION_2_0
476 #define CL_QUEUE_SIZE 0x1094
478 #ifdef CL_VERSION_2_1
479 #define CL_QUEUE_DEVICE_DEFAULT 0x1095
482 /* cl_mem_flags and cl_svm_mem_flags - bitfield */
483 #define CL_MEM_READ_WRITE (1 << 0)
484 #define CL_MEM_WRITE_ONLY (1 << 1)
485 #define CL_MEM_READ_ONLY (1 << 2)
486 #define CL_MEM_USE_HOST_PTR (1 << 3)
487 #define CL_MEM_ALLOC_HOST_PTR (1 << 4)
488 #define CL_MEM_COPY_HOST_PTR (1 << 5)
489 /* reserved (1 << 6) */
490 #ifdef CL_VERSION_1_2
491 #define CL_MEM_HOST_WRITE_ONLY (1 << 7)
492 #define CL_MEM_HOST_READ_ONLY (1 << 8)
493 #define CL_MEM_HOST_NO_ACCESS (1 << 9)
495 #ifdef CL_VERSION_2_0
496 #define CL_MEM_SVM_FINE_GRAIN_BUFFER (1 << 10) /* used by cl_svm_mem_flags only */
497 #define CL_MEM_SVM_ATOMICS (1 << 11) /* used by cl_svm_mem_flags only */
498 #define CL_MEM_KERNEL_READ_AND_WRITE (1 << 12)
501 #ifdef CL_VERSION_1_2
503 /* cl_mem_migration_flags - bitfield */
504 #define CL_MIGRATE_MEM_OBJECT_HOST (1 << 0)
505 #define CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED (1 << 1)
509 /* cl_channel_order */
514 #define CL_RGB 0x10B4
515 #define CL_RGBA 0x10B5
516 #define CL_BGRA 0x10B6
517 #define CL_ARGB 0x10B7
518 #define CL_INTENSITY 0x10B8
519 #define CL_LUMINANCE 0x10B9
520 #ifdef CL_VERSION_1_1
522 #define CL_RGx 0x10BB
523 #define CL_RGBx 0x10BC
525 #ifdef CL_VERSION_1_2
526 #define CL_DEPTH 0x10BD
527 #define CL_DEPTH_STENCIL 0x10BE
529 #ifdef CL_VERSION_2_0
530 #define CL_sRGB 0x10BF
531 #define CL_sRGBx 0x10C0
532 #define CL_sRGBA 0x10C1
533 #define CL_sBGRA 0x10C2
534 #define CL_ABGR 0x10C3
537 /* cl_channel_type */
538 #define CL_SNORM_INT8 0x10D0
539 #define CL_SNORM_INT16 0x10D1
540 #define CL_UNORM_INT8 0x10D2
541 #define CL_UNORM_INT16 0x10D3
542 #define CL_UNORM_SHORT_565 0x10D4
543 #define CL_UNORM_SHORT_555 0x10D5
544 #define CL_UNORM_INT_101010 0x10D6
545 #define CL_SIGNED_INT8 0x10D7
546 #define CL_SIGNED_INT16 0x10D8
547 #define CL_SIGNED_INT32 0x10D9
548 #define CL_UNSIGNED_INT8 0x10DA
549 #define CL_UNSIGNED_INT16 0x10DB
550 #define CL_UNSIGNED_INT32 0x10DC
551 #define CL_HALF_FLOAT 0x10DD
552 #define CL_FLOAT 0x10DE
553 #ifdef CL_VERSION_1_2
554 #define CL_UNORM_INT24 0x10DF
556 #ifdef CL_VERSION_2_1
557 #define CL_UNORM_INT_101010_2 0x10E0
560 /* cl_mem_object_type */
561 #define CL_MEM_OBJECT_BUFFER 0x10F0
562 #define CL_MEM_OBJECT_IMAGE2D 0x10F1
563 #define CL_MEM_OBJECT_IMAGE3D 0x10F2
564 #ifdef CL_VERSION_1_2
565 #define CL_MEM_OBJECT_IMAGE2D_ARRAY 0x10F3
566 #define CL_MEM_OBJECT_IMAGE1D 0x10F4
567 #define CL_MEM_OBJECT_IMAGE1D_ARRAY 0x10F5
568 #define CL_MEM_OBJECT_IMAGE1D_BUFFER 0x10F6
570 #ifdef CL_VERSION_2_0
571 #define CL_MEM_OBJECT_PIPE 0x10F7
575 #define CL_MEM_TYPE 0x1100
576 #define CL_MEM_FLAGS 0x1101
577 #define CL_MEM_SIZE 0x1102
578 #define CL_MEM_HOST_PTR 0x1103
579 #define CL_MEM_MAP_COUNT 0x1104
580 #define CL_MEM_REFERENCE_COUNT 0x1105
581 #define CL_MEM_CONTEXT 0x1106
582 #ifdef CL_VERSION_1_1
583 #define CL_MEM_ASSOCIATED_MEMOBJECT 0x1107
584 #define CL_MEM_OFFSET 0x1108
586 #ifdef CL_VERSION_2_0
587 #define CL_MEM_USES_SVM_POINTER 0x1109
591 #define CL_IMAGE_FORMAT 0x1110
592 #define CL_IMAGE_ELEMENT_SIZE 0x1111
593 #define CL_IMAGE_ROW_PITCH 0x1112
594 #define CL_IMAGE_SLICE_PITCH 0x1113
595 #define CL_IMAGE_WIDTH 0x1114
596 #define CL_IMAGE_HEIGHT 0x1115
597 #define CL_IMAGE_DEPTH 0x1116
598 #ifdef CL_VERSION_1_2
599 #define CL_IMAGE_ARRAY_SIZE 0x1117
600 #define CL_IMAGE_BUFFER 0x1118
601 #define CL_IMAGE_NUM_MIP_LEVELS 0x1119
602 #define CL_IMAGE_NUM_SAMPLES 0x111A
605 #ifdef CL_VERSION_2_0
608 #define CL_PIPE_PACKET_SIZE 0x1120
609 #define CL_PIPE_MAX_PACKETS 0x1121
613 /* cl_addressing_mode */
614 #define CL_ADDRESS_NONE 0x1130
615 #define CL_ADDRESS_CLAMP_TO_EDGE 0x1131
616 #define CL_ADDRESS_CLAMP 0x1132
617 #define CL_ADDRESS_REPEAT 0x1133
618 #ifdef CL_VERSION_1_1
619 #define CL_ADDRESS_MIRRORED_REPEAT 0x1134
623 #define CL_FILTER_NEAREST 0x1140
624 #define CL_FILTER_LINEAR 0x1141
626 /* cl_sampler_info */
627 #define CL_SAMPLER_REFERENCE_COUNT 0x1150
628 #define CL_SAMPLER_CONTEXT 0x1151
629 #define CL_SAMPLER_NORMALIZED_COORDS 0x1152
630 #define CL_SAMPLER_ADDRESSING_MODE 0x1153
631 #define CL_SAMPLER_FILTER_MODE 0x1154
632 #ifdef CL_VERSION_2_0
633 /* These enumerants are for the cl_khr_mipmap_image extension.
634 They have since been added to cl_ext.h with an appropriate
635 KHR suffix, but are left here for backwards compatibility. */
636 #define CL_SAMPLER_MIP_FILTER_MODE 0x1155
637 #define CL_SAMPLER_LOD_MIN 0x1156
638 #define CL_SAMPLER_LOD_MAX 0x1157
641 /* cl_map_flags - bitfield */
642 #define CL_MAP_READ (1 << 0)
643 #define CL_MAP_WRITE (1 << 1)
644 #ifdef CL_VERSION_1_2
645 #define CL_MAP_WRITE_INVALIDATE_REGION (1 << 2)
648 /* cl_program_info */
649 #define CL_PROGRAM_REFERENCE_COUNT 0x1160
650 #define CL_PROGRAM_CONTEXT 0x1161
651 #define CL_PROGRAM_NUM_DEVICES 0x1162
652 #define CL_PROGRAM_DEVICES 0x1163
653 #define CL_PROGRAM_SOURCE 0x1164
654 #define CL_PROGRAM_BINARY_SIZES 0x1165
655 #define CL_PROGRAM_BINARIES 0x1166
656 #ifdef CL_VERSION_1_2
657 #define CL_PROGRAM_NUM_KERNELS 0x1167
658 #define CL_PROGRAM_KERNEL_NAMES 0x1168
660 #ifdef CL_VERSION_2_1
661 #define CL_PROGRAM_IL 0x1169
663 #ifdef CL_VERSION_2_2
664 #define CL_PROGRAM_SCOPE_GLOBAL_CTORS_PRESENT 0x116A
665 #define CL_PROGRAM_SCOPE_GLOBAL_DTORS_PRESENT 0x116B
668 /* cl_program_build_info */
669 #define CL_PROGRAM_BUILD_STATUS 0x1181
670 #define CL_PROGRAM_BUILD_OPTIONS 0x1182
671 #define CL_PROGRAM_BUILD_LOG 0x1183
672 #ifdef CL_VERSION_1_2
673 #define CL_PROGRAM_BINARY_TYPE 0x1184
675 #ifdef CL_VERSION_2_0
676 #define CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE 0x1185
679 #ifdef CL_VERSION_1_2
681 /* cl_program_binary_type */
682 #define CL_PROGRAM_BINARY_TYPE_NONE 0x0
683 #define CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT 0x1
684 #define CL_PROGRAM_BINARY_TYPE_LIBRARY 0x2
685 #define CL_PROGRAM_BINARY_TYPE_EXECUTABLE 0x4
689 /* cl_build_status */
690 #define CL_BUILD_SUCCESS 0
691 #define CL_BUILD_NONE -1
692 #define CL_BUILD_ERROR -2
693 #define CL_BUILD_IN_PROGRESS -3
696 #define CL_KERNEL_FUNCTION_NAME 0x1190
697 #define CL_KERNEL_NUM_ARGS 0x1191
698 #define CL_KERNEL_REFERENCE_COUNT 0x1192
699 #define CL_KERNEL_CONTEXT 0x1193
700 #define CL_KERNEL_PROGRAM 0x1194
701 #ifdef CL_VERSION_1_2
702 #define CL_KERNEL_ATTRIBUTES 0x1195
704 #ifdef CL_VERSION_2_1
705 #define CL_KERNEL_MAX_NUM_SUB_GROUPS 0x11B9
706 #define CL_KERNEL_COMPILE_NUM_SUB_GROUPS 0x11BA
709 #ifdef CL_VERSION_1_2
711 /* cl_kernel_arg_info */
712 #define CL_KERNEL_ARG_ADDRESS_QUALIFIER 0x1196
713 #define CL_KERNEL_ARG_ACCESS_QUALIFIER 0x1197
714 #define CL_KERNEL_ARG_TYPE_NAME 0x1198
715 #define CL_KERNEL_ARG_TYPE_QUALIFIER 0x1199
716 #define CL_KERNEL_ARG_NAME 0x119A
720 #ifdef CL_VERSION_1_2
722 /* cl_kernel_arg_address_qualifier */
723 #define CL_KERNEL_ARG_ADDRESS_GLOBAL 0x119B
724 #define CL_KERNEL_ARG_ADDRESS_LOCAL 0x119C
725 #define CL_KERNEL_ARG_ADDRESS_CONSTANT 0x119D
726 #define CL_KERNEL_ARG_ADDRESS_PRIVATE 0x119E
730 #ifdef CL_VERSION_1_2
732 /* cl_kernel_arg_access_qualifier */
733 #define CL_KERNEL_ARG_ACCESS_READ_ONLY 0x11A0
734 #define CL_KERNEL_ARG_ACCESS_WRITE_ONLY 0x11A1
735 #define CL_KERNEL_ARG_ACCESS_READ_WRITE 0x11A2
736 #define CL_KERNEL_ARG_ACCESS_NONE 0x11A3
740 #ifdef CL_VERSION_1_2
742 /* cl_kernel_arg_type_qualifier */
743 #define CL_KERNEL_ARG_TYPE_NONE 0
744 #define CL_KERNEL_ARG_TYPE_CONST (1 << 0)
745 #define CL_KERNEL_ARG_TYPE_RESTRICT (1 << 1)
746 #define CL_KERNEL_ARG_TYPE_VOLATILE (1 << 2)
747 #ifdef CL_VERSION_2_0
748 #define CL_KERNEL_ARG_TYPE_PIPE (1 << 3)
753 /* cl_kernel_work_group_info */
754 #define CL_KERNEL_WORK_GROUP_SIZE 0x11B0
755 #define CL_KERNEL_COMPILE_WORK_GROUP_SIZE 0x11B1
756 #define CL_KERNEL_LOCAL_MEM_SIZE 0x11B2
757 #define CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x11B3
758 #define CL_KERNEL_PRIVATE_MEM_SIZE 0x11B4
759 #ifdef CL_VERSION_1_2
760 #define CL_KERNEL_GLOBAL_WORK_SIZE 0x11B5
763 #ifdef CL_VERSION_2_1
765 /* cl_kernel_sub_group_info */
766 #define CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE 0x2033
767 #define CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE 0x2034
768 #define CL_KERNEL_LOCAL_SIZE_FOR_SUB_GROUP_COUNT 0x11B8
772 #ifdef CL_VERSION_2_0
774 /* cl_kernel_exec_info */
775 #define CL_KERNEL_EXEC_INFO_SVM_PTRS 0x11B6
776 #define CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM 0x11B7
781 #define CL_EVENT_COMMAND_QUEUE 0x11D0
782 #define CL_EVENT_COMMAND_TYPE 0x11D1
783 #define CL_EVENT_REFERENCE_COUNT 0x11D2
784 #define CL_EVENT_COMMAND_EXECUTION_STATUS 0x11D3
785 #ifdef CL_VERSION_1_1
786 #define CL_EVENT_CONTEXT 0x11D4
789 /* cl_command_type */
790 #define CL_COMMAND_NDRANGE_KERNEL 0x11F0
791 #define CL_COMMAND_TASK 0x11F1
792 #define CL_COMMAND_NATIVE_KERNEL 0x11F2
793 #define CL_COMMAND_READ_BUFFER 0x11F3
794 #define CL_COMMAND_WRITE_BUFFER 0x11F4
795 #define CL_COMMAND_COPY_BUFFER 0x11F5
796 #define CL_COMMAND_READ_IMAGE 0x11F6
797 #define CL_COMMAND_WRITE_IMAGE 0x11F7
798 #define CL_COMMAND_COPY_IMAGE 0x11F8
799 #define CL_COMMAND_COPY_IMAGE_TO_BUFFER 0x11F9
800 #define CL_COMMAND_COPY_BUFFER_TO_IMAGE 0x11FA
801 #define CL_COMMAND_MAP_BUFFER 0x11FB
802 #define CL_COMMAND_MAP_IMAGE 0x11FC
803 #define CL_COMMAND_UNMAP_MEM_OBJECT 0x11FD
804 #define CL_COMMAND_MARKER 0x11FE
805 #define CL_COMMAND_ACQUIRE_GL_OBJECTS 0x11FF
806 #define CL_COMMAND_RELEASE_GL_OBJECTS 0x1200
807 #ifdef CL_VERSION_1_1
808 #define CL_COMMAND_READ_BUFFER_RECT 0x1201
809 #define CL_COMMAND_WRITE_BUFFER_RECT 0x1202
810 #define CL_COMMAND_COPY_BUFFER_RECT 0x1203
811 #define CL_COMMAND_USER 0x1204
813 #ifdef CL_VERSION_1_2
814 #define CL_COMMAND_BARRIER 0x1205
815 #define CL_COMMAND_MIGRATE_MEM_OBJECTS 0x1206
816 #define CL_COMMAND_FILL_BUFFER 0x1207
817 #define CL_COMMAND_FILL_IMAGE 0x1208
819 #ifdef CL_VERSION_2_0
820 #define CL_COMMAND_SVM_FREE 0x1209
821 #define CL_COMMAND_SVM_MEMCPY 0x120A
822 #define CL_COMMAND_SVM_MEMFILL 0x120B
823 #define CL_COMMAND_SVM_MAP 0x120C
824 #define CL_COMMAND_SVM_UNMAP 0x120D
827 /* command execution status */
828 #define CL_COMPLETE 0x0
829 #define CL_RUNNING 0x1
830 #define CL_SUBMITTED 0x2
831 #define CL_QUEUED 0x3
833 #ifdef CL_VERSION_1_1
835 /* cl_buffer_create_type */
836 #define CL_BUFFER_CREATE_TYPE_REGION 0x1220
840 /* cl_profiling_info */
841 #define CL_PROFILING_COMMAND_QUEUED 0x1280
842 #define CL_PROFILING_COMMAND_SUBMIT 0x1281
843 #define CL_PROFILING_COMMAND_START 0x1282
844 #define CL_PROFILING_COMMAND_END 0x1283
845 #ifdef CL_VERSION_2_0
846 #define CL_PROFILING_COMMAND_COMPLETE 0x1284
849 /********************************************************************************************************/
852 extern CL_API_ENTRY cl_int CL_API_CALL
853 clGetPlatformIDs(cl_uint num_entries
,
854 cl_platform_id
* platforms
,
855 cl_uint
* num_platforms
) CL_API_SUFFIX__VERSION_1_0
;
857 extern CL_API_ENTRY cl_int CL_API_CALL
858 clGetPlatformInfo(cl_platform_id platform
,
859 cl_platform_info param_name
,
860 size_t param_value_size
,
862 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_1_0
;
865 extern CL_API_ENTRY cl_int CL_API_CALL
866 clGetDeviceIDs(cl_platform_id platform
,
867 cl_device_type device_type
,
869 cl_device_id
* devices
,
870 cl_uint
* num_devices
) CL_API_SUFFIX__VERSION_1_0
;
872 extern CL_API_ENTRY cl_int CL_API_CALL
873 clGetDeviceInfo(cl_device_id device
,
874 cl_device_info param_name
,
875 size_t param_value_size
,
877 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_1_0
;
879 #ifdef CL_VERSION_1_2
881 extern CL_API_ENTRY cl_int CL_API_CALL
882 clCreateSubDevices(cl_device_id in_device
,
883 const cl_device_partition_property
* properties
,
885 cl_device_id
* out_devices
,
886 cl_uint
* num_devices_ret
) CL_API_SUFFIX__VERSION_1_2
;
888 extern CL_API_ENTRY cl_int CL_API_CALL
889 clRetainDevice(cl_device_id device
) CL_API_SUFFIX__VERSION_1_2
;
891 extern CL_API_ENTRY cl_int CL_API_CALL
892 clReleaseDevice(cl_device_id device
) CL_API_SUFFIX__VERSION_1_2
;
896 #ifdef CL_VERSION_2_1
898 extern CL_API_ENTRY cl_int CL_API_CALL
899 clSetDefaultDeviceCommandQueue(cl_context context
,
901 cl_command_queue command_queue
) CL_API_SUFFIX__VERSION_2_1
;
903 extern CL_API_ENTRY cl_int CL_API_CALL
904 clGetDeviceAndHostTimer(cl_device_id device
,
905 cl_ulong
* device_timestamp
,
906 cl_ulong
* host_timestamp
) CL_API_SUFFIX__VERSION_2_1
;
908 extern CL_API_ENTRY cl_int CL_API_CALL
909 clGetHostTimer(cl_device_id device
,
910 cl_ulong
* host_timestamp
) CL_API_SUFFIX__VERSION_2_1
;
915 extern CL_API_ENTRY cl_context CL_API_CALL
916 clCreateContext(const cl_context_properties
* properties
,
918 const cl_device_id
* devices
,
919 void (CL_CALLBACK
* pfn_notify
)(const char * errinfo
,
920 const void * private_info
,
924 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_0
;
926 extern CL_API_ENTRY cl_context CL_API_CALL
927 clCreateContextFromType(const cl_context_properties
* properties
,
928 cl_device_type device_type
,
929 void (CL_CALLBACK
* pfn_notify
)(const char * errinfo
,
930 const void * private_info
,
934 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_0
;
936 extern CL_API_ENTRY cl_int CL_API_CALL
937 clRetainContext(cl_context context
) CL_API_SUFFIX__VERSION_1_0
;
939 extern CL_API_ENTRY cl_int CL_API_CALL
940 clReleaseContext(cl_context context
) CL_API_SUFFIX__VERSION_1_0
;
942 extern CL_API_ENTRY cl_int CL_API_CALL
943 clGetContextInfo(cl_context context
,
944 cl_context_info param_name
,
945 size_t param_value_size
,
947 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_1_0
;
949 /* Command Queue APIs */
951 #ifdef CL_VERSION_2_0
953 extern CL_API_ENTRY cl_command_queue CL_API_CALL
954 clCreateCommandQueueWithProperties(cl_context context
,
956 const cl_queue_properties
* properties
,
957 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_2_0
;
961 extern CL_API_ENTRY cl_int CL_API_CALL
962 clRetainCommandQueue(cl_command_queue command_queue
) CL_API_SUFFIX__VERSION_1_0
;
964 extern CL_API_ENTRY cl_int CL_API_CALL
965 clReleaseCommandQueue(cl_command_queue command_queue
) CL_API_SUFFIX__VERSION_1_0
;
967 extern CL_API_ENTRY cl_int CL_API_CALL
968 clGetCommandQueueInfo(cl_command_queue command_queue
,
969 cl_command_queue_info param_name
,
970 size_t param_value_size
,
972 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_1_0
;
974 /* Memory Object APIs */
975 extern CL_API_ENTRY cl_mem CL_API_CALL
976 clCreateBuffer(cl_context context
,
980 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_0
;
982 #ifdef CL_VERSION_1_1
984 extern CL_API_ENTRY cl_mem CL_API_CALL
985 clCreateSubBuffer(cl_mem buffer
,
987 cl_buffer_create_type buffer_create_type
,
988 const void * buffer_create_info
,
989 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_1
;
993 #ifdef CL_VERSION_1_2
995 extern CL_API_ENTRY cl_mem CL_API_CALL
996 clCreateImage(cl_context context
,
998 const cl_image_format
* image_format
,
999 const cl_image_desc
* image_desc
,
1001 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_2
;
1005 #ifdef CL_VERSION_2_0
1007 extern CL_API_ENTRY cl_mem CL_API_CALL
1008 clCreatePipe(cl_context context
,
1010 cl_uint pipe_packet_size
,
1011 cl_uint pipe_max_packets
,
1012 const cl_pipe_properties
* properties
,
1013 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_2_0
;
1017 extern CL_API_ENTRY cl_int CL_API_CALL
1018 clRetainMemObject(cl_mem memobj
) CL_API_SUFFIX__VERSION_1_0
;
1020 extern CL_API_ENTRY cl_int CL_API_CALL
1021 clReleaseMemObject(cl_mem memobj
) CL_API_SUFFIX__VERSION_1_0
;
1023 extern CL_API_ENTRY cl_int CL_API_CALL
1024 clGetSupportedImageFormats(cl_context context
,
1026 cl_mem_object_type image_type
,
1027 cl_uint num_entries
,
1028 cl_image_format
* image_formats
,
1029 cl_uint
* num_image_formats
) CL_API_SUFFIX__VERSION_1_0
;
1031 extern CL_API_ENTRY cl_int CL_API_CALL
1032 clGetMemObjectInfo(cl_mem memobj
,
1033 cl_mem_info param_name
,
1034 size_t param_value_size
,
1036 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_1_0
;
1038 extern CL_API_ENTRY cl_int CL_API_CALL
1039 clGetImageInfo(cl_mem image
,
1040 cl_image_info param_name
,
1041 size_t param_value_size
,
1043 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_1_0
;
1045 #ifdef CL_VERSION_2_0
1047 extern CL_API_ENTRY cl_int CL_API_CALL
1048 clGetPipeInfo(cl_mem pipe
,
1049 cl_pipe_info param_name
,
1050 size_t param_value_size
,
1052 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_2_0
;
1056 #ifdef CL_VERSION_1_1
1058 extern CL_API_ENTRY cl_int CL_API_CALL
1059 clSetMemObjectDestructorCallback(cl_mem memobj
,
1060 void (CL_CALLBACK
* pfn_notify
)(cl_mem memobj
,
1062 void * user_data
) CL_API_SUFFIX__VERSION_1_1
;
1066 /* SVM Allocation APIs */
1068 #ifdef CL_VERSION_2_0
1070 extern CL_API_ENTRY
void * CL_API_CALL
1071 clSVMAlloc(cl_context context
,
1072 cl_svm_mem_flags flags
,
1074 cl_uint alignment
) CL_API_SUFFIX__VERSION_2_0
;
1076 extern CL_API_ENTRY
void CL_API_CALL
1077 clSVMFree(cl_context context
,
1078 void * svm_pointer
) CL_API_SUFFIX__VERSION_2_0
;
1084 #ifdef CL_VERSION_2_0
1086 extern CL_API_ENTRY cl_sampler CL_API_CALL
1087 clCreateSamplerWithProperties(cl_context context
,
1088 const cl_sampler_properties
* sampler_properties
,
1089 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_2_0
;
1093 extern CL_API_ENTRY cl_int CL_API_CALL
1094 clRetainSampler(cl_sampler sampler
) CL_API_SUFFIX__VERSION_1_0
;
1096 extern CL_API_ENTRY cl_int CL_API_CALL
1097 clReleaseSampler(cl_sampler sampler
) CL_API_SUFFIX__VERSION_1_0
;
1099 extern CL_API_ENTRY cl_int CL_API_CALL
1100 clGetSamplerInfo(cl_sampler sampler
,
1101 cl_sampler_info param_name
,
1102 size_t param_value_size
,
1104 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_1_0
;
1106 /* Program Object APIs */
1107 extern CL_API_ENTRY cl_program CL_API_CALL
1108 clCreateProgramWithSource(cl_context context
,
1110 const char ** strings
,
1111 const size_t * lengths
,
1112 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_0
;
1114 extern CL_API_ENTRY cl_program CL_API_CALL
1115 clCreateProgramWithBinary(cl_context context
,
1116 cl_uint num_devices
,
1117 const cl_device_id
* device_list
,
1118 const size_t * lengths
,
1119 const unsigned char ** binaries
,
1120 cl_int
* binary_status
,
1121 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_0
;
1123 #ifdef CL_VERSION_1_2
1125 extern CL_API_ENTRY cl_program CL_API_CALL
1126 clCreateProgramWithBuiltInKernels(cl_context context
,
1127 cl_uint num_devices
,
1128 const cl_device_id
* device_list
,
1129 const char * kernel_names
,
1130 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_2
;
1134 #ifdef CL_VERSION_2_1
1136 extern CL_API_ENTRY cl_program CL_API_CALL
1137 clCreateProgramWithIL(cl_context context
,
1140 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_2_1
;
1144 extern CL_API_ENTRY cl_int CL_API_CALL
1145 clRetainProgram(cl_program program
) CL_API_SUFFIX__VERSION_1_0
;
1147 extern CL_API_ENTRY cl_int CL_API_CALL
1148 clReleaseProgram(cl_program program
) CL_API_SUFFIX__VERSION_1_0
;
1150 extern CL_API_ENTRY cl_int CL_API_CALL
1151 clBuildProgram(cl_program program
,
1152 cl_uint num_devices
,
1153 const cl_device_id
* device_list
,
1154 const char * options
,
1155 void (CL_CALLBACK
* pfn_notify
)(cl_program program
,
1157 void * user_data
) CL_API_SUFFIX__VERSION_1_0
;
1159 #ifdef CL_VERSION_1_2
1161 extern CL_API_ENTRY cl_int CL_API_CALL
1162 clCompileProgram(cl_program program
,
1163 cl_uint num_devices
,
1164 const cl_device_id
* device_list
,
1165 const char * options
,
1166 cl_uint num_input_headers
,
1167 const cl_program
* input_headers
,
1168 const char ** header_include_names
,
1169 void (CL_CALLBACK
* pfn_notify
)(cl_program program
,
1171 void * user_data
) CL_API_SUFFIX__VERSION_1_2
;
1173 extern CL_API_ENTRY cl_program CL_API_CALL
1174 clLinkProgram(cl_context context
,
1175 cl_uint num_devices
,
1176 const cl_device_id
* device_list
,
1177 const char * options
,
1178 cl_uint num_input_programs
,
1179 const cl_program
* input_programs
,
1180 void (CL_CALLBACK
* pfn_notify
)(cl_program program
,
1183 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_2
;
1187 #ifdef CL_VERSION_2_2
1189 extern CL_API_ENTRY cl_int CL_API_CALL
1190 clSetProgramReleaseCallback(cl_program program
,
1191 void (CL_CALLBACK
* pfn_notify
)(cl_program program
,
1193 void * user_data
) CL_API_SUFFIX__VERSION_2_2
;
1195 extern CL_API_ENTRY cl_int CL_API_CALL
1196 clSetProgramSpecializationConstant(cl_program program
,
1199 const void* spec_value
) CL_API_SUFFIX__VERSION_2_2
;
1203 #ifdef CL_VERSION_1_2
1205 extern CL_API_ENTRY cl_int CL_API_CALL
1206 clUnloadPlatformCompiler(cl_platform_id platform
) CL_API_SUFFIX__VERSION_1_2
;
1210 extern CL_API_ENTRY cl_int CL_API_CALL
1211 clGetProgramInfo(cl_program program
,
1212 cl_program_info param_name
,
1213 size_t param_value_size
,
1215 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_1_0
;
1217 extern CL_API_ENTRY cl_int CL_API_CALL
1218 clGetProgramBuildInfo(cl_program program
,
1219 cl_device_id device
,
1220 cl_program_build_info param_name
,
1221 size_t param_value_size
,
1223 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_1_0
;
1225 /* Kernel Object APIs */
1226 extern CL_API_ENTRY cl_kernel CL_API_CALL
1227 clCreateKernel(cl_program program
,
1228 const char * kernel_name
,
1229 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_0
;
1231 extern CL_API_ENTRY cl_int CL_API_CALL
1232 clCreateKernelsInProgram(cl_program program
,
1233 cl_uint num_kernels
,
1234 cl_kernel
* kernels
,
1235 cl_uint
* num_kernels_ret
) CL_API_SUFFIX__VERSION_1_0
;
1237 #ifdef CL_VERSION_2_1
1239 extern CL_API_ENTRY cl_kernel CL_API_CALL
1240 clCloneKernel(cl_kernel source_kernel
,
1241 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_2_1
;
1245 extern CL_API_ENTRY cl_int CL_API_CALL
1246 clRetainKernel(cl_kernel kernel
) CL_API_SUFFIX__VERSION_1_0
;
1248 extern CL_API_ENTRY cl_int CL_API_CALL
1249 clReleaseKernel(cl_kernel kernel
) CL_API_SUFFIX__VERSION_1_0
;
1251 extern CL_API_ENTRY cl_int CL_API_CALL
1252 clSetKernelArg(cl_kernel kernel
,
1255 const void * arg_value
) CL_API_SUFFIX__VERSION_1_0
;
1257 #ifdef CL_VERSION_2_0
1259 extern CL_API_ENTRY cl_int CL_API_CALL
1260 clSetKernelArgSVMPointer(cl_kernel kernel
,
1262 const void * arg_value
) CL_API_SUFFIX__VERSION_2_0
;
1264 extern CL_API_ENTRY cl_int CL_API_CALL
1265 clSetKernelExecInfo(cl_kernel kernel
,
1266 cl_kernel_exec_info param_name
,
1267 size_t param_value_size
,
1268 const void * param_value
) CL_API_SUFFIX__VERSION_2_0
;
1272 extern CL_API_ENTRY cl_int CL_API_CALL
1273 clGetKernelInfo(cl_kernel kernel
,
1274 cl_kernel_info param_name
,
1275 size_t param_value_size
,
1277 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_1_0
;
1279 #ifdef CL_VERSION_1_2
1281 extern CL_API_ENTRY cl_int CL_API_CALL
1282 clGetKernelArgInfo(cl_kernel kernel
,
1284 cl_kernel_arg_info param_name
,
1285 size_t param_value_size
,
1287 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_1_2
;
1291 extern CL_API_ENTRY cl_int CL_API_CALL
1292 clGetKernelWorkGroupInfo(cl_kernel kernel
,
1293 cl_device_id device
,
1294 cl_kernel_work_group_info param_name
,
1295 size_t param_value_size
,
1297 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_1_0
;
1299 #ifdef CL_VERSION_2_1
1301 extern CL_API_ENTRY cl_int CL_API_CALL
1302 clGetKernelSubGroupInfo(cl_kernel kernel
,
1303 cl_device_id device
,
1304 cl_kernel_sub_group_info param_name
,
1305 size_t input_value_size
,
1306 const void* input_value
,
1307 size_t param_value_size
,
1309 size_t* param_value_size_ret
) CL_API_SUFFIX__VERSION_2_1
;
1313 /* Event Object APIs */
1314 extern CL_API_ENTRY cl_int CL_API_CALL
1315 clWaitForEvents(cl_uint num_events
,
1316 const cl_event
* event_list
) CL_API_SUFFIX__VERSION_1_0
;
1318 extern CL_API_ENTRY cl_int CL_API_CALL
1319 clGetEventInfo(cl_event event
,
1320 cl_event_info param_name
,
1321 size_t param_value_size
,
1323 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_1_0
;
1325 #ifdef CL_VERSION_1_1
1327 extern CL_API_ENTRY cl_event CL_API_CALL
1328 clCreateUserEvent(cl_context context
,
1329 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_1
;
1333 extern CL_API_ENTRY cl_int CL_API_CALL
1334 clRetainEvent(cl_event event
) CL_API_SUFFIX__VERSION_1_0
;
1336 extern CL_API_ENTRY cl_int CL_API_CALL
1337 clReleaseEvent(cl_event event
) CL_API_SUFFIX__VERSION_1_0
;
1339 #ifdef CL_VERSION_1_1
1341 extern CL_API_ENTRY cl_int CL_API_CALL
1342 clSetUserEventStatus(cl_event event
,
1343 cl_int execution_status
) CL_API_SUFFIX__VERSION_1_1
;
1345 extern CL_API_ENTRY cl_int CL_API_CALL
1346 clSetEventCallback(cl_event event
,
1347 cl_int command_exec_callback_type
,
1348 void (CL_CALLBACK
* pfn_notify
)(cl_event event
,
1349 cl_int event_command_status
,
1351 void * user_data
) CL_API_SUFFIX__VERSION_1_1
;
1355 /* Profiling APIs */
1356 extern CL_API_ENTRY cl_int CL_API_CALL
1357 clGetEventProfilingInfo(cl_event event
,
1358 cl_profiling_info param_name
,
1359 size_t param_value_size
,
1361 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_1_0
;
1363 /* Flush and Finish APIs */
1364 extern CL_API_ENTRY cl_int CL_API_CALL
1365 clFlush(cl_command_queue command_queue
) CL_API_SUFFIX__VERSION_1_0
;
1367 extern CL_API_ENTRY cl_int CL_API_CALL
1368 clFinish(cl_command_queue command_queue
) CL_API_SUFFIX__VERSION_1_0
;
1370 /* Enqueued Commands APIs */
1371 extern CL_API_ENTRY cl_int CL_API_CALL
1372 clEnqueueReadBuffer(cl_command_queue command_queue
,
1374 cl_bool blocking_read
,
1378 cl_uint num_events_in_wait_list
,
1379 const cl_event
* event_wait_list
,
1380 cl_event
* event
) CL_API_SUFFIX__VERSION_1_0
;
1382 #ifdef CL_VERSION_1_1
1384 extern CL_API_ENTRY cl_int CL_API_CALL
1385 clEnqueueReadBufferRect(cl_command_queue command_queue
,
1387 cl_bool blocking_read
,
1388 const size_t * buffer_offset
,
1389 const size_t * host_offset
,
1390 const size_t * region
,
1391 size_t buffer_row_pitch
,
1392 size_t buffer_slice_pitch
,
1393 size_t host_row_pitch
,
1394 size_t host_slice_pitch
,
1396 cl_uint num_events_in_wait_list
,
1397 const cl_event
* event_wait_list
,
1398 cl_event
* event
) CL_API_SUFFIX__VERSION_1_1
;
1402 extern CL_API_ENTRY cl_int CL_API_CALL
1403 clEnqueueWriteBuffer(cl_command_queue command_queue
,
1405 cl_bool blocking_write
,
1409 cl_uint num_events_in_wait_list
,
1410 const cl_event
* event_wait_list
,
1411 cl_event
* event
) CL_API_SUFFIX__VERSION_1_0
;
1413 #ifdef CL_VERSION_1_1
1415 extern CL_API_ENTRY cl_int CL_API_CALL
1416 clEnqueueWriteBufferRect(cl_command_queue command_queue
,
1418 cl_bool blocking_write
,
1419 const size_t * buffer_offset
,
1420 const size_t * host_offset
,
1421 const size_t * region
,
1422 size_t buffer_row_pitch
,
1423 size_t buffer_slice_pitch
,
1424 size_t host_row_pitch
,
1425 size_t host_slice_pitch
,
1427 cl_uint num_events_in_wait_list
,
1428 const cl_event
* event_wait_list
,
1429 cl_event
* event
) CL_API_SUFFIX__VERSION_1_1
;
1433 #ifdef CL_VERSION_1_2
1435 extern CL_API_ENTRY cl_int CL_API_CALL
1436 clEnqueueFillBuffer(cl_command_queue command_queue
,
1438 const void * pattern
,
1439 size_t pattern_size
,
1442 cl_uint num_events_in_wait_list
,
1443 const cl_event
* event_wait_list
,
1444 cl_event
* event
) CL_API_SUFFIX__VERSION_1_2
;
1448 extern CL_API_ENTRY cl_int CL_API_CALL
1449 clEnqueueCopyBuffer(cl_command_queue command_queue
,
1455 cl_uint num_events_in_wait_list
,
1456 const cl_event
* event_wait_list
,
1457 cl_event
* event
) CL_API_SUFFIX__VERSION_1_0
;
1459 #ifdef CL_VERSION_1_1
1461 extern CL_API_ENTRY cl_int CL_API_CALL
1462 clEnqueueCopyBufferRect(cl_command_queue command_queue
,
1465 const size_t * src_origin
,
1466 const size_t * dst_origin
,
1467 const size_t * region
,
1468 size_t src_row_pitch
,
1469 size_t src_slice_pitch
,
1470 size_t dst_row_pitch
,
1471 size_t dst_slice_pitch
,
1472 cl_uint num_events_in_wait_list
,
1473 const cl_event
* event_wait_list
,
1474 cl_event
* event
) CL_API_SUFFIX__VERSION_1_1
;
1478 extern CL_API_ENTRY cl_int CL_API_CALL
1479 clEnqueueReadImage(cl_command_queue command_queue
,
1481 cl_bool blocking_read
,
1482 const size_t * origin
,
1483 const size_t * region
,
1487 cl_uint num_events_in_wait_list
,
1488 const cl_event
* event_wait_list
,
1489 cl_event
* event
) CL_API_SUFFIX__VERSION_1_0
;
1491 extern CL_API_ENTRY cl_int CL_API_CALL
1492 clEnqueueWriteImage(cl_command_queue command_queue
,
1494 cl_bool blocking_write
,
1495 const size_t * origin
,
1496 const size_t * region
,
1497 size_t input_row_pitch
,
1498 size_t input_slice_pitch
,
1500 cl_uint num_events_in_wait_list
,
1501 const cl_event
* event_wait_list
,
1502 cl_event
* event
) CL_API_SUFFIX__VERSION_1_0
;
1504 #ifdef CL_VERSION_1_2
1506 extern CL_API_ENTRY cl_int CL_API_CALL
1507 clEnqueueFillImage(cl_command_queue command_queue
,
1509 const void * fill_color
,
1510 const size_t * origin
,
1511 const size_t * region
,
1512 cl_uint num_events_in_wait_list
,
1513 const cl_event
* event_wait_list
,
1514 cl_event
* event
) CL_API_SUFFIX__VERSION_1_2
;
1518 extern CL_API_ENTRY cl_int CL_API_CALL
1519 clEnqueueCopyImage(cl_command_queue command_queue
,
1522 const size_t * src_origin
,
1523 const size_t * dst_origin
,
1524 const size_t * region
,
1525 cl_uint num_events_in_wait_list
,
1526 const cl_event
* event_wait_list
,
1527 cl_event
* event
) CL_API_SUFFIX__VERSION_1_0
;
1529 extern CL_API_ENTRY cl_int CL_API_CALL
1530 clEnqueueCopyImageToBuffer(cl_command_queue command_queue
,
1533 const size_t * src_origin
,
1534 const size_t * region
,
1536 cl_uint num_events_in_wait_list
,
1537 const cl_event
* event_wait_list
,
1538 cl_event
* event
) CL_API_SUFFIX__VERSION_1_0
;
1540 extern CL_API_ENTRY cl_int CL_API_CALL
1541 clEnqueueCopyBufferToImage(cl_command_queue command_queue
,
1545 const size_t * dst_origin
,
1546 const size_t * region
,
1547 cl_uint num_events_in_wait_list
,
1548 const cl_event
* event_wait_list
,
1549 cl_event
* event
) CL_API_SUFFIX__VERSION_1_0
;
1551 extern CL_API_ENTRY
void * CL_API_CALL
1552 clEnqueueMapBuffer(cl_command_queue command_queue
,
1554 cl_bool blocking_map
,
1555 cl_map_flags map_flags
,
1558 cl_uint num_events_in_wait_list
,
1559 const cl_event
* event_wait_list
,
1561 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_0
;
1563 extern CL_API_ENTRY
void * CL_API_CALL
1564 clEnqueueMapImage(cl_command_queue command_queue
,
1566 cl_bool blocking_map
,
1567 cl_map_flags map_flags
,
1568 const size_t * origin
,
1569 const size_t * region
,
1570 size_t * image_row_pitch
,
1571 size_t * image_slice_pitch
,
1572 cl_uint num_events_in_wait_list
,
1573 const cl_event
* event_wait_list
,
1575 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_0
;
1577 extern CL_API_ENTRY cl_int CL_API_CALL
1578 clEnqueueUnmapMemObject(cl_command_queue command_queue
,
1581 cl_uint num_events_in_wait_list
,
1582 const cl_event
* event_wait_list
,
1583 cl_event
* event
) CL_API_SUFFIX__VERSION_1_0
;
1585 #ifdef CL_VERSION_1_2
1587 extern CL_API_ENTRY cl_int CL_API_CALL
1588 clEnqueueMigrateMemObjects(cl_command_queue command_queue
,
1589 cl_uint num_mem_objects
,
1590 const cl_mem
* mem_objects
,
1591 cl_mem_migration_flags flags
,
1592 cl_uint num_events_in_wait_list
,
1593 const cl_event
* event_wait_list
,
1594 cl_event
* event
) CL_API_SUFFIX__VERSION_1_2
;
1598 extern CL_API_ENTRY cl_int CL_API_CALL
1599 clEnqueueNDRangeKernel(cl_command_queue command_queue
,
1602 const size_t * global_work_offset
,
1603 const size_t * global_work_size
,
1604 const size_t * local_work_size
,
1605 cl_uint num_events_in_wait_list
,
1606 const cl_event
* event_wait_list
,
1607 cl_event
* event
) CL_API_SUFFIX__VERSION_1_0
;
1609 extern CL_API_ENTRY cl_int CL_API_CALL
1610 clEnqueueNativeKernel(cl_command_queue command_queue
,
1611 void (CL_CALLBACK
* user_func
)(void *),
1614 cl_uint num_mem_objects
,
1615 const cl_mem
* mem_list
,
1616 const void ** args_mem_loc
,
1617 cl_uint num_events_in_wait_list
,
1618 const cl_event
* event_wait_list
,
1619 cl_event
* event
) CL_API_SUFFIX__VERSION_1_0
;
1621 #ifdef CL_VERSION_1_2
1623 extern CL_API_ENTRY cl_int CL_API_CALL
1624 clEnqueueMarkerWithWaitList(cl_command_queue command_queue
,
1625 cl_uint num_events_in_wait_list
,
1626 const cl_event
* event_wait_list
,
1627 cl_event
* event
) CL_API_SUFFIX__VERSION_1_2
;
1629 extern CL_API_ENTRY cl_int CL_API_CALL
1630 clEnqueueBarrierWithWaitList(cl_command_queue command_queue
,
1631 cl_uint num_events_in_wait_list
,
1632 const cl_event
* event_wait_list
,
1633 cl_event
* event
) CL_API_SUFFIX__VERSION_1_2
;
1637 #ifdef CL_VERSION_2_0
1639 extern CL_API_ENTRY cl_int CL_API_CALL
1640 clEnqueueSVMFree(cl_command_queue command_queue
,
1641 cl_uint num_svm_pointers
,
1642 void * svm_pointers
[],
1643 void (CL_CALLBACK
* pfn_free_func
)(cl_command_queue queue
,
1644 cl_uint num_svm_pointers
,
1645 void * svm_pointers
[],
1648 cl_uint num_events_in_wait_list
,
1649 const cl_event
* event_wait_list
,
1650 cl_event
* event
) CL_API_SUFFIX__VERSION_2_0
;
1652 extern CL_API_ENTRY cl_int CL_API_CALL
1653 clEnqueueSVMMemcpy(cl_command_queue command_queue
,
1654 cl_bool blocking_copy
,
1656 const void * src_ptr
,
1658 cl_uint num_events_in_wait_list
,
1659 const cl_event
* event_wait_list
,
1660 cl_event
* event
) CL_API_SUFFIX__VERSION_2_0
;
1662 extern CL_API_ENTRY cl_int CL_API_CALL
1663 clEnqueueSVMMemFill(cl_command_queue command_queue
,
1665 const void * pattern
,
1666 size_t pattern_size
,
1668 cl_uint num_events_in_wait_list
,
1669 const cl_event
* event_wait_list
,
1670 cl_event
* event
) CL_API_SUFFIX__VERSION_2_0
;
1672 extern CL_API_ENTRY cl_int CL_API_CALL
1673 clEnqueueSVMMap(cl_command_queue command_queue
,
1674 cl_bool blocking_map
,
1678 cl_uint num_events_in_wait_list
,
1679 const cl_event
* event_wait_list
,
1680 cl_event
* event
) CL_API_SUFFIX__VERSION_2_0
;
1682 extern CL_API_ENTRY cl_int CL_API_CALL
1683 clEnqueueSVMUnmap(cl_command_queue command_queue
,
1685 cl_uint num_events_in_wait_list
,
1686 const cl_event
* event_wait_list
,
1687 cl_event
* event
) CL_API_SUFFIX__VERSION_2_0
;
1691 #ifdef CL_VERSION_2_1
1693 extern CL_API_ENTRY cl_int CL_API_CALL
1694 clEnqueueSVMMigrateMem(cl_command_queue command_queue
,
1695 cl_uint num_svm_pointers
,
1696 const void ** svm_pointers
,
1697 const size_t * sizes
,
1698 cl_mem_migration_flags flags
,
1699 cl_uint num_events_in_wait_list
,
1700 const cl_event
* event_wait_list
,
1701 cl_event
* event
) CL_API_SUFFIX__VERSION_2_1
;
1705 #ifdef CL_VERSION_1_2
1707 /* Extension function access
1709 * Returns the extension function address for the given function name,
1710 * or NULL if a valid function can not be found. The client must
1711 * check to make sure the address is not NULL, before using or
1712 * calling the returned function address.
1714 extern CL_API_ENTRY
void * CL_API_CALL
1715 clGetExtensionFunctionAddressForPlatform(cl_platform_id platform
,
1716 const char * func_name
) CL_API_SUFFIX__VERSION_1_2
;
1720 #ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
1723 * This API introduces mutable state into the OpenCL implementation. It has been REMOVED
1724 * to better facilitate thread safety. The 1.0 API is not thread safe. It is not tested by the
1725 * OpenCL 1.1 conformance test, and consequently may not work or may not work dependably.
1726 * It is likely to be non-performant. Use of this API is not advised. Use at your own risk.
1728 * Software developers previously relying on this API are instructed to set the command queue
1729 * properties when creating the queue, instead.
1731 extern CL_API_ENTRY cl_int CL_API_CALL
1732 clSetCommandQueueProperty(cl_command_queue command_queue
,
1733 cl_command_queue_properties properties
,
1735 cl_command_queue_properties
* old_properties
) CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
;
1736 #endif /* CL_USE_DEPRECATED_OPENCL_1_0_APIS */
1738 /* Deprecated OpenCL 1.1 APIs */
1739 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
1740 clCreateImage2D(cl_context context
,
1742 const cl_image_format
* image_format
,
1744 size_t image_height
,
1745 size_t image_row_pitch
,
1747 cl_int
* errcode_ret
) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
;
1749 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
1750 clCreateImage3D(cl_context context
,
1752 const cl_image_format
* image_format
,
1754 size_t image_height
,
1756 size_t image_row_pitch
,
1757 size_t image_slice_pitch
,
1759 cl_int
* errcode_ret
) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
;
1761 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
1762 clEnqueueMarker(cl_command_queue command_queue
,
1763 cl_event
* event
) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
;
1765 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
1766 clEnqueueWaitForEvents(cl_command_queue command_queue
,
1768 const cl_event
* event_list
) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
;
1770 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
1771 clEnqueueBarrier(cl_command_queue command_queue
) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
;
1773 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
1774 clUnloadCompiler(void) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
;
1776 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
void * CL_API_CALL
1777 clGetExtensionFunctionAddress(const char * func_name
) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
;
1779 /* Deprecated OpenCL 2.0 APIs */
1780 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_command_queue CL_API_CALL
1781 clCreateCommandQueue(cl_context context
,
1782 cl_device_id device
,
1783 cl_command_queue_properties properties
,
1784 cl_int
* errcode_ret
) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED
;
1786 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_sampler CL_API_CALL
1787 clCreateSampler(cl_context context
,
1788 cl_bool normalized_coords
,
1789 cl_addressing_mode addressing_mode
,
1790 cl_filter_mode filter_mode
,
1791 cl_int
* errcode_ret
) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED
;
1793 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_int CL_API_CALL
1794 clEnqueueTask(cl_command_queue command_queue
,
1796 cl_uint num_events_in_wait_list
,
1797 const cl_event
* event_wait_list
,
1798 cl_event
* event
) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED
;
1804 #endif /* __OPENCL_CL_H */