blob: 7224ed38faad33d8ed9c25acaeee26400c716aa6 [file] [log] [blame]
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001/*******************************************************************************
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01002 * Copyright (c) 2008-2018 The Khronos Group Inc.
Anthony Barbier6ff3b192017-09-04 18:44:23 +01003 *
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 *
Pablo Telloe86a09f2018-01-11 15:44:48 +000015 * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
16 * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
17 * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
18 * https://www.khronos.org/registry/
19 *
Anthony Barbier6ff3b192017-09-04 18:44:23 +010020 * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
27 ******************************************************************************/
28
29#ifndef __OPENCL_CL_H
30#define __OPENCL_CL_H
31
32#ifdef __APPLE__
Anthony Barbier8b2fdc92018-08-09 11:42:38 +010033#include <OpenCL/cl_version.h>
Anthony Barbier6ff3b192017-09-04 18:44:23 +010034#include <OpenCL/cl_platform.h>
35#else
Anthony Barbier8b2fdc92018-08-09 11:42:38 +010036#include <CL/cl_version.h>
Anthony Barbier6ff3b192017-09-04 18:44:23 +010037#include <CL/cl_platform.h>
Anthony Barbier8b2fdc92018-08-09 11:42:38 +010038#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +010039
40#ifdef __cplusplus
41extern "C" {
42#endif
43
44/******************************************************************************/
45
46typedef struct _cl_platform_id * cl_platform_id;
47typedef struct _cl_device_id * cl_device_id;
48typedef struct _cl_context * cl_context;
49typedef struct _cl_command_queue * cl_command_queue;
50typedef struct _cl_mem * cl_mem;
51typedef struct _cl_program * cl_program;
52typedef struct _cl_kernel * cl_kernel;
53typedef struct _cl_event * cl_event;
54typedef struct _cl_sampler * cl_sampler;
55
Anthony Barbier8b2fdc92018-08-09 11:42:38 +010056typedef 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. */
Anthony Barbier6ff3b192017-09-04 18:44:23 +010057typedef cl_ulong cl_bitfield;
58typedef cl_bitfield cl_device_type;
59typedef cl_uint cl_platform_info;
60typedef cl_uint cl_device_info;
61typedef cl_bitfield cl_device_fp_config;
62typedef cl_uint cl_device_mem_cache_type;
63typedef cl_uint cl_device_local_mem_type;
64typedef cl_bitfield cl_device_exec_capabilities;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +010065#ifdef CL_VERSION_2_0
Pablo Telloe86a09f2018-01-11 15:44:48 +000066typedef cl_bitfield cl_device_svm_capabilities;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +010067#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +010068typedef cl_bitfield cl_command_queue_properties;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +010069#ifdef CL_VERSION_1_2
Anthony Barbier6ff3b192017-09-04 18:44:23 +010070typedef intptr_t cl_device_partition_property;
71typedef cl_bitfield cl_device_affinity_domain;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +010072#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +010073
74typedef intptr_t cl_context_properties;
75typedef cl_uint cl_context_info;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +010076#ifdef CL_VERSION_2_0
Pablo Telloe86a09f2018-01-11 15:44:48 +000077typedef cl_bitfield cl_queue_properties;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +010078#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +010079typedef cl_uint cl_command_queue_info;
80typedef cl_uint cl_channel_order;
81typedef cl_uint cl_channel_type;
82typedef cl_bitfield cl_mem_flags;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +010083#ifdef CL_VERSION_2_0
Pablo Telloe86a09f2018-01-11 15:44:48 +000084typedef cl_bitfield cl_svm_mem_flags;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +010085#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +010086typedef cl_uint cl_mem_object_type;
87typedef cl_uint cl_mem_info;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +010088#ifdef CL_VERSION_1_2
Anthony Barbier6ff3b192017-09-04 18:44:23 +010089typedef cl_bitfield cl_mem_migration_flags;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +010090#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +010091typedef cl_uint cl_image_info;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +010092#ifdef CL_VERSION_1_1
Anthony Barbier6ff3b192017-09-04 18:44:23 +010093typedef cl_uint cl_buffer_create_type;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +010094#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +010095typedef cl_uint cl_addressing_mode;
96typedef cl_uint cl_filter_mode;
97typedef cl_uint cl_sampler_info;
98typedef cl_bitfield cl_map_flags;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +010099#ifdef CL_VERSION_2_0
Pablo Telloe86a09f2018-01-11 15:44:48 +0000100typedef intptr_t cl_pipe_properties;
101typedef cl_uint cl_pipe_info;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100102#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100103typedef cl_uint cl_program_info;
104typedef cl_uint cl_program_build_info;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100105#ifdef CL_VERSION_1_2
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100106typedef cl_uint cl_program_binary_type;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100107#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100108typedef cl_int cl_build_status;
109typedef cl_uint cl_kernel_info;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100110#ifdef CL_VERSION_1_2
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100111typedef cl_uint cl_kernel_arg_info;
112typedef cl_uint cl_kernel_arg_address_qualifier;
113typedef cl_uint cl_kernel_arg_access_qualifier;
114typedef cl_bitfield cl_kernel_arg_type_qualifier;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100115#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100116typedef cl_uint cl_kernel_work_group_info;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100117#ifdef CL_VERSION_2_1
Pablo Telloe86a09f2018-01-11 15:44:48 +0000118typedef cl_uint cl_kernel_sub_group_info;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100119#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100120typedef cl_uint cl_event_info;
121typedef cl_uint cl_command_type;
122typedef cl_uint cl_profiling_info;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100123#ifdef CL_VERSION_2_0
Pablo Telloe86a09f2018-01-11 15:44:48 +0000124typedef cl_bitfield cl_sampler_properties;
125typedef cl_uint cl_kernel_exec_info;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100126#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100127
128typedef struct _cl_image_format {
129 cl_channel_order image_channel_order;
130 cl_channel_type image_channel_data_type;
131} cl_image_format;
132
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100133#ifdef CL_VERSION_1_2
134
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100135typedef struct _cl_image_desc {
136 cl_mem_object_type image_type;
137 size_t image_width;
138 size_t image_height;
139 size_t image_depth;
140 size_t image_array_size;
141 size_t image_row_pitch;
142 size_t image_slice_pitch;
143 cl_uint num_mip_levels;
144 cl_uint num_samples;
Pablo Telloe86a09f2018-01-11 15:44:48 +0000145#ifdef __GNUC__
146 __extension__ /* Prevents warnings about anonymous union in -pedantic builds */
147#endif
148 union {
149 cl_mem buffer;
150 cl_mem mem_object;
151 };
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100152} cl_image_desc;
153
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100154#endif
155
156#ifdef CL_VERSION_1_1
157
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100158typedef struct _cl_buffer_region {
159 size_t origin;
160 size_t size;
161} cl_buffer_region;
162
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100163#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100164
165/******************************************************************************/
166
167/* Error Codes */
168#define CL_SUCCESS 0
169#define CL_DEVICE_NOT_FOUND -1
170#define CL_DEVICE_NOT_AVAILABLE -2
171#define CL_COMPILER_NOT_AVAILABLE -3
172#define CL_MEM_OBJECT_ALLOCATION_FAILURE -4
173#define CL_OUT_OF_RESOURCES -5
174#define CL_OUT_OF_HOST_MEMORY -6
175#define CL_PROFILING_INFO_NOT_AVAILABLE -7
176#define CL_MEM_COPY_OVERLAP -8
177#define CL_IMAGE_FORMAT_MISMATCH -9
178#define CL_IMAGE_FORMAT_NOT_SUPPORTED -10
179#define CL_BUILD_PROGRAM_FAILURE -11
180#define CL_MAP_FAILURE -12
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100181#ifdef CL_VERSION_1_1
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100182#define CL_MISALIGNED_SUB_BUFFER_OFFSET -13
183#define CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST -14
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100184#endif
185#ifdef CL_VERSION_1_2
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100186#define CL_COMPILE_PROGRAM_FAILURE -15
187#define CL_LINKER_NOT_AVAILABLE -16
188#define CL_LINK_PROGRAM_FAILURE -17
189#define CL_DEVICE_PARTITION_FAILED -18
190#define CL_KERNEL_ARG_INFO_NOT_AVAILABLE -19
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100191#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100192
193#define CL_INVALID_VALUE -30
194#define CL_INVALID_DEVICE_TYPE -31
195#define CL_INVALID_PLATFORM -32
196#define CL_INVALID_DEVICE -33
197#define CL_INVALID_CONTEXT -34
198#define CL_INVALID_QUEUE_PROPERTIES -35
199#define CL_INVALID_COMMAND_QUEUE -36
200#define CL_INVALID_HOST_PTR -37
201#define CL_INVALID_MEM_OBJECT -38
202#define CL_INVALID_IMAGE_FORMAT_DESCRIPTOR -39
203#define CL_INVALID_IMAGE_SIZE -40
204#define CL_INVALID_SAMPLER -41
205#define CL_INVALID_BINARY -42
206#define CL_INVALID_BUILD_OPTIONS -43
207#define CL_INVALID_PROGRAM -44
208#define CL_INVALID_PROGRAM_EXECUTABLE -45
209#define CL_INVALID_KERNEL_NAME -46
210#define CL_INVALID_KERNEL_DEFINITION -47
211#define CL_INVALID_KERNEL -48
212#define CL_INVALID_ARG_INDEX -49
213#define CL_INVALID_ARG_VALUE -50
214#define CL_INVALID_ARG_SIZE -51
215#define CL_INVALID_KERNEL_ARGS -52
216#define CL_INVALID_WORK_DIMENSION -53
217#define CL_INVALID_WORK_GROUP_SIZE -54
218#define CL_INVALID_WORK_ITEM_SIZE -55
219#define CL_INVALID_GLOBAL_OFFSET -56
220#define CL_INVALID_EVENT_WAIT_LIST -57
221#define CL_INVALID_EVENT -58
222#define CL_INVALID_OPERATION -59
223#define CL_INVALID_GL_OBJECT -60
224#define CL_INVALID_BUFFER_SIZE -61
225#define CL_INVALID_MIP_LEVEL -62
226#define CL_INVALID_GLOBAL_WORK_SIZE -63
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100227#ifdef CL_VERSION_1_1
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100228#define CL_INVALID_PROPERTY -64
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100229#endif
230#ifdef CL_VERSION_1_2
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100231#define CL_INVALID_IMAGE_DESCRIPTOR -65
232#define CL_INVALID_COMPILER_OPTIONS -66
233#define CL_INVALID_LINKER_OPTIONS -67
234#define CL_INVALID_DEVICE_PARTITION_COUNT -68
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100235#endif
236#ifdef CL_VERSION_2_0
Pablo Telloe86a09f2018-01-11 15:44:48 +0000237#define CL_INVALID_PIPE_SIZE -69
238#define CL_INVALID_DEVICE_QUEUE -70
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100239#endif
240#ifdef CL_VERSION_2_2
Pablo Telloe86a09f2018-01-11 15:44:48 +0000241#define CL_INVALID_SPEC_ID -71
242#define CL_MAX_SIZE_RESTRICTION_EXCEEDED -72
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100243#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100244
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100245
246/* cl_bool */
247#define CL_FALSE 0
248#define CL_TRUE 1
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100249#ifdef CL_VERSION_1_2
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100250#define CL_BLOCKING CL_TRUE
251#define CL_NON_BLOCKING CL_FALSE
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100252#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100253
254/* cl_platform_info */
255#define CL_PLATFORM_PROFILE 0x0900
256#define CL_PLATFORM_VERSION 0x0901
257#define CL_PLATFORM_NAME 0x0902
258#define CL_PLATFORM_VENDOR 0x0903
259#define CL_PLATFORM_EXTENSIONS 0x0904
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100260#ifdef CL_VERSION_2_1
Pablo Telloe86a09f2018-01-11 15:44:48 +0000261#define CL_PLATFORM_HOST_TIMER_RESOLUTION 0x0905
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100262#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100263
264/* cl_device_type - bitfield */
265#define CL_DEVICE_TYPE_DEFAULT (1 << 0)
266#define CL_DEVICE_TYPE_CPU (1 << 1)
267#define CL_DEVICE_TYPE_GPU (1 << 2)
268#define CL_DEVICE_TYPE_ACCELERATOR (1 << 3)
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100269#ifdef CL_VERSION_1_2
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100270#define CL_DEVICE_TYPE_CUSTOM (1 << 4)
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100271#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100272#define CL_DEVICE_TYPE_ALL 0xFFFFFFFF
273
274/* cl_device_info */
Pablo Telloe86a09f2018-01-11 15:44:48 +0000275#define CL_DEVICE_TYPE 0x1000
276#define CL_DEVICE_VENDOR_ID 0x1001
277#define CL_DEVICE_MAX_COMPUTE_UNITS 0x1002
278#define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS 0x1003
279#define CL_DEVICE_MAX_WORK_GROUP_SIZE 0x1004
280#define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005
281#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR 0x1006
282#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT 0x1007
283#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT 0x1008
284#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG 0x1009
285#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT 0x100A
286#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE 0x100B
287#define CL_DEVICE_MAX_CLOCK_FREQUENCY 0x100C
288#define CL_DEVICE_ADDRESS_BITS 0x100D
289#define CL_DEVICE_MAX_READ_IMAGE_ARGS 0x100E
290#define CL_DEVICE_MAX_WRITE_IMAGE_ARGS 0x100F
291#define CL_DEVICE_MAX_MEM_ALLOC_SIZE 0x1010
292#define CL_DEVICE_IMAGE2D_MAX_WIDTH 0x1011
293#define CL_DEVICE_IMAGE2D_MAX_HEIGHT 0x1012
294#define CL_DEVICE_IMAGE3D_MAX_WIDTH 0x1013
295#define CL_DEVICE_IMAGE3D_MAX_HEIGHT 0x1014
296#define CL_DEVICE_IMAGE3D_MAX_DEPTH 0x1015
297#define CL_DEVICE_IMAGE_SUPPORT 0x1016
298#define CL_DEVICE_MAX_PARAMETER_SIZE 0x1017
299#define CL_DEVICE_MAX_SAMPLERS 0x1018
300#define CL_DEVICE_MEM_BASE_ADDR_ALIGN 0x1019
301#define CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE 0x101A
302#define CL_DEVICE_SINGLE_FP_CONFIG 0x101B
303#define CL_DEVICE_GLOBAL_MEM_CACHE_TYPE 0x101C
304#define CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE 0x101D
305#define CL_DEVICE_GLOBAL_MEM_CACHE_SIZE 0x101E
306#define CL_DEVICE_GLOBAL_MEM_SIZE 0x101F
307#define CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE 0x1020
308#define CL_DEVICE_MAX_CONSTANT_ARGS 0x1021
309#define CL_DEVICE_LOCAL_MEM_TYPE 0x1022
310#define CL_DEVICE_LOCAL_MEM_SIZE 0x1023
311#define CL_DEVICE_ERROR_CORRECTION_SUPPORT 0x1024
312#define CL_DEVICE_PROFILING_TIMER_RESOLUTION 0x1025
313#define CL_DEVICE_ENDIAN_LITTLE 0x1026
314#define CL_DEVICE_AVAILABLE 0x1027
315#define CL_DEVICE_COMPILER_AVAILABLE 0x1028
316#define CL_DEVICE_EXECUTION_CAPABILITIES 0x1029
317#define CL_DEVICE_QUEUE_PROPERTIES 0x102A /* deprecated */
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100318#ifdef CL_VERSION_2_0
Pablo Telloe86a09f2018-01-11 15:44:48 +0000319#define CL_DEVICE_QUEUE_ON_HOST_PROPERTIES 0x102A
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100320#endif
Pablo Telloe86a09f2018-01-11 15:44:48 +0000321#define CL_DEVICE_NAME 0x102B
322#define CL_DEVICE_VENDOR 0x102C
323#define CL_DRIVER_VERSION 0x102D
324#define CL_DEVICE_PROFILE 0x102E
325#define CL_DEVICE_VERSION 0x102F
326#define CL_DEVICE_EXTENSIONS 0x1030
327#define CL_DEVICE_PLATFORM 0x1031
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100328#ifdef CL_VERSION_1_2
Pablo Telloe86a09f2018-01-11 15:44:48 +0000329#define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100330#endif
331/* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG which is already defined in "cl_ext.h" */
332#ifdef CL_VERSION_1_1
Pablo Telloe86a09f2018-01-11 15:44:48 +0000333#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034
334#define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035 /* deprecated */
335#define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036
336#define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT 0x1037
337#define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT 0x1038
338#define CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG 0x1039
339#define CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT 0x103A
340#define CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE 0x103B
341#define CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF 0x103C
342#define CL_DEVICE_OPENCL_C_VERSION 0x103D
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100343#endif
344#ifdef CL_VERSION_1_2
Pablo Telloe86a09f2018-01-11 15:44:48 +0000345#define CL_DEVICE_LINKER_AVAILABLE 0x103E
346#define CL_DEVICE_BUILT_IN_KERNELS 0x103F
347#define CL_DEVICE_IMAGE_MAX_BUFFER_SIZE 0x1040
348#define CL_DEVICE_IMAGE_MAX_ARRAY_SIZE 0x1041
349#define CL_DEVICE_PARENT_DEVICE 0x1042
350#define CL_DEVICE_PARTITION_MAX_SUB_DEVICES 0x1043
351#define CL_DEVICE_PARTITION_PROPERTIES 0x1044
352#define CL_DEVICE_PARTITION_AFFINITY_DOMAIN 0x1045
353#define CL_DEVICE_PARTITION_TYPE 0x1046
354#define CL_DEVICE_REFERENCE_COUNT 0x1047
355#define CL_DEVICE_PREFERRED_INTEROP_USER_SYNC 0x1048
356#define CL_DEVICE_PRINTF_BUFFER_SIZE 0x1049
357#define CL_DEVICE_IMAGE_PITCH_ALIGNMENT 0x104A
358#define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT 0x104B
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100359#endif
360#ifdef CL_VERSION_2_0
Pablo Telloe86a09f2018-01-11 15:44:48 +0000361#define CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS 0x104C
362#define CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE 0x104D
363#define CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES 0x104E
364#define CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE 0x104F
365#define CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE 0x1050
366#define CL_DEVICE_MAX_ON_DEVICE_QUEUES 0x1051
367#define CL_DEVICE_MAX_ON_DEVICE_EVENTS 0x1052
368#define CL_DEVICE_SVM_CAPABILITIES 0x1053
369#define CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE 0x1054
370#define CL_DEVICE_MAX_PIPE_ARGS 0x1055
371#define CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS 0x1056
372#define CL_DEVICE_PIPE_MAX_PACKET_SIZE 0x1057
373#define CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT 0x1058
374#define CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT 0x1059
375#define CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT 0x105A
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100376#endif
377#ifdef CL_VERSION_2_1
Pablo Telloe86a09f2018-01-11 15:44:48 +0000378#define CL_DEVICE_IL_VERSION 0x105B
379#define CL_DEVICE_MAX_NUM_SUB_GROUPS 0x105C
380#define CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS 0x105D
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100381#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100382
383/* cl_device_fp_config - bitfield */
384#define CL_FP_DENORM (1 << 0)
385#define CL_FP_INF_NAN (1 << 1)
386#define CL_FP_ROUND_TO_NEAREST (1 << 2)
387#define CL_FP_ROUND_TO_ZERO (1 << 3)
388#define CL_FP_ROUND_TO_INF (1 << 4)
389#define CL_FP_FMA (1 << 5)
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100390#ifdef CL_VERSION_1_1
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100391#define CL_FP_SOFT_FLOAT (1 << 6)
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100392#endif
393#ifdef CL_VERSION_1_2
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100394#define CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT (1 << 7)
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100395#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100396
397/* cl_device_mem_cache_type */
398#define CL_NONE 0x0
399#define CL_READ_ONLY_CACHE 0x1
400#define CL_READ_WRITE_CACHE 0x2
401
402/* cl_device_local_mem_type */
403#define CL_LOCAL 0x1
404#define CL_GLOBAL 0x2
405
406/* cl_device_exec_capabilities - bitfield */
407#define CL_EXEC_KERNEL (1 << 0)
408#define CL_EXEC_NATIVE_KERNEL (1 << 1)
409
410/* cl_command_queue_properties - bitfield */
411#define CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE (1 << 0)
412#define CL_QUEUE_PROFILING_ENABLE (1 << 1)
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100413#ifdef CL_VERSION_2_0
Pablo Telloe86a09f2018-01-11 15:44:48 +0000414#define CL_QUEUE_ON_DEVICE (1 << 2)
415#define CL_QUEUE_ON_DEVICE_DEFAULT (1 << 3)
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100416#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100417
418/* cl_context_info */
419#define CL_CONTEXT_REFERENCE_COUNT 0x1080
420#define CL_CONTEXT_DEVICES 0x1081
421#define CL_CONTEXT_PROPERTIES 0x1082
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100422#ifdef CL_VERSION_1_1
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100423#define CL_CONTEXT_NUM_DEVICES 0x1083
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100424#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100425
426/* cl_context_properties */
427#define CL_CONTEXT_PLATFORM 0x1084
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100428#ifdef CL_VERSION_1_2
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100429#define CL_CONTEXT_INTEROP_USER_SYNC 0x1085
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100430#endif
431
432#ifdef CL_VERSION_1_2
433
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100434/* cl_device_partition_property */
435#define CL_DEVICE_PARTITION_EQUALLY 0x1086
436#define CL_DEVICE_PARTITION_BY_COUNTS 0x1087
437#define CL_DEVICE_PARTITION_BY_COUNTS_LIST_END 0x0
438#define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN 0x1088
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100439
440#endif
441
442#ifdef CL_VERSION_1_2
443
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100444/* cl_device_affinity_domain */
Pablo Telloe86a09f2018-01-11 15:44:48 +0000445#define CL_DEVICE_AFFINITY_DOMAIN_NUMA (1 << 0)
446#define CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE (1 << 1)
447#define CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE (1 << 2)
448#define CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE (1 << 3)
449#define CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE (1 << 4)
450#define CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE (1 << 5)
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100451
452#endif
453
454#ifdef CL_VERSION_2_0
455
Pablo Telloe86a09f2018-01-11 15:44:48 +0000456/* cl_device_svm_capabilities */
457#define CL_DEVICE_SVM_COARSE_GRAIN_BUFFER (1 << 0)
458#define CL_DEVICE_SVM_FINE_GRAIN_BUFFER (1 << 1)
459#define CL_DEVICE_SVM_FINE_GRAIN_SYSTEM (1 << 2)
460#define CL_DEVICE_SVM_ATOMICS (1 << 3)
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100461
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100462#endif
463
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100464/* cl_command_queue_info */
465#define CL_QUEUE_CONTEXT 0x1090
466#define CL_QUEUE_DEVICE 0x1091
467#define CL_QUEUE_REFERENCE_COUNT 0x1092
468#define CL_QUEUE_PROPERTIES 0x1093
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100469#ifdef CL_VERSION_2_0
Pablo Telloe86a09f2018-01-11 15:44:48 +0000470#define CL_QUEUE_SIZE 0x1094
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100471#endif
472#ifdef CL_VERSION_2_1
Pablo Telloe86a09f2018-01-11 15:44:48 +0000473#define CL_QUEUE_DEVICE_DEFAULT 0x1095
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100474#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100475
Pablo Telloe86a09f2018-01-11 15:44:48 +0000476/* cl_mem_flags and cl_svm_mem_flags - bitfield */
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100477#define CL_MEM_READ_WRITE (1 << 0)
478#define CL_MEM_WRITE_ONLY (1 << 1)
479#define CL_MEM_READ_ONLY (1 << 2)
480#define CL_MEM_USE_HOST_PTR (1 << 3)
481#define CL_MEM_ALLOC_HOST_PTR (1 << 4)
482#define CL_MEM_COPY_HOST_PTR (1 << 5)
Pablo Telloe86a09f2018-01-11 15:44:48 +0000483/* reserved (1 << 6) */
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100484#ifdef CL_VERSION_1_2
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100485#define CL_MEM_HOST_WRITE_ONLY (1 << 7)
486#define CL_MEM_HOST_READ_ONLY (1 << 8)
487#define CL_MEM_HOST_NO_ACCESS (1 << 9)
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100488#endif
489#ifdef CL_VERSION_2_0
Pablo Telloe86a09f2018-01-11 15:44:48 +0000490#define CL_MEM_SVM_FINE_GRAIN_BUFFER (1 << 10) /* used by cl_svm_mem_flags only */
491#define CL_MEM_SVM_ATOMICS (1 << 11) /* used by cl_svm_mem_flags only */
492#define CL_MEM_KERNEL_READ_AND_WRITE (1 << 12)
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100493#endif
494
495#ifdef CL_VERSION_1_2
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100496
497/* cl_mem_migration_flags - bitfield */
498#define CL_MIGRATE_MEM_OBJECT_HOST (1 << 0)
499#define CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED (1 << 1)
500
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100501#endif
502
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100503/* cl_channel_order */
504#define CL_R 0x10B0
505#define CL_A 0x10B1
506#define CL_RG 0x10B2
507#define CL_RA 0x10B3
508#define CL_RGB 0x10B4
509#define CL_RGBA 0x10B5
510#define CL_BGRA 0x10B6
511#define CL_ARGB 0x10B7
512#define CL_INTENSITY 0x10B8
513#define CL_LUMINANCE 0x10B9
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100514#ifdef CL_VERSION_1_1
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100515#define CL_Rx 0x10BA
516#define CL_RGx 0x10BB
517#define CL_RGBx 0x10BC
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100518#endif
519#ifdef CL_VERSION_1_2
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100520#define CL_DEPTH 0x10BD
521#define CL_DEPTH_STENCIL 0x10BE
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100522#endif
523#ifdef CL_VERSION_2_0
Pablo Telloe86a09f2018-01-11 15:44:48 +0000524#define CL_sRGB 0x10BF
525#define CL_sRGBx 0x10C0
526#define CL_sRGBA 0x10C1
527#define CL_sBGRA 0x10C2
528#define CL_ABGR 0x10C3
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100529#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100530
531/* cl_channel_type */
532#define CL_SNORM_INT8 0x10D0
533#define CL_SNORM_INT16 0x10D1
534#define CL_UNORM_INT8 0x10D2
535#define CL_UNORM_INT16 0x10D3
536#define CL_UNORM_SHORT_565 0x10D4
537#define CL_UNORM_SHORT_555 0x10D5
538#define CL_UNORM_INT_101010 0x10D6
539#define CL_SIGNED_INT8 0x10D7
540#define CL_SIGNED_INT16 0x10D8
541#define CL_SIGNED_INT32 0x10D9
542#define CL_UNSIGNED_INT8 0x10DA
543#define CL_UNSIGNED_INT16 0x10DB
544#define CL_UNSIGNED_INT32 0x10DC
545#define CL_HALF_FLOAT 0x10DD
546#define CL_FLOAT 0x10DE
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100547#ifdef CL_VERSION_1_2
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100548#define CL_UNORM_INT24 0x10DF
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100549#endif
550#ifdef CL_VERSION_2_1
Pablo Telloe86a09f2018-01-11 15:44:48 +0000551#define CL_UNORM_INT_101010_2 0x10E0
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100552#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100553
554/* cl_mem_object_type */
555#define CL_MEM_OBJECT_BUFFER 0x10F0
556#define CL_MEM_OBJECT_IMAGE2D 0x10F1
557#define CL_MEM_OBJECT_IMAGE3D 0x10F2
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100558#ifdef CL_VERSION_1_2
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100559#define CL_MEM_OBJECT_IMAGE2D_ARRAY 0x10F3
560#define CL_MEM_OBJECT_IMAGE1D 0x10F4
561#define CL_MEM_OBJECT_IMAGE1D_ARRAY 0x10F5
562#define CL_MEM_OBJECT_IMAGE1D_BUFFER 0x10F6
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100563#endif
564#ifdef CL_VERSION_2_0
Pablo Telloe86a09f2018-01-11 15:44:48 +0000565#define CL_MEM_OBJECT_PIPE 0x10F7
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100566#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100567
568/* cl_mem_info */
569#define CL_MEM_TYPE 0x1100
570#define CL_MEM_FLAGS 0x1101
571#define CL_MEM_SIZE 0x1102
572#define CL_MEM_HOST_PTR 0x1103
573#define CL_MEM_MAP_COUNT 0x1104
574#define CL_MEM_REFERENCE_COUNT 0x1105
575#define CL_MEM_CONTEXT 0x1106
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100576#ifdef CL_VERSION_1_1
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100577#define CL_MEM_ASSOCIATED_MEMOBJECT 0x1107
578#define CL_MEM_OFFSET 0x1108
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100579#endif
580#ifdef CL_VERSION_2_0
Pablo Telloe86a09f2018-01-11 15:44:48 +0000581#define CL_MEM_USES_SVM_POINTER 0x1109
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100582#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100583
584/* cl_image_info */
585#define CL_IMAGE_FORMAT 0x1110
586#define CL_IMAGE_ELEMENT_SIZE 0x1111
587#define CL_IMAGE_ROW_PITCH 0x1112
588#define CL_IMAGE_SLICE_PITCH 0x1113
589#define CL_IMAGE_WIDTH 0x1114
590#define CL_IMAGE_HEIGHT 0x1115
591#define CL_IMAGE_DEPTH 0x1116
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100592#ifdef CL_VERSION_1_2
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100593#define CL_IMAGE_ARRAY_SIZE 0x1117
594#define CL_IMAGE_BUFFER 0x1118
595#define CL_IMAGE_NUM_MIP_LEVELS 0x1119
596#define CL_IMAGE_NUM_SAMPLES 0x111A
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100597#endif
598
599#ifdef CL_VERSION_2_0
600
Pablo Telloe86a09f2018-01-11 15:44:48 +0000601/* cl_pipe_info */
602#define CL_PIPE_PACKET_SIZE 0x1120
603#define CL_PIPE_MAX_PACKETS 0x1121
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100604
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100605#endif
606
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100607/* cl_addressing_mode */
608#define CL_ADDRESS_NONE 0x1130
609#define CL_ADDRESS_CLAMP_TO_EDGE 0x1131
610#define CL_ADDRESS_CLAMP 0x1132
611#define CL_ADDRESS_REPEAT 0x1133
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100612#ifdef CL_VERSION_1_1
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100613#define CL_ADDRESS_MIRRORED_REPEAT 0x1134
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100614#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100615
616/* cl_filter_mode */
617#define CL_FILTER_NEAREST 0x1140
618#define CL_FILTER_LINEAR 0x1141
619
620/* cl_sampler_info */
621#define CL_SAMPLER_REFERENCE_COUNT 0x1150
622#define CL_SAMPLER_CONTEXT 0x1151
623#define CL_SAMPLER_NORMALIZED_COORDS 0x1152
624#define CL_SAMPLER_ADDRESSING_MODE 0x1153
625#define CL_SAMPLER_FILTER_MODE 0x1154
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100626#ifdef CL_VERSION_2_0
Pablo Telloe86a09f2018-01-11 15:44:48 +0000627#define CL_SAMPLER_MIP_FILTER_MODE 0x1155
628#define CL_SAMPLER_LOD_MIN 0x1156
629#define CL_SAMPLER_LOD_MAX 0x1157
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100630#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100631
632/* cl_map_flags - bitfield */
633#define CL_MAP_READ (1 << 0)
634#define CL_MAP_WRITE (1 << 1)
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100635#ifdef CL_VERSION_1_2
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100636#define CL_MAP_WRITE_INVALIDATE_REGION (1 << 2)
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100637#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100638
639/* cl_program_info */
640#define CL_PROGRAM_REFERENCE_COUNT 0x1160
641#define CL_PROGRAM_CONTEXT 0x1161
642#define CL_PROGRAM_NUM_DEVICES 0x1162
643#define CL_PROGRAM_DEVICES 0x1163
644#define CL_PROGRAM_SOURCE 0x1164
645#define CL_PROGRAM_BINARY_SIZES 0x1165
646#define CL_PROGRAM_BINARIES 0x1166
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100647#ifdef CL_VERSION_1_2
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100648#define CL_PROGRAM_NUM_KERNELS 0x1167
649#define CL_PROGRAM_KERNEL_NAMES 0x1168
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100650#endif
651#ifdef CL_VERSION_2_1
Pablo Telloe86a09f2018-01-11 15:44:48 +0000652#define CL_PROGRAM_IL 0x1169
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100653#endif
654#ifdef CL_VERSION_2_2
Pablo Telloe86a09f2018-01-11 15:44:48 +0000655#define CL_PROGRAM_SCOPE_GLOBAL_CTORS_PRESENT 0x116A
656#define CL_PROGRAM_SCOPE_GLOBAL_DTORS_PRESENT 0x116B
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100657#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100658
659/* cl_program_build_info */
660#define CL_PROGRAM_BUILD_STATUS 0x1181
661#define CL_PROGRAM_BUILD_OPTIONS 0x1182
662#define CL_PROGRAM_BUILD_LOG 0x1183
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100663#ifdef CL_VERSION_1_2
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100664#define CL_PROGRAM_BINARY_TYPE 0x1184
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100665#endif
666#ifdef CL_VERSION_2_0
Pablo Telloe86a09f2018-01-11 15:44:48 +0000667#define CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE 0x1185
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100668#endif
669
670#ifdef CL_VERSION_1_2
671
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100672/* cl_program_binary_type */
673#define CL_PROGRAM_BINARY_TYPE_NONE 0x0
674#define CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT 0x1
675#define CL_PROGRAM_BINARY_TYPE_LIBRARY 0x2
676#define CL_PROGRAM_BINARY_TYPE_EXECUTABLE 0x4
677
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100678#endif
679
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100680/* cl_build_status */
681#define CL_BUILD_SUCCESS 0
682#define CL_BUILD_NONE -1
683#define CL_BUILD_ERROR -2
684#define CL_BUILD_IN_PROGRESS -3
685
686/* cl_kernel_info */
687#define CL_KERNEL_FUNCTION_NAME 0x1190
688#define CL_KERNEL_NUM_ARGS 0x1191
689#define CL_KERNEL_REFERENCE_COUNT 0x1192
690#define CL_KERNEL_CONTEXT 0x1193
691#define CL_KERNEL_PROGRAM 0x1194
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100692#ifdef CL_VERSION_1_2
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100693#define CL_KERNEL_ATTRIBUTES 0x1195
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100694#endif
695#ifdef CL_VERSION_2_1
Pablo Telloe86a09f2018-01-11 15:44:48 +0000696#define CL_KERNEL_MAX_NUM_SUB_GROUPS 0x11B9
697#define CL_KERNEL_COMPILE_NUM_SUB_GROUPS 0x11BA
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100698#endif
699
700#ifdef CL_VERSION_1_2
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100701
702/* cl_kernel_arg_info */
703#define CL_KERNEL_ARG_ADDRESS_QUALIFIER 0x1196
704#define CL_KERNEL_ARG_ACCESS_QUALIFIER 0x1197
705#define CL_KERNEL_ARG_TYPE_NAME 0x1198
706#define CL_KERNEL_ARG_TYPE_QUALIFIER 0x1199
707#define CL_KERNEL_ARG_NAME 0x119A
708
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100709#endif
710
711#ifdef CL_VERSION_1_2
712
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100713/* cl_kernel_arg_address_qualifier */
714#define CL_KERNEL_ARG_ADDRESS_GLOBAL 0x119B
715#define CL_KERNEL_ARG_ADDRESS_LOCAL 0x119C
716#define CL_KERNEL_ARG_ADDRESS_CONSTANT 0x119D
717#define CL_KERNEL_ARG_ADDRESS_PRIVATE 0x119E
718
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100719#endif
720
721#ifdef CL_VERSION_1_2
722
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100723/* cl_kernel_arg_access_qualifier */
724#define CL_KERNEL_ARG_ACCESS_READ_ONLY 0x11A0
725#define CL_KERNEL_ARG_ACCESS_WRITE_ONLY 0x11A1
726#define CL_KERNEL_ARG_ACCESS_READ_WRITE 0x11A2
727#define CL_KERNEL_ARG_ACCESS_NONE 0x11A3
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100728
729#endif
730
731#ifdef CL_VERSION_1_2
732
Pablo Telloe86a09f2018-01-11 15:44:48 +0000733/* cl_kernel_arg_type_qualifier */
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100734#define CL_KERNEL_ARG_TYPE_NONE 0
735#define CL_KERNEL_ARG_TYPE_CONST (1 << 0)
736#define CL_KERNEL_ARG_TYPE_RESTRICT (1 << 1)
737#define CL_KERNEL_ARG_TYPE_VOLATILE (1 << 2)
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100738#ifdef CL_VERSION_2_0
Pablo Telloe86a09f2018-01-11 15:44:48 +0000739#define CL_KERNEL_ARG_TYPE_PIPE (1 << 3)
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100740#endif
741
742#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100743
744/* cl_kernel_work_group_info */
745#define CL_KERNEL_WORK_GROUP_SIZE 0x11B0
746#define CL_KERNEL_COMPILE_WORK_GROUP_SIZE 0x11B1
747#define CL_KERNEL_LOCAL_MEM_SIZE 0x11B2
748#define CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x11B3
749#define CL_KERNEL_PRIVATE_MEM_SIZE 0x11B4
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100750#ifdef CL_VERSION_1_2
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100751#define CL_KERNEL_GLOBAL_WORK_SIZE 0x11B5
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100752#endif
753
754#ifdef CL_VERSION_2_1
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100755
Pablo Telloe86a09f2018-01-11 15:44:48 +0000756/* cl_kernel_sub_group_info */
757#define CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE 0x2033
758#define CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE 0x2034
759#define CL_KERNEL_LOCAL_SIZE_FOR_SUB_GROUP_COUNT 0x11B8
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100760
761#endif
762
763#ifdef CL_VERSION_2_0
764
Pablo Telloe86a09f2018-01-11 15:44:48 +0000765/* cl_kernel_exec_info */
766#define CL_KERNEL_EXEC_INFO_SVM_PTRS 0x11B6
767#define CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM 0x11B7
768
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100769#endif
770
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100771/* cl_event_info */
772#define CL_EVENT_COMMAND_QUEUE 0x11D0
773#define CL_EVENT_COMMAND_TYPE 0x11D1
774#define CL_EVENT_REFERENCE_COUNT 0x11D2
775#define CL_EVENT_COMMAND_EXECUTION_STATUS 0x11D3
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100776#ifdef CL_VERSION_1_1
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100777#define CL_EVENT_CONTEXT 0x11D4
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100778#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100779
780/* cl_command_type */
781#define CL_COMMAND_NDRANGE_KERNEL 0x11F0
782#define CL_COMMAND_TASK 0x11F1
783#define CL_COMMAND_NATIVE_KERNEL 0x11F2
784#define CL_COMMAND_READ_BUFFER 0x11F3
785#define CL_COMMAND_WRITE_BUFFER 0x11F4
786#define CL_COMMAND_COPY_BUFFER 0x11F5
787#define CL_COMMAND_READ_IMAGE 0x11F6
788#define CL_COMMAND_WRITE_IMAGE 0x11F7
789#define CL_COMMAND_COPY_IMAGE 0x11F8
790#define CL_COMMAND_COPY_IMAGE_TO_BUFFER 0x11F9
791#define CL_COMMAND_COPY_BUFFER_TO_IMAGE 0x11FA
792#define CL_COMMAND_MAP_BUFFER 0x11FB
793#define CL_COMMAND_MAP_IMAGE 0x11FC
794#define CL_COMMAND_UNMAP_MEM_OBJECT 0x11FD
795#define CL_COMMAND_MARKER 0x11FE
796#define CL_COMMAND_ACQUIRE_GL_OBJECTS 0x11FF
797#define CL_COMMAND_RELEASE_GL_OBJECTS 0x1200
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100798#ifdef CL_VERSION_1_1
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100799#define CL_COMMAND_READ_BUFFER_RECT 0x1201
800#define CL_COMMAND_WRITE_BUFFER_RECT 0x1202
801#define CL_COMMAND_COPY_BUFFER_RECT 0x1203
802#define CL_COMMAND_USER 0x1204
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100803#endif
804#ifdef CL_VERSION_1_2
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100805#define CL_COMMAND_BARRIER 0x1205
806#define CL_COMMAND_MIGRATE_MEM_OBJECTS 0x1206
807#define CL_COMMAND_FILL_BUFFER 0x1207
808#define CL_COMMAND_FILL_IMAGE 0x1208
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100809#endif
810#ifdef CL_VERSION_2_0
Pablo Telloe86a09f2018-01-11 15:44:48 +0000811#define CL_COMMAND_SVM_FREE 0x1209
812#define CL_COMMAND_SVM_MEMCPY 0x120A
813#define CL_COMMAND_SVM_MEMFILL 0x120B
814#define CL_COMMAND_SVM_MAP 0x120C
815#define CL_COMMAND_SVM_UNMAP 0x120D
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100816#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100817
818/* command execution status */
819#define CL_COMPLETE 0x0
820#define CL_RUNNING 0x1
821#define CL_SUBMITTED 0x2
822#define CL_QUEUED 0x3
823
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100824#ifdef CL_VERSION_1_1
825
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100826/* cl_buffer_create_type */
827#define CL_BUFFER_CREATE_TYPE_REGION 0x1220
828
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100829#endif
830
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100831/* cl_profiling_info */
832#define CL_PROFILING_COMMAND_QUEUED 0x1280
833#define CL_PROFILING_COMMAND_SUBMIT 0x1281
834#define CL_PROFILING_COMMAND_START 0x1282
835#define CL_PROFILING_COMMAND_END 0x1283
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100836#ifdef CL_VERSION_2_0
Pablo Telloe86a09f2018-01-11 15:44:48 +0000837#define CL_PROFILING_COMMAND_COMPLETE 0x1284
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100838#endif
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100839
840/********************************************************************************************************/
841
842/* Platform API */
843extern CL_API_ENTRY cl_int CL_API_CALL
844clGetPlatformIDs(cl_uint /* num_entries */,
845 cl_platform_id * /* platforms */,
846 cl_uint * /* num_platforms */) CL_API_SUFFIX__VERSION_1_0;
847
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100848extern CL_API_ENTRY cl_int CL_API_CALL
849clGetPlatformInfo(cl_platform_id /* platform */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100850 cl_platform_info /* param_name */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100851 size_t /* param_value_size */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100852 void * /* param_value */,
853 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
854
855/* Device APIs */
856extern CL_API_ENTRY cl_int CL_API_CALL
857clGetDeviceIDs(cl_platform_id /* platform */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100858 cl_device_type /* device_type */,
859 cl_uint /* num_entries */,
860 cl_device_id * /* devices */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100861 cl_uint * /* num_devices */) CL_API_SUFFIX__VERSION_1_0;
862
863extern CL_API_ENTRY cl_int CL_API_CALL
864clGetDeviceInfo(cl_device_id /* device */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100865 cl_device_info /* param_name */,
866 size_t /* param_value_size */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100867 void * /* param_value */,
868 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100869
870#ifdef CL_VERSION_1_2
871
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100872extern CL_API_ENTRY cl_int CL_API_CALL
873clCreateSubDevices(cl_device_id /* in_device */,
874 const cl_device_partition_property * /* properties */,
875 cl_uint /* num_devices */,
876 cl_device_id * /* out_devices */,
877 cl_uint * /* num_devices_ret */) CL_API_SUFFIX__VERSION_1_2;
878
879extern CL_API_ENTRY cl_int CL_API_CALL
880clRetainDevice(cl_device_id /* device */) CL_API_SUFFIX__VERSION_1_2;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100881
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100882extern CL_API_ENTRY cl_int CL_API_CALL
883clReleaseDevice(cl_device_id /* device */) CL_API_SUFFIX__VERSION_1_2;
Pablo Telloe86a09f2018-01-11 15:44:48 +0000884
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100885#endif
886
887#ifdef CL_VERSION_2_1
888
Pablo Telloe86a09f2018-01-11 15:44:48 +0000889extern CL_API_ENTRY cl_int CL_API_CALL
890clSetDefaultDeviceCommandQueue(cl_context /* context */,
891 cl_device_id /* device */,
892 cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_2_1;
893
894extern CL_API_ENTRY cl_int CL_API_CALL
895clGetDeviceAndHostTimer(cl_device_id /* device */,
896 cl_ulong* /* device_timestamp */,
897 cl_ulong* /* host_timestamp */) CL_API_SUFFIX__VERSION_2_1;
898
899extern CL_API_ENTRY cl_int CL_API_CALL
900clGetHostTimer(cl_device_id /* device */,
901 cl_ulong * /* host_timestamp */) CL_API_SUFFIX__VERSION_2_1;
902
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100903#endif
904
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100905/* Context APIs */
906extern CL_API_ENTRY cl_context CL_API_CALL
907clCreateContext(const cl_context_properties * /* properties */,
908 cl_uint /* num_devices */,
909 const cl_device_id * /* devices */,
910 void (CL_CALLBACK * /* pfn_notify */)(const char *, const void *, size_t, void *),
911 void * /* user_data */,
912 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
913
914extern CL_API_ENTRY cl_context CL_API_CALL
915clCreateContextFromType(const cl_context_properties * /* properties */,
916 cl_device_type /* device_type */,
917 void (CL_CALLBACK * /* pfn_notify*/ )(const char *, const void *, size_t, void *),
918 void * /* user_data */,
919 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
920
921extern CL_API_ENTRY cl_int CL_API_CALL
922clRetainContext(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0;
923
924extern CL_API_ENTRY cl_int CL_API_CALL
925clReleaseContext(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0;
926
927extern CL_API_ENTRY cl_int CL_API_CALL
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100928clGetContextInfo(cl_context /* context */,
929 cl_context_info /* param_name */,
930 size_t /* param_value_size */,
931 void * /* param_value */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100932 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
933
934/* Command Queue APIs */
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100935
936#ifdef CL_VERSION_2_0
937
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100938extern CL_API_ENTRY cl_command_queue CL_API_CALL
Pablo Telloe86a09f2018-01-11 15:44:48 +0000939clCreateCommandQueueWithProperties(cl_context /* context */,
940 cl_device_id /* device */,
941 const cl_queue_properties * /* properties */,
942 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_2_0;
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100943
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100944#endif
945
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100946extern CL_API_ENTRY cl_int CL_API_CALL
947clRetainCommandQueue(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
948
949extern CL_API_ENTRY cl_int CL_API_CALL
950clReleaseCommandQueue(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
951
952extern CL_API_ENTRY cl_int CL_API_CALL
953clGetCommandQueueInfo(cl_command_queue /* command_queue */,
954 cl_command_queue_info /* param_name */,
955 size_t /* param_value_size */,
956 void * /* param_value */,
957 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
958
959/* Memory Object APIs */
960extern CL_API_ENTRY cl_mem CL_API_CALL
961clCreateBuffer(cl_context /* context */,
962 cl_mem_flags /* flags */,
963 size_t /* size */,
964 void * /* host_ptr */,
965 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
966
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100967#ifdef CL_VERSION_1_1
968
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100969extern CL_API_ENTRY cl_mem CL_API_CALL
970clCreateSubBuffer(cl_mem /* buffer */,
971 cl_mem_flags /* flags */,
972 cl_buffer_create_type /* buffer_create_type */,
973 const void * /* buffer_create_info */,
974 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
975
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100976#endif
977
978#ifdef CL_VERSION_1_2
979
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100980extern CL_API_ENTRY cl_mem CL_API_CALL
981clCreateImage(cl_context /* context */,
982 cl_mem_flags /* flags */,
983 const cl_image_format * /* image_format */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100984 const cl_image_desc * /* image_desc */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +0100985 void * /* host_ptr */,
986 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100987
988#endif
989
990#ifdef CL_VERSION_2_0
991
Pablo Telloe86a09f2018-01-11 15:44:48 +0000992extern CL_API_ENTRY cl_mem CL_API_CALL
993clCreatePipe(cl_context /* context */,
994 cl_mem_flags /* flags */,
995 cl_uint /* pipe_packet_size */,
996 cl_uint /* pipe_max_packets */,
997 const cl_pipe_properties * /* properties */,
998 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_2_0;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +0100999
1000#endif
1001
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001002extern CL_API_ENTRY cl_int CL_API_CALL
1003clRetainMemObject(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0;
1004
1005extern CL_API_ENTRY cl_int CL_API_CALL
1006clReleaseMemObject(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0;
1007
1008extern CL_API_ENTRY cl_int CL_API_CALL
1009clGetSupportedImageFormats(cl_context /* context */,
1010 cl_mem_flags /* flags */,
1011 cl_mem_object_type /* image_type */,
1012 cl_uint /* num_entries */,
1013 cl_image_format * /* image_formats */,
1014 cl_uint * /* num_image_formats */) CL_API_SUFFIX__VERSION_1_0;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001015
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001016extern CL_API_ENTRY cl_int CL_API_CALL
1017clGetMemObjectInfo(cl_mem /* memobj */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001018 cl_mem_info /* param_name */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001019 size_t /* param_value_size */,
1020 void * /* param_value */,
1021 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
1022
1023extern CL_API_ENTRY cl_int CL_API_CALL
1024clGetImageInfo(cl_mem /* image */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001025 cl_image_info /* param_name */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001026 size_t /* param_value_size */,
1027 void * /* param_value */,
1028 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001029
1030#ifdef CL_VERSION_2_0
1031
Pablo Telloe86a09f2018-01-11 15:44:48 +00001032extern CL_API_ENTRY cl_int CL_API_CALL
1033clGetPipeInfo(cl_mem /* pipe */,
1034 cl_pipe_info /* param_name */,
1035 size_t /* param_value_size */,
1036 void * /* param_value */,
1037 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_2_0;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001038
1039#endif
1040
1041#ifdef CL_VERSION_1_1
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001042
1043extern CL_API_ENTRY cl_int CL_API_CALL
Pablo Telloe86a09f2018-01-11 15:44:48 +00001044clSetMemObjectDestructorCallback(cl_mem /* memobj */,
1045 void (CL_CALLBACK * /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/),
1046 void * /*user_data */ ) CL_API_SUFFIX__VERSION_1_1;
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001047
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001048#endif
1049
Pablo Telloe86a09f2018-01-11 15:44:48 +00001050/* SVM Allocation APIs */
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001051
1052#ifdef CL_VERSION_2_0
1053
Pablo Telloe86a09f2018-01-11 15:44:48 +00001054extern CL_API_ENTRY void * CL_API_CALL
1055clSVMAlloc(cl_context /* context */,
1056 cl_svm_mem_flags /* flags */,
1057 size_t /* size */,
1058 cl_uint /* alignment */) CL_API_SUFFIX__VERSION_2_0;
1059
1060extern CL_API_ENTRY void CL_API_CALL
1061clSVMFree(cl_context /* context */,
1062 void * /* svm_pointer */) CL_API_SUFFIX__VERSION_2_0;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001063
1064#endif
1065
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001066/* Sampler APIs */
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001067
1068#ifdef CL_VERSION_2_0
1069
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001070extern CL_API_ENTRY cl_sampler CL_API_CALL
Pablo Telloe86a09f2018-01-11 15:44:48 +00001071clCreateSamplerWithProperties(cl_context /* context */,
1072 const cl_sampler_properties * /* normalized_coords */,
1073 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_2_0;
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001074
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001075#endif
1076
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001077extern CL_API_ENTRY cl_int CL_API_CALL
1078clRetainSampler(cl_sampler /* sampler */) CL_API_SUFFIX__VERSION_1_0;
1079
1080extern CL_API_ENTRY cl_int CL_API_CALL
1081clReleaseSampler(cl_sampler /* sampler */) CL_API_SUFFIX__VERSION_1_0;
1082
1083extern CL_API_ENTRY cl_int CL_API_CALL
1084clGetSamplerInfo(cl_sampler /* sampler */,
1085 cl_sampler_info /* param_name */,
1086 size_t /* param_value_size */,
1087 void * /* param_value */,
1088 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001089
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001090/* Program Object APIs */
1091extern CL_API_ENTRY cl_program CL_API_CALL
1092clCreateProgramWithSource(cl_context /* context */,
1093 cl_uint /* count */,
1094 const char ** /* strings */,
1095 const size_t * /* lengths */,
1096 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
1097
1098extern CL_API_ENTRY cl_program CL_API_CALL
1099clCreateProgramWithBinary(cl_context /* context */,
1100 cl_uint /* num_devices */,
1101 const cl_device_id * /* device_list */,
1102 const size_t * /* lengths */,
1103 const unsigned char ** /* binaries */,
1104 cl_int * /* binary_status */,
1105 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
1106
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001107#ifdef CL_VERSION_1_2
1108
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001109extern CL_API_ENTRY cl_program CL_API_CALL
1110clCreateProgramWithBuiltInKernels(cl_context /* context */,
1111 cl_uint /* num_devices */,
1112 const cl_device_id * /* device_list */,
1113 const char * /* kernel_names */,
1114 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2;
1115
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001116#endif
1117
1118#ifdef CL_VERSION_2_1
1119
Pablo Telloe86a09f2018-01-11 15:44:48 +00001120extern CL_API_ENTRY cl_program CL_API_CALL
1121clCreateProgramWithIL(cl_context /* context */,
1122 const void* /* il */,
1123 size_t /* length */,
1124 cl_int* /* errcode_ret */) CL_API_SUFFIX__VERSION_2_1;
1125
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001126#endif
Pablo Telloe86a09f2018-01-11 15:44:48 +00001127
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001128extern CL_API_ENTRY cl_int CL_API_CALL
1129clRetainProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0;
1130
1131extern CL_API_ENTRY cl_int CL_API_CALL
1132clReleaseProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0;
1133
1134extern CL_API_ENTRY cl_int CL_API_CALL
1135clBuildProgram(cl_program /* program */,
1136 cl_uint /* num_devices */,
1137 const cl_device_id * /* device_list */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001138 const char * /* options */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001139 void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */),
1140 void * /* user_data */) CL_API_SUFFIX__VERSION_1_0;
1141
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001142#ifdef CL_VERSION_1_2
1143
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001144extern CL_API_ENTRY cl_int CL_API_CALL
1145clCompileProgram(cl_program /* program */,
1146 cl_uint /* num_devices */,
1147 const cl_device_id * /* device_list */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001148 const char * /* options */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001149 cl_uint /* num_input_headers */,
1150 const cl_program * /* input_headers */,
1151 const char ** /* header_include_names */,
1152 void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */),
1153 void * /* user_data */) CL_API_SUFFIX__VERSION_1_2;
1154
1155extern CL_API_ENTRY cl_program CL_API_CALL
1156clLinkProgram(cl_context /* context */,
1157 cl_uint /* num_devices */,
1158 const cl_device_id * /* device_list */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001159 const char * /* options */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001160 cl_uint /* num_input_programs */,
1161 const cl_program * /* input_programs */,
1162 void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */),
1163 void * /* user_data */,
1164 cl_int * /* errcode_ret */ ) CL_API_SUFFIX__VERSION_1_2;
1165
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001166#endif
1167
1168#ifdef CL_VERSION_2_2
1169
Pablo Telloe86a09f2018-01-11 15:44:48 +00001170extern CL_API_ENTRY cl_int CL_API_CALL
1171clSetProgramReleaseCallback(cl_program /* program */,
1172 void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */),
1173 void * /* user_data */) CL_API_SUFFIX__VERSION_2_2;
1174
1175extern CL_API_ENTRY cl_int CL_API_CALL
1176clSetProgramSpecializationConstant(cl_program /* program */,
1177 cl_uint /* spec_id */,
1178 size_t /* spec_size */,
1179 const void* /* spec_value */) CL_API_SUFFIX__VERSION_2_2;
1180
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001181#endif
1182
1183#ifdef CL_VERSION_1_2
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001184
1185extern CL_API_ENTRY cl_int CL_API_CALL
1186clUnloadPlatformCompiler(cl_platform_id /* platform */) CL_API_SUFFIX__VERSION_1_2;
1187
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001188#endif
1189
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001190extern CL_API_ENTRY cl_int CL_API_CALL
1191clGetProgramInfo(cl_program /* program */,
1192 cl_program_info /* param_name */,
1193 size_t /* param_value_size */,
1194 void * /* param_value */,
1195 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
1196
1197extern CL_API_ENTRY cl_int CL_API_CALL
1198clGetProgramBuildInfo(cl_program /* program */,
1199 cl_device_id /* device */,
1200 cl_program_build_info /* param_name */,
1201 size_t /* param_value_size */,
1202 void * /* param_value */,
1203 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001204
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001205/* Kernel Object APIs */
1206extern CL_API_ENTRY cl_kernel CL_API_CALL
1207clCreateKernel(cl_program /* program */,
1208 const char * /* kernel_name */,
1209 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
1210
1211extern CL_API_ENTRY cl_int CL_API_CALL
1212clCreateKernelsInProgram(cl_program /* program */,
1213 cl_uint /* num_kernels */,
1214 cl_kernel * /* kernels */,
1215 cl_uint * /* num_kernels_ret */) CL_API_SUFFIX__VERSION_1_0;
1216
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001217#ifdef CL_VERSION_2_1
1218
Pablo Telloe86a09f2018-01-11 15:44:48 +00001219extern CL_API_ENTRY cl_kernel CL_API_CALL
1220clCloneKernel(cl_kernel /* source_kernel */,
1221 cl_int* /* errcode_ret */) CL_API_SUFFIX__VERSION_2_1;
1222
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001223#endif
1224
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001225extern CL_API_ENTRY cl_int CL_API_CALL
1226clRetainKernel(cl_kernel /* kernel */) CL_API_SUFFIX__VERSION_1_0;
1227
1228extern CL_API_ENTRY cl_int CL_API_CALL
1229clReleaseKernel(cl_kernel /* kernel */) CL_API_SUFFIX__VERSION_1_0;
1230
1231extern CL_API_ENTRY cl_int CL_API_CALL
1232clSetKernelArg(cl_kernel /* kernel */,
1233 cl_uint /* arg_index */,
1234 size_t /* arg_size */,
1235 const void * /* arg_value */) CL_API_SUFFIX__VERSION_1_0;
1236
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001237#ifdef CL_VERSION_2_0
1238
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001239extern CL_API_ENTRY cl_int CL_API_CALL
Pablo Telloe86a09f2018-01-11 15:44:48 +00001240clSetKernelArgSVMPointer(cl_kernel /* kernel */,
1241 cl_uint /* arg_index */,
1242 const void * /* arg_value */) CL_API_SUFFIX__VERSION_2_0;
1243
1244extern CL_API_ENTRY cl_int CL_API_CALL
1245clSetKernelExecInfo(cl_kernel /* kernel */,
1246 cl_kernel_exec_info /* param_name */,
1247 size_t /* param_value_size */,
1248 const void * /* param_value */) CL_API_SUFFIX__VERSION_2_0;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001249
1250#endif
1251
Pablo Telloe86a09f2018-01-11 15:44:48 +00001252extern CL_API_ENTRY cl_int CL_API_CALL
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001253clGetKernelInfo(cl_kernel /* kernel */,
1254 cl_kernel_info /* param_name */,
1255 size_t /* param_value_size */,
1256 void * /* param_value */,
1257 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
1258
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001259#ifdef CL_VERSION_1_2
1260
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001261extern CL_API_ENTRY cl_int CL_API_CALL
1262clGetKernelArgInfo(cl_kernel /* kernel */,
1263 cl_uint /* arg_indx */,
1264 cl_kernel_arg_info /* param_name */,
1265 size_t /* param_value_size */,
1266 void * /* param_value */,
1267 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_2;
1268
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001269#endif
1270
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001271extern CL_API_ENTRY cl_int CL_API_CALL
1272clGetKernelWorkGroupInfo(cl_kernel /* kernel */,
1273 cl_device_id /* device */,
1274 cl_kernel_work_group_info /* param_name */,
1275 size_t /* param_value_size */,
1276 void * /* param_value */,
1277 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
1278
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001279#ifdef CL_VERSION_2_1
1280
Pablo Telloe86a09f2018-01-11 15:44:48 +00001281extern CL_API_ENTRY cl_int CL_API_CALL
1282clGetKernelSubGroupInfo(cl_kernel /* kernel */,
1283 cl_device_id /* device */,
1284 cl_kernel_sub_group_info /* param_name */,
1285 size_t /* input_value_size */,
1286 const void* /*input_value */,
1287 size_t /* param_value_size */,
1288 void* /* param_value */,
1289 size_t* /* param_value_size_ret */ ) CL_API_SUFFIX__VERSION_2_1;
1290
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001291#endif
Pablo Telloe86a09f2018-01-11 15:44:48 +00001292
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001293/* Event Object APIs */
1294extern CL_API_ENTRY cl_int CL_API_CALL
1295clWaitForEvents(cl_uint /* num_events */,
1296 const cl_event * /* event_list */) CL_API_SUFFIX__VERSION_1_0;
1297
1298extern CL_API_ENTRY cl_int CL_API_CALL
1299clGetEventInfo(cl_event /* event */,
1300 cl_event_info /* param_name */,
1301 size_t /* param_value_size */,
1302 void * /* param_value */,
1303 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001304
1305#ifdef CL_VERSION_1_1
1306
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001307extern CL_API_ENTRY cl_event CL_API_CALL
1308clCreateUserEvent(cl_context /* context */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001309 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
1310
1311#endif
1312
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001313extern CL_API_ENTRY cl_int CL_API_CALL
1314clRetainEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0;
1315
1316extern CL_API_ENTRY cl_int CL_API_CALL
1317clReleaseEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0;
1318
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001319#ifdef CL_VERSION_1_1
1320
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001321extern CL_API_ENTRY cl_int CL_API_CALL
1322clSetUserEventStatus(cl_event /* event */,
1323 cl_int /* execution_status */) CL_API_SUFFIX__VERSION_1_1;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001324
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001325extern CL_API_ENTRY cl_int CL_API_CALL
1326clSetEventCallback( cl_event /* event */,
1327 cl_int /* command_exec_callback_type */,
1328 void (CL_CALLBACK * /* pfn_notify */)(cl_event, cl_int, void *),
1329 void * /* user_data */) CL_API_SUFFIX__VERSION_1_1;
1330
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001331#endif
1332
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001333/* Profiling APIs */
1334extern CL_API_ENTRY cl_int CL_API_CALL
1335clGetEventProfilingInfo(cl_event /* event */,
1336 cl_profiling_info /* param_name */,
1337 size_t /* param_value_size */,
1338 void * /* param_value */,
1339 size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001340
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001341/* Flush and Finish APIs */
1342extern CL_API_ENTRY cl_int CL_API_CALL
1343clFlush(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
1344
1345extern CL_API_ENTRY cl_int CL_API_CALL
1346clFinish(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
1347
1348/* Enqueued Commands APIs */
1349extern CL_API_ENTRY cl_int CL_API_CALL
1350clEnqueueReadBuffer(cl_command_queue /* command_queue */,
1351 cl_mem /* buffer */,
1352 cl_bool /* blocking_read */,
1353 size_t /* offset */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001354 size_t /* size */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001355 void * /* ptr */,
1356 cl_uint /* num_events_in_wait_list */,
1357 const cl_event * /* event_wait_list */,
1358 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001359
1360#ifdef CL_VERSION_1_1
1361
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001362extern CL_API_ENTRY cl_int CL_API_CALL
1363clEnqueueReadBufferRect(cl_command_queue /* command_queue */,
1364 cl_mem /* buffer */,
1365 cl_bool /* blocking_read */,
1366 const size_t * /* buffer_offset */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001367 const size_t * /* host_offset */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001368 const size_t * /* region */,
1369 size_t /* buffer_row_pitch */,
1370 size_t /* buffer_slice_pitch */,
1371 size_t /* host_row_pitch */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001372 size_t /* host_slice_pitch */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001373 void * /* ptr */,
1374 cl_uint /* num_events_in_wait_list */,
1375 const cl_event * /* event_wait_list */,
1376 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001377
1378#endif
1379
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001380extern CL_API_ENTRY cl_int CL_API_CALL
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001381clEnqueueWriteBuffer(cl_command_queue /* command_queue */,
1382 cl_mem /* buffer */,
1383 cl_bool /* blocking_write */,
1384 size_t /* offset */,
1385 size_t /* size */,
1386 const void * /* ptr */,
1387 cl_uint /* num_events_in_wait_list */,
1388 const cl_event * /* event_wait_list */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001389 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001390
1391#ifdef CL_VERSION_1_1
1392
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001393extern CL_API_ENTRY cl_int CL_API_CALL
1394clEnqueueWriteBufferRect(cl_command_queue /* command_queue */,
1395 cl_mem /* buffer */,
1396 cl_bool /* blocking_write */,
1397 const size_t * /* buffer_offset */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001398 const size_t * /* host_offset */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001399 const size_t * /* region */,
1400 size_t /* buffer_row_pitch */,
1401 size_t /* buffer_slice_pitch */,
1402 size_t /* host_row_pitch */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001403 size_t /* host_slice_pitch */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001404 const void * /* ptr */,
1405 cl_uint /* num_events_in_wait_list */,
1406 const cl_event * /* event_wait_list */,
1407 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001408
1409#endif
1410
1411#ifdef CL_VERSION_1_2
1412
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001413extern CL_API_ENTRY cl_int CL_API_CALL
1414clEnqueueFillBuffer(cl_command_queue /* command_queue */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001415 cl_mem /* buffer */,
1416 const void * /* pattern */,
1417 size_t /* pattern_size */,
1418 size_t /* offset */,
1419 size_t /* size */,
1420 cl_uint /* num_events_in_wait_list */,
1421 const cl_event * /* event_wait_list */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001422 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001423
1424#endif
1425
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001426extern CL_API_ENTRY cl_int CL_API_CALL
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001427clEnqueueCopyBuffer(cl_command_queue /* command_queue */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001428 cl_mem /* src_buffer */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001429 cl_mem /* dst_buffer */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001430 size_t /* src_offset */,
1431 size_t /* dst_offset */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001432 size_t /* size */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001433 cl_uint /* num_events_in_wait_list */,
1434 const cl_event * /* event_wait_list */,
1435 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001436
1437#ifdef CL_VERSION_1_1
1438
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001439extern CL_API_ENTRY cl_int CL_API_CALL
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001440clEnqueueCopyBufferRect(cl_command_queue /* command_queue */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001441 cl_mem /* src_buffer */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001442 cl_mem /* dst_buffer */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001443 const size_t * /* src_origin */,
1444 const size_t * /* dst_origin */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001445 const size_t * /* region */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001446 size_t /* src_row_pitch */,
1447 size_t /* src_slice_pitch */,
1448 size_t /* dst_row_pitch */,
1449 size_t /* dst_slice_pitch */,
1450 cl_uint /* num_events_in_wait_list */,
1451 const cl_event * /* event_wait_list */,
1452 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001453
1454#endif
1455
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001456extern CL_API_ENTRY cl_int CL_API_CALL
1457clEnqueueReadImage(cl_command_queue /* command_queue */,
1458 cl_mem /* image */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001459 cl_bool /* blocking_read */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001460 const size_t * /* origin[3] */,
1461 const size_t * /* region[3] */,
1462 size_t /* row_pitch */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001463 size_t /* slice_pitch */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001464 void * /* ptr */,
1465 cl_uint /* num_events_in_wait_list */,
1466 const cl_event * /* event_wait_list */,
1467 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
1468
1469extern CL_API_ENTRY cl_int CL_API_CALL
1470clEnqueueWriteImage(cl_command_queue /* command_queue */,
1471 cl_mem /* image */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001472 cl_bool /* blocking_write */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001473 const size_t * /* origin[3] */,
1474 const size_t * /* region[3] */,
1475 size_t /* input_row_pitch */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001476 size_t /* input_slice_pitch */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001477 const void * /* ptr */,
1478 cl_uint /* num_events_in_wait_list */,
1479 const cl_event * /* event_wait_list */,
1480 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
1481
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001482#ifdef CL_VERSION_1_2
1483
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001484extern CL_API_ENTRY cl_int CL_API_CALL
1485clEnqueueFillImage(cl_command_queue /* command_queue */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001486 cl_mem /* image */,
1487 const void * /* fill_color */,
1488 const size_t * /* origin[3] */,
1489 const size_t * /* region[3] */,
1490 cl_uint /* num_events_in_wait_list */,
1491 const cl_event * /* event_wait_list */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001492 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001493
1494#endif
1495
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001496extern CL_API_ENTRY cl_int CL_API_CALL
1497clEnqueueCopyImage(cl_command_queue /* command_queue */,
1498 cl_mem /* src_image */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001499 cl_mem /* dst_image */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001500 const size_t * /* src_origin[3] */,
1501 const size_t * /* dst_origin[3] */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001502 const size_t * /* region[3] */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001503 cl_uint /* num_events_in_wait_list */,
1504 const cl_event * /* event_wait_list */,
1505 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
1506
1507extern CL_API_ENTRY cl_int CL_API_CALL
1508clEnqueueCopyImageToBuffer(cl_command_queue /* command_queue */,
1509 cl_mem /* src_image */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001510 cl_mem /* dst_buffer */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001511 const size_t * /* src_origin[3] */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001512 const size_t * /* region[3] */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001513 size_t /* dst_offset */,
1514 cl_uint /* num_events_in_wait_list */,
1515 const cl_event * /* event_wait_list */,
1516 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
1517
1518extern CL_API_ENTRY cl_int CL_API_CALL
1519clEnqueueCopyBufferToImage(cl_command_queue /* command_queue */,
1520 cl_mem /* src_buffer */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001521 cl_mem /* dst_image */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001522 size_t /* src_offset */,
1523 const size_t * /* dst_origin[3] */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001524 const size_t * /* region[3] */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001525 cl_uint /* num_events_in_wait_list */,
1526 const cl_event * /* event_wait_list */,
1527 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
1528
1529extern CL_API_ENTRY void * CL_API_CALL
1530clEnqueueMapBuffer(cl_command_queue /* command_queue */,
1531 cl_mem /* buffer */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001532 cl_bool /* blocking_map */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001533 cl_map_flags /* map_flags */,
1534 size_t /* offset */,
1535 size_t /* size */,
1536 cl_uint /* num_events_in_wait_list */,
1537 const cl_event * /* event_wait_list */,
1538 cl_event * /* event */,
1539 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
1540
1541extern CL_API_ENTRY void * CL_API_CALL
1542clEnqueueMapImage(cl_command_queue /* command_queue */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001543 cl_mem /* image */,
1544 cl_bool /* blocking_map */,
1545 cl_map_flags /* map_flags */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001546 const size_t * /* origin[3] */,
1547 const size_t * /* region[3] */,
1548 size_t * /* image_row_pitch */,
1549 size_t * /* image_slice_pitch */,
1550 cl_uint /* num_events_in_wait_list */,
1551 const cl_event * /* event_wait_list */,
1552 cl_event * /* event */,
1553 cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
1554
1555extern CL_API_ENTRY cl_int CL_API_CALL
1556clEnqueueUnmapMemObject(cl_command_queue /* command_queue */,
1557 cl_mem /* memobj */,
1558 void * /* mapped_ptr */,
1559 cl_uint /* num_events_in_wait_list */,
1560 const cl_event * /* event_wait_list */,
1561 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
1562
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001563#ifdef CL_VERSION_1_2
1564
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001565extern CL_API_ENTRY cl_int CL_API_CALL
1566clEnqueueMigrateMemObjects(cl_command_queue /* command_queue */,
1567 cl_uint /* num_mem_objects */,
1568 const cl_mem * /* mem_objects */,
1569 cl_mem_migration_flags /* flags */,
1570 cl_uint /* num_events_in_wait_list */,
1571 const cl_event * /* event_wait_list */,
1572 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2;
1573
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001574#endif
1575
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001576extern CL_API_ENTRY cl_int CL_API_CALL
1577clEnqueueNDRangeKernel(cl_command_queue /* command_queue */,
1578 cl_kernel /* kernel */,
1579 cl_uint /* work_dim */,
1580 const size_t * /* global_work_offset */,
1581 const size_t * /* global_work_size */,
1582 const size_t * /* local_work_size */,
1583 cl_uint /* num_events_in_wait_list */,
1584 const cl_event * /* event_wait_list */,
1585 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
1586
1587extern CL_API_ENTRY cl_int CL_API_CALL
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001588clEnqueueNativeKernel(cl_command_queue /* command_queue */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001589 void (CL_CALLBACK * /*user_func*/)(void *),
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001590 void * /* args */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001591 size_t /* cb_args */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001592 cl_uint /* num_mem_objects */,
1593 const cl_mem * /* mem_list */,
1594 const void ** /* args_mem_loc */,
1595 cl_uint /* num_events_in_wait_list */,
1596 const cl_event * /* event_wait_list */,
1597 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
1598
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001599#ifdef CL_VERSION_1_2
1600
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001601extern CL_API_ENTRY cl_int CL_API_CALL
Pablo Telloe86a09f2018-01-11 15:44:48 +00001602clEnqueueMarkerWithWaitList(cl_command_queue /* command_queue */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001603 cl_uint /* num_events_in_wait_list */,
1604 const cl_event * /* event_wait_list */,
1605 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2;
1606
1607extern CL_API_ENTRY cl_int CL_API_CALL
Pablo Telloe86a09f2018-01-11 15:44:48 +00001608clEnqueueBarrierWithWaitList(cl_command_queue /* command_queue */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001609 cl_uint /* num_events_in_wait_list */,
1610 const cl_event * /* event_wait_list */,
1611 cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2;
1612
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001613#endif
1614
1615#ifdef CL_VERSION_2_0
1616
Pablo Telloe86a09f2018-01-11 15:44:48 +00001617extern CL_API_ENTRY cl_int CL_API_CALL
1618clEnqueueSVMFree(cl_command_queue /* command_queue */,
1619 cl_uint /* num_svm_pointers */,
1620 void *[] /* svm_pointers[] */,
1621 void (CL_CALLBACK * /*pfn_free_func*/)(cl_command_queue /* queue */,
1622 cl_uint /* num_svm_pointers */,
1623 void *[] /* svm_pointers[] */,
1624 void * /* user_data */),
1625 void * /* user_data */,
1626 cl_uint /* num_events_in_wait_list */,
1627 const cl_event * /* event_wait_list */,
1628 cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0;
1629
1630extern CL_API_ENTRY cl_int CL_API_CALL
1631clEnqueueSVMMemcpy(cl_command_queue /* command_queue */,
1632 cl_bool /* blocking_copy */,
1633 void * /* dst_ptr */,
1634 const void * /* src_ptr */,
1635 size_t /* size */,
1636 cl_uint /* num_events_in_wait_list */,
1637 const cl_event * /* event_wait_list */,
1638 cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0;
1639
1640extern CL_API_ENTRY cl_int CL_API_CALL
1641clEnqueueSVMMemFill(cl_command_queue /* command_queue */,
1642 void * /* svm_ptr */,
1643 const void * /* pattern */,
1644 size_t /* pattern_size */,
1645 size_t /* size */,
1646 cl_uint /* num_events_in_wait_list */,
1647 const cl_event * /* event_wait_list */,
1648 cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001649
Pablo Telloe86a09f2018-01-11 15:44:48 +00001650extern CL_API_ENTRY cl_int CL_API_CALL
1651clEnqueueSVMMap(cl_command_queue /* command_queue */,
1652 cl_bool /* blocking_map */,
1653 cl_map_flags /* flags */,
1654 void * /* svm_ptr */,
1655 size_t /* size */,
1656 cl_uint /* num_events_in_wait_list */,
1657 const cl_event * /* event_wait_list */,
1658 cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001659
Pablo Telloe86a09f2018-01-11 15:44:48 +00001660extern CL_API_ENTRY cl_int CL_API_CALL
1661clEnqueueSVMUnmap(cl_command_queue /* command_queue */,
1662 void * /* svm_ptr */,
1663 cl_uint /* num_events_in_wait_list */,
1664 const cl_event * /* event_wait_list */,
1665 cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0;
1666
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001667#endif
1668
1669#ifdef CL_VERSION_2_1
1670
Pablo Telloe86a09f2018-01-11 15:44:48 +00001671extern CL_API_ENTRY cl_int CL_API_CALL
1672clEnqueueSVMMigrateMem(cl_command_queue /* command_queue */,
1673 cl_uint /* num_svm_pointers */,
1674 const void ** /* svm_pointers */,
1675 const size_t * /* sizes */,
1676 cl_mem_migration_flags /* flags */,
1677 cl_uint /* num_events_in_wait_list */,
1678 const cl_event * /* event_wait_list */,
1679 cl_event * /* event */) CL_API_SUFFIX__VERSION_2_1;
1680
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001681#endif
1682
1683#ifdef CL_VERSION_1_2
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001684
1685/* Extension function access
1686 *
1687 * Returns the extension function address for the given function name,
1688 * or NULL if a valid function can not be found. The client must
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001689 * check to make sure the address is not NULL, before using or
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001690 * calling the returned function address.
1691 */
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001692extern CL_API_ENTRY void * CL_API_CALL
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001693clGetExtensionFunctionAddressForPlatform(cl_platform_id /* platform */,
1694 const char * /* func_name */) CL_API_SUFFIX__VERSION_1_2;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001695
1696#endif
1697
1698#ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
1699 /*
1700 * WARNING:
1701 * This API introduces mutable state into the OpenCL implementation. It has been REMOVED
1702 * to better facilitate thread safety. The 1.0 API is not thread safe. It is not tested by the
1703 * OpenCL 1.1 conformance test, and consequently may not work or may not work dependably.
1704 * It is likely to be non-performant. Use of this API is not advised. Use at your own risk.
1705 *
1706 * Software developers previously relying on this API are instructed to set the command queue
1707 * properties when creating the queue, instead.
1708 */
1709 extern CL_API_ENTRY cl_int CL_API_CALL
1710 clSetCommandQueueProperty(cl_command_queue /* command_queue */,
1711 cl_command_queue_properties /* properties */,
1712 cl_bool /* enable */,
1713 cl_command_queue_properties * /* old_properties */) CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED;
1714#endif /* CL_USE_DEPRECATED_OPENCL_1_0_APIS */
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001715
Pablo Telloe86a09f2018-01-11 15:44:48 +00001716/* Deprecated OpenCL 1.1 APIs */
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001717extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
1718clCreateImage2D(cl_context /* context */,
1719 cl_mem_flags /* flags */,
1720 const cl_image_format * /* image_format */,
1721 size_t /* image_width */,
1722 size_t /* image_height */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001723 size_t /* image_row_pitch */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001724 void * /* host_ptr */,
1725 cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001726
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001727extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
1728clCreateImage3D(cl_context /* context */,
1729 cl_mem_flags /* flags */,
1730 const cl_image_format * /* image_format */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001731 size_t /* image_width */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001732 size_t /* image_height */,
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001733 size_t /* image_depth */,
1734 size_t /* image_row_pitch */,
1735 size_t /* image_slice_pitch */,
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001736 void * /* host_ptr */,
1737 cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001738
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001739extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
1740clEnqueueMarker(cl_command_queue /* command_queue */,
1741 cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001742
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001743extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
1744clEnqueueWaitForEvents(cl_command_queue /* command_queue */,
1745 cl_uint /* num_events */,
1746 const cl_event * /* event_list */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001747
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001748extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
1749clEnqueueBarrier(cl_command_queue /* command_queue */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
1750
1751extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
1752clUnloadCompiler(void) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001753
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001754extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED void * CL_API_CALL
1755clGetExtensionFunctionAddress(const char * /* func_name */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001756
Pablo Telloe86a09f2018-01-11 15:44:48 +00001757/* Deprecated OpenCL 2.0 APIs */
1758extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_command_queue CL_API_CALL
1759clCreateCommandQueue(cl_context /* context */,
1760 cl_device_id /* device */,
1761 cl_command_queue_properties /* properties */,
1762 cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001763
Pablo Telloe86a09f2018-01-11 15:44:48 +00001764extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_sampler CL_API_CALL
1765clCreateSampler(cl_context /* context */,
1766 cl_bool /* normalized_coords */,
1767 cl_addressing_mode /* addressing_mode */,
1768 cl_filter_mode /* filter_mode */,
1769 cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001770
Pablo Telloe86a09f2018-01-11 15:44:48 +00001771extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_int CL_API_CALL
1772clEnqueueTask(cl_command_queue /* command_queue */,
1773 cl_kernel /* kernel */,
1774 cl_uint /* num_events_in_wait_list */,
1775 const cl_event * /* event_wait_list */,
1776 cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED;
Anthony Barbier8b2fdc92018-08-09 11:42:38 +01001777
Anthony Barbier6ff3b192017-09-04 18:44:23 +01001778#ifdef __cplusplus
1779}
1780#endif
1781
1782#endif /* __OPENCL_CL_H */
1783