1af69d88dSmrg/*******************************************************************************
27ec681f3Smrg * Copyright (c) 2008-2020 The Khronos Group Inc.
3af69d88dSmrg *
47ec681f3Smrg * Licensed under the Apache License, Version 2.0 (the "License");
57ec681f3Smrg * you may not use this file except in compliance with the License.
67ec681f3Smrg * You may obtain a copy of the License at
7af69d88dSmrg *
87ec681f3Smrg *    http://www.apache.org/licenses/LICENSE-2.0
9af69d88dSmrg *
107ec681f3Smrg * Unless required by applicable law or agreed to in writing, software
117ec681f3Smrg * distributed under the License is distributed on an "AS IS" BASIS,
127ec681f3Smrg * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
137ec681f3Smrg * See the License for the specific language governing permissions and
147ec681f3Smrg * limitations under the License.
15af69d88dSmrg ******************************************************************************/
16af69d88dSmrg
17af69d88dSmrg#ifndef __OPENCL_CL_H
18af69d88dSmrg#define __OPENCL_CL_H
19af69d88dSmrg
2053c12917Smaya#include <CL/cl_version.h>
21af69d88dSmrg#include <CL/cl_platform.h>
22af69d88dSmrg
23af69d88dSmrg#ifdef __cplusplus
24af69d88dSmrgextern "C" {
25af69d88dSmrg#endif
26af69d88dSmrg
27af69d88dSmrg/******************************************************************************/
28af69d88dSmrg
29af69d88dSmrgtypedef struct _cl_platform_id *    cl_platform_id;
30af69d88dSmrgtypedef struct _cl_device_id *      cl_device_id;
31af69d88dSmrgtypedef struct _cl_context *        cl_context;
32af69d88dSmrgtypedef struct _cl_command_queue *  cl_command_queue;
33af69d88dSmrgtypedef struct _cl_mem *            cl_mem;
34af69d88dSmrgtypedef struct _cl_program *        cl_program;
35af69d88dSmrgtypedef struct _cl_kernel *         cl_kernel;
36af69d88dSmrgtypedef struct _cl_event *          cl_event;
37af69d88dSmrgtypedef struct _cl_sampler *        cl_sampler;
38af69d88dSmrg
3953c12917Smayatypedef 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. */
40af69d88dSmrgtypedef cl_ulong            cl_bitfield;
417ec681f3Smrgtypedef cl_ulong            cl_properties;
42af69d88dSmrgtypedef cl_bitfield         cl_device_type;
43af69d88dSmrgtypedef cl_uint             cl_platform_info;
44af69d88dSmrgtypedef cl_uint             cl_device_info;
45af69d88dSmrgtypedef cl_bitfield         cl_device_fp_config;
46af69d88dSmrgtypedef cl_uint             cl_device_mem_cache_type;
47af69d88dSmrgtypedef cl_uint             cl_device_local_mem_type;
48af69d88dSmrgtypedef cl_bitfield         cl_device_exec_capabilities;
4953c12917Smaya#ifdef CL_VERSION_2_0
5053c12917Smayatypedef cl_bitfield         cl_device_svm_capabilities;
5153c12917Smaya#endif
52af69d88dSmrgtypedef cl_bitfield         cl_command_queue_properties;
5353c12917Smaya#ifdef CL_VERSION_1_2
54af69d88dSmrgtypedef intptr_t            cl_device_partition_property;
55af69d88dSmrgtypedef cl_bitfield         cl_device_affinity_domain;
5653c12917Smaya#endif
57af69d88dSmrg
58af69d88dSmrgtypedef intptr_t            cl_context_properties;
59af69d88dSmrgtypedef cl_uint             cl_context_info;
6053c12917Smaya#ifdef CL_VERSION_2_0
617ec681f3Smrgtypedef cl_properties       cl_queue_properties;
6253c12917Smaya#endif
63af69d88dSmrgtypedef cl_uint             cl_command_queue_info;
64af69d88dSmrgtypedef cl_uint             cl_channel_order;
65af69d88dSmrgtypedef cl_uint             cl_channel_type;
66af69d88dSmrgtypedef cl_bitfield         cl_mem_flags;
6753c12917Smaya#ifdef CL_VERSION_2_0
6853c12917Smayatypedef cl_bitfield         cl_svm_mem_flags;
6953c12917Smaya#endif
70af69d88dSmrgtypedef cl_uint             cl_mem_object_type;
71af69d88dSmrgtypedef cl_uint             cl_mem_info;
7253c12917Smaya#ifdef CL_VERSION_1_2
73af69d88dSmrgtypedef cl_bitfield         cl_mem_migration_flags;
7453c12917Smaya#endif
75af69d88dSmrgtypedef cl_uint             cl_image_info;
7653c12917Smaya#ifdef CL_VERSION_1_1
77af69d88dSmrgtypedef cl_uint             cl_buffer_create_type;
7853c12917Smaya#endif
79af69d88dSmrgtypedef cl_uint             cl_addressing_mode;
80af69d88dSmrgtypedef cl_uint             cl_filter_mode;
81af69d88dSmrgtypedef cl_uint             cl_sampler_info;
82af69d88dSmrgtypedef cl_bitfield         cl_map_flags;
8353c12917Smaya#ifdef CL_VERSION_2_0
8453c12917Smayatypedef intptr_t            cl_pipe_properties;
8553c12917Smayatypedef cl_uint             cl_pipe_info;
8653c12917Smaya#endif
87af69d88dSmrgtypedef cl_uint             cl_program_info;
88af69d88dSmrgtypedef cl_uint             cl_program_build_info;
8953c12917Smaya#ifdef CL_VERSION_1_2
90af69d88dSmrgtypedef cl_uint             cl_program_binary_type;
9153c12917Smaya#endif
92af69d88dSmrgtypedef cl_int              cl_build_status;
93af69d88dSmrgtypedef cl_uint             cl_kernel_info;
9453c12917Smaya#ifdef CL_VERSION_1_2
95af69d88dSmrgtypedef cl_uint             cl_kernel_arg_info;
96af69d88dSmrgtypedef cl_uint             cl_kernel_arg_address_qualifier;
97af69d88dSmrgtypedef cl_uint             cl_kernel_arg_access_qualifier;
98af69d88dSmrgtypedef cl_bitfield         cl_kernel_arg_type_qualifier;
9953c12917Smaya#endif
100af69d88dSmrgtypedef cl_uint             cl_kernel_work_group_info;
10153c12917Smaya#ifdef CL_VERSION_2_1
10253c12917Smayatypedef cl_uint             cl_kernel_sub_group_info;
10353c12917Smaya#endif
104af69d88dSmrgtypedef cl_uint             cl_event_info;
105af69d88dSmrgtypedef cl_uint             cl_command_type;
106af69d88dSmrgtypedef cl_uint             cl_profiling_info;
10753c12917Smaya#ifdef CL_VERSION_2_0
1087ec681f3Smrgtypedef cl_properties       cl_sampler_properties;
10953c12917Smayatypedef cl_uint             cl_kernel_exec_info;
11053c12917Smaya#endif
1117ec681f3Smrg#ifdef CL_VERSION_3_0
1127ec681f3Smrgtypedef cl_bitfield         cl_device_atomic_capabilities;
1137ec681f3Smrgtypedef cl_bitfield         cl_device_device_enqueue_capabilities;
1147ec681f3Smrgtypedef cl_uint             cl_khronos_vendor_id;
1157ec681f3Smrgtypedef cl_properties       cl_mem_properties;
1167ec681f3Smrgtypedef cl_uint             cl_version;
1177ec681f3Smrg#endif
118af69d88dSmrg
119af69d88dSmrgtypedef struct _cl_image_format {
120af69d88dSmrg    cl_channel_order        image_channel_order;
121af69d88dSmrg    cl_channel_type         image_channel_data_type;
122af69d88dSmrg} cl_image_format;
123af69d88dSmrg
12453c12917Smaya#ifdef CL_VERSION_1_2
12553c12917Smaya
126af69d88dSmrgtypedef struct _cl_image_desc {
127af69d88dSmrg    cl_mem_object_type      image_type;
128af69d88dSmrg    size_t                  image_width;
129af69d88dSmrg    size_t                  image_height;
130af69d88dSmrg    size_t                  image_depth;
131af69d88dSmrg    size_t                  image_array_size;
132af69d88dSmrg    size_t                  image_row_pitch;
133af69d88dSmrg    size_t                  image_slice_pitch;
134af69d88dSmrg    cl_uint                 num_mip_levels;
135af69d88dSmrg    cl_uint                 num_samples;
1367ec681f3Smrg#ifdef CL_VERSION_2_0
1377ec681f3Smrg#if __CL_HAS_ANON_STRUCT__
13853c12917Smaya#ifdef _MSC_VER
1397ec681f3Smrg#if _MSC_VER >= 1500
1407ec681f3Smrg#pragma warning( push )
14153c12917Smaya#pragma warning( disable : 4201 ) /* Prevents warning about nameless struct/union in /W4 /Za builds */
14253c12917Smaya#endif
1437ec681f3Smrg#endif
1447ec681f3Smrg    __CL_ANON_STRUCT__
14553c12917Smaya    union {
1467ec681f3Smrg#endif
1477ec681f3Smrg#endif
14853c12917Smaya      cl_mem                  buffer;
1497ec681f3Smrg#ifdef CL_VERSION_2_0
1507ec681f3Smrg#if __CL_HAS_ANON_STRUCT__
15153c12917Smaya      cl_mem                  mem_object;
15253c12917Smaya    };
15353c12917Smaya#ifdef _MSC_VER
1547ec681f3Smrg#if _MSC_VER >= 1500
1557ec681f3Smrg#pragma warning( pop )
1567ec681f3Smrg#endif
1577ec681f3Smrg#endif
1587ec681f3Smrg#endif
15953c12917Smaya#endif
160af69d88dSmrg} cl_image_desc;
161af69d88dSmrg
16253c12917Smaya#endif
16353c12917Smaya
16453c12917Smaya#ifdef CL_VERSION_1_1
16553c12917Smaya
166af69d88dSmrgtypedef struct _cl_buffer_region {
167af69d88dSmrg    size_t                  origin;
168af69d88dSmrg    size_t                  size;
169af69d88dSmrg} cl_buffer_region;
170af69d88dSmrg
17153c12917Smaya#endif
172af69d88dSmrg
1737ec681f3Smrg#ifdef CL_VERSION_3_0
1747ec681f3Smrg
1757ec681f3Smrg#define CL_NAME_VERSION_MAX_NAME_SIZE 64
1767ec681f3Smrg
1777ec681f3Smrgtypedef struct _cl_name_version {
1787ec681f3Smrg    cl_version              version;
1797ec681f3Smrg    char                    name[CL_NAME_VERSION_MAX_NAME_SIZE];
1807ec681f3Smrg} cl_name_version;
1817ec681f3Smrg
1827ec681f3Smrg#endif
1837ec681f3Smrg
184af69d88dSmrg/******************************************************************************/
185af69d88dSmrg
186af69d88dSmrg/* Error Codes */
187af69d88dSmrg#define CL_SUCCESS                                  0
188af69d88dSmrg#define CL_DEVICE_NOT_FOUND                         -1
189af69d88dSmrg#define CL_DEVICE_NOT_AVAILABLE                     -2
190af69d88dSmrg#define CL_COMPILER_NOT_AVAILABLE                   -3
191af69d88dSmrg#define CL_MEM_OBJECT_ALLOCATION_FAILURE            -4
192af69d88dSmrg#define CL_OUT_OF_RESOURCES                         -5
193af69d88dSmrg#define CL_OUT_OF_HOST_MEMORY                       -6
194af69d88dSmrg#define CL_PROFILING_INFO_NOT_AVAILABLE             -7
195af69d88dSmrg#define CL_MEM_COPY_OVERLAP                         -8
196af69d88dSmrg#define CL_IMAGE_FORMAT_MISMATCH                    -9
197af69d88dSmrg#define CL_IMAGE_FORMAT_NOT_SUPPORTED               -10
198af69d88dSmrg#define CL_BUILD_PROGRAM_FAILURE                    -11
199af69d88dSmrg#define CL_MAP_FAILURE                              -12
20053c12917Smaya#ifdef CL_VERSION_1_1
201af69d88dSmrg#define CL_MISALIGNED_SUB_BUFFER_OFFSET             -13
202af69d88dSmrg#define CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST -14
20353c12917Smaya#endif
20453c12917Smaya#ifdef CL_VERSION_1_2
205af69d88dSmrg#define CL_COMPILE_PROGRAM_FAILURE                  -15
206af69d88dSmrg#define CL_LINKER_NOT_AVAILABLE                     -16
207af69d88dSmrg#define CL_LINK_PROGRAM_FAILURE                     -17
208af69d88dSmrg#define CL_DEVICE_PARTITION_FAILED                  -18
209af69d88dSmrg#define CL_KERNEL_ARG_INFO_NOT_AVAILABLE            -19
21053c12917Smaya#endif
211af69d88dSmrg
212af69d88dSmrg#define CL_INVALID_VALUE                            -30
213af69d88dSmrg#define CL_INVALID_DEVICE_TYPE                      -31
214af69d88dSmrg#define CL_INVALID_PLATFORM                         -32
215af69d88dSmrg#define CL_INVALID_DEVICE                           -33
216af69d88dSmrg#define CL_INVALID_CONTEXT                          -34
217af69d88dSmrg#define CL_INVALID_QUEUE_PROPERTIES                 -35
218af69d88dSmrg#define CL_INVALID_COMMAND_QUEUE                    -36
219af69d88dSmrg#define CL_INVALID_HOST_PTR                         -37
220af69d88dSmrg#define CL_INVALID_MEM_OBJECT                       -38
221af69d88dSmrg#define CL_INVALID_IMAGE_FORMAT_DESCRIPTOR          -39
222af69d88dSmrg#define CL_INVALID_IMAGE_SIZE                       -40
223af69d88dSmrg#define CL_INVALID_SAMPLER                          -41
224af69d88dSmrg#define CL_INVALID_BINARY                           -42
225af69d88dSmrg#define CL_INVALID_BUILD_OPTIONS                    -43
226af69d88dSmrg#define CL_INVALID_PROGRAM                          -44
227af69d88dSmrg#define CL_INVALID_PROGRAM_EXECUTABLE               -45
228af69d88dSmrg#define CL_INVALID_KERNEL_NAME                      -46
229af69d88dSmrg#define CL_INVALID_KERNEL_DEFINITION                -47
230af69d88dSmrg#define CL_INVALID_KERNEL                           -48
231af69d88dSmrg#define CL_INVALID_ARG_INDEX                        -49
232af69d88dSmrg#define CL_INVALID_ARG_VALUE                        -50
233af69d88dSmrg#define CL_INVALID_ARG_SIZE                         -51
234af69d88dSmrg#define CL_INVALID_KERNEL_ARGS                      -52
235af69d88dSmrg#define CL_INVALID_WORK_DIMENSION                   -53
236af69d88dSmrg#define CL_INVALID_WORK_GROUP_SIZE                  -54
237af69d88dSmrg#define CL_INVALID_WORK_ITEM_SIZE                   -55
238af69d88dSmrg#define CL_INVALID_GLOBAL_OFFSET                    -56
239af69d88dSmrg#define CL_INVALID_EVENT_WAIT_LIST                  -57
240af69d88dSmrg#define CL_INVALID_EVENT                            -58
241af69d88dSmrg#define CL_INVALID_OPERATION                        -59
242af69d88dSmrg#define CL_INVALID_GL_OBJECT                        -60
243af69d88dSmrg#define CL_INVALID_BUFFER_SIZE                      -61
244af69d88dSmrg#define CL_INVALID_MIP_LEVEL                        -62
245af69d88dSmrg#define CL_INVALID_GLOBAL_WORK_SIZE                 -63
24653c12917Smaya#ifdef CL_VERSION_1_1
247af69d88dSmrg#define CL_INVALID_PROPERTY                         -64
24853c12917Smaya#endif
24953c12917Smaya#ifdef CL_VERSION_1_2
250af69d88dSmrg#define CL_INVALID_IMAGE_DESCRIPTOR                 -65
251af69d88dSmrg#define CL_INVALID_COMPILER_OPTIONS                 -66
252af69d88dSmrg#define CL_INVALID_LINKER_OPTIONS                   -67
253af69d88dSmrg#define CL_INVALID_DEVICE_PARTITION_COUNT           -68
25453c12917Smaya#endif
25553c12917Smaya#ifdef CL_VERSION_2_0
25653c12917Smaya#define CL_INVALID_PIPE_SIZE                        -69
25753c12917Smaya#define CL_INVALID_DEVICE_QUEUE                     -70
25853c12917Smaya#endif
25953c12917Smaya#ifdef CL_VERSION_2_2
26053c12917Smaya#define CL_INVALID_SPEC_ID                          -71
26153c12917Smaya#define CL_MAX_SIZE_RESTRICTION_EXCEEDED            -72
26253c12917Smaya#endif
263af69d88dSmrg
264af69d88dSmrg
265af69d88dSmrg/* cl_bool */
266af69d88dSmrg#define CL_FALSE                                    0
267af69d88dSmrg#define CL_TRUE                                     1
26853c12917Smaya#ifdef CL_VERSION_1_2
269af69d88dSmrg#define CL_BLOCKING                                 CL_TRUE
270af69d88dSmrg#define CL_NON_BLOCKING                             CL_FALSE
27153c12917Smaya#endif
272af69d88dSmrg
273af69d88dSmrg/* cl_platform_info */
274af69d88dSmrg#define CL_PLATFORM_PROFILE                         0x0900
275af69d88dSmrg#define CL_PLATFORM_VERSION                         0x0901
276af69d88dSmrg#define CL_PLATFORM_NAME                            0x0902
277af69d88dSmrg#define CL_PLATFORM_VENDOR                          0x0903
278af69d88dSmrg#define CL_PLATFORM_EXTENSIONS                      0x0904
27953c12917Smaya#ifdef CL_VERSION_2_1
28053c12917Smaya#define CL_PLATFORM_HOST_TIMER_RESOLUTION           0x0905
28153c12917Smaya#endif
2827ec681f3Smrg#ifdef CL_VERSION_3_0
2837ec681f3Smrg#define CL_PLATFORM_NUMERIC_VERSION                 0x0906
2847ec681f3Smrg#define CL_PLATFORM_EXTENSIONS_WITH_VERSION         0x0907
2857ec681f3Smrg#endif
286af69d88dSmrg
287af69d88dSmrg/* cl_device_type - bitfield */
288af69d88dSmrg#define CL_DEVICE_TYPE_DEFAULT                      (1 << 0)
289af69d88dSmrg#define CL_DEVICE_TYPE_CPU                          (1 << 1)
290af69d88dSmrg#define CL_DEVICE_TYPE_GPU                          (1 << 2)
291af69d88dSmrg#define CL_DEVICE_TYPE_ACCELERATOR                  (1 << 3)
29253c12917Smaya#ifdef CL_VERSION_1_2
293af69d88dSmrg#define CL_DEVICE_TYPE_CUSTOM                       (1 << 4)
29453c12917Smaya#endif
295af69d88dSmrg#define CL_DEVICE_TYPE_ALL                          0xFFFFFFFF
296af69d88dSmrg
297af69d88dSmrg/* cl_device_info */
29853c12917Smaya#define CL_DEVICE_TYPE                                   0x1000
29953c12917Smaya#define CL_DEVICE_VENDOR_ID                              0x1001
30053c12917Smaya#define CL_DEVICE_MAX_COMPUTE_UNITS                      0x1002
30153c12917Smaya#define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS               0x1003
30253c12917Smaya#define CL_DEVICE_MAX_WORK_GROUP_SIZE                    0x1004
30353c12917Smaya#define CL_DEVICE_MAX_WORK_ITEM_SIZES                    0x1005
30453c12917Smaya#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR            0x1006
30553c12917Smaya#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT           0x1007
30653c12917Smaya#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT             0x1008
30753c12917Smaya#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG            0x1009
30853c12917Smaya#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT           0x100A
30953c12917Smaya#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE          0x100B
31053c12917Smaya#define CL_DEVICE_MAX_CLOCK_FREQUENCY                    0x100C
31153c12917Smaya#define CL_DEVICE_ADDRESS_BITS                           0x100D
31253c12917Smaya#define CL_DEVICE_MAX_READ_IMAGE_ARGS                    0x100E
31353c12917Smaya#define CL_DEVICE_MAX_WRITE_IMAGE_ARGS                   0x100F
31453c12917Smaya#define CL_DEVICE_MAX_MEM_ALLOC_SIZE                     0x1010
31553c12917Smaya#define CL_DEVICE_IMAGE2D_MAX_WIDTH                      0x1011
31653c12917Smaya#define CL_DEVICE_IMAGE2D_MAX_HEIGHT                     0x1012
31753c12917Smaya#define CL_DEVICE_IMAGE3D_MAX_WIDTH                      0x1013
31853c12917Smaya#define CL_DEVICE_IMAGE3D_MAX_HEIGHT                     0x1014
31953c12917Smaya#define CL_DEVICE_IMAGE3D_MAX_DEPTH                      0x1015
32053c12917Smaya#define CL_DEVICE_IMAGE_SUPPORT                          0x1016
32153c12917Smaya#define CL_DEVICE_MAX_PARAMETER_SIZE                     0x1017
32253c12917Smaya#define CL_DEVICE_MAX_SAMPLERS                           0x1018
32353c12917Smaya#define CL_DEVICE_MEM_BASE_ADDR_ALIGN                    0x1019
32453c12917Smaya#define CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE               0x101A
32553c12917Smaya#define CL_DEVICE_SINGLE_FP_CONFIG                       0x101B
32653c12917Smaya#define CL_DEVICE_GLOBAL_MEM_CACHE_TYPE                  0x101C
32753c12917Smaya#define CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE              0x101D
32853c12917Smaya#define CL_DEVICE_GLOBAL_MEM_CACHE_SIZE                  0x101E
32953c12917Smaya#define CL_DEVICE_GLOBAL_MEM_SIZE                        0x101F
33053c12917Smaya#define CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE               0x1020
33153c12917Smaya#define CL_DEVICE_MAX_CONSTANT_ARGS                      0x1021
33253c12917Smaya#define CL_DEVICE_LOCAL_MEM_TYPE                         0x1022
33353c12917Smaya#define CL_DEVICE_LOCAL_MEM_SIZE                         0x1023
33453c12917Smaya#define CL_DEVICE_ERROR_CORRECTION_SUPPORT               0x1024
33553c12917Smaya#define CL_DEVICE_PROFILING_TIMER_RESOLUTION             0x1025
33653c12917Smaya#define CL_DEVICE_ENDIAN_LITTLE                          0x1026
33753c12917Smaya#define CL_DEVICE_AVAILABLE                              0x1027
33853c12917Smaya#define CL_DEVICE_COMPILER_AVAILABLE                     0x1028
33953c12917Smaya#define CL_DEVICE_EXECUTION_CAPABILITIES                 0x1029
34053c12917Smaya#define CL_DEVICE_QUEUE_PROPERTIES                       0x102A    /* deprecated */
34153c12917Smaya#ifdef CL_VERSION_2_0
34253c12917Smaya#define CL_DEVICE_QUEUE_ON_HOST_PROPERTIES               0x102A
34353c12917Smaya#endif
34453c12917Smaya#define CL_DEVICE_NAME                                   0x102B
34553c12917Smaya#define CL_DEVICE_VENDOR                                 0x102C
34653c12917Smaya#define CL_DRIVER_VERSION                                0x102D
34753c12917Smaya#define CL_DEVICE_PROFILE                                0x102E
34853c12917Smaya#define CL_DEVICE_VERSION                                0x102F
34953c12917Smaya#define CL_DEVICE_EXTENSIONS                             0x1030
35053c12917Smaya#define CL_DEVICE_PLATFORM                               0x1031
35153c12917Smaya#ifdef CL_VERSION_1_2
35253c12917Smaya#define CL_DEVICE_DOUBLE_FP_CONFIG                       0x1032
35353c12917Smaya#endif
35453c12917Smaya/* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG which is already defined in "cl_ext.h" */
35553c12917Smaya#ifdef CL_VERSION_1_1
35653c12917Smaya#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF            0x1034
35753c12917Smaya#define CL_DEVICE_HOST_UNIFIED_MEMORY                    0x1035   /* deprecated */
35853c12917Smaya#define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR               0x1036
35953c12917Smaya#define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT              0x1037
36053c12917Smaya#define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT                0x1038
36153c12917Smaya#define CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG               0x1039
36253c12917Smaya#define CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT              0x103A
36353c12917Smaya#define CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE             0x103B
36453c12917Smaya#define CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF               0x103C
36553c12917Smaya#define CL_DEVICE_OPENCL_C_VERSION                       0x103D
36653c12917Smaya#endif
36753c12917Smaya#ifdef CL_VERSION_1_2
36853c12917Smaya#define CL_DEVICE_LINKER_AVAILABLE                       0x103E
36953c12917Smaya#define CL_DEVICE_BUILT_IN_KERNELS                       0x103F
37053c12917Smaya#define CL_DEVICE_IMAGE_MAX_BUFFER_SIZE                  0x1040
37153c12917Smaya#define CL_DEVICE_IMAGE_MAX_ARRAY_SIZE                   0x1041
37253c12917Smaya#define CL_DEVICE_PARENT_DEVICE                          0x1042
37353c12917Smaya#define CL_DEVICE_PARTITION_MAX_SUB_DEVICES              0x1043
37453c12917Smaya#define CL_DEVICE_PARTITION_PROPERTIES                   0x1044
37553c12917Smaya#define CL_DEVICE_PARTITION_AFFINITY_DOMAIN              0x1045
37653c12917Smaya#define CL_DEVICE_PARTITION_TYPE                         0x1046
37753c12917Smaya#define CL_DEVICE_REFERENCE_COUNT                        0x1047
37853c12917Smaya#define CL_DEVICE_PREFERRED_INTEROP_USER_SYNC            0x1048
37953c12917Smaya#define CL_DEVICE_PRINTF_BUFFER_SIZE                     0x1049
38053c12917Smaya#endif
38153c12917Smaya#ifdef CL_VERSION_2_0
3827ec681f3Smrg#define CL_DEVICE_IMAGE_PITCH_ALIGNMENT                  0x104A
3837ec681f3Smrg#define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT           0x104B
38453c12917Smaya#define CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS              0x104C
38553c12917Smaya#define CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE               0x104D
38653c12917Smaya#define CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES             0x104E
38753c12917Smaya#define CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE         0x104F
38853c12917Smaya#define CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE               0x1050
38953c12917Smaya#define CL_DEVICE_MAX_ON_DEVICE_QUEUES                   0x1051
39053c12917Smaya#define CL_DEVICE_MAX_ON_DEVICE_EVENTS                   0x1052
39153c12917Smaya#define CL_DEVICE_SVM_CAPABILITIES                       0x1053
39253c12917Smaya#define CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE   0x1054
39353c12917Smaya#define CL_DEVICE_MAX_PIPE_ARGS                          0x1055
39453c12917Smaya#define CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS           0x1056
39553c12917Smaya#define CL_DEVICE_PIPE_MAX_PACKET_SIZE                   0x1057
39653c12917Smaya#define CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT    0x1058
39753c12917Smaya#define CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT      0x1059
39853c12917Smaya#define CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT       0x105A
39953c12917Smaya#endif
40053c12917Smaya#ifdef CL_VERSION_2_1
40153c12917Smaya#define CL_DEVICE_IL_VERSION                             0x105B
40253c12917Smaya#define CL_DEVICE_MAX_NUM_SUB_GROUPS                     0x105C
40353c12917Smaya#define CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS 0x105D
40453c12917Smaya#endif
4057ec681f3Smrg#ifdef CL_VERSION_3_0
4067ec681f3Smrg#define CL_DEVICE_NUMERIC_VERSION                        0x105E
4077ec681f3Smrg#define CL_DEVICE_EXTENSIONS_WITH_VERSION                0x1060
4087ec681f3Smrg#define CL_DEVICE_ILS_WITH_VERSION                       0x1061
4097ec681f3Smrg#define CL_DEVICE_BUILT_IN_KERNELS_WITH_VERSION          0x1062
4107ec681f3Smrg#define CL_DEVICE_ATOMIC_MEMORY_CAPABILITIES             0x1063
4117ec681f3Smrg#define CL_DEVICE_ATOMIC_FENCE_CAPABILITIES              0x1064
4127ec681f3Smrg#define CL_DEVICE_NON_UNIFORM_WORK_GROUP_SUPPORT         0x1065
4137ec681f3Smrg#define CL_DEVICE_OPENCL_C_ALL_VERSIONS                  0x1066
4147ec681f3Smrg#define CL_DEVICE_PREFERRED_WORK_GROUP_SIZE_MULTIPLE     0x1067
4157ec681f3Smrg#define CL_DEVICE_WORK_GROUP_COLLECTIVE_FUNCTIONS_SUPPORT 0x1068
4167ec681f3Smrg#define CL_DEVICE_GENERIC_ADDRESS_SPACE_SUPPORT          0x1069
4177ec681f3Smrg/* 0x106A to 0x106E - Reserved for upcoming KHR extension */
4187ec681f3Smrg#define CL_DEVICE_OPENCL_C_FEATURES                      0x106F
4197ec681f3Smrg#define CL_DEVICE_DEVICE_ENQUEUE_CAPABILITIES            0x1070
4207ec681f3Smrg#define CL_DEVICE_PIPE_SUPPORT                           0x1071
4217ec681f3Smrg#define CL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED      0x1072
4227ec681f3Smrg#endif
423af69d88dSmrg
424af69d88dSmrg/* cl_device_fp_config - bitfield */
425af69d88dSmrg#define CL_FP_DENORM                                (1 << 0)
426af69d88dSmrg#define CL_FP_INF_NAN                               (1 << 1)
427af69d88dSmrg#define CL_FP_ROUND_TO_NEAREST                      (1 << 2)
428af69d88dSmrg#define CL_FP_ROUND_TO_ZERO                         (1 << 3)
429af69d88dSmrg#define CL_FP_ROUND_TO_INF                          (1 << 4)
430af69d88dSmrg#define CL_FP_FMA                                   (1 << 5)
43153c12917Smaya#ifdef CL_VERSION_1_1
432af69d88dSmrg#define CL_FP_SOFT_FLOAT                            (1 << 6)
43353c12917Smaya#endif
43453c12917Smaya#ifdef CL_VERSION_1_2
435af69d88dSmrg#define CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT         (1 << 7)
43653c12917Smaya#endif
437af69d88dSmrg
438af69d88dSmrg/* cl_device_mem_cache_type */
439af69d88dSmrg#define CL_NONE                                     0x0
440af69d88dSmrg#define CL_READ_ONLY_CACHE                          0x1
441af69d88dSmrg#define CL_READ_WRITE_CACHE                         0x2
442af69d88dSmrg
443af69d88dSmrg/* cl_device_local_mem_type */
444af69d88dSmrg#define CL_LOCAL                                    0x1
445af69d88dSmrg#define CL_GLOBAL                                   0x2
446af69d88dSmrg
447af69d88dSmrg/* cl_device_exec_capabilities - bitfield */
448af69d88dSmrg#define CL_EXEC_KERNEL                              (1 << 0)
449af69d88dSmrg#define CL_EXEC_NATIVE_KERNEL                       (1 << 1)
450af69d88dSmrg
451af69d88dSmrg/* cl_command_queue_properties - bitfield */
452af69d88dSmrg#define CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE      (1 << 0)
453af69d88dSmrg#define CL_QUEUE_PROFILING_ENABLE                   (1 << 1)
45453c12917Smaya#ifdef CL_VERSION_2_0
45553c12917Smaya#define CL_QUEUE_ON_DEVICE                          (1 << 2)
45653c12917Smaya#define CL_QUEUE_ON_DEVICE_DEFAULT                  (1 << 3)
45753c12917Smaya#endif
458af69d88dSmrg
45953c12917Smaya/* cl_context_info */
460af69d88dSmrg#define CL_CONTEXT_REFERENCE_COUNT                  0x1080
461af69d88dSmrg#define CL_CONTEXT_DEVICES                          0x1081
462af69d88dSmrg#define CL_CONTEXT_PROPERTIES                       0x1082
46353c12917Smaya#ifdef CL_VERSION_1_1
464af69d88dSmrg#define CL_CONTEXT_NUM_DEVICES                      0x1083
46553c12917Smaya#endif
466af69d88dSmrg
467af69d88dSmrg/* cl_context_properties */
468af69d88dSmrg#define CL_CONTEXT_PLATFORM                         0x1084
46953c12917Smaya#ifdef CL_VERSION_1_2
470af69d88dSmrg#define CL_CONTEXT_INTEROP_USER_SYNC                0x1085
47153c12917Smaya#endif
47253c12917Smaya
47353c12917Smaya#ifdef CL_VERSION_1_2
47453c12917Smaya
475af69d88dSmrg/* cl_device_partition_property */
476af69d88dSmrg#define CL_DEVICE_PARTITION_EQUALLY                 0x1086
477af69d88dSmrg#define CL_DEVICE_PARTITION_BY_COUNTS               0x1087
478af69d88dSmrg#define CL_DEVICE_PARTITION_BY_COUNTS_LIST_END      0x0
479af69d88dSmrg#define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN      0x1088
48053c12917Smaya
48153c12917Smaya#endif
48253c12917Smaya
48353c12917Smaya#ifdef CL_VERSION_1_2
48453c12917Smaya
485af69d88dSmrg/* cl_device_affinity_domain */
48653c12917Smaya#define CL_DEVICE_AFFINITY_DOMAIN_NUMA               (1 << 0)
48753c12917Smaya#define CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE           (1 << 1)
48853c12917Smaya#define CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE           (1 << 2)
48953c12917Smaya#define CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE           (1 << 3)
49053c12917Smaya#define CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE           (1 << 4)
49153c12917Smaya#define CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE (1 << 5)
49253c12917Smaya
49353c12917Smaya#endif
49453c12917Smaya
49553c12917Smaya#ifdef CL_VERSION_2_0
49653c12917Smaya
49753c12917Smaya/* cl_device_svm_capabilities */
49853c12917Smaya#define CL_DEVICE_SVM_COARSE_GRAIN_BUFFER           (1 << 0)
49953c12917Smaya#define CL_DEVICE_SVM_FINE_GRAIN_BUFFER             (1 << 1)
50053c12917Smaya#define CL_DEVICE_SVM_FINE_GRAIN_SYSTEM             (1 << 2)
50153c12917Smaya#define CL_DEVICE_SVM_ATOMICS                       (1 << 3)
50253c12917Smaya
50353c12917Smaya#endif
504af69d88dSmrg
505af69d88dSmrg/* cl_command_queue_info */
506af69d88dSmrg#define CL_QUEUE_CONTEXT                            0x1090
507af69d88dSmrg#define CL_QUEUE_DEVICE                             0x1091
508af69d88dSmrg#define CL_QUEUE_REFERENCE_COUNT                    0x1092
509af69d88dSmrg#define CL_QUEUE_PROPERTIES                         0x1093
51053c12917Smaya#ifdef CL_VERSION_2_0
51153c12917Smaya#define CL_QUEUE_SIZE                               0x1094
51253c12917Smaya#endif
51353c12917Smaya#ifdef CL_VERSION_2_1
51453c12917Smaya#define CL_QUEUE_DEVICE_DEFAULT                     0x1095
51553c12917Smaya#endif
5167ec681f3Smrg#ifdef CL_VERSION_3_0
5177ec681f3Smrg#define CL_QUEUE_PROPERTIES_ARRAY                   0x1098
5187ec681f3Smrg#endif
519af69d88dSmrg
52053c12917Smaya/* cl_mem_flags and cl_svm_mem_flags - bitfield */
521af69d88dSmrg#define CL_MEM_READ_WRITE                           (1 << 0)
522af69d88dSmrg#define CL_MEM_WRITE_ONLY                           (1 << 1)
523af69d88dSmrg#define CL_MEM_READ_ONLY                            (1 << 2)
524af69d88dSmrg#define CL_MEM_USE_HOST_PTR                         (1 << 3)
525af69d88dSmrg#define CL_MEM_ALLOC_HOST_PTR                       (1 << 4)
526af69d88dSmrg#define CL_MEM_COPY_HOST_PTR                        (1 << 5)
527af69d88dSmrg/* reserved                                         (1 << 6)    */
52853c12917Smaya#ifdef CL_VERSION_1_2
529af69d88dSmrg#define CL_MEM_HOST_WRITE_ONLY                      (1 << 7)
530af69d88dSmrg#define CL_MEM_HOST_READ_ONLY                       (1 << 8)
531af69d88dSmrg#define CL_MEM_HOST_NO_ACCESS                       (1 << 9)
53253c12917Smaya#endif
53353c12917Smaya#ifdef CL_VERSION_2_0
53453c12917Smaya#define CL_MEM_SVM_FINE_GRAIN_BUFFER                (1 << 10)   /* used by cl_svm_mem_flags only */
53553c12917Smaya#define CL_MEM_SVM_ATOMICS                          (1 << 11)   /* used by cl_svm_mem_flags only */
53653c12917Smaya#define CL_MEM_KERNEL_READ_AND_WRITE                (1 << 12)
53753c12917Smaya#endif
53853c12917Smaya
53953c12917Smaya#ifdef CL_VERSION_1_2
540af69d88dSmrg
541af69d88dSmrg/* cl_mem_migration_flags - bitfield */
542af69d88dSmrg#define CL_MIGRATE_MEM_OBJECT_HOST                  (1 << 0)
543af69d88dSmrg#define CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED     (1 << 1)
544af69d88dSmrg
54553c12917Smaya#endif
54653c12917Smaya
547af69d88dSmrg/* cl_channel_order */
548af69d88dSmrg#define CL_R                                        0x10B0
549af69d88dSmrg#define CL_A                                        0x10B1
550af69d88dSmrg#define CL_RG                                       0x10B2
551af69d88dSmrg#define CL_RA                                       0x10B3
552af69d88dSmrg#define CL_RGB                                      0x10B4
553af69d88dSmrg#define CL_RGBA                                     0x10B5
554af69d88dSmrg#define CL_BGRA                                     0x10B6
555af69d88dSmrg#define CL_ARGB                                     0x10B7
556af69d88dSmrg#define CL_INTENSITY                                0x10B8
557af69d88dSmrg#define CL_LUMINANCE                                0x10B9
55853c12917Smaya#ifdef CL_VERSION_1_1
559af69d88dSmrg#define CL_Rx                                       0x10BA
560af69d88dSmrg#define CL_RGx                                      0x10BB
561af69d88dSmrg#define CL_RGBx                                     0x10BC
56253c12917Smaya#endif
56353c12917Smaya#ifdef CL_VERSION_1_2
564af69d88dSmrg#define CL_DEPTH                                    0x10BD
565af69d88dSmrg#define CL_DEPTH_STENCIL                            0x10BE
56653c12917Smaya#endif
56753c12917Smaya#ifdef CL_VERSION_2_0
56853c12917Smaya#define CL_sRGB                                     0x10BF
56953c12917Smaya#define CL_sRGBx                                    0x10C0
57053c12917Smaya#define CL_sRGBA                                    0x10C1
57153c12917Smaya#define CL_sBGRA                                    0x10C2
57253c12917Smaya#define CL_ABGR                                     0x10C3
57353c12917Smaya#endif
574af69d88dSmrg
575af69d88dSmrg/* cl_channel_type */
576af69d88dSmrg#define CL_SNORM_INT8                               0x10D0
577af69d88dSmrg#define CL_SNORM_INT16                              0x10D1
578af69d88dSmrg#define CL_UNORM_INT8                               0x10D2
579af69d88dSmrg#define CL_UNORM_INT16                              0x10D3
580af69d88dSmrg#define CL_UNORM_SHORT_565                          0x10D4
581af69d88dSmrg#define CL_UNORM_SHORT_555                          0x10D5
582af69d88dSmrg#define CL_UNORM_INT_101010                         0x10D6
583af69d88dSmrg#define CL_SIGNED_INT8                              0x10D7
584af69d88dSmrg#define CL_SIGNED_INT16                             0x10D8
585af69d88dSmrg#define CL_SIGNED_INT32                             0x10D9
586af69d88dSmrg#define CL_UNSIGNED_INT8                            0x10DA
587af69d88dSmrg#define CL_UNSIGNED_INT16                           0x10DB
588af69d88dSmrg#define CL_UNSIGNED_INT32                           0x10DC
589af69d88dSmrg#define CL_HALF_FLOAT                               0x10DD
590af69d88dSmrg#define CL_FLOAT                                    0x10DE
59153c12917Smaya#ifdef CL_VERSION_1_2
592af69d88dSmrg#define CL_UNORM_INT24                              0x10DF
59353c12917Smaya#endif
59453c12917Smaya#ifdef CL_VERSION_2_1
59553c12917Smaya#define CL_UNORM_INT_101010_2                       0x10E0
59653c12917Smaya#endif
597af69d88dSmrg
598af69d88dSmrg/* cl_mem_object_type */
599af69d88dSmrg#define CL_MEM_OBJECT_BUFFER                        0x10F0
600af69d88dSmrg#define CL_MEM_OBJECT_IMAGE2D                       0x10F1
601af69d88dSmrg#define CL_MEM_OBJECT_IMAGE3D                       0x10F2
60253c12917Smaya#ifdef CL_VERSION_1_2
603af69d88dSmrg#define CL_MEM_OBJECT_IMAGE2D_ARRAY                 0x10F3
604af69d88dSmrg#define CL_MEM_OBJECT_IMAGE1D                       0x10F4
605af69d88dSmrg#define CL_MEM_OBJECT_IMAGE1D_ARRAY                 0x10F5
606af69d88dSmrg#define CL_MEM_OBJECT_IMAGE1D_BUFFER                0x10F6
60753c12917Smaya#endif
60853c12917Smaya#ifdef CL_VERSION_2_0
60953c12917Smaya#define CL_MEM_OBJECT_PIPE                          0x10F7
61053c12917Smaya#endif
611af69d88dSmrg
612af69d88dSmrg/* cl_mem_info */
613af69d88dSmrg#define CL_MEM_TYPE                                 0x1100
614af69d88dSmrg#define CL_MEM_FLAGS                                0x1101
615af69d88dSmrg#define CL_MEM_SIZE                                 0x1102
616af69d88dSmrg#define CL_MEM_HOST_PTR                             0x1103
617af69d88dSmrg#define CL_MEM_MAP_COUNT                            0x1104
618af69d88dSmrg#define CL_MEM_REFERENCE_COUNT                      0x1105
619af69d88dSmrg#define CL_MEM_CONTEXT                              0x1106
62053c12917Smaya#ifdef CL_VERSION_1_1
621af69d88dSmrg#define CL_MEM_ASSOCIATED_MEMOBJECT                 0x1107
622af69d88dSmrg#define CL_MEM_OFFSET                               0x1108
62353c12917Smaya#endif
62453c12917Smaya#ifdef CL_VERSION_2_0
62553c12917Smaya#define CL_MEM_USES_SVM_POINTER                     0x1109
62653c12917Smaya#endif
6277ec681f3Smrg#ifdef CL_VERSION_3_0
6287ec681f3Smrg#define CL_MEM_PROPERTIES                           0x110A
6297ec681f3Smrg#endif
630af69d88dSmrg
631af69d88dSmrg/* cl_image_info */
632af69d88dSmrg#define CL_IMAGE_FORMAT                             0x1110
633af69d88dSmrg#define CL_IMAGE_ELEMENT_SIZE                       0x1111
634af69d88dSmrg#define CL_IMAGE_ROW_PITCH                          0x1112
635af69d88dSmrg#define CL_IMAGE_SLICE_PITCH                        0x1113
636af69d88dSmrg#define CL_IMAGE_WIDTH                              0x1114
637af69d88dSmrg#define CL_IMAGE_HEIGHT                             0x1115
638af69d88dSmrg#define CL_IMAGE_DEPTH                              0x1116
63953c12917Smaya#ifdef CL_VERSION_1_2
640af69d88dSmrg#define CL_IMAGE_ARRAY_SIZE                         0x1117
641af69d88dSmrg#define CL_IMAGE_BUFFER                             0x1118
642af69d88dSmrg#define CL_IMAGE_NUM_MIP_LEVELS                     0x1119
643af69d88dSmrg#define CL_IMAGE_NUM_SAMPLES                        0x111A
64453c12917Smaya#endif
64553c12917Smaya
64653c12917Smaya
64753c12917Smaya/* cl_pipe_info */
6487ec681f3Smrg#ifdef CL_VERSION_2_0
64953c12917Smaya#define CL_PIPE_PACKET_SIZE                         0x1120
65053c12917Smaya#define CL_PIPE_MAX_PACKETS                         0x1121
6517ec681f3Smrg#endif
6527ec681f3Smrg#ifdef CL_VERSION_3_0
6537ec681f3Smrg#define CL_PIPE_PROPERTIES                          0x1122
65453c12917Smaya#endif
655af69d88dSmrg
656af69d88dSmrg/* cl_addressing_mode */
657af69d88dSmrg#define CL_ADDRESS_NONE                             0x1130
658af69d88dSmrg#define CL_ADDRESS_CLAMP_TO_EDGE                    0x1131
659af69d88dSmrg#define CL_ADDRESS_CLAMP                            0x1132
660af69d88dSmrg#define CL_ADDRESS_REPEAT                           0x1133
66153c12917Smaya#ifdef CL_VERSION_1_1
662af69d88dSmrg#define CL_ADDRESS_MIRRORED_REPEAT                  0x1134
66353c12917Smaya#endif
664af69d88dSmrg
665af69d88dSmrg/* cl_filter_mode */
666af69d88dSmrg#define CL_FILTER_NEAREST                           0x1140
667af69d88dSmrg#define CL_FILTER_LINEAR                            0x1141
668af69d88dSmrg
669af69d88dSmrg/* cl_sampler_info */
670af69d88dSmrg#define CL_SAMPLER_REFERENCE_COUNT                  0x1150
671af69d88dSmrg#define CL_SAMPLER_CONTEXT                          0x1151
672af69d88dSmrg#define CL_SAMPLER_NORMALIZED_COORDS                0x1152
673af69d88dSmrg#define CL_SAMPLER_ADDRESSING_MODE                  0x1153
674af69d88dSmrg#define CL_SAMPLER_FILTER_MODE                      0x1154
67553c12917Smaya#ifdef CL_VERSION_2_0
67653c12917Smaya/* These enumerants are for the cl_khr_mipmap_image extension.
67753c12917Smaya   They have since been added to cl_ext.h with an appropriate
67853c12917Smaya   KHR suffix, but are left here for backwards compatibility. */
67953c12917Smaya#define CL_SAMPLER_MIP_FILTER_MODE                  0x1155
68053c12917Smaya#define CL_SAMPLER_LOD_MIN                          0x1156
68153c12917Smaya#define CL_SAMPLER_LOD_MAX                          0x1157
68253c12917Smaya#endif
6837ec681f3Smrg#ifdef CL_VERSION_3_0
6847ec681f3Smrg#define CL_SAMPLER_PROPERTIES                       0x1158
6857ec681f3Smrg#endif
686af69d88dSmrg
687af69d88dSmrg/* cl_map_flags - bitfield */
688af69d88dSmrg#define CL_MAP_READ                                 (1 << 0)
689af69d88dSmrg#define CL_MAP_WRITE                                (1 << 1)
69053c12917Smaya#ifdef CL_VERSION_1_2
691af69d88dSmrg#define CL_MAP_WRITE_INVALIDATE_REGION              (1 << 2)
69253c12917Smaya#endif
693af69d88dSmrg
694af69d88dSmrg/* cl_program_info */
695af69d88dSmrg#define CL_PROGRAM_REFERENCE_COUNT                  0x1160
696af69d88dSmrg#define CL_PROGRAM_CONTEXT                          0x1161
697af69d88dSmrg#define CL_PROGRAM_NUM_DEVICES                      0x1162
698af69d88dSmrg#define CL_PROGRAM_DEVICES                          0x1163
699af69d88dSmrg#define CL_PROGRAM_SOURCE                           0x1164
700af69d88dSmrg#define CL_PROGRAM_BINARY_SIZES                     0x1165
701af69d88dSmrg#define CL_PROGRAM_BINARIES                         0x1166
70253c12917Smaya#ifdef CL_VERSION_1_2
703af69d88dSmrg#define CL_PROGRAM_NUM_KERNELS                      0x1167
704af69d88dSmrg#define CL_PROGRAM_KERNEL_NAMES                     0x1168
70553c12917Smaya#endif
70653c12917Smaya#ifdef CL_VERSION_2_1
70753c12917Smaya#define CL_PROGRAM_IL                               0x1169
70853c12917Smaya#endif
70953c12917Smaya#ifdef CL_VERSION_2_2
71053c12917Smaya#define CL_PROGRAM_SCOPE_GLOBAL_CTORS_PRESENT       0x116A
71153c12917Smaya#define CL_PROGRAM_SCOPE_GLOBAL_DTORS_PRESENT       0x116B
71253c12917Smaya#endif
713af69d88dSmrg
714af69d88dSmrg/* cl_program_build_info */
715af69d88dSmrg#define CL_PROGRAM_BUILD_STATUS                     0x1181
716af69d88dSmrg#define CL_PROGRAM_BUILD_OPTIONS                    0x1182
717af69d88dSmrg#define CL_PROGRAM_BUILD_LOG                        0x1183
71853c12917Smaya#ifdef CL_VERSION_1_2
719af69d88dSmrg#define CL_PROGRAM_BINARY_TYPE                      0x1184
72053c12917Smaya#endif
72153c12917Smaya#ifdef CL_VERSION_2_0
72253c12917Smaya#define CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE 0x1185
72353c12917Smaya#endif
72453c12917Smaya
72553c12917Smaya#ifdef CL_VERSION_1_2
72653c12917Smaya
727af69d88dSmrg/* cl_program_binary_type */
728af69d88dSmrg#define CL_PROGRAM_BINARY_TYPE_NONE                 0x0
729af69d88dSmrg#define CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT      0x1
730af69d88dSmrg#define CL_PROGRAM_BINARY_TYPE_LIBRARY              0x2
731af69d88dSmrg#define CL_PROGRAM_BINARY_TYPE_EXECUTABLE           0x4
732af69d88dSmrg
73353c12917Smaya#endif
73453c12917Smaya
735af69d88dSmrg/* cl_build_status */
736af69d88dSmrg#define CL_BUILD_SUCCESS                            0
737af69d88dSmrg#define CL_BUILD_NONE                               -1
738af69d88dSmrg#define CL_BUILD_ERROR                              -2
739af69d88dSmrg#define CL_BUILD_IN_PROGRESS                        -3
740af69d88dSmrg
741af69d88dSmrg/* cl_kernel_info */
742af69d88dSmrg#define CL_KERNEL_FUNCTION_NAME                     0x1190
743af69d88dSmrg#define CL_KERNEL_NUM_ARGS                          0x1191
744af69d88dSmrg#define CL_KERNEL_REFERENCE_COUNT                   0x1192
745af69d88dSmrg#define CL_KERNEL_CONTEXT                           0x1193
746af69d88dSmrg#define CL_KERNEL_PROGRAM                           0x1194
74753c12917Smaya#ifdef CL_VERSION_1_2
748af69d88dSmrg#define CL_KERNEL_ATTRIBUTES                        0x1195
74953c12917Smaya#endif
75053c12917Smaya
75153c12917Smaya#ifdef CL_VERSION_1_2
752af69d88dSmrg
753af69d88dSmrg/* cl_kernel_arg_info */
754af69d88dSmrg#define CL_KERNEL_ARG_ADDRESS_QUALIFIER             0x1196
755af69d88dSmrg#define CL_KERNEL_ARG_ACCESS_QUALIFIER              0x1197
756af69d88dSmrg#define CL_KERNEL_ARG_TYPE_NAME                     0x1198
757af69d88dSmrg#define CL_KERNEL_ARG_TYPE_QUALIFIER                0x1199
758af69d88dSmrg#define CL_KERNEL_ARG_NAME                          0x119A
759af69d88dSmrg
76053c12917Smaya#endif
76153c12917Smaya
76253c12917Smaya#ifdef CL_VERSION_1_2
76353c12917Smaya
764af69d88dSmrg/* cl_kernel_arg_address_qualifier */
765af69d88dSmrg#define CL_KERNEL_ARG_ADDRESS_GLOBAL                0x119B
766af69d88dSmrg#define CL_KERNEL_ARG_ADDRESS_LOCAL                 0x119C
767af69d88dSmrg#define CL_KERNEL_ARG_ADDRESS_CONSTANT              0x119D
768af69d88dSmrg#define CL_KERNEL_ARG_ADDRESS_PRIVATE               0x119E
769af69d88dSmrg
77053c12917Smaya#endif
77153c12917Smaya
77253c12917Smaya#ifdef CL_VERSION_1_2
77353c12917Smaya
774af69d88dSmrg/* cl_kernel_arg_access_qualifier */
775af69d88dSmrg#define CL_KERNEL_ARG_ACCESS_READ_ONLY              0x11A0
776af69d88dSmrg#define CL_KERNEL_ARG_ACCESS_WRITE_ONLY             0x11A1
777af69d88dSmrg#define CL_KERNEL_ARG_ACCESS_READ_WRITE             0x11A2
778af69d88dSmrg#define CL_KERNEL_ARG_ACCESS_NONE                   0x11A3
77953c12917Smaya
78053c12917Smaya#endif
78153c12917Smaya
78253c12917Smaya#ifdef CL_VERSION_1_2
78353c12917Smaya
78453c12917Smaya/* cl_kernel_arg_type_qualifier */
785af69d88dSmrg#define CL_KERNEL_ARG_TYPE_NONE                     0
786af69d88dSmrg#define CL_KERNEL_ARG_TYPE_CONST                    (1 << 0)
787af69d88dSmrg#define CL_KERNEL_ARG_TYPE_RESTRICT                 (1 << 1)
788af69d88dSmrg#define CL_KERNEL_ARG_TYPE_VOLATILE                 (1 << 2)
78953c12917Smaya#ifdef CL_VERSION_2_0
79053c12917Smaya#define CL_KERNEL_ARG_TYPE_PIPE                     (1 << 3)
79153c12917Smaya#endif
79253c12917Smaya
79353c12917Smaya#endif
794af69d88dSmrg
795af69d88dSmrg/* cl_kernel_work_group_info */
796af69d88dSmrg#define CL_KERNEL_WORK_GROUP_SIZE                   0x11B0
797af69d88dSmrg#define CL_KERNEL_COMPILE_WORK_GROUP_SIZE           0x11B1
798af69d88dSmrg#define CL_KERNEL_LOCAL_MEM_SIZE                    0x11B2
799af69d88dSmrg#define CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x11B3
800af69d88dSmrg#define CL_KERNEL_PRIVATE_MEM_SIZE                  0x11B4
80153c12917Smaya#ifdef CL_VERSION_1_2
802af69d88dSmrg#define CL_KERNEL_GLOBAL_WORK_SIZE                  0x11B5
80353c12917Smaya#endif
80453c12917Smaya
80553c12917Smaya#ifdef CL_VERSION_2_1
806af69d88dSmrg
80753c12917Smaya/* cl_kernel_sub_group_info */
80853c12917Smaya#define CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE    0x2033
80953c12917Smaya#define CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE       0x2034
81053c12917Smaya#define CL_KERNEL_LOCAL_SIZE_FOR_SUB_GROUP_COUNT    0x11B8
8117ec681f3Smrg#define CL_KERNEL_MAX_NUM_SUB_GROUPS                0x11B9
8127ec681f3Smrg#define CL_KERNEL_COMPILE_NUM_SUB_GROUPS            0x11BA
81353c12917Smaya
81453c12917Smaya#endif
81553c12917Smaya
81653c12917Smaya#ifdef CL_VERSION_2_0
81753c12917Smaya
81853c12917Smaya/* cl_kernel_exec_info */
81953c12917Smaya#define CL_KERNEL_EXEC_INFO_SVM_PTRS                0x11B6
82053c12917Smaya#define CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM   0x11B7
82153c12917Smaya
82253c12917Smaya#endif
82353c12917Smaya
82453c12917Smaya/* cl_event_info */
825af69d88dSmrg#define CL_EVENT_COMMAND_QUEUE                      0x11D0
826af69d88dSmrg#define CL_EVENT_COMMAND_TYPE                       0x11D1
827af69d88dSmrg#define CL_EVENT_REFERENCE_COUNT                    0x11D2
828af69d88dSmrg#define CL_EVENT_COMMAND_EXECUTION_STATUS           0x11D3
82953c12917Smaya#ifdef CL_VERSION_1_1
830af69d88dSmrg#define CL_EVENT_CONTEXT                            0x11D4
83153c12917Smaya#endif
832af69d88dSmrg
833af69d88dSmrg/* cl_command_type */
834af69d88dSmrg#define CL_COMMAND_NDRANGE_KERNEL                   0x11F0
835af69d88dSmrg#define CL_COMMAND_TASK                             0x11F1
836af69d88dSmrg#define CL_COMMAND_NATIVE_KERNEL                    0x11F2
837af69d88dSmrg#define CL_COMMAND_READ_BUFFER                      0x11F3
838af69d88dSmrg#define CL_COMMAND_WRITE_BUFFER                     0x11F4
839af69d88dSmrg#define CL_COMMAND_COPY_BUFFER                      0x11F5
840af69d88dSmrg#define CL_COMMAND_READ_IMAGE                       0x11F6
841af69d88dSmrg#define CL_COMMAND_WRITE_IMAGE                      0x11F7
842af69d88dSmrg#define CL_COMMAND_COPY_IMAGE                       0x11F8
843af69d88dSmrg#define CL_COMMAND_COPY_IMAGE_TO_BUFFER             0x11F9
844af69d88dSmrg#define CL_COMMAND_COPY_BUFFER_TO_IMAGE             0x11FA
845af69d88dSmrg#define CL_COMMAND_MAP_BUFFER                       0x11FB
846af69d88dSmrg#define CL_COMMAND_MAP_IMAGE                        0x11FC
847af69d88dSmrg#define CL_COMMAND_UNMAP_MEM_OBJECT                 0x11FD
848af69d88dSmrg#define CL_COMMAND_MARKER                           0x11FE
849af69d88dSmrg#define CL_COMMAND_ACQUIRE_GL_OBJECTS               0x11FF
850af69d88dSmrg#define CL_COMMAND_RELEASE_GL_OBJECTS               0x1200
85153c12917Smaya#ifdef CL_VERSION_1_1
852af69d88dSmrg#define CL_COMMAND_READ_BUFFER_RECT                 0x1201
853af69d88dSmrg#define CL_COMMAND_WRITE_BUFFER_RECT                0x1202
854af69d88dSmrg#define CL_COMMAND_COPY_BUFFER_RECT                 0x1203
855af69d88dSmrg#define CL_COMMAND_USER                             0x1204
85653c12917Smaya#endif
85753c12917Smaya#ifdef CL_VERSION_1_2
858af69d88dSmrg#define CL_COMMAND_BARRIER                          0x1205
859af69d88dSmrg#define CL_COMMAND_MIGRATE_MEM_OBJECTS              0x1206
860af69d88dSmrg#define CL_COMMAND_FILL_BUFFER                      0x1207
861af69d88dSmrg#define CL_COMMAND_FILL_IMAGE                       0x1208
86253c12917Smaya#endif
86353c12917Smaya#ifdef CL_VERSION_2_0
86453c12917Smaya#define CL_COMMAND_SVM_FREE                         0x1209
86553c12917Smaya#define CL_COMMAND_SVM_MEMCPY                       0x120A
86653c12917Smaya#define CL_COMMAND_SVM_MEMFILL                      0x120B
86753c12917Smaya#define CL_COMMAND_SVM_MAP                          0x120C
86853c12917Smaya#define CL_COMMAND_SVM_UNMAP                        0x120D
86953c12917Smaya#endif
8707ec681f3Smrg#ifdef CL_VERSION_3_0
8717ec681f3Smrg#define CL_COMMAND_SVM_MIGRATE_MEM                  0x120E
8727ec681f3Smrg#endif
873af69d88dSmrg
874af69d88dSmrg/* command execution status */
875af69d88dSmrg#define CL_COMPLETE                                 0x0
876af69d88dSmrg#define CL_RUNNING                                  0x1
877af69d88dSmrg#define CL_SUBMITTED                                0x2
878af69d88dSmrg#define CL_QUEUED                                   0x3
879af69d88dSmrg
88053c12917Smaya/* cl_buffer_create_type */
8817ec681f3Smrg#ifdef CL_VERSION_1_1
882af69d88dSmrg#define CL_BUFFER_CREATE_TYPE_REGION                0x1220
88353c12917Smaya#endif
88453c12917Smaya
88553c12917Smaya/* cl_profiling_info */
886af69d88dSmrg#define CL_PROFILING_COMMAND_QUEUED                 0x1280
887af69d88dSmrg#define CL_PROFILING_COMMAND_SUBMIT                 0x1281
888af69d88dSmrg#define CL_PROFILING_COMMAND_START                  0x1282
889af69d88dSmrg#define CL_PROFILING_COMMAND_END                    0x1283
89053c12917Smaya#ifdef CL_VERSION_2_0
89153c12917Smaya#define CL_PROFILING_COMMAND_COMPLETE               0x1284
89253c12917Smaya#endif
893af69d88dSmrg
8947ec681f3Smrg/* cl_device_atomic_capabilities - bitfield */
8957ec681f3Smrg#ifdef CL_VERSION_3_0
8967ec681f3Smrg#define CL_DEVICE_ATOMIC_ORDER_RELAXED          (1 << 0)
8977ec681f3Smrg#define CL_DEVICE_ATOMIC_ORDER_ACQ_REL          (1 << 1)
8987ec681f3Smrg#define CL_DEVICE_ATOMIC_ORDER_SEQ_CST          (1 << 2)
8997ec681f3Smrg#define CL_DEVICE_ATOMIC_SCOPE_WORK_ITEM        (1 << 3)
9007ec681f3Smrg#define CL_DEVICE_ATOMIC_SCOPE_WORK_GROUP       (1 << 4)
9017ec681f3Smrg#define CL_DEVICE_ATOMIC_SCOPE_DEVICE           (1 << 5)
9027ec681f3Smrg#define CL_DEVICE_ATOMIC_SCOPE_ALL_DEVICES      (1 << 6)
9037ec681f3Smrg#endif
9047ec681f3Smrg
9057ec681f3Smrg/* cl_device_device_enqueue_capabilities - bitfield */
9067ec681f3Smrg#ifdef CL_VERSION_3_0
9077ec681f3Smrg#define CL_DEVICE_QUEUE_SUPPORTED               (1 << 0)
9087ec681f3Smrg#define CL_DEVICE_QUEUE_REPLACEABLE_DEFAULT     (1 << 1)
9097ec681f3Smrg#endif
9107ec681f3Smrg
9117ec681f3Smrg/* cl_khronos_vendor_id */
9127ec681f3Smrg#define CL_KHRONOS_VENDOR_ID_CODEPLAY               0x10004
9137ec681f3Smrg
9147ec681f3Smrg#ifdef CL_VERSION_3_0
9157ec681f3Smrg
9167ec681f3Smrg/* cl_version */
9177ec681f3Smrg#define CL_VERSION_MAJOR_BITS (10)
9187ec681f3Smrg#define CL_VERSION_MINOR_BITS (10)
9197ec681f3Smrg#define CL_VERSION_PATCH_BITS (12)
9207ec681f3Smrg
9217ec681f3Smrg#define CL_VERSION_MAJOR_MASK ((1 << CL_VERSION_MAJOR_BITS) - 1)
9227ec681f3Smrg#define CL_VERSION_MINOR_MASK ((1 << CL_VERSION_MINOR_BITS) - 1)
9237ec681f3Smrg#define CL_VERSION_PATCH_MASK ((1 << CL_VERSION_PATCH_BITS) - 1)
9247ec681f3Smrg
9257ec681f3Smrg#define CL_VERSION_MAJOR(version) \
9267ec681f3Smrg  ((version) >> (CL_VERSION_MINOR_BITS + CL_VERSION_PATCH_BITS))
9277ec681f3Smrg
9287ec681f3Smrg#define CL_VERSION_MINOR(version) \
9297ec681f3Smrg  (((version) >> CL_VERSION_PATCH_BITS) & CL_VERSION_MINOR_MASK)
9307ec681f3Smrg
9317ec681f3Smrg#define CL_VERSION_PATCH(version) ((version) & CL_VERSION_PATCH_MASK)
9327ec681f3Smrg
9337ec681f3Smrg#define CL_MAKE_VERSION(major, minor, patch)                      \
9347ec681f3Smrg  ((((major) & CL_VERSION_MAJOR_MASK)                             \
9357ec681f3Smrg       << (CL_VERSION_MINOR_BITS + CL_VERSION_PATCH_BITS)) |      \
9367ec681f3Smrg   (((minor) & CL_VERSION_MINOR_MASK) << CL_VERSION_PATCH_BITS) | \
9377ec681f3Smrg   ((patch) & CL_VERSION_PATCH_MASK))
9387ec681f3Smrg
9397ec681f3Smrg#endif
9407ec681f3Smrg
941af69d88dSmrg/********************************************************************************************************/
942af69d88dSmrg
943af69d88dSmrg/* Platform API */
944af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
94553c12917SmayaclGetPlatformIDs(cl_uint          num_entries,
94653c12917Smaya                 cl_platform_id * platforms,
94753c12917Smaya                 cl_uint *        num_platforms) CL_API_SUFFIX__VERSION_1_0;
948af69d88dSmrg
94953c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
95053c12917SmayaclGetPlatformInfo(cl_platform_id   platform,
95153c12917Smaya                  cl_platform_info param_name,
95253c12917Smaya                  size_t           param_value_size,
95353c12917Smaya                  void *           param_value,
95453c12917Smaya                  size_t *         param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
955af69d88dSmrg
956af69d88dSmrg/* Device APIs */
957af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
95853c12917SmayaclGetDeviceIDs(cl_platform_id   platform,
95953c12917Smaya               cl_device_type   device_type,
96053c12917Smaya               cl_uint          num_entries,
96153c12917Smaya               cl_device_id *   devices,
96253c12917Smaya               cl_uint *        num_devices) CL_API_SUFFIX__VERSION_1_0;
96353c12917Smaya
96453c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
96553c12917SmayaclGetDeviceInfo(cl_device_id    device,
96653c12917Smaya                cl_device_info  param_name,
96753c12917Smaya                size_t          param_value_size,
96853c12917Smaya                void *          param_value,
96953c12917Smaya                size_t *        param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
97053c12917Smaya
97153c12917Smaya#ifdef CL_VERSION_1_2
972af69d88dSmrg
973af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
97453c12917SmayaclCreateSubDevices(cl_device_id                         in_device,
97553c12917Smaya                   const cl_device_partition_property * properties,
97653c12917Smaya                   cl_uint                              num_devices,
97753c12917Smaya                   cl_device_id *                       out_devices,
97853c12917Smaya                   cl_uint *                            num_devices_ret) CL_API_SUFFIX__VERSION_1_2;
97953c12917Smaya
980af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
98153c12917SmayaclRetainDevice(cl_device_id device) CL_API_SUFFIX__VERSION_1_2;
982af69d88dSmrg
983af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
98453c12917SmayaclReleaseDevice(cl_device_id device) CL_API_SUFFIX__VERSION_1_2;
98553c12917Smaya
98653c12917Smaya#endif
98753c12917Smaya
98853c12917Smaya#ifdef CL_VERSION_2_1
98953c12917Smaya
99053c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
99153c12917SmayaclSetDefaultDeviceCommandQueue(cl_context           context,
99253c12917Smaya                               cl_device_id         device,
99353c12917Smaya                               cl_command_queue     command_queue) CL_API_SUFFIX__VERSION_2_1;
99453c12917Smaya
995af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
99653c12917SmayaclGetDeviceAndHostTimer(cl_device_id    device,
99753c12917Smaya                        cl_ulong*       device_timestamp,
99853c12917Smaya                        cl_ulong*       host_timestamp) CL_API_SUFFIX__VERSION_2_1;
99953c12917Smaya
100053c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
100153c12917SmayaclGetHostTimer(cl_device_id device,
100253c12917Smaya               cl_ulong *   host_timestamp) CL_API_SUFFIX__VERSION_2_1;
100353c12917Smaya
100453c12917Smaya#endif
100553c12917Smaya
100653c12917Smaya/* Context APIs */
1007af69d88dSmrgextern CL_API_ENTRY cl_context CL_API_CALL
100853c12917SmayaclCreateContext(const cl_context_properties * properties,
100953c12917Smaya                cl_uint              num_devices,
101053c12917Smaya                const cl_device_id * devices,
101153c12917Smaya                void (CL_CALLBACK * pfn_notify)(const char * errinfo,
101253c12917Smaya                                                const void * private_info,
101353c12917Smaya                                                size_t       cb,
101453c12917Smaya                                                void *       user_data),
101553c12917Smaya                void *               user_data,
101653c12917Smaya                cl_int *             errcode_ret) CL_API_SUFFIX__VERSION_1_0;
1017af69d88dSmrg
1018af69d88dSmrgextern CL_API_ENTRY cl_context CL_API_CALL
101953c12917SmayaclCreateContextFromType(const cl_context_properties * properties,
102053c12917Smaya                        cl_device_type      device_type,
102153c12917Smaya                        void (CL_CALLBACK * pfn_notify)(const char * errinfo,
102253c12917Smaya                                                        const void * private_info,
102353c12917Smaya                                                        size_t       cb,
102453c12917Smaya                                                        void *       user_data),
102553c12917Smaya                        void *              user_data,
102653c12917Smaya                        cl_int *            errcode_ret) CL_API_SUFFIX__VERSION_1_0;
1027af69d88dSmrg
1028af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
102953c12917SmayaclRetainContext(cl_context context) CL_API_SUFFIX__VERSION_1_0;
1030af69d88dSmrg
1031af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
103253c12917SmayaclReleaseContext(cl_context context) CL_API_SUFFIX__VERSION_1_0;
1033af69d88dSmrg
1034af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
103553c12917SmayaclGetContextInfo(cl_context         context,
103653c12917Smaya                 cl_context_info    param_name,
103753c12917Smaya                 size_t             param_value_size,
103853c12917Smaya                 void *             param_value,
103953c12917Smaya                 size_t *           param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
1040af69d88dSmrg
10417ec681f3Smrg#ifdef CL_VERSION_3_0
10427ec681f3Smrg
10437ec681f3Smrgextern CL_API_ENTRY cl_int CL_API_CALL
10447ec681f3SmrgclSetContextDestructorCallback(cl_context         context,
10457ec681f3Smrg                               void (CL_CALLBACK* pfn_notify)(cl_context context,
10467ec681f3Smrg                                                              void* user_data),
10477ec681f3Smrg                               void*              user_data) CL_API_SUFFIX__VERSION_3_0;
10487ec681f3Smrg
10497ec681f3Smrg#endif
10507ec681f3Smrg
1051af69d88dSmrg/* Command Queue APIs */
105253c12917Smaya
105353c12917Smaya#ifdef CL_VERSION_2_0
105453c12917Smaya
1055af69d88dSmrgextern CL_API_ENTRY cl_command_queue CL_API_CALL
105653c12917SmayaclCreateCommandQueueWithProperties(cl_context               context,
105753c12917Smaya                                   cl_device_id             device,
105853c12917Smaya                                   const cl_queue_properties *    properties,
105953c12917Smaya                                   cl_int *                 errcode_ret) CL_API_SUFFIX__VERSION_2_0;
106053c12917Smaya
106153c12917Smaya#endif
1062af69d88dSmrg
1063af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
106453c12917SmayaclRetainCommandQueue(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
1065af69d88dSmrg
1066af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
106753c12917SmayaclReleaseCommandQueue(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
1068af69d88dSmrg
1069af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
107053c12917SmayaclGetCommandQueueInfo(cl_command_queue      command_queue,
107153c12917Smaya                      cl_command_queue_info param_name,
107253c12917Smaya                      size_t                param_value_size,
107353c12917Smaya                      void *                param_value,
107453c12917Smaya                      size_t *              param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
1075af69d88dSmrg
1076af69d88dSmrg/* Memory Object APIs */
1077af69d88dSmrgextern CL_API_ENTRY cl_mem CL_API_CALL
107853c12917SmayaclCreateBuffer(cl_context   context,
107953c12917Smaya               cl_mem_flags flags,
108053c12917Smaya               size_t       size,
108153c12917Smaya               void *       host_ptr,
108253c12917Smaya               cl_int *     errcode_ret) CL_API_SUFFIX__VERSION_1_0;
108353c12917Smaya
108453c12917Smaya#ifdef CL_VERSION_1_1
1085af69d88dSmrg
1086af69d88dSmrgextern CL_API_ENTRY cl_mem CL_API_CALL
108753c12917SmayaclCreateSubBuffer(cl_mem                   buffer,
108853c12917Smaya                  cl_mem_flags             flags,
108953c12917Smaya                  cl_buffer_create_type    buffer_create_type,
109053c12917Smaya                  const void *             buffer_create_info,
109153c12917Smaya                  cl_int *                 errcode_ret) CL_API_SUFFIX__VERSION_1_1;
109253c12917Smaya
109353c12917Smaya#endif
109453c12917Smaya
109553c12917Smaya#ifdef CL_VERSION_1_2
109653c12917Smaya
109753c12917Smayaextern CL_API_ENTRY cl_mem CL_API_CALL
109853c12917SmayaclCreateImage(cl_context              context,
109953c12917Smaya              cl_mem_flags            flags,
110053c12917Smaya              const cl_image_format * image_format,
110153c12917Smaya              const cl_image_desc *   image_desc,
110253c12917Smaya              void *                  host_ptr,
110353c12917Smaya              cl_int *                errcode_ret) CL_API_SUFFIX__VERSION_1_2;
110453c12917Smaya
110553c12917Smaya#endif
110653c12917Smaya
110753c12917Smaya#ifdef CL_VERSION_2_0
1108af69d88dSmrg
1109af69d88dSmrgextern CL_API_ENTRY cl_mem CL_API_CALL
111053c12917SmayaclCreatePipe(cl_context                 context,
111153c12917Smaya             cl_mem_flags               flags,
111253c12917Smaya             cl_uint                    pipe_packet_size,
111353c12917Smaya             cl_uint                    pipe_max_packets,
111453c12917Smaya             const cl_pipe_properties * properties,
111553c12917Smaya             cl_int *                   errcode_ret) CL_API_SUFFIX__VERSION_2_0;
111653c12917Smaya
111753c12917Smaya#endif
111853c12917Smaya
11197ec681f3Smrg#ifdef CL_VERSION_3_0
11207ec681f3Smrg
11217ec681f3Smrgextern CL_API_ENTRY cl_mem CL_API_CALL
11227ec681f3SmrgclCreateBufferWithProperties(cl_context                context,
11237ec681f3Smrg                             const cl_mem_properties * properties,
11247ec681f3Smrg                             cl_mem_flags              flags,
11257ec681f3Smrg                             size_t                    size,
11267ec681f3Smrg                             void *                    host_ptr,
11277ec681f3Smrg                             cl_int *                  errcode_ret) CL_API_SUFFIX__VERSION_3_0;
11287ec681f3Smrg
11297ec681f3Smrgextern CL_API_ENTRY cl_mem CL_API_CALL
11307ec681f3SmrgclCreateImageWithProperties(cl_context                context,
11317ec681f3Smrg                            const cl_mem_properties * properties,
11327ec681f3Smrg                            cl_mem_flags              flags,
11337ec681f3Smrg                            const cl_image_format *   image_format,
11347ec681f3Smrg                            const cl_image_desc *     image_desc,
11357ec681f3Smrg                            void *                    host_ptr,
11367ec681f3Smrg                            cl_int *                  errcode_ret) CL_API_SUFFIX__VERSION_3_0;
11377ec681f3Smrg
11387ec681f3Smrg#endif
11397ec681f3Smrg
1140af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
114153c12917SmayaclRetainMemObject(cl_mem memobj) CL_API_SUFFIX__VERSION_1_0;
1142af69d88dSmrg
1143af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
114453c12917SmayaclReleaseMemObject(cl_mem memobj) CL_API_SUFFIX__VERSION_1_0;
1145af69d88dSmrg
1146af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
114753c12917SmayaclGetSupportedImageFormats(cl_context           context,
114853c12917Smaya                           cl_mem_flags         flags,
114953c12917Smaya                           cl_mem_object_type   image_type,
115053c12917Smaya                           cl_uint              num_entries,
115153c12917Smaya                           cl_image_format *    image_formats,
115253c12917Smaya                           cl_uint *            num_image_formats) CL_API_SUFFIX__VERSION_1_0;
115353c12917Smaya
1154af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
115553c12917SmayaclGetMemObjectInfo(cl_mem           memobj,
115653c12917Smaya                   cl_mem_info      param_name,
115753c12917Smaya                   size_t           param_value_size,
115853c12917Smaya                   void *           param_value,
115953c12917Smaya                   size_t *         param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
1160af69d88dSmrg
1161af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
116253c12917SmayaclGetImageInfo(cl_mem           image,
116353c12917Smaya               cl_image_info    param_name,
116453c12917Smaya               size_t           param_value_size,
116553c12917Smaya               void *           param_value,
116653c12917Smaya               size_t *         param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
116753c12917Smaya
116853c12917Smaya#ifdef CL_VERSION_2_0
1169af69d88dSmrg
1170af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
117153c12917SmayaclGetPipeInfo(cl_mem           pipe,
117253c12917Smaya              cl_pipe_info     param_name,
117353c12917Smaya              size_t           param_value_size,
117453c12917Smaya              void *           param_value,
117553c12917Smaya              size_t *         param_value_size_ret) CL_API_SUFFIX__VERSION_2_0;
117653c12917Smaya
117753c12917Smaya#endif
117853c12917Smaya
117953c12917Smaya#ifdef CL_VERSION_1_1
118053c12917Smaya
118153c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
118253c12917SmayaclSetMemObjectDestructorCallback(cl_mem memobj,
118353c12917Smaya                                 void (CL_CALLBACK * pfn_notify)(cl_mem memobj,
118453c12917Smaya                                                                 void * user_data),
118553c12917Smaya                                 void * user_data) CL_API_SUFFIX__VERSION_1_1;
118653c12917Smaya
118753c12917Smaya#endif
118853c12917Smaya
118953c12917Smaya/* SVM Allocation APIs */
119053c12917Smaya
119153c12917Smaya#ifdef CL_VERSION_2_0
119253c12917Smaya
119353c12917Smayaextern CL_API_ENTRY void * CL_API_CALL
119453c12917SmayaclSVMAlloc(cl_context       context,
119553c12917Smaya           cl_svm_mem_flags flags,
119653c12917Smaya           size_t           size,
119753c12917Smaya           cl_uint          alignment) CL_API_SUFFIX__VERSION_2_0;
119853c12917Smaya
119953c12917Smayaextern CL_API_ENTRY void CL_API_CALL
120053c12917SmayaclSVMFree(cl_context        context,
120153c12917Smaya          void *            svm_pointer) CL_API_SUFFIX__VERSION_2_0;
120253c12917Smaya
120353c12917Smaya#endif
1204af69d88dSmrg
1205af69d88dSmrg/* Sampler APIs */
120653c12917Smaya
120753c12917Smaya#ifdef CL_VERSION_2_0
120853c12917Smaya
1209af69d88dSmrgextern CL_API_ENTRY cl_sampler CL_API_CALL
121053c12917SmayaclCreateSamplerWithProperties(cl_context                     context,
121153c12917Smaya                              const cl_sampler_properties *  sampler_properties,
121253c12917Smaya                              cl_int *                       errcode_ret) CL_API_SUFFIX__VERSION_2_0;
121353c12917Smaya
121453c12917Smaya#endif
1215af69d88dSmrg
1216af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
121753c12917SmayaclRetainSampler(cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0;
1218af69d88dSmrg
1219af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
122053c12917SmayaclReleaseSampler(cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0;
1221af69d88dSmrg
1222af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
122353c12917SmayaclGetSamplerInfo(cl_sampler         sampler,
122453c12917Smaya                 cl_sampler_info    param_name,
122553c12917Smaya                 size_t             param_value_size,
122653c12917Smaya                 void *             param_value,
122753c12917Smaya                 size_t *           param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
122853c12917Smaya
122953c12917Smaya/* Program Object APIs */
1230af69d88dSmrgextern CL_API_ENTRY cl_program CL_API_CALL
123153c12917SmayaclCreateProgramWithSource(cl_context        context,
123253c12917Smaya                          cl_uint           count,
123353c12917Smaya                          const char **     strings,
123453c12917Smaya                          const size_t *    lengths,
123553c12917Smaya                          cl_int *          errcode_ret) CL_API_SUFFIX__VERSION_1_0;
1236af69d88dSmrg
1237af69d88dSmrgextern CL_API_ENTRY cl_program CL_API_CALL
123853c12917SmayaclCreateProgramWithBinary(cl_context                     context,
123953c12917Smaya                          cl_uint                        num_devices,
124053c12917Smaya                          const cl_device_id *           device_list,
124153c12917Smaya                          const size_t *                 lengths,
124253c12917Smaya                          const unsigned char **         binaries,
124353c12917Smaya                          cl_int *                       binary_status,
124453c12917Smaya                          cl_int *                       errcode_ret) CL_API_SUFFIX__VERSION_1_0;
124553c12917Smaya
124653c12917Smaya#ifdef CL_VERSION_1_2
1247af69d88dSmrg
1248af69d88dSmrgextern CL_API_ENTRY cl_program CL_API_CALL
124953c12917SmayaclCreateProgramWithBuiltInKernels(cl_context            context,
125053c12917Smaya                                  cl_uint               num_devices,
125153c12917Smaya                                  const cl_device_id *  device_list,
125253c12917Smaya                                  const char *          kernel_names,
125353c12917Smaya                                  cl_int *              errcode_ret) CL_API_SUFFIX__VERSION_1_2;
125453c12917Smaya
125553c12917Smaya#endif
125653c12917Smaya
125753c12917Smaya#ifdef CL_VERSION_2_1
125853c12917Smaya
125953c12917Smayaextern CL_API_ENTRY cl_program CL_API_CALL
126053c12917SmayaclCreateProgramWithIL(cl_context    context,
126153c12917Smaya                     const void*    il,
126253c12917Smaya                     size_t         length,
126353c12917Smaya                     cl_int*        errcode_ret) CL_API_SUFFIX__VERSION_2_1;
126453c12917Smaya
126553c12917Smaya#endif
1266af69d88dSmrg
1267af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
126853c12917SmayaclRetainProgram(cl_program program) CL_API_SUFFIX__VERSION_1_0;
1269af69d88dSmrg
1270af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
127153c12917SmayaclReleaseProgram(cl_program program) CL_API_SUFFIX__VERSION_1_0;
1272af69d88dSmrg
1273af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
127453c12917SmayaclBuildProgram(cl_program           program,
127553c12917Smaya               cl_uint              num_devices,
127653c12917Smaya               const cl_device_id * device_list,
127753c12917Smaya               const char *         options,
127853c12917Smaya               void (CL_CALLBACK *  pfn_notify)(cl_program program,
127953c12917Smaya                                                void * user_data),
128053c12917Smaya               void *               user_data) CL_API_SUFFIX__VERSION_1_0;
128153c12917Smaya
128253c12917Smaya#ifdef CL_VERSION_1_2
1283af69d88dSmrg
1284af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
128553c12917SmayaclCompileProgram(cl_program           program,
128653c12917Smaya                 cl_uint              num_devices,
128753c12917Smaya                 const cl_device_id * device_list,
128853c12917Smaya                 const char *         options,
128953c12917Smaya                 cl_uint              num_input_headers,
129053c12917Smaya                 const cl_program *   input_headers,
129153c12917Smaya                 const char **        header_include_names,
129253c12917Smaya                 void (CL_CALLBACK *  pfn_notify)(cl_program program,
129353c12917Smaya                                                  void * user_data),
129453c12917Smaya                 void *               user_data) CL_API_SUFFIX__VERSION_1_2;
1295af69d88dSmrg
1296af69d88dSmrgextern CL_API_ENTRY cl_program CL_API_CALL
129753c12917SmayaclLinkProgram(cl_context           context,
129853c12917Smaya              cl_uint              num_devices,
129953c12917Smaya              const cl_device_id * device_list,
130053c12917Smaya              const char *         options,
130153c12917Smaya              cl_uint              num_input_programs,
130253c12917Smaya              const cl_program *   input_programs,
130353c12917Smaya              void (CL_CALLBACK *  pfn_notify)(cl_program program,
130453c12917Smaya                                               void * user_data),
130553c12917Smaya              void *               user_data,
130653c12917Smaya              cl_int *             errcode_ret) CL_API_SUFFIX__VERSION_1_2;
130753c12917Smaya
130853c12917Smaya#endif
130953c12917Smaya
131053c12917Smaya#ifdef CL_VERSION_2_2
131153c12917Smaya
13127ec681f3Smrgextern CL_API_ENTRY CL_EXT_PREFIX__VERSION_2_2_DEPRECATED cl_int CL_API_CALL
131353c12917SmayaclSetProgramReleaseCallback(cl_program          program,
131453c12917Smaya                            void (CL_CALLBACK * pfn_notify)(cl_program program,
131553c12917Smaya                                                            void * user_data),
13167ec681f3Smrg                            void *              user_data) CL_EXT_SUFFIX__VERSION_2_2_DEPRECATED;
131753c12917Smaya
131853c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
131953c12917SmayaclSetProgramSpecializationConstant(cl_program  program,
132053c12917Smaya                                   cl_uint     spec_id,
132153c12917Smaya                                   size_t      spec_size,
132253c12917Smaya                                   const void* spec_value) CL_API_SUFFIX__VERSION_2_2;
132353c12917Smaya
132453c12917Smaya#endif
1325af69d88dSmrg
132653c12917Smaya#ifdef CL_VERSION_1_2
1327af69d88dSmrg
1328af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
132953c12917SmayaclUnloadPlatformCompiler(cl_platform_id platform) CL_API_SUFFIX__VERSION_1_2;
133053c12917Smaya
133153c12917Smaya#endif
1332af69d88dSmrg
1333af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
133453c12917SmayaclGetProgramInfo(cl_program         program,
133553c12917Smaya                 cl_program_info    param_name,
133653c12917Smaya                 size_t             param_value_size,
133753c12917Smaya                 void *             param_value,
133853c12917Smaya                 size_t *           param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
1339af69d88dSmrg
1340af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
134153c12917SmayaclGetProgramBuildInfo(cl_program            program,
134253c12917Smaya                      cl_device_id          device,
134353c12917Smaya                      cl_program_build_info param_name,
134453c12917Smaya                      size_t                param_value_size,
134553c12917Smaya                      void *                param_value,
134653c12917Smaya                      size_t *              param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
134753c12917Smaya
1348af69d88dSmrg/* Kernel Object APIs */
1349af69d88dSmrgextern CL_API_ENTRY cl_kernel CL_API_CALL
135053c12917SmayaclCreateKernel(cl_program      program,
135153c12917Smaya               const char *    kernel_name,
135253c12917Smaya               cl_int *        errcode_ret) CL_API_SUFFIX__VERSION_1_0;
1353af69d88dSmrg
1354af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
135553c12917SmayaclCreateKernelsInProgram(cl_program     program,
135653c12917Smaya                         cl_uint        num_kernels,
135753c12917Smaya                         cl_kernel *    kernels,
135853c12917Smaya                         cl_uint *      num_kernels_ret) CL_API_SUFFIX__VERSION_1_0;
135953c12917Smaya
136053c12917Smaya#ifdef CL_VERSION_2_1
136153c12917Smaya
136253c12917Smayaextern CL_API_ENTRY cl_kernel CL_API_CALL
136353c12917SmayaclCloneKernel(cl_kernel     source_kernel,
136453c12917Smaya              cl_int*       errcode_ret) CL_API_SUFFIX__VERSION_2_1;
136553c12917Smaya
136653c12917Smaya#endif
1367af69d88dSmrg
1368af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
136953c12917SmayaclRetainKernel(cl_kernel    kernel) CL_API_SUFFIX__VERSION_1_0;
1370af69d88dSmrg
1371af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
137253c12917SmayaclReleaseKernel(cl_kernel   kernel) CL_API_SUFFIX__VERSION_1_0;
1373af69d88dSmrg
1374af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
137553c12917SmayaclSetKernelArg(cl_kernel    kernel,
137653c12917Smaya               cl_uint      arg_index,
137753c12917Smaya               size_t       arg_size,
137853c12917Smaya               const void * arg_value) CL_API_SUFFIX__VERSION_1_0;
137953c12917Smaya
138053c12917Smaya#ifdef CL_VERSION_2_0
1381af69d88dSmrg
1382af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
138353c12917SmayaclSetKernelArgSVMPointer(cl_kernel    kernel,
138453c12917Smaya                         cl_uint      arg_index,
138553c12917Smaya                         const void * arg_value) CL_API_SUFFIX__VERSION_2_0;
1386af69d88dSmrg
1387af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
138853c12917SmayaclSetKernelExecInfo(cl_kernel            kernel,
138953c12917Smaya                    cl_kernel_exec_info  param_name,
139053c12917Smaya                    size_t               param_value_size,
139153c12917Smaya                    const void *         param_value) CL_API_SUFFIX__VERSION_2_0;
139253c12917Smaya
139353c12917Smaya#endif
139453c12917Smaya
139553c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
139653c12917SmayaclGetKernelInfo(cl_kernel       kernel,
139753c12917Smaya                cl_kernel_info  param_name,
139853c12917Smaya                size_t          param_value_size,
139953c12917Smaya                void *          param_value,
140053c12917Smaya                size_t *        param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
140153c12917Smaya
140253c12917Smaya#ifdef CL_VERSION_1_2
1403af69d88dSmrg
1404af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
140553c12917SmayaclGetKernelArgInfo(cl_kernel       kernel,
140653c12917Smaya                   cl_uint         arg_indx,
140753c12917Smaya                   cl_kernel_arg_info  param_name,
140853c12917Smaya                   size_t          param_value_size,
140953c12917Smaya                   void *          param_value,
141053c12917Smaya                   size_t *        param_value_size_ret) CL_API_SUFFIX__VERSION_1_2;
141153c12917Smaya
141253c12917Smaya#endif
141353c12917Smaya
141453c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
141553c12917SmayaclGetKernelWorkGroupInfo(cl_kernel                  kernel,
141653c12917Smaya                         cl_device_id               device,
141753c12917Smaya                         cl_kernel_work_group_info  param_name,
141853c12917Smaya                         size_t                     param_value_size,
141953c12917Smaya                         void *                     param_value,
142053c12917Smaya                         size_t *                   param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
142153c12917Smaya
142253c12917Smaya#ifdef CL_VERSION_2_1
142353c12917Smaya
142453c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
142553c12917SmayaclGetKernelSubGroupInfo(cl_kernel                   kernel,
142653c12917Smaya                        cl_device_id                device,
142753c12917Smaya                        cl_kernel_sub_group_info    param_name,
142853c12917Smaya                        size_t                      input_value_size,
142953c12917Smaya                        const void*                 input_value,
143053c12917Smaya                        size_t                      param_value_size,
143153c12917Smaya                        void*                       param_value,
143253c12917Smaya                        size_t*                     param_value_size_ret) CL_API_SUFFIX__VERSION_2_1;
143353c12917Smaya
143453c12917Smaya#endif
1435af69d88dSmrg
1436af69d88dSmrg/* Event Object APIs */
1437af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
143853c12917SmayaclWaitForEvents(cl_uint             num_events,
143953c12917Smaya                const cl_event *    event_list) CL_API_SUFFIX__VERSION_1_0;
1440af69d88dSmrg
1441af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
144253c12917SmayaclGetEventInfo(cl_event         event,
144353c12917Smaya               cl_event_info    param_name,
144453c12917Smaya               size_t           param_value_size,
144553c12917Smaya               void *           param_value,
144653c12917Smaya               size_t *         param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
144753c12917Smaya
144853c12917Smaya#ifdef CL_VERSION_1_1
144953c12917Smaya
1450af69d88dSmrgextern CL_API_ENTRY cl_event CL_API_CALL
145153c12917SmayaclCreateUserEvent(cl_context    context,
145253c12917Smaya                  cl_int *      errcode_ret) CL_API_SUFFIX__VERSION_1_1;
145353c12917Smaya
145453c12917Smaya#endif
145553c12917Smaya
1456af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
145753c12917SmayaclRetainEvent(cl_event event) CL_API_SUFFIX__VERSION_1_0;
1458af69d88dSmrg
1459af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
146053c12917SmayaclReleaseEvent(cl_event event) CL_API_SUFFIX__VERSION_1_0;
146153c12917Smaya
146253c12917Smaya#ifdef CL_VERSION_1_1
1463af69d88dSmrg
1464af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
146553c12917SmayaclSetUserEventStatus(cl_event   event,
146653c12917Smaya                     cl_int     execution_status) CL_API_SUFFIX__VERSION_1_1;
146753c12917Smaya
1468af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
146953c12917SmayaclSetEventCallback(cl_event    event,
147053c12917Smaya                   cl_int      command_exec_callback_type,
147153c12917Smaya                   void (CL_CALLBACK * pfn_notify)(cl_event event,
147253c12917Smaya                                                   cl_int   event_command_status,
147353c12917Smaya                                                   void *   user_data),
147453c12917Smaya                   void *      user_data) CL_API_SUFFIX__VERSION_1_1;
147553c12917Smaya
147653c12917Smaya#endif
1477af69d88dSmrg
1478af69d88dSmrg/* Profiling APIs */
1479af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
148053c12917SmayaclGetEventProfilingInfo(cl_event            event,
148153c12917Smaya                        cl_profiling_info   param_name,
148253c12917Smaya                        size_t              param_value_size,
148353c12917Smaya                        void *              param_value,
148453c12917Smaya                        size_t *            param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
148553c12917Smaya
1486af69d88dSmrg/* Flush and Finish APIs */
1487af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
148853c12917SmayaclFlush(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
1489af69d88dSmrg
1490af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
149153c12917SmayaclFinish(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
1492af69d88dSmrg
1493af69d88dSmrg/* Enqueued Commands APIs */
1494af69d88dSmrgextern CL_API_ENTRY cl_int CL_API_CALL
149553c12917SmayaclEnqueueReadBuffer(cl_command_queue    command_queue,
149653c12917Smaya                    cl_mem              buffer,
149753c12917Smaya                    cl_bool             blocking_read,
149853c12917Smaya                    size_t              offset,
149953c12917Smaya                    size_t              size,
150053c12917Smaya                    void *              ptr,
150153c12917Smaya                    cl_uint             num_events_in_wait_list,
150253c12917Smaya                    const cl_event *    event_wait_list,
150353c12917Smaya                    cl_event *          event) CL_API_SUFFIX__VERSION_1_0;
150453c12917Smaya
150553c12917Smaya#ifdef CL_VERSION_1_1
150653c12917Smaya
150753c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
150853c12917SmayaclEnqueueReadBufferRect(cl_command_queue    command_queue,
150953c12917Smaya                        cl_mem              buffer,
151053c12917Smaya                        cl_bool             blocking_read,
151153c12917Smaya                        const size_t *      buffer_offset,
151253c12917Smaya                        const size_t *      host_offset,
151353c12917Smaya                        const size_t *      region,
151453c12917Smaya                        size_t              buffer_row_pitch,
151553c12917Smaya                        size_t              buffer_slice_pitch,
151653c12917Smaya                        size_t              host_row_pitch,
151753c12917Smaya                        size_t              host_slice_pitch,
151853c12917Smaya                        void *              ptr,
151953c12917Smaya                        cl_uint             num_events_in_wait_list,
152053c12917Smaya                        const cl_event *    event_wait_list,
152153c12917Smaya                        cl_event *          event) CL_API_SUFFIX__VERSION_1_1;
152253c12917Smaya
152353c12917Smaya#endif
152453c12917Smaya
152553c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
152653c12917SmayaclEnqueueWriteBuffer(cl_command_queue   command_queue,
152753c12917Smaya                     cl_mem             buffer,
152853c12917Smaya                     cl_bool            blocking_write,
152953c12917Smaya                     size_t             offset,
153053c12917Smaya                     size_t             size,
153153c12917Smaya                     const void *       ptr,
153253c12917Smaya                     cl_uint            num_events_in_wait_list,
153353c12917Smaya                     const cl_event *   event_wait_list,
153453c12917Smaya                     cl_event *         event) CL_API_SUFFIX__VERSION_1_0;
153553c12917Smaya
153653c12917Smaya#ifdef CL_VERSION_1_1
153753c12917Smaya
153853c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
153953c12917SmayaclEnqueueWriteBufferRect(cl_command_queue    command_queue,
154053c12917Smaya                         cl_mem              buffer,
154153c12917Smaya                         cl_bool             blocking_write,
154253c12917Smaya                         const size_t *      buffer_offset,
154353c12917Smaya                         const size_t *      host_offset,
154453c12917Smaya                         const size_t *      region,
154553c12917Smaya                         size_t              buffer_row_pitch,
154653c12917Smaya                         size_t              buffer_slice_pitch,
154753c12917Smaya                         size_t              host_row_pitch,
154853c12917Smaya                         size_t              host_slice_pitch,
154953c12917Smaya                         const void *        ptr,
155053c12917Smaya                         cl_uint             num_events_in_wait_list,
155153c12917Smaya                         const cl_event *    event_wait_list,
155253c12917Smaya                         cl_event *          event) CL_API_SUFFIX__VERSION_1_1;
155353c12917Smaya
155453c12917Smaya#endif
155553c12917Smaya
155653c12917Smaya#ifdef CL_VERSION_1_2
155753c12917Smaya
155853c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
155953c12917SmayaclEnqueueFillBuffer(cl_command_queue   command_queue,
156053c12917Smaya                    cl_mem             buffer,
156153c12917Smaya                    const void *       pattern,
156253c12917Smaya                    size_t             pattern_size,
156353c12917Smaya                    size_t             offset,
156453c12917Smaya                    size_t             size,
156553c12917Smaya                    cl_uint            num_events_in_wait_list,
156653c12917Smaya                    const cl_event *   event_wait_list,
156753c12917Smaya                    cl_event *         event) CL_API_SUFFIX__VERSION_1_2;
156853c12917Smaya
156953c12917Smaya#endif
157053c12917Smaya
157153c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
157253c12917SmayaclEnqueueCopyBuffer(cl_command_queue    command_queue,
157353c12917Smaya                    cl_mem              src_buffer,
157453c12917Smaya                    cl_mem              dst_buffer,
157553c12917Smaya                    size_t              src_offset,
157653c12917Smaya                    size_t              dst_offset,
157753c12917Smaya                    size_t              size,
157853c12917Smaya                    cl_uint             num_events_in_wait_list,
157953c12917Smaya                    const cl_event *    event_wait_list,
158053c12917Smaya                    cl_event *          event) CL_API_SUFFIX__VERSION_1_0;
158153c12917Smaya
158253c12917Smaya#ifdef CL_VERSION_1_1
158353c12917Smaya
158453c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
158553c12917SmayaclEnqueueCopyBufferRect(cl_command_queue    command_queue,
158653c12917Smaya                        cl_mem              src_buffer,
158753c12917Smaya                        cl_mem              dst_buffer,
158853c12917Smaya                        const size_t *      src_origin,
158953c12917Smaya                        const size_t *      dst_origin,
159053c12917Smaya                        const size_t *      region,
159153c12917Smaya                        size_t              src_row_pitch,
159253c12917Smaya                        size_t              src_slice_pitch,
159353c12917Smaya                        size_t              dst_row_pitch,
159453c12917Smaya                        size_t              dst_slice_pitch,
159553c12917Smaya                        cl_uint             num_events_in_wait_list,
159653c12917Smaya                        const cl_event *    event_wait_list,
159753c12917Smaya                        cl_event *          event) CL_API_SUFFIX__VERSION_1_1;
159853c12917Smaya
159953c12917Smaya#endif
160053c12917Smaya
160153c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
160253c12917SmayaclEnqueueReadImage(cl_command_queue     command_queue,
160353c12917Smaya                   cl_mem               image,
160453c12917Smaya                   cl_bool              blocking_read,
160553c12917Smaya                   const size_t *       origin,
160653c12917Smaya                   const size_t *       region,
160753c12917Smaya                   size_t               row_pitch,
160853c12917Smaya                   size_t               slice_pitch,
160953c12917Smaya                   void *               ptr,
161053c12917Smaya                   cl_uint              num_events_in_wait_list,
161153c12917Smaya                   const cl_event *     event_wait_list,
161253c12917Smaya                   cl_event *           event) CL_API_SUFFIX__VERSION_1_0;
161353c12917Smaya
161453c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
161553c12917SmayaclEnqueueWriteImage(cl_command_queue    command_queue,
161653c12917Smaya                    cl_mem              image,
161753c12917Smaya                    cl_bool             blocking_write,
161853c12917Smaya                    const size_t *      origin,
161953c12917Smaya                    const size_t *      region,
162053c12917Smaya                    size_t              input_row_pitch,
162153c12917Smaya                    size_t              input_slice_pitch,
162253c12917Smaya                    const void *        ptr,
162353c12917Smaya                    cl_uint             num_events_in_wait_list,
162453c12917Smaya                    const cl_event *    event_wait_list,
162553c12917Smaya                    cl_event *          event) CL_API_SUFFIX__VERSION_1_0;
162653c12917Smaya
162753c12917Smaya#ifdef CL_VERSION_1_2
162853c12917Smaya
162953c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
163053c12917SmayaclEnqueueFillImage(cl_command_queue   command_queue,
163153c12917Smaya                   cl_mem             image,
163253c12917Smaya                   const void *       fill_color,
163353c12917Smaya                   const size_t *     origin,
163453c12917Smaya                   const size_t *     region,
163553c12917Smaya                   cl_uint            num_events_in_wait_list,
163653c12917Smaya                   const cl_event *   event_wait_list,
163753c12917Smaya                   cl_event *         event) CL_API_SUFFIX__VERSION_1_2;
163853c12917Smaya
163953c12917Smaya#endif
164053c12917Smaya
164153c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
164253c12917SmayaclEnqueueCopyImage(cl_command_queue     command_queue,
164353c12917Smaya                   cl_mem               src_image,
164453c12917Smaya                   cl_mem               dst_image,
164553c12917Smaya                   const size_t *       src_origin,
164653c12917Smaya                   const size_t *       dst_origin,
164753c12917Smaya                   const size_t *       region,
164853c12917Smaya                   cl_uint              num_events_in_wait_list,
164953c12917Smaya                   const cl_event *     event_wait_list,
165053c12917Smaya                   cl_event *           event) CL_API_SUFFIX__VERSION_1_0;
165153c12917Smaya
165253c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
165353c12917SmayaclEnqueueCopyImageToBuffer(cl_command_queue command_queue,
165453c12917Smaya                           cl_mem           src_image,
165553c12917Smaya                           cl_mem           dst_buffer,
165653c12917Smaya                           const size_t *   src_origin,
165753c12917Smaya                           const size_t *   region,
165853c12917Smaya                           size_t           dst_offset,
165953c12917Smaya                           cl_uint          num_events_in_wait_list,
166053c12917Smaya                           const cl_event * event_wait_list,
166153c12917Smaya                           cl_event *       event) CL_API_SUFFIX__VERSION_1_0;
166253c12917Smaya
166353c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
166453c12917SmayaclEnqueueCopyBufferToImage(cl_command_queue command_queue,
166553c12917Smaya                           cl_mem           src_buffer,
166653c12917Smaya                           cl_mem           dst_image,
166753c12917Smaya                           size_t           src_offset,
166853c12917Smaya                           const size_t *   dst_origin,
166953c12917Smaya                           const size_t *   region,
167053c12917Smaya                           cl_uint          num_events_in_wait_list,
167153c12917Smaya                           const cl_event * event_wait_list,
167253c12917Smaya                           cl_event *       event) CL_API_SUFFIX__VERSION_1_0;
1673af69d88dSmrg
1674af69d88dSmrgextern CL_API_ENTRY void * CL_API_CALL
167553c12917SmayaclEnqueueMapBuffer(cl_command_queue command_queue,
167653c12917Smaya                   cl_mem           buffer,
167753c12917Smaya                   cl_bool          blocking_map,
167853c12917Smaya                   cl_map_flags     map_flags,
167953c12917Smaya                   size_t           offset,
168053c12917Smaya                   size_t           size,
168153c12917Smaya                   cl_uint          num_events_in_wait_list,
168253c12917Smaya                   const cl_event * event_wait_list,
168353c12917Smaya                   cl_event *       event,
168453c12917Smaya                   cl_int *         errcode_ret) CL_API_SUFFIX__VERSION_1_0;
1685af69d88dSmrg
1686af69d88dSmrgextern CL_API_ENTRY void * CL_API_CALL
168753c12917SmayaclEnqueueMapImage(cl_command_queue  command_queue,
168853c12917Smaya                  cl_mem            image,
168953c12917Smaya                  cl_bool           blocking_map,
169053c12917Smaya                  cl_map_flags      map_flags,
169153c12917Smaya                  const size_t *    origin,
169253c12917Smaya                  const size_t *    region,
169353c12917Smaya                  size_t *          image_row_pitch,
169453c12917Smaya                  size_t *          image_slice_pitch,
169553c12917Smaya                  cl_uint           num_events_in_wait_list,
169653c12917Smaya                  const cl_event *  event_wait_list,
169753c12917Smaya                  cl_event *        event,
169853c12917Smaya                  cl_int *          errcode_ret) CL_API_SUFFIX__VERSION_1_0;
169953c12917Smaya
170053c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
170153c12917SmayaclEnqueueUnmapMemObject(cl_command_queue command_queue,
170253c12917Smaya                        cl_mem           memobj,
170353c12917Smaya                        void *           mapped_ptr,
170453c12917Smaya                        cl_uint          num_events_in_wait_list,
170553c12917Smaya                        const cl_event * event_wait_list,
170653c12917Smaya                        cl_event *       event) CL_API_SUFFIX__VERSION_1_0;
170753c12917Smaya
170853c12917Smaya#ifdef CL_VERSION_1_2
170953c12917Smaya
171053c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
171153c12917SmayaclEnqueueMigrateMemObjects(cl_command_queue       command_queue,
171253c12917Smaya                           cl_uint                num_mem_objects,
171353c12917Smaya                           const cl_mem *         mem_objects,
171453c12917Smaya                           cl_mem_migration_flags flags,
171553c12917Smaya                           cl_uint                num_events_in_wait_list,
171653c12917Smaya                           const cl_event *       event_wait_list,
171753c12917Smaya                           cl_event *             event) CL_API_SUFFIX__VERSION_1_2;
171853c12917Smaya
171953c12917Smaya#endif
172053c12917Smaya
172153c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
172253c12917SmayaclEnqueueNDRangeKernel(cl_command_queue command_queue,
172353c12917Smaya                       cl_kernel        kernel,
172453c12917Smaya                       cl_uint          work_dim,
172553c12917Smaya                       const size_t *   global_work_offset,
172653c12917Smaya                       const size_t *   global_work_size,
172753c12917Smaya                       const size_t *   local_work_size,
172853c12917Smaya                       cl_uint          num_events_in_wait_list,
172953c12917Smaya                       const cl_event * event_wait_list,
173053c12917Smaya                       cl_event *       event) CL_API_SUFFIX__VERSION_1_0;
173153c12917Smaya
173253c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
173353c12917SmayaclEnqueueNativeKernel(cl_command_queue  command_queue,
173453c12917Smaya                      void (CL_CALLBACK * user_func)(void *),
173553c12917Smaya                      void *            args,
173653c12917Smaya                      size_t            cb_args,
173753c12917Smaya                      cl_uint           num_mem_objects,
173853c12917Smaya                      const cl_mem *    mem_list,
173953c12917Smaya                      const void **     args_mem_loc,
174053c12917Smaya                      cl_uint           num_events_in_wait_list,
174153c12917Smaya                      const cl_event *  event_wait_list,
174253c12917Smaya                      cl_event *        event) CL_API_SUFFIX__VERSION_1_0;
174353c12917Smaya
174453c12917Smaya#ifdef CL_VERSION_1_2
174553c12917Smaya
174653c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
174753c12917SmayaclEnqueueMarkerWithWaitList(cl_command_queue  command_queue,
174853c12917Smaya                            cl_uint           num_events_in_wait_list,
174953c12917Smaya                            const cl_event *  event_wait_list,
175053c12917Smaya                            cl_event *        event) CL_API_SUFFIX__VERSION_1_2;
175153c12917Smaya
175253c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
175353c12917SmayaclEnqueueBarrierWithWaitList(cl_command_queue  command_queue,
175453c12917Smaya                             cl_uint           num_events_in_wait_list,
175553c12917Smaya                             const cl_event *  event_wait_list,
175653c12917Smaya                             cl_event *        event) CL_API_SUFFIX__VERSION_1_2;
175753c12917Smaya
175853c12917Smaya#endif
175953c12917Smaya
176053c12917Smaya#ifdef CL_VERSION_2_0
176153c12917Smaya
176253c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
176353c12917SmayaclEnqueueSVMFree(cl_command_queue  command_queue,
176453c12917Smaya                 cl_uint           num_svm_pointers,
176553c12917Smaya                 void *            svm_pointers[],
176653c12917Smaya                 void (CL_CALLBACK * pfn_free_func)(cl_command_queue queue,
176753c12917Smaya                                                    cl_uint          num_svm_pointers,
176853c12917Smaya                                                    void *           svm_pointers[],
176953c12917Smaya                                                    void *           user_data),
177053c12917Smaya                 void *            user_data,
177153c12917Smaya                 cl_uint           num_events_in_wait_list,
177253c12917Smaya                 const cl_event *  event_wait_list,
177353c12917Smaya                 cl_event *        event) CL_API_SUFFIX__VERSION_2_0;
177453c12917Smaya
177553c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
177653c12917SmayaclEnqueueSVMMemcpy(cl_command_queue  command_queue,
177753c12917Smaya                   cl_bool           blocking_copy,
177853c12917Smaya                   void *            dst_ptr,
177953c12917Smaya                   const void *      src_ptr,
178053c12917Smaya                   size_t            size,
178153c12917Smaya                   cl_uint           num_events_in_wait_list,
178253c12917Smaya                   const cl_event *  event_wait_list,
178353c12917Smaya                   cl_event *        event) CL_API_SUFFIX__VERSION_2_0;
178453c12917Smaya
178553c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
178653c12917SmayaclEnqueueSVMMemFill(cl_command_queue  command_queue,
178753c12917Smaya                    void *            svm_ptr,
178853c12917Smaya                    const void *      pattern,
178953c12917Smaya                    size_t            pattern_size,
179053c12917Smaya                    size_t            size,
179153c12917Smaya                    cl_uint           num_events_in_wait_list,
179253c12917Smaya                    const cl_event *  event_wait_list,
179353c12917Smaya                    cl_event *        event) CL_API_SUFFIX__VERSION_2_0;
179453c12917Smaya
179553c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
179653c12917SmayaclEnqueueSVMMap(cl_command_queue  command_queue,
179753c12917Smaya                cl_bool           blocking_map,
179853c12917Smaya                cl_map_flags      flags,
179953c12917Smaya                void *            svm_ptr,
180053c12917Smaya                size_t            size,
180153c12917Smaya                cl_uint           num_events_in_wait_list,
180253c12917Smaya                const cl_event *  event_wait_list,
180353c12917Smaya                cl_event *        event) CL_API_SUFFIX__VERSION_2_0;
180453c12917Smaya
180553c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
180653c12917SmayaclEnqueueSVMUnmap(cl_command_queue  command_queue,
180753c12917Smaya                  void *            svm_ptr,
180853c12917Smaya                  cl_uint           num_events_in_wait_list,
180953c12917Smaya                  const cl_event *  event_wait_list,
181053c12917Smaya                  cl_event *        event) CL_API_SUFFIX__VERSION_2_0;
1811af69d88dSmrg
181253c12917Smaya#endif
181353c12917Smaya
181453c12917Smaya#ifdef CL_VERSION_2_1
181553c12917Smaya
181653c12917Smayaextern CL_API_ENTRY cl_int CL_API_CALL
181753c12917SmayaclEnqueueSVMMigrateMem(cl_command_queue         command_queue,
181853c12917Smaya                       cl_uint                  num_svm_pointers,
181953c12917Smaya                       const void **            svm_pointers,
182053c12917Smaya                       const size_t *           sizes,
182153c12917Smaya                       cl_mem_migration_flags   flags,
182253c12917Smaya                       cl_uint                  num_events_in_wait_list,
182353c12917Smaya                       const cl_event *         event_wait_list,
182453c12917Smaya                       cl_event *               event) CL_API_SUFFIX__VERSION_2_1;
182553c12917Smaya
182653c12917Smaya#endif
182753c12917Smaya
182853c12917Smaya#ifdef CL_VERSION_1_2
1829af69d88dSmrg
1830af69d88dSmrg/* Extension function access
1831af69d88dSmrg *
1832af69d88dSmrg * Returns the extension function address for the given function name,
1833af69d88dSmrg * or NULL if a valid function can not be found.  The client must
183453c12917Smaya * check to make sure the address is not NULL, before using or
1835af69d88dSmrg * calling the returned function address.
1836af69d88dSmrg */
183753c12917Smayaextern CL_API_ENTRY void * CL_API_CALL
183853c12917SmayaclGetExtensionFunctionAddressForPlatform(cl_platform_id platform,
183953c12917Smaya                                         const char *   func_name) CL_API_SUFFIX__VERSION_1_2;
184053c12917Smaya
184153c12917Smaya#endif
184253c12917Smaya
184353c12917Smaya#ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
184453c12917Smaya    /*
184553c12917Smaya     *  WARNING:
184653c12917Smaya     *     This API introduces mutable state into the OpenCL implementation. It has been REMOVED
184753c12917Smaya     *  to better facilitate thread safety.  The 1.0 API is not thread safe. It is not tested by the
184853c12917Smaya     *  OpenCL 1.1 conformance test, and consequently may not work or may not work dependably.
184953c12917Smaya     *  It is likely to be non-performant. Use of this API is not advised. Use at your own risk.
185053c12917Smaya     *
185153c12917Smaya     *  Software developers previously relying on this API are instructed to set the command queue
185253c12917Smaya     *  properties when creating the queue, instead.
185353c12917Smaya     */
185453c12917Smaya    extern CL_API_ENTRY cl_int CL_API_CALL
185553c12917Smaya    clSetCommandQueueProperty(cl_command_queue              command_queue,
185653c12917Smaya                              cl_command_queue_properties   properties,
185753c12917Smaya                              cl_bool                       enable,
185853c12917Smaya                              cl_command_queue_properties * old_properties) CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED;
185953c12917Smaya#endif /* CL_USE_DEPRECATED_OPENCL_1_0_APIS */
1860af69d88dSmrg
1861af69d88dSmrg/* Deprecated OpenCL 1.1 APIs */
1862af69d88dSmrgextern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
186353c12917SmayaclCreateImage2D(cl_context              context,
186453c12917Smaya                cl_mem_flags            flags,
186553c12917Smaya                const cl_image_format * image_format,
186653c12917Smaya                size_t                  image_width,
186753c12917Smaya                size_t                  image_height,
186853c12917Smaya                size_t                  image_row_pitch,
186953c12917Smaya                void *                  host_ptr,
187053c12917Smaya                cl_int *                errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
187153c12917Smaya
1872af69d88dSmrgextern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
187353c12917SmayaclCreateImage3D(cl_context              context,
187453c12917Smaya                cl_mem_flags            flags,
187553c12917Smaya                const cl_image_format * image_format,
187653c12917Smaya                size_t                  image_width,
187753c12917Smaya                size_t                  image_height,
187853c12917Smaya                size_t                  image_depth,
187953c12917Smaya                size_t                  image_row_pitch,
188053c12917Smaya                size_t                  image_slice_pitch,
188153c12917Smaya                void *                  host_ptr,
188253c12917Smaya                cl_int *                errcode_ret) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
188353c12917Smaya
1884af69d88dSmrgextern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
188553c12917SmayaclEnqueueMarker(cl_command_queue    command_queue,
188653c12917Smaya                cl_event *          event) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
188753c12917Smaya
1888af69d88dSmrgextern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
188953c12917SmayaclEnqueueWaitForEvents(cl_command_queue  command_queue,
189053c12917Smaya                        cl_uint          num_events,
189153c12917Smaya                        const cl_event * event_list) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
189253c12917Smaya
1893af69d88dSmrgextern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
189453c12917SmayaclEnqueueBarrier(cl_command_queue command_queue) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
1895af69d88dSmrg
1896af69d88dSmrgextern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
1897af69d88dSmrgclUnloadCompiler(void) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
189853c12917Smaya
1899af69d88dSmrgextern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED void * CL_API_CALL
190053c12917SmayaclGetExtensionFunctionAddress(const char * func_name) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
190153c12917Smaya
190253c12917Smaya/* Deprecated OpenCL 2.0 APIs */
190353c12917Smayaextern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_command_queue CL_API_CALL
190453c12917SmayaclCreateCommandQueue(cl_context                     context,
190553c12917Smaya                     cl_device_id                   device,
190653c12917Smaya                     cl_command_queue_properties    properties,
190753c12917Smaya                     cl_int *                       errcode_ret) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED;
190853c12917Smaya
190953c12917Smayaextern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_sampler CL_API_CALL
191053c12917SmayaclCreateSampler(cl_context          context,
191153c12917Smaya                cl_bool             normalized_coords,
191253c12917Smaya                cl_addressing_mode  addressing_mode,
191353c12917Smaya                cl_filter_mode      filter_mode,
191453c12917Smaya                cl_int *            errcode_ret) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED;
191553c12917Smaya
191653c12917Smayaextern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_int CL_API_CALL
191753c12917SmayaclEnqueueTask(cl_command_queue  command_queue,
191853c12917Smaya              cl_kernel         kernel,
191953c12917Smaya              cl_uint           num_events_in_wait_list,
192053c12917Smaya              const cl_event *  event_wait_list,
192153c12917Smaya              cl_event *        event) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED;
1922af69d88dSmrg
1923af69d88dSmrg#ifdef __cplusplus
1924af69d88dSmrg}
1925af69d88dSmrg#endif
1926af69d88dSmrg
1927af69d88dSmrg#endif  /* __OPENCL_CL_H */
1928