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
;
141 __extension__
/* Prevents warnings about anonymous union in -pedantic builds */
144 #pragma warning( push )
145 #pragma warning( disable : 4201 ) /* Prevents warning about nameless struct/union in /W4 /Za builds */
152 #pragma warning( pop )
158 #ifdef CL_VERSION_1_1
160 typedef struct _cl_buffer_region
{
167 /******************************************************************************/
171 #define CL_DEVICE_NOT_FOUND -1
172 #define CL_DEVICE_NOT_AVAILABLE -2
173 #define CL_COMPILER_NOT_AVAILABLE -3
174 #define CL_MEM_OBJECT_ALLOCATION_FAILURE -4
175 #define CL_OUT_OF_RESOURCES -5
176 #define CL_OUT_OF_HOST_MEMORY -6
177 #define CL_PROFILING_INFO_NOT_AVAILABLE -7
178 #define CL_MEM_COPY_OVERLAP -8
179 #define CL_IMAGE_FORMAT_MISMATCH -9
180 #define CL_IMAGE_FORMAT_NOT_SUPPORTED -10
181 #define CL_BUILD_PROGRAM_FAILURE -11
182 #define CL_MAP_FAILURE -12
183 #ifdef CL_VERSION_1_1
184 #define CL_MISALIGNED_SUB_BUFFER_OFFSET -13
185 #define CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST -14
187 #ifdef CL_VERSION_1_2
188 #define CL_COMPILE_PROGRAM_FAILURE -15
189 #define CL_LINKER_NOT_AVAILABLE -16
190 #define CL_LINK_PROGRAM_FAILURE -17
191 #define CL_DEVICE_PARTITION_FAILED -18
192 #define CL_KERNEL_ARG_INFO_NOT_AVAILABLE -19
195 #define CL_INVALID_VALUE -30
196 #define CL_INVALID_DEVICE_TYPE -31
197 #define CL_INVALID_PLATFORM -32
198 #define CL_INVALID_DEVICE -33
199 #define CL_INVALID_CONTEXT -34
200 #define CL_INVALID_QUEUE_PROPERTIES -35
201 #define CL_INVALID_COMMAND_QUEUE -36
202 #define CL_INVALID_HOST_PTR -37
203 #define CL_INVALID_MEM_OBJECT -38
204 #define CL_INVALID_IMAGE_FORMAT_DESCRIPTOR -39
205 #define CL_INVALID_IMAGE_SIZE -40
206 #define CL_INVALID_SAMPLER -41
207 #define CL_INVALID_BINARY -42
208 #define CL_INVALID_BUILD_OPTIONS -43
209 #define CL_INVALID_PROGRAM -44
210 #define CL_INVALID_PROGRAM_EXECUTABLE -45
211 #define CL_INVALID_KERNEL_NAME -46
212 #define CL_INVALID_KERNEL_DEFINITION -47
213 #define CL_INVALID_KERNEL -48
214 #define CL_INVALID_ARG_INDEX -49
215 #define CL_INVALID_ARG_VALUE -50
216 #define CL_INVALID_ARG_SIZE -51
217 #define CL_INVALID_KERNEL_ARGS -52
218 #define CL_INVALID_WORK_DIMENSION -53
219 #define CL_INVALID_WORK_GROUP_SIZE -54
220 #define CL_INVALID_WORK_ITEM_SIZE -55
221 #define CL_INVALID_GLOBAL_OFFSET -56
222 #define CL_INVALID_EVENT_WAIT_LIST -57
223 #define CL_INVALID_EVENT -58
224 #define CL_INVALID_OPERATION -59
225 #define CL_INVALID_GL_OBJECT -60
226 #define CL_INVALID_BUFFER_SIZE -61
227 #define CL_INVALID_MIP_LEVEL -62
228 #define CL_INVALID_GLOBAL_WORK_SIZE -63
229 #ifdef CL_VERSION_1_1
230 #define CL_INVALID_PROPERTY -64
232 #ifdef CL_VERSION_1_2
233 #define CL_INVALID_IMAGE_DESCRIPTOR -65
234 #define CL_INVALID_COMPILER_OPTIONS -66
235 #define CL_INVALID_LINKER_OPTIONS -67
236 #define CL_INVALID_DEVICE_PARTITION_COUNT -68
238 #ifdef CL_VERSION_2_0
239 #define CL_INVALID_PIPE_SIZE -69
240 #define CL_INVALID_DEVICE_QUEUE -70
242 #ifdef CL_VERSION_2_2
243 #define CL_INVALID_SPEC_ID -71
244 #define CL_MAX_SIZE_RESTRICTION_EXCEEDED -72
251 #ifdef CL_VERSION_1_2
252 #define CL_BLOCKING CL_TRUE
253 #define CL_NON_BLOCKING CL_FALSE
256 /* cl_platform_info */
257 #define CL_PLATFORM_PROFILE 0x0900
258 #define CL_PLATFORM_VERSION 0x0901
259 #define CL_PLATFORM_NAME 0x0902
260 #define CL_PLATFORM_VENDOR 0x0903
261 #define CL_PLATFORM_EXTENSIONS 0x0904
262 #ifdef CL_VERSION_2_1
263 #define CL_PLATFORM_HOST_TIMER_RESOLUTION 0x0905
266 /* cl_device_type - bitfield */
267 #define CL_DEVICE_TYPE_DEFAULT (1 << 0)
268 #define CL_DEVICE_TYPE_CPU (1 << 1)
269 #define CL_DEVICE_TYPE_GPU (1 << 2)
270 #define CL_DEVICE_TYPE_ACCELERATOR (1 << 3)
271 #ifdef CL_VERSION_1_2
272 #define CL_DEVICE_TYPE_CUSTOM (1 << 4)
274 #define CL_DEVICE_TYPE_ALL 0xFFFFFFFF
277 #define CL_DEVICE_TYPE 0x1000
278 #define CL_DEVICE_VENDOR_ID 0x1001
279 #define CL_DEVICE_MAX_COMPUTE_UNITS 0x1002
280 #define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS 0x1003
281 #define CL_DEVICE_MAX_WORK_GROUP_SIZE 0x1004
282 #define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005
283 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR 0x1006
284 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT 0x1007
285 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT 0x1008
286 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG 0x1009
287 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT 0x100A
288 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE 0x100B
289 #define CL_DEVICE_MAX_CLOCK_FREQUENCY 0x100C
290 #define CL_DEVICE_ADDRESS_BITS 0x100D
291 #define CL_DEVICE_MAX_READ_IMAGE_ARGS 0x100E
292 #define CL_DEVICE_MAX_WRITE_IMAGE_ARGS 0x100F
293 #define CL_DEVICE_MAX_MEM_ALLOC_SIZE 0x1010
294 #define CL_DEVICE_IMAGE2D_MAX_WIDTH 0x1011
295 #define CL_DEVICE_IMAGE2D_MAX_HEIGHT 0x1012
296 #define CL_DEVICE_IMAGE3D_MAX_WIDTH 0x1013
297 #define CL_DEVICE_IMAGE3D_MAX_HEIGHT 0x1014
298 #define CL_DEVICE_IMAGE3D_MAX_DEPTH 0x1015
299 #define CL_DEVICE_IMAGE_SUPPORT 0x1016
300 #define CL_DEVICE_MAX_PARAMETER_SIZE 0x1017
301 #define CL_DEVICE_MAX_SAMPLERS 0x1018
302 #define CL_DEVICE_MEM_BASE_ADDR_ALIGN 0x1019
303 #define CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE 0x101A
304 #define CL_DEVICE_SINGLE_FP_CONFIG 0x101B
305 #define CL_DEVICE_GLOBAL_MEM_CACHE_TYPE 0x101C
306 #define CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE 0x101D
307 #define CL_DEVICE_GLOBAL_MEM_CACHE_SIZE 0x101E
308 #define CL_DEVICE_GLOBAL_MEM_SIZE 0x101F
309 #define CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE 0x1020
310 #define CL_DEVICE_MAX_CONSTANT_ARGS 0x1021
311 #define CL_DEVICE_LOCAL_MEM_TYPE 0x1022
312 #define CL_DEVICE_LOCAL_MEM_SIZE 0x1023
313 #define CL_DEVICE_ERROR_CORRECTION_SUPPORT 0x1024
314 #define CL_DEVICE_PROFILING_TIMER_RESOLUTION 0x1025
315 #define CL_DEVICE_ENDIAN_LITTLE 0x1026
316 #define CL_DEVICE_AVAILABLE 0x1027
317 #define CL_DEVICE_COMPILER_AVAILABLE 0x1028
318 #define CL_DEVICE_EXECUTION_CAPABILITIES 0x1029
319 #define CL_DEVICE_QUEUE_PROPERTIES 0x102A /* deprecated */
320 #ifdef CL_VERSION_2_0
321 #define CL_DEVICE_QUEUE_ON_HOST_PROPERTIES 0x102A
323 #define CL_DEVICE_NAME 0x102B
324 #define CL_DEVICE_VENDOR 0x102C
325 #define CL_DRIVER_VERSION 0x102D
326 #define CL_DEVICE_PROFILE 0x102E
327 #define CL_DEVICE_VERSION 0x102F
328 #define CL_DEVICE_EXTENSIONS 0x1030
329 #define CL_DEVICE_PLATFORM 0x1031
330 #ifdef CL_VERSION_1_2
331 #define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032
333 /* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG which is already defined in "cl_ext.h" */
334 #ifdef CL_VERSION_1_1
335 #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034
336 #define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035 /* deprecated */
337 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036
338 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT 0x1037
339 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT 0x1038
340 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG 0x1039
341 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT 0x103A
342 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE 0x103B
343 #define CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF 0x103C
344 #define CL_DEVICE_OPENCL_C_VERSION 0x103D
346 #ifdef CL_VERSION_1_2
347 #define CL_DEVICE_LINKER_AVAILABLE 0x103E
348 #define CL_DEVICE_BUILT_IN_KERNELS 0x103F
349 #define CL_DEVICE_IMAGE_MAX_BUFFER_SIZE 0x1040
350 #define CL_DEVICE_IMAGE_MAX_ARRAY_SIZE 0x1041
351 #define CL_DEVICE_PARENT_DEVICE 0x1042
352 #define CL_DEVICE_PARTITION_MAX_SUB_DEVICES 0x1043
353 #define CL_DEVICE_PARTITION_PROPERTIES 0x1044
354 #define CL_DEVICE_PARTITION_AFFINITY_DOMAIN 0x1045
355 #define CL_DEVICE_PARTITION_TYPE 0x1046
356 #define CL_DEVICE_REFERENCE_COUNT 0x1047
357 #define CL_DEVICE_PREFERRED_INTEROP_USER_SYNC 0x1048
358 #define CL_DEVICE_PRINTF_BUFFER_SIZE 0x1049
359 #define CL_DEVICE_IMAGE_PITCH_ALIGNMENT 0x104A
360 #define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT 0x104B
362 #ifdef CL_VERSION_2_0
363 #define CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS 0x104C
364 #define CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE 0x104D
365 #define CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES 0x104E
366 #define CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE 0x104F
367 #define CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE 0x1050
368 #define CL_DEVICE_MAX_ON_DEVICE_QUEUES 0x1051
369 #define CL_DEVICE_MAX_ON_DEVICE_EVENTS 0x1052
370 #define CL_DEVICE_SVM_CAPABILITIES 0x1053
371 #define CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE 0x1054
372 #define CL_DEVICE_MAX_PIPE_ARGS 0x1055
373 #define CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS 0x1056
374 #define CL_DEVICE_PIPE_MAX_PACKET_SIZE 0x1057
375 #define CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT 0x1058
376 #define CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT 0x1059
377 #define CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT 0x105A
379 #ifdef CL_VERSION_2_1
380 #define CL_DEVICE_IL_VERSION 0x105B
381 #define CL_DEVICE_MAX_NUM_SUB_GROUPS 0x105C
382 #define CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS 0x105D
385 /* cl_device_fp_config - bitfield */
386 #define CL_FP_DENORM (1 << 0)
387 #define CL_FP_INF_NAN (1 << 1)
388 #define CL_FP_ROUND_TO_NEAREST (1 << 2)
389 #define CL_FP_ROUND_TO_ZERO (1 << 3)
390 #define CL_FP_ROUND_TO_INF (1 << 4)
391 #define CL_FP_FMA (1 << 5)
392 #ifdef CL_VERSION_1_1
393 #define CL_FP_SOFT_FLOAT (1 << 6)
395 #ifdef CL_VERSION_1_2
396 #define CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT (1 << 7)
399 /* cl_device_mem_cache_type */
401 #define CL_READ_ONLY_CACHE 0x1
402 #define CL_READ_WRITE_CACHE 0x2
404 /* cl_device_local_mem_type */
406 #define CL_GLOBAL 0x2
408 /* cl_device_exec_capabilities - bitfield */
409 #define CL_EXEC_KERNEL (1 << 0)
410 #define CL_EXEC_NATIVE_KERNEL (1 << 1)
412 /* cl_command_queue_properties - bitfield */
413 #define CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE (1 << 0)
414 #define CL_QUEUE_PROFILING_ENABLE (1 << 1)
415 #ifdef CL_VERSION_2_0
416 #define CL_QUEUE_ON_DEVICE (1 << 2)
417 #define CL_QUEUE_ON_DEVICE_DEFAULT (1 << 3)
420 /* cl_context_info */
421 #define CL_CONTEXT_REFERENCE_COUNT 0x1080
422 #define CL_CONTEXT_DEVICES 0x1081
423 #define CL_CONTEXT_PROPERTIES 0x1082
424 #ifdef CL_VERSION_1_1
425 #define CL_CONTEXT_NUM_DEVICES 0x1083
428 /* cl_context_properties */
429 #define CL_CONTEXT_PLATFORM 0x1084
430 #ifdef CL_VERSION_1_2
431 #define CL_CONTEXT_INTEROP_USER_SYNC 0x1085
434 #ifdef CL_VERSION_1_2
436 /* cl_device_partition_property */
437 #define CL_DEVICE_PARTITION_EQUALLY 0x1086
438 #define CL_DEVICE_PARTITION_BY_COUNTS 0x1087
439 #define CL_DEVICE_PARTITION_BY_COUNTS_LIST_END 0x0
440 #define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN 0x1088
444 #ifdef CL_VERSION_1_2
446 /* cl_device_affinity_domain */
447 #define CL_DEVICE_AFFINITY_DOMAIN_NUMA (1 << 0)
448 #define CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE (1 << 1)
449 #define CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE (1 << 2)
450 #define CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE (1 << 3)
451 #define CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE (1 << 4)
452 #define CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE (1 << 5)
456 #ifdef CL_VERSION_2_0
458 /* cl_device_svm_capabilities */
459 #define CL_DEVICE_SVM_COARSE_GRAIN_BUFFER (1 << 0)
460 #define CL_DEVICE_SVM_FINE_GRAIN_BUFFER (1 << 1)
461 #define CL_DEVICE_SVM_FINE_GRAIN_SYSTEM (1 << 2)
462 #define CL_DEVICE_SVM_ATOMICS (1 << 3)
466 /* cl_command_queue_info */
467 #define CL_QUEUE_CONTEXT 0x1090
468 #define CL_QUEUE_DEVICE 0x1091
469 #define CL_QUEUE_REFERENCE_COUNT 0x1092
470 #define CL_QUEUE_PROPERTIES 0x1093
471 #ifdef CL_VERSION_2_0
472 #define CL_QUEUE_SIZE 0x1094
474 #ifdef CL_VERSION_2_1
475 #define CL_QUEUE_DEVICE_DEFAULT 0x1095
478 /* cl_mem_flags and cl_svm_mem_flags - bitfield */
479 #define CL_MEM_READ_WRITE (1 << 0)
480 #define CL_MEM_WRITE_ONLY (1 << 1)
481 #define CL_MEM_READ_ONLY (1 << 2)
482 #define CL_MEM_USE_HOST_PTR (1 << 3)
483 #define CL_MEM_ALLOC_HOST_PTR (1 << 4)
484 #define CL_MEM_COPY_HOST_PTR (1 << 5)
485 /* reserved (1 << 6) */
486 #ifdef CL_VERSION_1_2
487 #define CL_MEM_HOST_WRITE_ONLY (1 << 7)
488 #define CL_MEM_HOST_READ_ONLY (1 << 8)
489 #define CL_MEM_HOST_NO_ACCESS (1 << 9)
491 #ifdef CL_VERSION_2_0
492 #define CL_MEM_SVM_FINE_GRAIN_BUFFER (1 << 10) /* used by cl_svm_mem_flags only */
493 #define CL_MEM_SVM_ATOMICS (1 << 11) /* used by cl_svm_mem_flags only */
494 #define CL_MEM_KERNEL_READ_AND_WRITE (1 << 12)
497 #ifdef CL_VERSION_1_2
499 /* cl_mem_migration_flags - bitfield */
500 #define CL_MIGRATE_MEM_OBJECT_HOST (1 << 0)
501 #define CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED (1 << 1)
505 /* cl_channel_order */
510 #define CL_RGB 0x10B4
511 #define CL_RGBA 0x10B5
512 #define CL_BGRA 0x10B6
513 #define CL_ARGB 0x10B7
514 #define CL_INTENSITY 0x10B8
515 #define CL_LUMINANCE 0x10B9
516 #ifdef CL_VERSION_1_1
518 #define CL_RGx 0x10BB
519 #define CL_RGBx 0x10BC
521 #ifdef CL_VERSION_1_2
522 #define CL_DEPTH 0x10BD
523 #define CL_DEPTH_STENCIL 0x10BE
525 #ifdef CL_VERSION_2_0
526 #define CL_sRGB 0x10BF
527 #define CL_sRGBx 0x10C0
528 #define CL_sRGBA 0x10C1
529 #define CL_sBGRA 0x10C2
530 #define CL_ABGR 0x10C3
533 /* cl_channel_type */
534 #define CL_SNORM_INT8 0x10D0
535 #define CL_SNORM_INT16 0x10D1
536 #define CL_UNORM_INT8 0x10D2
537 #define CL_UNORM_INT16 0x10D3
538 #define CL_UNORM_SHORT_565 0x10D4
539 #define CL_UNORM_SHORT_555 0x10D5
540 #define CL_UNORM_INT_101010 0x10D6
541 #define CL_SIGNED_INT8 0x10D7
542 #define CL_SIGNED_INT16 0x10D8
543 #define CL_SIGNED_INT32 0x10D9
544 #define CL_UNSIGNED_INT8 0x10DA
545 #define CL_UNSIGNED_INT16 0x10DB
546 #define CL_UNSIGNED_INT32 0x10DC
547 #define CL_HALF_FLOAT 0x10DD
548 #define CL_FLOAT 0x10DE
549 #ifdef CL_VERSION_1_2
550 #define CL_UNORM_INT24 0x10DF
552 #ifdef CL_VERSION_2_1
553 #define CL_UNORM_INT_101010_2 0x10E0
556 /* cl_mem_object_type */
557 #define CL_MEM_OBJECT_BUFFER 0x10F0
558 #define CL_MEM_OBJECT_IMAGE2D 0x10F1
559 #define CL_MEM_OBJECT_IMAGE3D 0x10F2
560 #ifdef CL_VERSION_1_2
561 #define CL_MEM_OBJECT_IMAGE2D_ARRAY 0x10F3
562 #define CL_MEM_OBJECT_IMAGE1D 0x10F4
563 #define CL_MEM_OBJECT_IMAGE1D_ARRAY 0x10F5
564 #define CL_MEM_OBJECT_IMAGE1D_BUFFER 0x10F6
566 #ifdef CL_VERSION_2_0
567 #define CL_MEM_OBJECT_PIPE 0x10F7
571 #define CL_MEM_TYPE 0x1100
572 #define CL_MEM_FLAGS 0x1101
573 #define CL_MEM_SIZE 0x1102
574 #define CL_MEM_HOST_PTR 0x1103
575 #define CL_MEM_MAP_COUNT 0x1104
576 #define CL_MEM_REFERENCE_COUNT 0x1105
577 #define CL_MEM_CONTEXT 0x1106
578 #ifdef CL_VERSION_1_1
579 #define CL_MEM_ASSOCIATED_MEMOBJECT 0x1107
580 #define CL_MEM_OFFSET 0x1108
582 #ifdef CL_VERSION_2_0
583 #define CL_MEM_USES_SVM_POINTER 0x1109
587 #define CL_IMAGE_FORMAT 0x1110
588 #define CL_IMAGE_ELEMENT_SIZE 0x1111
589 #define CL_IMAGE_ROW_PITCH 0x1112
590 #define CL_IMAGE_SLICE_PITCH 0x1113
591 #define CL_IMAGE_WIDTH 0x1114
592 #define CL_IMAGE_HEIGHT 0x1115
593 #define CL_IMAGE_DEPTH 0x1116
594 #ifdef CL_VERSION_1_2
595 #define CL_IMAGE_ARRAY_SIZE 0x1117
596 #define CL_IMAGE_BUFFER 0x1118
597 #define CL_IMAGE_NUM_MIP_LEVELS 0x1119
598 #define CL_IMAGE_NUM_SAMPLES 0x111A
601 #ifdef CL_VERSION_2_0
604 #define CL_PIPE_PACKET_SIZE 0x1120
605 #define CL_PIPE_MAX_PACKETS 0x1121
609 /* cl_addressing_mode */
610 #define CL_ADDRESS_NONE 0x1130
611 #define CL_ADDRESS_CLAMP_TO_EDGE 0x1131
612 #define CL_ADDRESS_CLAMP 0x1132
613 #define CL_ADDRESS_REPEAT 0x1133
614 #ifdef CL_VERSION_1_1
615 #define CL_ADDRESS_MIRRORED_REPEAT 0x1134
619 #define CL_FILTER_NEAREST 0x1140
620 #define CL_FILTER_LINEAR 0x1141
622 /* cl_sampler_info */
623 #define CL_SAMPLER_REFERENCE_COUNT 0x1150
624 #define CL_SAMPLER_CONTEXT 0x1151
625 #define CL_SAMPLER_NORMALIZED_COORDS 0x1152
626 #define CL_SAMPLER_ADDRESSING_MODE 0x1153
627 #define CL_SAMPLER_FILTER_MODE 0x1154
628 #ifdef CL_VERSION_2_0
629 /* These enumerants are for the cl_khr_mipmap_image extension.
630 They have since been added to cl_ext.h with an appropriate
631 KHR suffix, but are left here for backwards compatibility. */
632 #define CL_SAMPLER_MIP_FILTER_MODE 0x1155
633 #define CL_SAMPLER_LOD_MIN 0x1156
634 #define CL_SAMPLER_LOD_MAX 0x1157
637 /* cl_map_flags - bitfield */
638 #define CL_MAP_READ (1 << 0)
639 #define CL_MAP_WRITE (1 << 1)
640 #ifdef CL_VERSION_1_2
641 #define CL_MAP_WRITE_INVALIDATE_REGION (1 << 2)
644 /* cl_program_info */
645 #define CL_PROGRAM_REFERENCE_COUNT 0x1160
646 #define CL_PROGRAM_CONTEXT 0x1161
647 #define CL_PROGRAM_NUM_DEVICES 0x1162
648 #define CL_PROGRAM_DEVICES 0x1163
649 #define CL_PROGRAM_SOURCE 0x1164
650 #define CL_PROGRAM_BINARY_SIZES 0x1165
651 #define CL_PROGRAM_BINARIES 0x1166
652 #ifdef CL_VERSION_1_2
653 #define CL_PROGRAM_NUM_KERNELS 0x1167
654 #define CL_PROGRAM_KERNEL_NAMES 0x1168
656 #ifdef CL_VERSION_2_1
657 #define CL_PROGRAM_IL 0x1169
659 #ifdef CL_VERSION_2_2
660 #define CL_PROGRAM_SCOPE_GLOBAL_CTORS_PRESENT 0x116A
661 #define CL_PROGRAM_SCOPE_GLOBAL_DTORS_PRESENT 0x116B
664 /* cl_program_build_info */
665 #define CL_PROGRAM_BUILD_STATUS 0x1181
666 #define CL_PROGRAM_BUILD_OPTIONS 0x1182
667 #define CL_PROGRAM_BUILD_LOG 0x1183
668 #ifdef CL_VERSION_1_2
669 #define CL_PROGRAM_BINARY_TYPE 0x1184
671 #ifdef CL_VERSION_2_0
672 #define CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE 0x1185
675 #ifdef CL_VERSION_1_2
677 /* cl_program_binary_type */
678 #define CL_PROGRAM_BINARY_TYPE_NONE 0x0
679 #define CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT 0x1
680 #define CL_PROGRAM_BINARY_TYPE_LIBRARY 0x2
681 #define CL_PROGRAM_BINARY_TYPE_EXECUTABLE 0x4
685 /* cl_build_status */
686 #define CL_BUILD_SUCCESS 0
687 #define CL_BUILD_NONE -1
688 #define CL_BUILD_ERROR -2
689 #define CL_BUILD_IN_PROGRESS -3
692 #define CL_KERNEL_FUNCTION_NAME 0x1190
693 #define CL_KERNEL_NUM_ARGS 0x1191
694 #define CL_KERNEL_REFERENCE_COUNT 0x1192
695 #define CL_KERNEL_CONTEXT 0x1193
696 #define CL_KERNEL_PROGRAM 0x1194
697 #ifdef CL_VERSION_1_2
698 #define CL_KERNEL_ATTRIBUTES 0x1195
700 #ifdef CL_VERSION_2_1
701 #define CL_KERNEL_MAX_NUM_SUB_GROUPS 0x11B9
702 #define CL_KERNEL_COMPILE_NUM_SUB_GROUPS 0x11BA
705 #ifdef CL_VERSION_1_2
707 /* cl_kernel_arg_info */
708 #define CL_KERNEL_ARG_ADDRESS_QUALIFIER 0x1196
709 #define CL_KERNEL_ARG_ACCESS_QUALIFIER 0x1197
710 #define CL_KERNEL_ARG_TYPE_NAME 0x1198
711 #define CL_KERNEL_ARG_TYPE_QUALIFIER 0x1199
712 #define CL_KERNEL_ARG_NAME 0x119A
716 #ifdef CL_VERSION_1_2
718 /* cl_kernel_arg_address_qualifier */
719 #define CL_KERNEL_ARG_ADDRESS_GLOBAL 0x119B
720 #define CL_KERNEL_ARG_ADDRESS_LOCAL 0x119C
721 #define CL_KERNEL_ARG_ADDRESS_CONSTANT 0x119D
722 #define CL_KERNEL_ARG_ADDRESS_PRIVATE 0x119E
726 #ifdef CL_VERSION_1_2
728 /* cl_kernel_arg_access_qualifier */
729 #define CL_KERNEL_ARG_ACCESS_READ_ONLY 0x11A0
730 #define CL_KERNEL_ARG_ACCESS_WRITE_ONLY 0x11A1
731 #define CL_KERNEL_ARG_ACCESS_READ_WRITE 0x11A2
732 #define CL_KERNEL_ARG_ACCESS_NONE 0x11A3
736 #ifdef CL_VERSION_1_2
738 /* cl_kernel_arg_type_qualifier */
739 #define CL_KERNEL_ARG_TYPE_NONE 0
740 #define CL_KERNEL_ARG_TYPE_CONST (1 << 0)
741 #define CL_KERNEL_ARG_TYPE_RESTRICT (1 << 1)
742 #define CL_KERNEL_ARG_TYPE_VOLATILE (1 << 2)
743 #ifdef CL_VERSION_2_0
744 #define CL_KERNEL_ARG_TYPE_PIPE (1 << 3)
749 /* cl_kernel_work_group_info */
750 #define CL_KERNEL_WORK_GROUP_SIZE 0x11B0
751 #define CL_KERNEL_COMPILE_WORK_GROUP_SIZE 0x11B1
752 #define CL_KERNEL_LOCAL_MEM_SIZE 0x11B2
753 #define CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x11B3
754 #define CL_KERNEL_PRIVATE_MEM_SIZE 0x11B4
755 #ifdef CL_VERSION_1_2
756 #define CL_KERNEL_GLOBAL_WORK_SIZE 0x11B5
759 #ifdef CL_VERSION_2_1
761 /* cl_kernel_sub_group_info */
762 #define CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE 0x2033
763 #define CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE 0x2034
764 #define CL_KERNEL_LOCAL_SIZE_FOR_SUB_GROUP_COUNT 0x11B8
768 #ifdef CL_VERSION_2_0
770 /* cl_kernel_exec_info */
771 #define CL_KERNEL_EXEC_INFO_SVM_PTRS 0x11B6
772 #define CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM 0x11B7
777 #define CL_EVENT_COMMAND_QUEUE 0x11D0
778 #define CL_EVENT_COMMAND_TYPE 0x11D1
779 #define CL_EVENT_REFERENCE_COUNT 0x11D2
780 #define CL_EVENT_COMMAND_EXECUTION_STATUS 0x11D3
781 #ifdef CL_VERSION_1_1
782 #define CL_EVENT_CONTEXT 0x11D4
785 /* cl_command_type */
786 #define CL_COMMAND_NDRANGE_KERNEL 0x11F0
787 #define CL_COMMAND_TASK 0x11F1
788 #define CL_COMMAND_NATIVE_KERNEL 0x11F2
789 #define CL_COMMAND_READ_BUFFER 0x11F3
790 #define CL_COMMAND_WRITE_BUFFER 0x11F4
791 #define CL_COMMAND_COPY_BUFFER 0x11F5
792 #define CL_COMMAND_READ_IMAGE 0x11F6
793 #define CL_COMMAND_WRITE_IMAGE 0x11F7
794 #define CL_COMMAND_COPY_IMAGE 0x11F8
795 #define CL_COMMAND_COPY_IMAGE_TO_BUFFER 0x11F9
796 #define CL_COMMAND_COPY_BUFFER_TO_IMAGE 0x11FA
797 #define CL_COMMAND_MAP_BUFFER 0x11FB
798 #define CL_COMMAND_MAP_IMAGE 0x11FC
799 #define CL_COMMAND_UNMAP_MEM_OBJECT 0x11FD
800 #define CL_COMMAND_MARKER 0x11FE
801 #define CL_COMMAND_ACQUIRE_GL_OBJECTS 0x11FF
802 #define CL_COMMAND_RELEASE_GL_OBJECTS 0x1200
803 #ifdef CL_VERSION_1_1
804 #define CL_COMMAND_READ_BUFFER_RECT 0x1201
805 #define CL_COMMAND_WRITE_BUFFER_RECT 0x1202
806 #define CL_COMMAND_COPY_BUFFER_RECT 0x1203
807 #define CL_COMMAND_USER 0x1204
809 #ifdef CL_VERSION_1_2
810 #define CL_COMMAND_BARRIER 0x1205
811 #define CL_COMMAND_MIGRATE_MEM_OBJECTS 0x1206
812 #define CL_COMMAND_FILL_BUFFER 0x1207
813 #define CL_COMMAND_FILL_IMAGE 0x1208
815 #ifdef CL_VERSION_2_0
816 #define CL_COMMAND_SVM_FREE 0x1209
817 #define CL_COMMAND_SVM_MEMCPY 0x120A
818 #define CL_COMMAND_SVM_MEMFILL 0x120B
819 #define CL_COMMAND_SVM_MAP 0x120C
820 #define CL_COMMAND_SVM_UNMAP 0x120D
823 /* command execution status */
824 #define CL_COMPLETE 0x0
825 #define CL_RUNNING 0x1
826 #define CL_SUBMITTED 0x2
827 #define CL_QUEUED 0x3
829 #ifdef CL_VERSION_1_1
831 /* cl_buffer_create_type */
832 #define CL_BUFFER_CREATE_TYPE_REGION 0x1220
836 /* cl_profiling_info */
837 #define CL_PROFILING_COMMAND_QUEUED 0x1280
838 #define CL_PROFILING_COMMAND_SUBMIT 0x1281
839 #define CL_PROFILING_COMMAND_START 0x1282
840 #define CL_PROFILING_COMMAND_END 0x1283
841 #ifdef CL_VERSION_2_0
842 #define CL_PROFILING_COMMAND_COMPLETE 0x1284
845 /********************************************************************************************************/
848 extern CL_API_ENTRY cl_int CL_API_CALL
849 clGetPlatformIDs(cl_uint num_entries
,
850 cl_platform_id
* platforms
,
851 cl_uint
* num_platforms
) CL_API_SUFFIX__VERSION_1_0
;
853 extern CL_API_ENTRY cl_int CL_API_CALL
854 clGetPlatformInfo(cl_platform_id platform
,
855 cl_platform_info param_name
,
856 size_t param_value_size
,
858 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_1_0
;
861 extern CL_API_ENTRY cl_int CL_API_CALL
862 clGetDeviceIDs(cl_platform_id platform
,
863 cl_device_type device_type
,
865 cl_device_id
* devices
,
866 cl_uint
* num_devices
) CL_API_SUFFIX__VERSION_1_0
;
868 extern CL_API_ENTRY cl_int CL_API_CALL
869 clGetDeviceInfo(cl_device_id device
,
870 cl_device_info param_name
,
871 size_t param_value_size
,
873 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_1_0
;
875 #ifdef CL_VERSION_1_2
877 extern CL_API_ENTRY cl_int CL_API_CALL
878 clCreateSubDevices(cl_device_id in_device
,
879 const cl_device_partition_property
* properties
,
881 cl_device_id
* out_devices
,
882 cl_uint
* num_devices_ret
) CL_API_SUFFIX__VERSION_1_2
;
884 extern CL_API_ENTRY cl_int CL_API_CALL
885 clRetainDevice(cl_device_id device
) CL_API_SUFFIX__VERSION_1_2
;
887 extern CL_API_ENTRY cl_int CL_API_CALL
888 clReleaseDevice(cl_device_id device
) CL_API_SUFFIX__VERSION_1_2
;
892 #ifdef CL_VERSION_2_1
894 extern CL_API_ENTRY cl_int CL_API_CALL
895 clSetDefaultDeviceCommandQueue(cl_context context
,
897 cl_command_queue command_queue
) CL_API_SUFFIX__VERSION_2_1
;
899 extern CL_API_ENTRY cl_int CL_API_CALL
900 clGetDeviceAndHostTimer(cl_device_id device
,
901 cl_ulong
* device_timestamp
,
902 cl_ulong
* host_timestamp
) CL_API_SUFFIX__VERSION_2_1
;
904 extern CL_API_ENTRY cl_int CL_API_CALL
905 clGetHostTimer(cl_device_id device
,
906 cl_ulong
* host_timestamp
) CL_API_SUFFIX__VERSION_2_1
;
911 extern CL_API_ENTRY cl_context CL_API_CALL
912 clCreateContext(const cl_context_properties
* properties
,
914 const cl_device_id
* devices
,
915 void (CL_CALLBACK
* pfn_notify
)(const char * errinfo
,
916 const void * private_info
,
920 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_0
;
922 extern CL_API_ENTRY cl_context CL_API_CALL
923 clCreateContextFromType(const cl_context_properties
* properties
,
924 cl_device_type device_type
,
925 void (CL_CALLBACK
* pfn_notify
)(const char * errinfo
,
926 const void * private_info
,
930 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_0
;
932 extern CL_API_ENTRY cl_int CL_API_CALL
933 clRetainContext(cl_context context
) CL_API_SUFFIX__VERSION_1_0
;
935 extern CL_API_ENTRY cl_int CL_API_CALL
936 clReleaseContext(cl_context context
) CL_API_SUFFIX__VERSION_1_0
;
938 extern CL_API_ENTRY cl_int CL_API_CALL
939 clGetContextInfo(cl_context context
,
940 cl_context_info param_name
,
941 size_t param_value_size
,
943 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_1_0
;
945 /* Command Queue APIs */
947 #ifdef CL_VERSION_2_0
949 extern CL_API_ENTRY cl_command_queue CL_API_CALL
950 clCreateCommandQueueWithProperties(cl_context context
,
952 const cl_queue_properties
* properties
,
953 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_2_0
;
957 extern CL_API_ENTRY cl_int CL_API_CALL
958 clRetainCommandQueue(cl_command_queue command_queue
) CL_API_SUFFIX__VERSION_1_0
;
960 extern CL_API_ENTRY cl_int CL_API_CALL
961 clReleaseCommandQueue(cl_command_queue command_queue
) CL_API_SUFFIX__VERSION_1_0
;
963 extern CL_API_ENTRY cl_int CL_API_CALL
964 clGetCommandQueueInfo(cl_command_queue command_queue
,
965 cl_command_queue_info param_name
,
966 size_t param_value_size
,
968 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_1_0
;
970 /* Memory Object APIs */
971 extern CL_API_ENTRY cl_mem CL_API_CALL
972 clCreateBuffer(cl_context context
,
976 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_0
;
978 #ifdef CL_VERSION_1_1
980 extern CL_API_ENTRY cl_mem CL_API_CALL
981 clCreateSubBuffer(cl_mem buffer
,
983 cl_buffer_create_type buffer_create_type
,
984 const void * buffer_create_info
,
985 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_1
;
989 #ifdef CL_VERSION_1_2
991 extern CL_API_ENTRY cl_mem CL_API_CALL
992 clCreateImage(cl_context context
,
994 const cl_image_format
* image_format
,
995 const cl_image_desc
* image_desc
,
997 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_2
;
1001 #ifdef CL_VERSION_2_0
1003 extern CL_API_ENTRY cl_mem CL_API_CALL
1004 clCreatePipe(cl_context context
,
1006 cl_uint pipe_packet_size
,
1007 cl_uint pipe_max_packets
,
1008 const cl_pipe_properties
* properties
,
1009 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_2_0
;
1013 extern CL_API_ENTRY cl_int CL_API_CALL
1014 clRetainMemObject(cl_mem memobj
) CL_API_SUFFIX__VERSION_1_0
;
1016 extern CL_API_ENTRY cl_int CL_API_CALL
1017 clReleaseMemObject(cl_mem memobj
) CL_API_SUFFIX__VERSION_1_0
;
1019 extern CL_API_ENTRY cl_int CL_API_CALL
1020 clGetSupportedImageFormats(cl_context context
,
1022 cl_mem_object_type image_type
,
1023 cl_uint num_entries
,
1024 cl_image_format
* image_formats
,
1025 cl_uint
* num_image_formats
) CL_API_SUFFIX__VERSION_1_0
;
1027 extern CL_API_ENTRY cl_int CL_API_CALL
1028 clGetMemObjectInfo(cl_mem memobj
,
1029 cl_mem_info param_name
,
1030 size_t param_value_size
,
1032 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_1_0
;
1034 extern CL_API_ENTRY cl_int CL_API_CALL
1035 clGetImageInfo(cl_mem image
,
1036 cl_image_info param_name
,
1037 size_t param_value_size
,
1039 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_1_0
;
1041 #ifdef CL_VERSION_2_0
1043 extern CL_API_ENTRY cl_int CL_API_CALL
1044 clGetPipeInfo(cl_mem pipe
,
1045 cl_pipe_info param_name
,
1046 size_t param_value_size
,
1048 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_2_0
;
1052 #ifdef CL_VERSION_1_1
1054 extern CL_API_ENTRY cl_int CL_API_CALL
1055 clSetMemObjectDestructorCallback(cl_mem memobj
,
1056 void (CL_CALLBACK
* pfn_notify
)(cl_mem memobj
,
1058 void * user_data
) CL_API_SUFFIX__VERSION_1_1
;
1062 /* SVM Allocation APIs */
1064 #ifdef CL_VERSION_2_0
1066 extern CL_API_ENTRY
void * CL_API_CALL
1067 clSVMAlloc(cl_context context
,
1068 cl_svm_mem_flags flags
,
1070 cl_uint alignment
) CL_API_SUFFIX__VERSION_2_0
;
1072 extern CL_API_ENTRY
void CL_API_CALL
1073 clSVMFree(cl_context context
,
1074 void * svm_pointer
) CL_API_SUFFIX__VERSION_2_0
;
1080 #ifdef CL_VERSION_2_0
1082 extern CL_API_ENTRY cl_sampler CL_API_CALL
1083 clCreateSamplerWithProperties(cl_context context
,
1084 const cl_sampler_properties
* sampler_properties
,
1085 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_2_0
;
1089 extern CL_API_ENTRY cl_int CL_API_CALL
1090 clRetainSampler(cl_sampler sampler
) CL_API_SUFFIX__VERSION_1_0
;
1092 extern CL_API_ENTRY cl_int CL_API_CALL
1093 clReleaseSampler(cl_sampler sampler
) CL_API_SUFFIX__VERSION_1_0
;
1095 extern CL_API_ENTRY cl_int CL_API_CALL
1096 clGetSamplerInfo(cl_sampler sampler
,
1097 cl_sampler_info param_name
,
1098 size_t param_value_size
,
1100 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_1_0
;
1102 /* Program Object APIs */
1103 extern CL_API_ENTRY cl_program CL_API_CALL
1104 clCreateProgramWithSource(cl_context context
,
1106 const char ** strings
,
1107 const size_t * lengths
,
1108 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_0
;
1110 extern CL_API_ENTRY cl_program CL_API_CALL
1111 clCreateProgramWithBinary(cl_context context
,
1112 cl_uint num_devices
,
1113 const cl_device_id
* device_list
,
1114 const size_t * lengths
,
1115 const unsigned char ** binaries
,
1116 cl_int
* binary_status
,
1117 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_0
;
1119 #ifdef CL_VERSION_1_2
1121 extern CL_API_ENTRY cl_program CL_API_CALL
1122 clCreateProgramWithBuiltInKernels(cl_context context
,
1123 cl_uint num_devices
,
1124 const cl_device_id
* device_list
,
1125 const char * kernel_names
,
1126 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_2
;
1130 #ifdef CL_VERSION_2_1
1132 extern CL_API_ENTRY cl_program CL_API_CALL
1133 clCreateProgramWithIL(cl_context context
,
1136 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_2_1
;
1140 extern CL_API_ENTRY cl_int CL_API_CALL
1141 clRetainProgram(cl_program program
) CL_API_SUFFIX__VERSION_1_0
;
1143 extern CL_API_ENTRY cl_int CL_API_CALL
1144 clReleaseProgram(cl_program program
) CL_API_SUFFIX__VERSION_1_0
;
1146 extern CL_API_ENTRY cl_int CL_API_CALL
1147 clBuildProgram(cl_program program
,
1148 cl_uint num_devices
,
1149 const cl_device_id
* device_list
,
1150 const char * options
,
1151 void (CL_CALLBACK
* pfn_notify
)(cl_program program
,
1153 void * user_data
) CL_API_SUFFIX__VERSION_1_0
;
1155 #ifdef CL_VERSION_1_2
1157 extern CL_API_ENTRY cl_int CL_API_CALL
1158 clCompileProgram(cl_program program
,
1159 cl_uint num_devices
,
1160 const cl_device_id
* device_list
,
1161 const char * options
,
1162 cl_uint num_input_headers
,
1163 const cl_program
* input_headers
,
1164 const char ** header_include_names
,
1165 void (CL_CALLBACK
* pfn_notify
)(cl_program program
,
1167 void * user_data
) CL_API_SUFFIX__VERSION_1_2
;
1169 extern CL_API_ENTRY cl_program CL_API_CALL
1170 clLinkProgram(cl_context context
,
1171 cl_uint num_devices
,
1172 const cl_device_id
* device_list
,
1173 const char * options
,
1174 cl_uint num_input_programs
,
1175 const cl_program
* input_programs
,
1176 void (CL_CALLBACK
* pfn_notify
)(cl_program program
,
1179 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_2
;
1183 #ifdef CL_VERSION_2_2
1185 extern CL_API_ENTRY cl_int CL_API_CALL
1186 clSetProgramReleaseCallback(cl_program program
,
1187 void (CL_CALLBACK
* pfn_notify
)(cl_program program
,
1189 void * user_data
) CL_API_SUFFIX__VERSION_2_2
;
1191 extern CL_API_ENTRY cl_int CL_API_CALL
1192 clSetProgramSpecializationConstant(cl_program program
,
1195 const void* spec_value
) CL_API_SUFFIX__VERSION_2_2
;
1199 #ifdef CL_VERSION_1_2
1201 extern CL_API_ENTRY cl_int CL_API_CALL
1202 clUnloadPlatformCompiler(cl_platform_id platform
) CL_API_SUFFIX__VERSION_1_2
;
1206 extern CL_API_ENTRY cl_int CL_API_CALL
1207 clGetProgramInfo(cl_program program
,
1208 cl_program_info param_name
,
1209 size_t param_value_size
,
1211 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_1_0
;
1213 extern CL_API_ENTRY cl_int CL_API_CALL
1214 clGetProgramBuildInfo(cl_program program
,
1215 cl_device_id device
,
1216 cl_program_build_info param_name
,
1217 size_t param_value_size
,
1219 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_1_0
;
1221 /* Kernel Object APIs */
1222 extern CL_API_ENTRY cl_kernel CL_API_CALL
1223 clCreateKernel(cl_program program
,
1224 const char * kernel_name
,
1225 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_0
;
1227 extern CL_API_ENTRY cl_int CL_API_CALL
1228 clCreateKernelsInProgram(cl_program program
,
1229 cl_uint num_kernels
,
1230 cl_kernel
* kernels
,
1231 cl_uint
* num_kernels_ret
) CL_API_SUFFIX__VERSION_1_0
;
1233 #ifdef CL_VERSION_2_1
1235 extern CL_API_ENTRY cl_kernel CL_API_CALL
1236 clCloneKernel(cl_kernel source_kernel
,
1237 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_2_1
;
1241 extern CL_API_ENTRY cl_int CL_API_CALL
1242 clRetainKernel(cl_kernel kernel
) CL_API_SUFFIX__VERSION_1_0
;
1244 extern CL_API_ENTRY cl_int CL_API_CALL
1245 clReleaseKernel(cl_kernel kernel
) CL_API_SUFFIX__VERSION_1_0
;
1247 extern CL_API_ENTRY cl_int CL_API_CALL
1248 clSetKernelArg(cl_kernel kernel
,
1251 const void * arg_value
) CL_API_SUFFIX__VERSION_1_0
;
1253 #ifdef CL_VERSION_2_0
1255 extern CL_API_ENTRY cl_int CL_API_CALL
1256 clSetKernelArgSVMPointer(cl_kernel kernel
,
1258 const void * arg_value
) CL_API_SUFFIX__VERSION_2_0
;
1260 extern CL_API_ENTRY cl_int CL_API_CALL
1261 clSetKernelExecInfo(cl_kernel kernel
,
1262 cl_kernel_exec_info param_name
,
1263 size_t param_value_size
,
1264 const void * param_value
) CL_API_SUFFIX__VERSION_2_0
;
1268 extern CL_API_ENTRY cl_int CL_API_CALL
1269 clGetKernelInfo(cl_kernel kernel
,
1270 cl_kernel_info param_name
,
1271 size_t param_value_size
,
1273 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_1_0
;
1275 #ifdef CL_VERSION_1_2
1277 extern CL_API_ENTRY cl_int CL_API_CALL
1278 clGetKernelArgInfo(cl_kernel kernel
,
1280 cl_kernel_arg_info param_name
,
1281 size_t param_value_size
,
1283 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_1_2
;
1287 extern CL_API_ENTRY cl_int CL_API_CALL
1288 clGetKernelWorkGroupInfo(cl_kernel kernel
,
1289 cl_device_id device
,
1290 cl_kernel_work_group_info param_name
,
1291 size_t param_value_size
,
1293 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_1_0
;
1295 #ifdef CL_VERSION_2_1
1297 extern CL_API_ENTRY cl_int CL_API_CALL
1298 clGetKernelSubGroupInfo(cl_kernel kernel
,
1299 cl_device_id device
,
1300 cl_kernel_sub_group_info param_name
,
1301 size_t input_value_size
,
1302 const void* input_value
,
1303 size_t param_value_size
,
1305 size_t* param_value_size_ret
) CL_API_SUFFIX__VERSION_2_1
;
1309 /* Event Object APIs */
1310 extern CL_API_ENTRY cl_int CL_API_CALL
1311 clWaitForEvents(cl_uint num_events
,
1312 const cl_event
* event_list
) CL_API_SUFFIX__VERSION_1_0
;
1314 extern CL_API_ENTRY cl_int CL_API_CALL
1315 clGetEventInfo(cl_event event
,
1316 cl_event_info param_name
,
1317 size_t param_value_size
,
1319 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_1_0
;
1321 #ifdef CL_VERSION_1_1
1323 extern CL_API_ENTRY cl_event CL_API_CALL
1324 clCreateUserEvent(cl_context context
,
1325 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_1
;
1329 extern CL_API_ENTRY cl_int CL_API_CALL
1330 clRetainEvent(cl_event event
) CL_API_SUFFIX__VERSION_1_0
;
1332 extern CL_API_ENTRY cl_int CL_API_CALL
1333 clReleaseEvent(cl_event event
) CL_API_SUFFIX__VERSION_1_0
;
1335 #ifdef CL_VERSION_1_1
1337 extern CL_API_ENTRY cl_int CL_API_CALL
1338 clSetUserEventStatus(cl_event event
,
1339 cl_int execution_status
) CL_API_SUFFIX__VERSION_1_1
;
1341 extern CL_API_ENTRY cl_int CL_API_CALL
1342 clSetEventCallback(cl_event event
,
1343 cl_int command_exec_callback_type
,
1344 void (CL_CALLBACK
* pfn_notify
)(cl_event event
,
1345 cl_int event_command_status
,
1347 void * user_data
) CL_API_SUFFIX__VERSION_1_1
;
1351 /* Profiling APIs */
1352 extern CL_API_ENTRY cl_int CL_API_CALL
1353 clGetEventProfilingInfo(cl_event event
,
1354 cl_profiling_info param_name
,
1355 size_t param_value_size
,
1357 size_t * param_value_size_ret
) CL_API_SUFFIX__VERSION_1_0
;
1359 /* Flush and Finish APIs */
1360 extern CL_API_ENTRY cl_int CL_API_CALL
1361 clFlush(cl_command_queue command_queue
) CL_API_SUFFIX__VERSION_1_0
;
1363 extern CL_API_ENTRY cl_int CL_API_CALL
1364 clFinish(cl_command_queue command_queue
) CL_API_SUFFIX__VERSION_1_0
;
1366 /* Enqueued Commands APIs */
1367 extern CL_API_ENTRY cl_int CL_API_CALL
1368 clEnqueueReadBuffer(cl_command_queue command_queue
,
1370 cl_bool blocking_read
,
1374 cl_uint num_events_in_wait_list
,
1375 const cl_event
* event_wait_list
,
1376 cl_event
* event
) CL_API_SUFFIX__VERSION_1_0
;
1378 #ifdef CL_VERSION_1_1
1380 extern CL_API_ENTRY cl_int CL_API_CALL
1381 clEnqueueReadBufferRect(cl_command_queue command_queue
,
1383 cl_bool blocking_read
,
1384 const size_t * buffer_offset
,
1385 const size_t * host_offset
,
1386 const size_t * region
,
1387 size_t buffer_row_pitch
,
1388 size_t buffer_slice_pitch
,
1389 size_t host_row_pitch
,
1390 size_t host_slice_pitch
,
1392 cl_uint num_events_in_wait_list
,
1393 const cl_event
* event_wait_list
,
1394 cl_event
* event
) CL_API_SUFFIX__VERSION_1_1
;
1398 extern CL_API_ENTRY cl_int CL_API_CALL
1399 clEnqueueWriteBuffer(cl_command_queue command_queue
,
1401 cl_bool blocking_write
,
1405 cl_uint num_events_in_wait_list
,
1406 const cl_event
* event_wait_list
,
1407 cl_event
* event
) CL_API_SUFFIX__VERSION_1_0
;
1409 #ifdef CL_VERSION_1_1
1411 extern CL_API_ENTRY cl_int CL_API_CALL
1412 clEnqueueWriteBufferRect(cl_command_queue command_queue
,
1414 cl_bool blocking_write
,
1415 const size_t * buffer_offset
,
1416 const size_t * host_offset
,
1417 const size_t * region
,
1418 size_t buffer_row_pitch
,
1419 size_t buffer_slice_pitch
,
1420 size_t host_row_pitch
,
1421 size_t host_slice_pitch
,
1423 cl_uint num_events_in_wait_list
,
1424 const cl_event
* event_wait_list
,
1425 cl_event
* event
) CL_API_SUFFIX__VERSION_1_1
;
1429 #ifdef CL_VERSION_1_2
1431 extern CL_API_ENTRY cl_int CL_API_CALL
1432 clEnqueueFillBuffer(cl_command_queue command_queue
,
1434 const void * pattern
,
1435 size_t pattern_size
,
1438 cl_uint num_events_in_wait_list
,
1439 const cl_event
* event_wait_list
,
1440 cl_event
* event
) CL_API_SUFFIX__VERSION_1_2
;
1444 extern CL_API_ENTRY cl_int CL_API_CALL
1445 clEnqueueCopyBuffer(cl_command_queue command_queue
,
1451 cl_uint num_events_in_wait_list
,
1452 const cl_event
* event_wait_list
,
1453 cl_event
* event
) CL_API_SUFFIX__VERSION_1_0
;
1455 #ifdef CL_VERSION_1_1
1457 extern CL_API_ENTRY cl_int CL_API_CALL
1458 clEnqueueCopyBufferRect(cl_command_queue command_queue
,
1461 const size_t * src_origin
,
1462 const size_t * dst_origin
,
1463 const size_t * region
,
1464 size_t src_row_pitch
,
1465 size_t src_slice_pitch
,
1466 size_t dst_row_pitch
,
1467 size_t dst_slice_pitch
,
1468 cl_uint num_events_in_wait_list
,
1469 const cl_event
* event_wait_list
,
1470 cl_event
* event
) CL_API_SUFFIX__VERSION_1_1
;
1474 extern CL_API_ENTRY cl_int CL_API_CALL
1475 clEnqueueReadImage(cl_command_queue command_queue
,
1477 cl_bool blocking_read
,
1478 const size_t * origin
,
1479 const size_t * region
,
1483 cl_uint num_events_in_wait_list
,
1484 const cl_event
* event_wait_list
,
1485 cl_event
* event
) CL_API_SUFFIX__VERSION_1_0
;
1487 extern CL_API_ENTRY cl_int CL_API_CALL
1488 clEnqueueWriteImage(cl_command_queue command_queue
,
1490 cl_bool blocking_write
,
1491 const size_t * origin
,
1492 const size_t * region
,
1493 size_t input_row_pitch
,
1494 size_t input_slice_pitch
,
1496 cl_uint num_events_in_wait_list
,
1497 const cl_event
* event_wait_list
,
1498 cl_event
* event
) CL_API_SUFFIX__VERSION_1_0
;
1500 #ifdef CL_VERSION_1_2
1502 extern CL_API_ENTRY cl_int CL_API_CALL
1503 clEnqueueFillImage(cl_command_queue command_queue
,
1505 const void * fill_color
,
1506 const size_t * origin
,
1507 const size_t * region
,
1508 cl_uint num_events_in_wait_list
,
1509 const cl_event
* event_wait_list
,
1510 cl_event
* event
) CL_API_SUFFIX__VERSION_1_2
;
1514 extern CL_API_ENTRY cl_int CL_API_CALL
1515 clEnqueueCopyImage(cl_command_queue command_queue
,
1518 const size_t * src_origin
,
1519 const size_t * dst_origin
,
1520 const size_t * region
,
1521 cl_uint num_events_in_wait_list
,
1522 const cl_event
* event_wait_list
,
1523 cl_event
* event
) CL_API_SUFFIX__VERSION_1_0
;
1525 extern CL_API_ENTRY cl_int CL_API_CALL
1526 clEnqueueCopyImageToBuffer(cl_command_queue command_queue
,
1529 const size_t * src_origin
,
1530 const size_t * region
,
1532 cl_uint num_events_in_wait_list
,
1533 const cl_event
* event_wait_list
,
1534 cl_event
* event
) CL_API_SUFFIX__VERSION_1_0
;
1536 extern CL_API_ENTRY cl_int CL_API_CALL
1537 clEnqueueCopyBufferToImage(cl_command_queue command_queue
,
1541 const size_t * dst_origin
,
1542 const size_t * region
,
1543 cl_uint num_events_in_wait_list
,
1544 const cl_event
* event_wait_list
,
1545 cl_event
* event
) CL_API_SUFFIX__VERSION_1_0
;
1547 extern CL_API_ENTRY
void * CL_API_CALL
1548 clEnqueueMapBuffer(cl_command_queue command_queue
,
1550 cl_bool blocking_map
,
1551 cl_map_flags map_flags
,
1554 cl_uint num_events_in_wait_list
,
1555 const cl_event
* event_wait_list
,
1557 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_0
;
1559 extern CL_API_ENTRY
void * CL_API_CALL
1560 clEnqueueMapImage(cl_command_queue command_queue
,
1562 cl_bool blocking_map
,
1563 cl_map_flags map_flags
,
1564 const size_t * origin
,
1565 const size_t * region
,
1566 size_t * image_row_pitch
,
1567 size_t * image_slice_pitch
,
1568 cl_uint num_events_in_wait_list
,
1569 const cl_event
* event_wait_list
,
1571 cl_int
* errcode_ret
) CL_API_SUFFIX__VERSION_1_0
;
1573 extern CL_API_ENTRY cl_int CL_API_CALL
1574 clEnqueueUnmapMemObject(cl_command_queue command_queue
,
1577 cl_uint num_events_in_wait_list
,
1578 const cl_event
* event_wait_list
,
1579 cl_event
* event
) CL_API_SUFFIX__VERSION_1_0
;
1581 #ifdef CL_VERSION_1_2
1583 extern CL_API_ENTRY cl_int CL_API_CALL
1584 clEnqueueMigrateMemObjects(cl_command_queue command_queue
,
1585 cl_uint num_mem_objects
,
1586 const cl_mem
* mem_objects
,
1587 cl_mem_migration_flags flags
,
1588 cl_uint num_events_in_wait_list
,
1589 const cl_event
* event_wait_list
,
1590 cl_event
* event
) CL_API_SUFFIX__VERSION_1_2
;
1594 extern CL_API_ENTRY cl_int CL_API_CALL
1595 clEnqueueNDRangeKernel(cl_command_queue command_queue
,
1598 const size_t * global_work_offset
,
1599 const size_t * global_work_size
,
1600 const size_t * local_work_size
,
1601 cl_uint num_events_in_wait_list
,
1602 const cl_event
* event_wait_list
,
1603 cl_event
* event
) CL_API_SUFFIX__VERSION_1_0
;
1605 extern CL_API_ENTRY cl_int CL_API_CALL
1606 clEnqueueNativeKernel(cl_command_queue command_queue
,
1607 void (CL_CALLBACK
* user_func
)(void *),
1610 cl_uint num_mem_objects
,
1611 const cl_mem
* mem_list
,
1612 const void ** args_mem_loc
,
1613 cl_uint num_events_in_wait_list
,
1614 const cl_event
* event_wait_list
,
1615 cl_event
* event
) CL_API_SUFFIX__VERSION_1_0
;
1617 #ifdef CL_VERSION_1_2
1619 extern CL_API_ENTRY cl_int CL_API_CALL
1620 clEnqueueMarkerWithWaitList(cl_command_queue command_queue
,
1621 cl_uint num_events_in_wait_list
,
1622 const cl_event
* event_wait_list
,
1623 cl_event
* event
) CL_API_SUFFIX__VERSION_1_2
;
1625 extern CL_API_ENTRY cl_int CL_API_CALL
1626 clEnqueueBarrierWithWaitList(cl_command_queue command_queue
,
1627 cl_uint num_events_in_wait_list
,
1628 const cl_event
* event_wait_list
,
1629 cl_event
* event
) CL_API_SUFFIX__VERSION_1_2
;
1633 #ifdef CL_VERSION_2_0
1635 extern CL_API_ENTRY cl_int CL_API_CALL
1636 clEnqueueSVMFree(cl_command_queue command_queue
,
1637 cl_uint num_svm_pointers
,
1638 void * svm_pointers
[],
1639 void (CL_CALLBACK
* pfn_free_func
)(cl_command_queue queue
,
1640 cl_uint num_svm_pointers
,
1641 void * svm_pointers
[],
1644 cl_uint num_events_in_wait_list
,
1645 const cl_event
* event_wait_list
,
1646 cl_event
* event
) CL_API_SUFFIX__VERSION_2_0
;
1648 extern CL_API_ENTRY cl_int CL_API_CALL
1649 clEnqueueSVMMemcpy(cl_command_queue command_queue
,
1650 cl_bool blocking_copy
,
1652 const void * src_ptr
,
1654 cl_uint num_events_in_wait_list
,
1655 const cl_event
* event_wait_list
,
1656 cl_event
* event
) CL_API_SUFFIX__VERSION_2_0
;
1658 extern CL_API_ENTRY cl_int CL_API_CALL
1659 clEnqueueSVMMemFill(cl_command_queue command_queue
,
1661 const void * pattern
,
1662 size_t pattern_size
,
1664 cl_uint num_events_in_wait_list
,
1665 const cl_event
* event_wait_list
,
1666 cl_event
* event
) CL_API_SUFFIX__VERSION_2_0
;
1668 extern CL_API_ENTRY cl_int CL_API_CALL
1669 clEnqueueSVMMap(cl_command_queue command_queue
,
1670 cl_bool blocking_map
,
1674 cl_uint num_events_in_wait_list
,
1675 const cl_event
* event_wait_list
,
1676 cl_event
* event
) CL_API_SUFFIX__VERSION_2_0
;
1678 extern CL_API_ENTRY cl_int CL_API_CALL
1679 clEnqueueSVMUnmap(cl_command_queue command_queue
,
1681 cl_uint num_events_in_wait_list
,
1682 const cl_event
* event_wait_list
,
1683 cl_event
* event
) CL_API_SUFFIX__VERSION_2_0
;
1687 #ifdef CL_VERSION_2_1
1689 extern CL_API_ENTRY cl_int CL_API_CALL
1690 clEnqueueSVMMigrateMem(cl_command_queue command_queue
,
1691 cl_uint num_svm_pointers
,
1692 const void ** svm_pointers
,
1693 const size_t * sizes
,
1694 cl_mem_migration_flags flags
,
1695 cl_uint num_events_in_wait_list
,
1696 const cl_event
* event_wait_list
,
1697 cl_event
* event
) CL_API_SUFFIX__VERSION_2_1
;
1701 #ifdef CL_VERSION_1_2
1703 /* Extension function access
1705 * Returns the extension function address for the given function name,
1706 * or NULL if a valid function can not be found. The client must
1707 * check to make sure the address is not NULL, before using or
1708 * calling the returned function address.
1710 extern CL_API_ENTRY
void * CL_API_CALL
1711 clGetExtensionFunctionAddressForPlatform(cl_platform_id platform
,
1712 const char * func_name
) CL_API_SUFFIX__VERSION_1_2
;
1716 #ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
1719 * This API introduces mutable state into the OpenCL implementation. It has been REMOVED
1720 * to better facilitate thread safety. The 1.0 API is not thread safe. It is not tested by the
1721 * OpenCL 1.1 conformance test, and consequently may not work or may not work dependably.
1722 * It is likely to be non-performant. Use of this API is not advised. Use at your own risk.
1724 * Software developers previously relying on this API are instructed to set the command queue
1725 * properties when creating the queue, instead.
1727 extern CL_API_ENTRY cl_int CL_API_CALL
1728 clSetCommandQueueProperty(cl_command_queue command_queue
,
1729 cl_command_queue_properties properties
,
1731 cl_command_queue_properties
* old_properties
) CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
;
1732 #endif /* CL_USE_DEPRECATED_OPENCL_1_0_APIS */
1734 /* Deprecated OpenCL 1.1 APIs */
1735 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
1736 clCreateImage2D(cl_context context
,
1738 const cl_image_format
* image_format
,
1740 size_t image_height
,
1741 size_t image_row_pitch
,
1743 cl_int
* errcode_ret
) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
;
1745 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
1746 clCreateImage3D(cl_context context
,
1748 const cl_image_format
* image_format
,
1750 size_t image_height
,
1752 size_t image_row_pitch
,
1753 size_t image_slice_pitch
,
1755 cl_int
* errcode_ret
) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
;
1757 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
1758 clEnqueueMarker(cl_command_queue command_queue
,
1759 cl_event
* event
) 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 clEnqueueWaitForEvents(cl_command_queue command_queue
,
1764 const cl_event
* event_list
) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
;
1766 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
1767 clEnqueueBarrier(cl_command_queue command_queue
) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
;
1769 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
1770 clUnloadCompiler(void) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
;
1772 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
void * CL_API_CALL
1773 clGetExtensionFunctionAddress(const char * func_name
) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
;
1775 /* Deprecated OpenCL 2.0 APIs */
1776 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_command_queue CL_API_CALL
1777 clCreateCommandQueue(cl_context context
,
1778 cl_device_id device
,
1779 cl_command_queue_properties properties
,
1780 cl_int
* errcode_ret
) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED
;
1782 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_sampler CL_API_CALL
1783 clCreateSampler(cl_context context
,
1784 cl_bool normalized_coords
,
1785 cl_addressing_mode addressing_mode
,
1786 cl_filter_mode filter_mode
,
1787 cl_int
* errcode_ret
) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED
;
1789 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_int CL_API_CALL
1790 clEnqueueTask(cl_command_queue command_queue
,
1792 cl_uint num_events_in_wait_list
,
1793 const cl_event
* event_wait_list
,
1794 cl_event
* event
) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED
;
1800 #endif /* __OPENCL_CL_H */