1/*******************************************************************************
2 * Copyright (c) 2008-2010 The Khronos Group Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and/or associated documentation files (the
6 * "Materials"), to deal in the Materials without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish,
8 * distribute, sublicense, and/or sell copies of the Materials, and to
9 * permit persons to whom the Materials are furnished to do so, subject to
10 * the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included
13 * in all copies or substantial portions of the Materials.
14 *
15 * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21 * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
22 ******************************************************************************/
23
24/* $Revision: 11985 $ on $Date: 2010-07-15 11:16:06 -0700 (Thu, 15 Jul 2010) $ */
25
26#ifndef __OPENCL_CL_H
27#define __OPENCL_CL_H
28
29#ifdef __APPLE__
30#include <OpenCL/cl_platform.h>
31#else
32#include <CL/cl_platform.h>
33#endif
34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
39/******************************************************************************/
40
41typedef struct _cl_platform_id *    cl_platform_id;
42typedef struct _cl_device_id *      cl_device_id;
43typedef struct _cl_context *        cl_context;
44typedef struct _cl_command_queue *  cl_command_queue;
45typedef struct _cl_mem *            cl_mem;
46typedef struct _cl_program *        cl_program;
47typedef struct _cl_kernel *         cl_kernel;
48typedef struct _cl_event *          cl_event;
49typedef struct _cl_sampler *        cl_sampler;
50
51typedef 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. */
52typedef cl_ulong            cl_bitfield;
53typedef cl_bitfield         cl_device_type;
54typedef cl_uint             cl_platform_info;
55typedef cl_uint             cl_device_info;
56typedef cl_bitfield         cl_device_fp_config;
57typedef cl_uint             cl_device_mem_cache_type;
58typedef cl_uint             cl_device_local_mem_type;
59typedef cl_bitfield         cl_device_exec_capabilities;
60typedef cl_bitfield         cl_command_queue_properties;
61
62typedef intptr_t			cl_context_properties;
63typedef cl_uint             cl_context_info;
64typedef cl_uint             cl_command_queue_info;
65typedef cl_uint             cl_channel_order;
66typedef cl_uint             cl_channel_type;
67typedef cl_bitfield         cl_mem_flags;
68typedef cl_uint             cl_mem_object_type;
69typedef cl_uint             cl_mem_info;
70typedef cl_uint             cl_image_info;
71typedef cl_uint             cl_buffer_create_type;
72typedef cl_uint             cl_addressing_mode;
73typedef cl_uint             cl_filter_mode;
74typedef cl_uint             cl_sampler_info;
75typedef cl_bitfield         cl_map_flags;
76typedef cl_uint             cl_program_info;
77typedef cl_uint             cl_program_build_info;
78typedef cl_int              cl_build_status;
79typedef cl_uint             cl_kernel_info;
80typedef cl_uint             cl_kernel_work_group_info;
81typedef cl_uint             cl_event_info;
82typedef cl_uint             cl_command_type;
83typedef cl_uint             cl_profiling_info;
84
85typedef struct _cl_image_format {
86    cl_channel_order        image_channel_order;
87    cl_channel_type         image_channel_data_type;
88} cl_image_format;
89
90
91typedef struct _cl_buffer_region {
92    size_t                  origin;
93    size_t                  size;
94} cl_buffer_region;
95
96/******************************************************************************/
97
98/* Error Codes */
99#define CL_SUCCESS                                  0
100#define CL_DEVICE_NOT_FOUND                         -1
101#define CL_DEVICE_NOT_AVAILABLE                     -2
102#define CL_COMPILER_NOT_AVAILABLE                   -3
103#define CL_MEM_OBJECT_ALLOCATION_FAILURE            -4
104#define CL_OUT_OF_RESOURCES                         -5
105#define CL_OUT_OF_HOST_MEMORY                       -6
106#define CL_PROFILING_INFO_NOT_AVAILABLE             -7
107#define CL_MEM_COPY_OVERLAP                         -8
108#define CL_IMAGE_FORMAT_MISMATCH                    -9
109#define CL_IMAGE_FORMAT_NOT_SUPPORTED               -10
110#define CL_BUILD_PROGRAM_FAILURE                    -11
111#define CL_MAP_FAILURE                              -12
112#define CL_MISALIGNED_SUB_BUFFER_OFFSET             -13
113#define CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST -14
114
115#define CL_INVALID_VALUE                            -30
116#define CL_INVALID_DEVICE_TYPE                      -31
117#define CL_INVALID_PLATFORM                         -32
118#define CL_INVALID_DEVICE                           -33
119#define CL_INVALID_CONTEXT                          -34
120#define CL_INVALID_QUEUE_PROPERTIES                 -35
121#define CL_INVALID_COMMAND_QUEUE                    -36
122#define CL_INVALID_HOST_PTR                         -37
123#define CL_INVALID_MEM_OBJECT                       -38
124#define CL_INVALID_IMAGE_FORMAT_DESCRIPTOR          -39
125#define CL_INVALID_IMAGE_SIZE                       -40
126#define CL_INVALID_SAMPLER                          -41
127#define CL_INVALID_BINARY                           -42
128#define CL_INVALID_BUILD_OPTIONS                    -43
129#define CL_INVALID_PROGRAM                          -44
130#define CL_INVALID_PROGRAM_EXECUTABLE               -45
131#define CL_INVALID_KERNEL_NAME                      -46
132#define CL_INVALID_KERNEL_DEFINITION                -47
133#define CL_INVALID_KERNEL                           -48
134#define CL_INVALID_ARG_INDEX                        -49
135#define CL_INVALID_ARG_VALUE                        -50
136#define CL_INVALID_ARG_SIZE                         -51
137#define CL_INVALID_KERNEL_ARGS                      -52
138#define CL_INVALID_WORK_DIMENSION                   -53
139#define CL_INVALID_WORK_GROUP_SIZE                  -54
140#define CL_INVALID_WORK_ITEM_SIZE                   -55
141#define CL_INVALID_GLOBAL_OFFSET                    -56
142#define CL_INVALID_EVENT_WAIT_LIST                  -57
143#define CL_INVALID_EVENT                            -58
144#define CL_INVALID_OPERATION                        -59
145#define CL_INVALID_GL_OBJECT                        -60
146#define CL_INVALID_BUFFER_SIZE                      -61
147#define CL_INVALID_MIP_LEVEL                        -62
148#define CL_INVALID_GLOBAL_WORK_SIZE                 -63
149#define CL_INVALID_PROPERTY                         -64
150
151/* OpenCL Version */
152#define CL_VERSION_1_0                              1
153#define CL_VERSION_1_1                              1
154
155/* cl_bool */
156#define CL_FALSE                                    0
157#define CL_TRUE                                     1
158
159/* cl_platform_info */
160#define CL_PLATFORM_PROFILE                         0x0900
161#define CL_PLATFORM_VERSION                         0x0901
162#define CL_PLATFORM_NAME                            0x0902
163#define CL_PLATFORM_VENDOR                          0x0903
164#define CL_PLATFORM_EXTENSIONS                      0x0904
165
166/* cl_device_type - bitfield */
167#define CL_DEVICE_TYPE_DEFAULT                      (1 << 0)
168#define CL_DEVICE_TYPE_CPU                          (1 << 1)
169#define CL_DEVICE_TYPE_GPU                          (1 << 2)
170#define CL_DEVICE_TYPE_ACCELERATOR                  (1 << 3)
171#define CL_DEVICE_TYPE_ALL                          0xFFFFFFFF
172
173/* cl_device_info */
174#define CL_DEVICE_TYPE                              0x1000
175#define CL_DEVICE_VENDOR_ID                         0x1001
176#define CL_DEVICE_MAX_COMPUTE_UNITS                 0x1002
177#define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS          0x1003
178#define CL_DEVICE_MAX_WORK_GROUP_SIZE               0x1004
179#define CL_DEVICE_MAX_WORK_ITEM_SIZES               0x1005
180#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR       0x1006
181#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT      0x1007
182#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT        0x1008
183#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG       0x1009
184#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT      0x100A
185#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE     0x100B
186#define CL_DEVICE_MAX_CLOCK_FREQUENCY               0x100C
187#define CL_DEVICE_ADDRESS_BITS                      0x100D
188#define CL_DEVICE_MAX_READ_IMAGE_ARGS               0x100E
189#define CL_DEVICE_MAX_WRITE_IMAGE_ARGS              0x100F
190#define CL_DEVICE_MAX_MEM_ALLOC_SIZE                0x1010
191#define CL_DEVICE_IMAGE2D_MAX_WIDTH                 0x1011
192#define CL_DEVICE_IMAGE2D_MAX_HEIGHT                0x1012
193#define CL_DEVICE_IMAGE3D_MAX_WIDTH                 0x1013
194#define CL_DEVICE_IMAGE3D_MAX_HEIGHT                0x1014
195#define CL_DEVICE_IMAGE3D_MAX_DEPTH                 0x1015
196#define CL_DEVICE_IMAGE_SUPPORT                     0x1016
197#define CL_DEVICE_MAX_PARAMETER_SIZE                0x1017
198#define CL_DEVICE_MAX_SAMPLERS                      0x1018
199#define CL_DEVICE_MEM_BASE_ADDR_ALIGN               0x1019
200#define CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE          0x101A
201#define CL_DEVICE_SINGLE_FP_CONFIG                  0x101B
202#define CL_DEVICE_GLOBAL_MEM_CACHE_TYPE             0x101C
203#define CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE         0x101D
204#define CL_DEVICE_GLOBAL_MEM_CACHE_SIZE             0x101E
205#define CL_DEVICE_GLOBAL_MEM_SIZE                   0x101F
206#define CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE          0x1020
207#define CL_DEVICE_MAX_CONSTANT_ARGS                 0x1021
208#define CL_DEVICE_LOCAL_MEM_TYPE                    0x1022
209#define CL_DEVICE_LOCAL_MEM_SIZE                    0x1023
210#define CL_DEVICE_ERROR_CORRECTION_SUPPORT          0x1024
211#define CL_DEVICE_PROFILING_TIMER_RESOLUTION        0x1025
212#define CL_DEVICE_ENDIAN_LITTLE                     0x1026
213#define CL_DEVICE_AVAILABLE                         0x1027
214#define CL_DEVICE_COMPILER_AVAILABLE                0x1028
215#define CL_DEVICE_EXECUTION_CAPABILITIES            0x1029
216#define CL_DEVICE_QUEUE_PROPERTIES                  0x102A
217#define CL_DEVICE_NAME                              0x102B
218#define CL_DEVICE_VENDOR                            0x102C
219#define CL_DRIVER_VERSION                           0x102D
220#define CL_DEVICE_PROFILE                           0x102E
221#define CL_DEVICE_VERSION                           0x102F
222#define CL_DEVICE_EXTENSIONS                        0x1030
223#define CL_DEVICE_PLATFORM                          0x1031
224/* 0x1032 reserved for CL_DEVICE_DOUBLE_FP_CONFIG */
225/* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG */
226#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF       0x1034
227#define CL_DEVICE_HOST_UNIFIED_MEMORY               0x1035
228#define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR          0x1036
229#define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT         0x1037
230#define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT           0x1038
231#define CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG          0x1039
232#define CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT         0x103A
233#define CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE        0x103B
234#define CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF          0x103C
235#define CL_DEVICE_OPENCL_C_VERSION                  0x103D
236
237/* cl_device_fp_config - bitfield */
238#define CL_FP_DENORM                                (1 << 0)
239#define CL_FP_INF_NAN                               (1 << 1)
240#define CL_FP_ROUND_TO_NEAREST                      (1 << 2)
241#define CL_FP_ROUND_TO_ZERO                         (1 << 3)
242#define CL_FP_ROUND_TO_INF                          (1 << 4)
243#define CL_FP_FMA                                   (1 << 5)
244#define CL_FP_SOFT_FLOAT                            (1 << 6)
245
246/* cl_device_mem_cache_type */
247#define CL_NONE                                     0x0
248#define CL_READ_ONLY_CACHE                          0x1
249#define CL_READ_WRITE_CACHE                         0x2
250
251/* cl_device_local_mem_type */
252#define CL_LOCAL                                    0x1
253#define CL_GLOBAL                                   0x2
254
255/* cl_device_exec_capabilities - bitfield */
256#define CL_EXEC_KERNEL                              (1 << 0)
257#define CL_EXEC_NATIVE_KERNEL                       (1 << 1)
258
259/* cl_command_queue_properties - bitfield */
260#define CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE      (1 << 0)
261#define CL_QUEUE_PROFILING_ENABLE                   (1 << 1)
262
263/* cl_context_info  */
264#define CL_CONTEXT_REFERENCE_COUNT                  0x1080
265#define CL_CONTEXT_DEVICES                          0x1081
266#define CL_CONTEXT_PROPERTIES                       0x1082
267#define CL_CONTEXT_NUM_DEVICES                      0x1083
268
269/* cl_context_info + cl_context_properties */
270#define CL_CONTEXT_PLATFORM                         0x1084
271
272/* cl_command_queue_info */
273#define CL_QUEUE_CONTEXT                            0x1090
274#define CL_QUEUE_DEVICE                             0x1091
275#define CL_QUEUE_REFERENCE_COUNT                    0x1092
276#define CL_QUEUE_PROPERTIES                         0x1093
277
278/* cl_mem_flags - bitfield */
279#define CL_MEM_READ_WRITE                           (1 << 0)
280#define CL_MEM_WRITE_ONLY                           (1 << 1)
281#define CL_MEM_READ_ONLY                            (1 << 2)
282#define CL_MEM_USE_HOST_PTR                         (1 << 3)
283#define CL_MEM_ALLOC_HOST_PTR                       (1 << 4)
284#define CL_MEM_COPY_HOST_PTR                        (1 << 5)
285
286/* cl_channel_order */
287#define CL_R                                        0x10B0
288#define CL_A                                        0x10B1
289#define CL_RG                                       0x10B2
290#define CL_RA                                       0x10B3
291#define CL_RGB                                      0x10B4
292#define CL_RGBA                                     0x10B5
293#define CL_BGRA                                     0x10B6
294#define CL_ARGB                                     0x10B7
295#define CL_INTENSITY                                0x10B8
296#define CL_LUMINANCE                                0x10B9
297#define CL_Rx                                       0x10BA
298#define CL_RGx                                      0x10BB
299#define CL_RGBx                                     0x10BC
300
301/* cl_channel_type */
302#define CL_SNORM_INT8                               0x10D0
303#define CL_SNORM_INT16                              0x10D1
304#define CL_UNORM_INT8                               0x10D2
305#define CL_UNORM_INT16                              0x10D3
306#define CL_UNORM_SHORT_565                          0x10D4
307#define CL_UNORM_SHORT_555                          0x10D5
308#define CL_UNORM_INT_101010                         0x10D6
309#define CL_SIGNED_INT8                              0x10D7
310#define CL_SIGNED_INT16                             0x10D8
311#define CL_SIGNED_INT32                             0x10D9
312#define CL_UNSIGNED_INT8                            0x10DA
313#define CL_UNSIGNED_INT16                           0x10DB
314#define CL_UNSIGNED_INT32                           0x10DC
315#define CL_HALF_FLOAT                               0x10DD
316#define CL_FLOAT                                    0x10DE
317
318/* cl_mem_object_type */
319#define CL_MEM_OBJECT_BUFFER                        0x10F0
320#define CL_MEM_OBJECT_IMAGE2D                       0x10F1
321#define CL_MEM_OBJECT_IMAGE3D                       0x10F2
322
323/* cl_mem_info */
324#define CL_MEM_TYPE                                 0x1100
325#define CL_MEM_FLAGS                                0x1101
326#define CL_MEM_SIZE                                 0x1102
327#define CL_MEM_HOST_PTR                             0x1103
328#define CL_MEM_MAP_COUNT                            0x1104
329#define CL_MEM_REFERENCE_COUNT                      0x1105
330#define CL_MEM_CONTEXT                              0x1106
331#define CL_MEM_ASSOCIATED_MEMOBJECT                 0x1107
332#define CL_MEM_OFFSET                               0x1108
333
334/* cl_image_info */
335#define CL_IMAGE_FORMAT                             0x1110
336#define CL_IMAGE_ELEMENT_SIZE                       0x1111
337#define CL_IMAGE_ROW_PITCH                          0x1112
338#define CL_IMAGE_SLICE_PITCH                        0x1113
339#define CL_IMAGE_WIDTH                              0x1114
340#define CL_IMAGE_HEIGHT                             0x1115
341#define CL_IMAGE_DEPTH                              0x1116
342
343/* cl_addressing_mode */
344#define CL_ADDRESS_NONE                             0x1130
345#define CL_ADDRESS_CLAMP_TO_EDGE                    0x1131
346#define CL_ADDRESS_CLAMP                            0x1132
347#define CL_ADDRESS_REPEAT                           0x1133
348#define CL_ADDRESS_MIRRORED_REPEAT                  0x1134
349
350/* cl_filter_mode */
351#define CL_FILTER_NEAREST                           0x1140
352#define CL_FILTER_LINEAR                            0x1141
353
354/* cl_sampler_info */
355#define CL_SAMPLER_REFERENCE_COUNT                  0x1150
356#define CL_SAMPLER_CONTEXT                          0x1151
357#define CL_SAMPLER_NORMALIZED_COORDS                0x1152
358#define CL_SAMPLER_ADDRESSING_MODE                  0x1153
359#define CL_SAMPLER_FILTER_MODE                      0x1154
360
361/* cl_map_flags - bitfield */
362#define CL_MAP_READ                                 (1 << 0)
363#define CL_MAP_WRITE                                (1 << 1)
364
365/* cl_program_info */
366#define CL_PROGRAM_REFERENCE_COUNT                  0x1160
367#define CL_PROGRAM_CONTEXT                          0x1161
368#define CL_PROGRAM_NUM_DEVICES                      0x1162
369#define CL_PROGRAM_DEVICES                          0x1163
370#define CL_PROGRAM_SOURCE                           0x1164
371#define CL_PROGRAM_BINARY_SIZES                     0x1165
372#define CL_PROGRAM_BINARIES                         0x1166
373
374/* cl_program_build_info */
375#define CL_PROGRAM_BUILD_STATUS                     0x1181
376#define CL_PROGRAM_BUILD_OPTIONS                    0x1182
377#define CL_PROGRAM_BUILD_LOG                        0x1183
378
379/* cl_build_status */
380#define CL_BUILD_SUCCESS                            0
381#define CL_BUILD_NONE                               -1
382#define CL_BUILD_ERROR                              -2
383#define CL_BUILD_IN_PROGRESS                        -3
384
385/* cl_kernel_info */
386#define CL_KERNEL_FUNCTION_NAME                     0x1190
387#define CL_KERNEL_NUM_ARGS                          0x1191
388#define CL_KERNEL_REFERENCE_COUNT                   0x1192
389#define CL_KERNEL_CONTEXT                           0x1193
390#define CL_KERNEL_PROGRAM                           0x1194
391
392/* cl_kernel_work_group_info */
393#define CL_KERNEL_WORK_GROUP_SIZE                   0x11B0
394#define CL_KERNEL_COMPILE_WORK_GROUP_SIZE           0x11B1
395#define CL_KERNEL_LOCAL_MEM_SIZE                    0x11B2
396#define CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x11B3
397#define CL_KERNEL_PRIVATE_MEM_SIZE                  0x11B4
398
399/* cl_event_info  */
400#define CL_EVENT_COMMAND_QUEUE                      0x11D0
401#define CL_EVENT_COMMAND_TYPE                       0x11D1
402#define CL_EVENT_REFERENCE_COUNT                    0x11D2
403#define CL_EVENT_COMMAND_EXECUTION_STATUS           0x11D3
404#define CL_EVENT_CONTEXT                            0x11D4
405
406/* cl_command_type */
407#define CL_COMMAND_NDRANGE_KERNEL                   0x11F0
408#define CL_COMMAND_TASK                             0x11F1
409#define CL_COMMAND_NATIVE_KERNEL                    0x11F2
410#define CL_COMMAND_READ_BUFFER                      0x11F3
411#define CL_COMMAND_WRITE_BUFFER                     0x11F4
412#define CL_COMMAND_COPY_BUFFER                      0x11F5
413#define CL_COMMAND_READ_IMAGE                       0x11F6
414#define CL_COMMAND_WRITE_IMAGE                      0x11F7
415#define CL_COMMAND_COPY_IMAGE                       0x11F8
416#define CL_COMMAND_COPY_IMAGE_TO_BUFFER             0x11F9
417#define CL_COMMAND_COPY_BUFFER_TO_IMAGE             0x11FA
418#define CL_COMMAND_MAP_BUFFER                       0x11FB
419#define CL_COMMAND_MAP_IMAGE                        0x11FC
420#define CL_COMMAND_UNMAP_MEM_OBJECT                 0x11FD
421#define CL_COMMAND_MARKER                           0x11FE
422#define CL_COMMAND_ACQUIRE_GL_OBJECTS               0x11FF
423#define CL_COMMAND_RELEASE_GL_OBJECTS               0x1200
424#define CL_COMMAND_READ_BUFFER_RECT                 0x1201
425#define CL_COMMAND_WRITE_BUFFER_RECT                0x1202
426#define CL_COMMAND_COPY_BUFFER_RECT                 0x1203
427#define CL_COMMAND_USER                             0x1204
428
429/* command execution status */
430#define CL_COMPLETE                                 0x0
431#define CL_RUNNING                                  0x1
432#define CL_SUBMITTED                                0x2
433#define CL_QUEUED                                   0x3
434
435/* cl_buffer_create_type  */
436#define CL_BUFFER_CREATE_TYPE_REGION                0x1220
437
438/* cl_profiling_info  */
439#define CL_PROFILING_COMMAND_QUEUED                 0x1280
440#define CL_PROFILING_COMMAND_SUBMIT                 0x1281
441#define CL_PROFILING_COMMAND_START                  0x1282
442#define CL_PROFILING_COMMAND_END                    0x1283
443
444/********************************************************************************************************/
445
446/* Platform API */
447extern CL_API_ENTRY cl_int CL_API_CALL
448clGetPlatformIDs(cl_uint          /* num_entries */,
449                 cl_platform_id * /* platforms */,
450                 cl_uint *        /* num_platforms */) CL_API_SUFFIX__VERSION_1_0;
451
452extern CL_API_ENTRY cl_int CL_API_CALL
453clGetPlatformInfo(cl_platform_id   /* platform */,
454                  cl_platform_info /* param_name */,
455                  size_t           /* param_value_size */,
456                  void *           /* param_value */,
457                  size_t *         /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
458
459/* Device APIs */
460extern CL_API_ENTRY cl_int CL_API_CALL
461clGetDeviceIDs(cl_platform_id   /* platform */,
462               cl_device_type   /* device_type */,
463               cl_uint          /* num_entries */,
464               cl_device_id *   /* devices */,
465               cl_uint *        /* num_devices */) CL_API_SUFFIX__VERSION_1_0;
466
467extern CL_API_ENTRY cl_int CL_API_CALL
468clGetDeviceInfo(cl_device_id    /* device */,
469                cl_device_info  /* param_name */,
470                size_t          /* param_value_size */,
471                void *          /* param_value */,
472                size_t *        /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
473
474/* Context APIs  */
475extern CL_API_ENTRY cl_context CL_API_CALL
476clCreateContext(const cl_context_properties * /* properties */,
477                cl_uint                       /* num_devices */,
478                const cl_device_id *          /* devices */,
479                void (CL_CALLBACK * /* pfn_notify */)(const char *, const void *, size_t, void *),
480                void *                        /* user_data */,
481                cl_int *                      /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
482
483extern CL_API_ENTRY cl_context CL_API_CALL
484clCreateContextFromType(const cl_context_properties * /* properties */,
485                        cl_device_type                /* device_type */,
486                        void (CL_CALLBACK *     /* pfn_notify*/ )(const char *, const void *, size_t, void *),
487                        void *                        /* user_data */,
488                        cl_int *                      /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
489
490extern CL_API_ENTRY cl_int CL_API_CALL
491clRetainContext(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0;
492
493extern CL_API_ENTRY cl_int CL_API_CALL
494clReleaseContext(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0;
495
496extern CL_API_ENTRY cl_int CL_API_CALL
497clGetContextInfo(cl_context         /* context */,
498                 cl_context_info    /* param_name */,
499                 size_t             /* param_value_size */,
500                 void *             /* param_value */,
501                 size_t *           /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
502
503/* Command Queue APIs */
504extern CL_API_ENTRY cl_command_queue CL_API_CALL
505clCreateCommandQueue(cl_context                     /* context */,
506                     cl_device_id                   /* device */,
507                     cl_command_queue_properties    /* properties */,
508                     cl_int *                       /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
509
510extern CL_API_ENTRY cl_int CL_API_CALL
511clRetainCommandQueue(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
512
513extern CL_API_ENTRY cl_int CL_API_CALL
514clReleaseCommandQueue(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
515
516extern CL_API_ENTRY cl_int CL_API_CALL
517clGetCommandQueueInfo(cl_command_queue      /* command_queue */,
518                      cl_command_queue_info /* param_name */,
519                      size_t                /* param_value_size */,
520                      void *                /* param_value */,
521                      size_t *              /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
522
523#ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
524#warning CL_USE_DEPRECATED_OPENCL_1_0_APIS is defined. These APIs are unsupported and untested in OpenCL 1.1!
525/*
526 *  WARNING:
527 *     This API introduces mutable state into the OpenCL implementation. It has been REMOVED
528 *  to better facilitate thread safety.  The 1.0 API is not thread safe. It is not tested by the
529 *  OpenCL 1.1 conformance test, and consequently may not work or may not work dependably.
530 *  It is likely to be non-performant. Use of this API is not advised. Use at your own risk.
531 *
532 *  Software developers previously relying on this API are instructed to set the command queue
533 *  properties when creating the queue, instead.
534 */
535extern CL_API_ENTRY cl_int CL_API_CALL
536clSetCommandQueueProperty(cl_command_queue              /* command_queue */,
537                          cl_command_queue_properties   /* properties */,
538                          cl_bool                        /* enable */,
539                          cl_command_queue_properties * /* old_properties */) CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED;
540#endif /* CL_USE_DEPRECATED_OPENCL_1_0_APIS */
541
542/* Memory Object APIs */
543extern CL_API_ENTRY cl_mem CL_API_CALL
544clCreateBuffer(cl_context   /* context */,
545               cl_mem_flags /* flags */,
546               size_t       /* size */,
547               void *       /* host_ptr */,
548               cl_int *     /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
549
550extern CL_API_ENTRY cl_mem CL_API_CALL
551clCreateSubBuffer(cl_mem                   /* buffer */,
552                  cl_mem_flags             /* flags */,
553                  cl_buffer_create_type    /* buffer_create_type */,
554                  const void *             /* buffer_create_info */,
555                  cl_int *                 /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
556
557extern CL_API_ENTRY cl_mem CL_API_CALL
558clCreateImage2D(cl_context              /* context */,
559                cl_mem_flags            /* flags */,
560                const cl_image_format * /* image_format */,
561                size_t                  /* image_width */,
562                size_t                  /* image_height */,
563                size_t                  /* image_row_pitch */,
564                void *                  /* host_ptr */,
565                cl_int *                /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
566
567extern CL_API_ENTRY cl_mem CL_API_CALL
568clCreateImage3D(cl_context              /* context */,
569                cl_mem_flags            /* flags */,
570                const cl_image_format * /* image_format */,
571                size_t                  /* image_width */,
572                size_t                  /* image_height */,
573                size_t                  /* image_depth */,
574                size_t                  /* image_row_pitch */,
575                size_t                  /* image_slice_pitch */,
576                void *                  /* host_ptr */,
577                cl_int *                /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
578
579extern CL_API_ENTRY cl_int CL_API_CALL
580clRetainMemObject(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0;
581
582extern CL_API_ENTRY cl_int CL_API_CALL
583clReleaseMemObject(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0;
584
585extern CL_API_ENTRY cl_int CL_API_CALL
586clGetSupportedImageFormats(cl_context           /* context */,
587                           cl_mem_flags         /* flags */,
588                           cl_mem_object_type   /* image_type */,
589                           cl_uint              /* num_entries */,
590                           cl_image_format *    /* image_formats */,
591                           cl_uint *            /* num_image_formats */) CL_API_SUFFIX__VERSION_1_0;
592
593extern CL_API_ENTRY cl_int CL_API_CALL
594clGetMemObjectInfo(cl_mem           /* memobj */,
595                   cl_mem_info      /* param_name */,
596                   size_t           /* param_value_size */,
597                   void *           /* param_value */,
598                   size_t *         /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
599
600extern CL_API_ENTRY cl_int CL_API_CALL
601clGetImageInfo(cl_mem           /* image */,
602               cl_image_info    /* param_name */,
603               size_t           /* param_value_size */,
604               void *           /* param_value */,
605               size_t *         /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
606
607extern CL_API_ENTRY cl_int CL_API_CALL
608clSetMemObjectDestructorCallback(  cl_mem /* memobj */,
609                                    void (CL_CALLBACK * /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/),
610                                    void * /*user_data */ )             CL_API_SUFFIX__VERSION_1_1;
611
612/* Sampler APIs  */
613extern CL_API_ENTRY cl_sampler CL_API_CALL
614clCreateSampler(cl_context          /* context */,
615                cl_bool             /* normalized_coords */,
616                cl_addressing_mode  /* addressing_mode */,
617                cl_filter_mode      /* filter_mode */,
618                cl_int *            /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
619
620extern CL_API_ENTRY cl_int CL_API_CALL
621clRetainSampler(cl_sampler /* sampler */) CL_API_SUFFIX__VERSION_1_0;
622
623extern CL_API_ENTRY cl_int CL_API_CALL
624clReleaseSampler(cl_sampler /* sampler */) CL_API_SUFFIX__VERSION_1_0;
625
626extern CL_API_ENTRY cl_int CL_API_CALL
627clGetSamplerInfo(cl_sampler         /* sampler */,
628                 cl_sampler_info    /* param_name */,
629                 size_t             /* param_value_size */,
630                 void *             /* param_value */,
631                 size_t *           /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
632
633/* Program Object APIs  */
634extern CL_API_ENTRY cl_program CL_API_CALL
635clCreateProgramWithSource(cl_context        /* context */,
636                          cl_uint           /* count */,
637                          const char **     /* strings */,
638                          const size_t *    /* lengths */,
639                          cl_int *          /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
640
641extern CL_API_ENTRY cl_program CL_API_CALL
642clCreateProgramWithBinary(cl_context                     /* context */,
643                          cl_uint                        /* num_devices */,
644                          const cl_device_id *           /* device_list */,
645                          const size_t *                 /* lengths */,
646                          const unsigned char **         /* binaries */,
647                          cl_int *                       /* binary_status */,
648                          cl_int *                       /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
649
650extern CL_API_ENTRY cl_int CL_API_CALL
651clRetainProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0;
652
653extern CL_API_ENTRY cl_int CL_API_CALL
654clReleaseProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0;
655
656extern CL_API_ENTRY cl_int CL_API_CALL
657clBuildProgram(cl_program           /* program */,
658               cl_uint              /* num_devices */,
659               const cl_device_id * /* device_list */,
660               const char *         /* options */,
661               void (CL_CALLBACK *  /* pfn_notify */)(cl_program /* program */, void * /* user_data */),
662               void *               /* user_data */) CL_API_SUFFIX__VERSION_1_0;
663
664extern CL_API_ENTRY cl_int CL_API_CALL
665clUnloadCompiler(void) CL_API_SUFFIX__VERSION_1_0;
666
667extern CL_API_ENTRY cl_int CL_API_CALL
668clGetProgramInfo(cl_program         /* program */,
669                 cl_program_info    /* param_name */,
670                 size_t             /* param_value_size */,
671                 void *             /* param_value */,
672                 size_t *           /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
673
674extern CL_API_ENTRY cl_int CL_API_CALL
675clGetProgramBuildInfo(cl_program            /* program */,
676                      cl_device_id          /* device */,
677                      cl_program_build_info /* param_name */,
678                      size_t                /* param_value_size */,
679                      void *                /* param_value */,
680                      size_t *              /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
681
682/* Kernel Object APIs */
683extern CL_API_ENTRY cl_kernel CL_API_CALL
684clCreateKernel(cl_program      /* program */,
685               const char *    /* kernel_name */,
686               cl_int *        /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
687
688extern CL_API_ENTRY cl_int CL_API_CALL
689clCreateKernelsInProgram(cl_program     /* program */,
690                         cl_uint        /* num_kernels */,
691                         cl_kernel *    /* kernels */,
692                         cl_uint *      /* num_kernels_ret */) CL_API_SUFFIX__VERSION_1_0;
693
694extern CL_API_ENTRY cl_int CL_API_CALL
695clRetainKernel(cl_kernel    /* kernel */) CL_API_SUFFIX__VERSION_1_0;
696
697extern CL_API_ENTRY cl_int CL_API_CALL
698clReleaseKernel(cl_kernel   /* kernel */) CL_API_SUFFIX__VERSION_1_0;
699
700extern CL_API_ENTRY cl_int CL_API_CALL
701clSetKernelArg(cl_kernel    /* kernel */,
702               cl_uint      /* arg_index */,
703               size_t       /* arg_size */,
704               const void * /* arg_value */) CL_API_SUFFIX__VERSION_1_0;
705
706extern CL_API_ENTRY cl_int CL_API_CALL
707clGetKernelInfo(cl_kernel       /* kernel */,
708                cl_kernel_info  /* param_name */,
709                size_t          /* param_value_size */,
710                void *          /* param_value */,
711                size_t *        /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
712
713extern CL_API_ENTRY cl_int CL_API_CALL
714clGetKernelWorkGroupInfo(cl_kernel                  /* kernel */,
715                         cl_device_id               /* device */,
716                         cl_kernel_work_group_info  /* param_name */,
717                         size_t                     /* param_value_size */,
718                         void *                     /* param_value */,
719                         size_t *                   /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
720
721/* Event Object APIs  */
722extern CL_API_ENTRY cl_int CL_API_CALL
723clWaitForEvents(cl_uint             /* num_events */,
724                const cl_event *    /* event_list */) CL_API_SUFFIX__VERSION_1_0;
725
726extern CL_API_ENTRY cl_int CL_API_CALL
727clGetEventInfo(cl_event         /* event */,
728               cl_event_info    /* param_name */,
729               size_t           /* param_value_size */,
730               void *           /* param_value */,
731               size_t *         /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
732
733extern CL_API_ENTRY cl_event CL_API_CALL
734clCreateUserEvent(cl_context    /* context */,
735                  cl_int *      /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
736
737extern CL_API_ENTRY cl_int CL_API_CALL
738clRetainEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0;
739
740extern CL_API_ENTRY cl_int CL_API_CALL
741clReleaseEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0;
742
743extern CL_API_ENTRY cl_int CL_API_CALL
744clSetUserEventStatus(cl_event   /* event */,
745                     cl_int     /* execution_status */) CL_API_SUFFIX__VERSION_1_1;
746
747extern CL_API_ENTRY cl_int CL_API_CALL
748clSetEventCallback( cl_event    /* event */,
749                    cl_int      /* command_exec_callback_type */,
750                    void (CL_CALLBACK * /* pfn_notify */)(cl_event, cl_int, void *),
751                    void *      /* user_data */) CL_API_SUFFIX__VERSION_1_1;
752
753/* Profiling APIs  */
754extern CL_API_ENTRY cl_int CL_API_CALL
755clGetEventProfilingInfo(cl_event            /* event */,
756                        cl_profiling_info   /* param_name */,
757                        size_t              /* param_value_size */,
758                        void *              /* param_value */,
759                        size_t *            /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
760
761/* Flush and Finish APIs */
762extern CL_API_ENTRY cl_int CL_API_CALL
763clFlush(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
764
765extern CL_API_ENTRY cl_int CL_API_CALL
766clFinish(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
767
768/* Enqueued Commands APIs */
769extern CL_API_ENTRY cl_int CL_API_CALL
770clEnqueueReadBuffer(cl_command_queue    /* command_queue */,
771                    cl_mem              /* buffer */,
772                    cl_bool             /* blocking_read */,
773                    size_t              /* offset */,
774                    size_t              /* cb */,
775                    void *              /* ptr */,
776                    cl_uint             /* num_events_in_wait_list */,
777                    const cl_event *    /* event_wait_list */,
778                    cl_event *          /* event */) CL_API_SUFFIX__VERSION_1_0;
779
780extern CL_API_ENTRY cl_int CL_API_CALL
781clEnqueueReadBufferRect(cl_command_queue    /* command_queue */,
782                        cl_mem              /* buffer */,
783                        cl_bool             /* blocking_read */,
784                        const size_t *      /* buffer_origin */,
785                        const size_t *      /* host_origin */,
786                        const size_t *      /* region */,
787                        size_t              /* buffer_row_pitch */,
788                        size_t              /* buffer_slice_pitch */,
789                        size_t              /* host_row_pitch */,
790                        size_t              /* host_slice_pitch */,
791                        void *              /* ptr */,
792                        cl_uint             /* num_events_in_wait_list */,
793                        const cl_event *    /* event_wait_list */,
794                        cl_event *          /* event */) CL_API_SUFFIX__VERSION_1_1;
795
796extern CL_API_ENTRY cl_int CL_API_CALL
797clEnqueueWriteBuffer(cl_command_queue   /* command_queue */,
798                     cl_mem             /* buffer */,
799                     cl_bool            /* blocking_write */,
800                     size_t             /* offset */,
801                     size_t             /* cb */,
802                     const void *       /* ptr */,
803                     cl_uint            /* num_events_in_wait_list */,
804                     const cl_event *   /* event_wait_list */,
805                     cl_event *         /* event */) CL_API_SUFFIX__VERSION_1_0;
806
807extern CL_API_ENTRY cl_int CL_API_CALL
808clEnqueueWriteBufferRect(cl_command_queue    /* command_queue */,
809                         cl_mem              /* buffer */,
810                         cl_bool             /* blocking_write */,
811                         const size_t *      /* buffer_origin */,
812                         const size_t *      /* host_origin */,
813                         const size_t *      /* region */,
814                         size_t              /* buffer_row_pitch */,
815                         size_t              /* buffer_slice_pitch */,
816                         size_t              /* host_row_pitch */,
817                         size_t              /* host_slice_pitch */,
818                         const void *        /* ptr */,
819                         cl_uint             /* num_events_in_wait_list */,
820                         const cl_event *    /* event_wait_list */,
821                         cl_event *          /* event */) CL_API_SUFFIX__VERSION_1_1;
822
823extern CL_API_ENTRY cl_int CL_API_CALL
824clEnqueueCopyBuffer(cl_command_queue    /* command_queue */,
825                    cl_mem              /* src_buffer */,
826                    cl_mem              /* dst_buffer */,
827                    size_t              /* src_offset */,
828                    size_t              /* dst_offset */,
829                    size_t              /* cb */,
830                    cl_uint             /* num_events_in_wait_list */,
831                    const cl_event *    /* event_wait_list */,
832                    cl_event *          /* event */) CL_API_SUFFIX__VERSION_1_0;
833
834extern CL_API_ENTRY cl_int CL_API_CALL
835clEnqueueCopyBufferRect(cl_command_queue    /* command_queue */,
836                        cl_mem              /* src_buffer */,
837                        cl_mem              /* dst_buffer */,
838                        const size_t *      /* src_origin */,
839                        const size_t *      /* dst_origin */,
840                        const size_t *      /* region */,
841                        size_t              /* src_row_pitch */,
842                        size_t              /* src_slice_pitch */,
843                        size_t              /* dst_row_pitch */,
844                        size_t              /* dst_slice_pitch */,
845                        cl_uint             /* num_events_in_wait_list */,
846                        const cl_event *    /* event_wait_list */,
847                        cl_event *          /* event */) CL_API_SUFFIX__VERSION_1_1;
848
849extern CL_API_ENTRY cl_int CL_API_CALL
850clEnqueueReadImage(cl_command_queue     /* command_queue */,
851                   cl_mem               /* image */,
852                   cl_bool              /* blocking_read */,
853                   const size_t *       /* origin[3] */,
854                   const size_t *       /* region[3] */,
855                   size_t               /* row_pitch */,
856                   size_t               /* slice_pitch */,
857                   void *               /* ptr */,
858                   cl_uint              /* num_events_in_wait_list */,
859                   const cl_event *     /* event_wait_list */,
860                   cl_event *           /* event */) CL_API_SUFFIX__VERSION_1_0;
861
862extern CL_API_ENTRY cl_int CL_API_CALL
863clEnqueueWriteImage(cl_command_queue    /* command_queue */,
864                    cl_mem              /* image */,
865                    cl_bool             /* blocking_write */,
866                    const size_t *      /* origin[3] */,
867                    const size_t *      /* region[3] */,
868                    size_t              /* input_row_pitch */,
869                    size_t              /* input_slice_pitch */,
870                    const void *        /* ptr */,
871                    cl_uint             /* num_events_in_wait_list */,
872                    const cl_event *    /* event_wait_list */,
873                    cl_event *          /* event */) CL_API_SUFFIX__VERSION_1_0;
874
875extern CL_API_ENTRY cl_int CL_API_CALL
876clEnqueueCopyImage(cl_command_queue     /* command_queue */,
877                   cl_mem               /* src_image */,
878                   cl_mem               /* dst_image */,
879                   const size_t *       /* src_origin[3] */,
880                   const size_t *       /* dst_origin[3] */,
881                   const size_t *       /* region[3] */,
882                   cl_uint              /* num_events_in_wait_list */,
883                   const cl_event *     /* event_wait_list */,
884                   cl_event *           /* event */) CL_API_SUFFIX__VERSION_1_0;
885
886extern CL_API_ENTRY cl_int CL_API_CALL
887clEnqueueCopyImageToBuffer(cl_command_queue /* command_queue */,
888                           cl_mem           /* src_image */,
889                           cl_mem           /* dst_buffer */,
890                           const size_t *   /* src_origin[3] */,
891                           const size_t *   /* region[3] */,
892                           size_t           /* dst_offset */,
893                           cl_uint          /* num_events_in_wait_list */,
894                           const cl_event * /* event_wait_list */,
895                           cl_event *       /* event */) CL_API_SUFFIX__VERSION_1_0;
896
897extern CL_API_ENTRY cl_int CL_API_CALL
898clEnqueueCopyBufferToImage(cl_command_queue /* command_queue */,
899                           cl_mem           /* src_buffer */,
900                           cl_mem           /* dst_image */,
901                           size_t           /* src_offset */,
902                           const size_t *   /* dst_origin[3] */,
903                           const size_t *   /* region[3] */,
904                           cl_uint          /* num_events_in_wait_list */,
905                           const cl_event * /* event_wait_list */,
906                           cl_event *       /* event */) CL_API_SUFFIX__VERSION_1_0;
907
908extern CL_API_ENTRY void * CL_API_CALL
909clEnqueueMapBuffer(cl_command_queue /* command_queue */,
910                   cl_mem           /* buffer */,
911                   cl_bool          /* blocking_map */,
912                   cl_map_flags     /* map_flags */,
913                   size_t           /* offset */,
914                   size_t           /* cb */,
915                   cl_uint          /* num_events_in_wait_list */,
916                   const cl_event * /* event_wait_list */,
917                   cl_event *       /* event */,
918                   cl_int *         /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
919
920extern CL_API_ENTRY void * CL_API_CALL
921clEnqueueMapImage(cl_command_queue  /* command_queue */,
922                  cl_mem            /* image */,
923                  cl_bool           /* blocking_map */,
924                  cl_map_flags      /* map_flags */,
925                  const size_t *    /* origin[3] */,
926                  const size_t *    /* region[3] */,
927                  size_t *          /* image_row_pitch */,
928                  size_t *          /* image_slice_pitch */,
929                  cl_uint           /* num_events_in_wait_list */,
930                  const cl_event *  /* event_wait_list */,
931                  cl_event *        /* event */,
932                  cl_int *          /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
933
934extern CL_API_ENTRY cl_int CL_API_CALL
935clEnqueueUnmapMemObject(cl_command_queue /* command_queue */,
936                        cl_mem           /* memobj */,
937                        void *           /* mapped_ptr */,
938                        cl_uint          /* num_events_in_wait_list */,
939                        const cl_event *  /* event_wait_list */,
940                        cl_event *        /* event */) CL_API_SUFFIX__VERSION_1_0;
941
942extern CL_API_ENTRY cl_int CL_API_CALL
943clEnqueueNDRangeKernel(cl_command_queue /* command_queue */,
944                       cl_kernel        /* kernel */,
945                       cl_uint          /* work_dim */,
946                       const size_t *   /* global_work_offset */,
947                       const size_t *   /* global_work_size */,
948                       const size_t *   /* local_work_size */,
949                       cl_uint          /* num_events_in_wait_list */,
950                       const cl_event * /* event_wait_list */,
951                       cl_event *       /* event */) CL_API_SUFFIX__VERSION_1_0;
952
953extern CL_API_ENTRY cl_int CL_API_CALL
954clEnqueueTask(cl_command_queue  /* command_queue */,
955              cl_kernel         /* kernel */,
956              cl_uint           /* num_events_in_wait_list */,
957              const cl_event *  /* event_wait_list */,
958              cl_event *        /* event */) CL_API_SUFFIX__VERSION_1_0;
959
960extern CL_API_ENTRY cl_int CL_API_CALL
961clEnqueueNativeKernel(cl_command_queue  /* command_queue */,
962					  void (*user_func)(void *),
963                      void *            /* args */,
964                      size_t            /* cb_args */,
965                      cl_uint           /* num_mem_objects */,
966                      const cl_mem *    /* mem_list */,
967                      const void **     /* args_mem_loc */,
968                      cl_uint           /* num_events_in_wait_list */,
969                      const cl_event *  /* event_wait_list */,
970                      cl_event *        /* event */) CL_API_SUFFIX__VERSION_1_0;
971
972extern CL_API_ENTRY cl_int CL_API_CALL
973clEnqueueMarker(cl_command_queue    /* command_queue */,
974                cl_event *          /* event */) CL_API_SUFFIX__VERSION_1_0;
975
976extern CL_API_ENTRY cl_int CL_API_CALL
977clEnqueueWaitForEvents(cl_command_queue /* command_queue */,
978                       cl_uint          /* num_events */,
979                       const cl_event * /* event_list */) CL_API_SUFFIX__VERSION_1_0;
980
981extern CL_API_ENTRY cl_int CL_API_CALL
982clEnqueueBarrier(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
983
984/* Extension function access
985 *
986 * Returns the extension function address for the given function name,
987 * or NULL if a valid function can not be found.  The client must
988 * check to make sure the address is not NULL, before using or
989 * calling the returned function address.
990 */
991extern CL_API_ENTRY void * CL_API_CALL clGetExtensionFunctionAddress(const char * /* func_name */) CL_API_SUFFIX__VERSION_1_0;
992
993#ifdef __cplusplus
994}
995#endif
996
997#endif  /* __OPENCL_CL_H */
998
999