1#![allow(non_camel_case_types, non_upper_case_globals)]
18
19use super::cl_platform::{cl_int, cl_uchar, cl_uint, cl_ulong};
20#[allow(unused_imports)]
21use libc::{c_char, c_uchar, c_void, intptr_t, size_t};
22
23pub type cl_platform_id = *mut c_void;
24pub type cl_device_id = *mut c_void;
25pub type cl_context = *mut c_void;
26pub type cl_command_queue = *mut c_void;
27pub type cl_mem = *mut c_void;
28pub type cl_program = *mut c_void;
29pub type cl_kernel = *mut c_void;
30pub type cl_event = *mut c_void;
31pub type cl_sampler = *mut c_void;
32
33pub type cl_bool = cl_uint; pub type cl_bitfield = cl_ulong;
35pub type cl_properties = cl_ulong;
36pub type cl_device_type = cl_bitfield;
37pub type cl_platform_info = cl_uint;
38pub type cl_device_info = cl_uint;
39pub type cl_device_fp_config = cl_bitfield;
40pub type cl_device_mem_cache_type = cl_uint;
41pub type cl_device_local_mem_type = cl_uint;
42pub type cl_device_exec_capabilities = cl_bitfield;
43pub type cl_device_svm_capabilities = cl_bitfield;
45pub type cl_command_queue_properties = cl_bitfield;
47pub type cl_device_partition_property = intptr_t;
49pub type cl_device_affinity_domain = cl_bitfield;
50pub type cl_context_properties = intptr_t;
53pub type cl_context_info = cl_uint;
54pub type cl_queue_properties = cl_properties;
56pub type cl_command_queue_info = cl_uint;
58pub type cl_channel_order = cl_uint;
59pub type cl_channel_type = cl_uint;
60pub type cl_mem_flags = cl_bitfield;
61pub type cl_svm_mem_flags = cl_bitfield;
63pub type cl_mem_object_type = cl_uint;
65pub type cl_mem_info = cl_uint;
66pub type cl_mem_migration_flags = cl_bitfield;
68pub type cl_image_info = cl_uint;
70pub type cl_buffer_create_type = cl_uint;
72pub type cl_addressing_mode = cl_uint;
74pub type cl_filter_mode = cl_uint;
75pub type cl_sampler_info = cl_uint;
76pub type cl_map_flags = cl_bitfield;
77pub type cl_pipe_properties = intptr_t;
79pub type cl_pipe_info = cl_uint;
80pub type cl_program_info = cl_uint;
82pub type cl_program_build_info = cl_uint;
83pub type cl_program_binary_type = cl_uint;
85pub type cl_build_status = cl_int;
87pub type cl_kernel_info = cl_uint;
88pub type cl_kernel_arg_info = cl_uint;
90pub type cl_kernel_arg_address_qualifier = cl_uint;
91pub type cl_kernel_arg_access_qualifier = cl_uint;
92pub type cl_kernel_arg_type_qualifier = cl_uint;
93pub type cl_kernel_work_group_info = cl_uint;
95pub type cl_kernel_sub_group_info = cl_uint;
97pub type cl_event_info = cl_uint;
99pub type cl_command_type = cl_uint;
100pub type cl_profiling_info = cl_uint;
101pub type cl_sampler_properties = cl_bitfield;
103pub type cl_kernel_exec_info = cl_uint;
104pub type cl_device_atomic_capabilities = cl_bitfield;
107pub type cl_device_device_enqueue_capabilities = cl_bitfield;
108pub type cl_khronos_vendor_id = cl_uint;
109pub type cl_mem_properties = cl_properties;
110pub type cl_version = cl_uint;
111#[repr(C)]
114#[derive(Debug, Copy, Clone)]
115pub struct cl_image_format {
116 pub image_channel_order: cl_channel_order,
117 pub image_channel_data_type: cl_channel_type,
118}
119
120#[repr(C)]
123#[derive(Debug, Copy, Clone)]
124pub struct cl_image_desc {
125 pub image_type: cl_mem_object_type,
126 pub image_width: size_t,
127 pub image_height: size_t,
128 pub image_depth: size_t,
129 pub image_array_size: size_t,
130 pub image_row_pitch: size_t,
131 pub image_slice_pitch: size_t,
132 pub num_mip_levels: cl_uint,
133 pub num_samples: cl_uint,
134 pub buffer: cl_mem,
136}
137
138#[repr(C)]
143#[derive(Debug, Copy, Clone)]
144pub struct cl_buffer_region {
145 pub origin: size_t,
146 pub size: size_t,
147}
148
149pub const CL_NAME_VERSION_MAX_NAME_SIZE: usize = 64;
153#[repr(C)]
154#[derive(Debug, Copy, Clone)]
155pub struct cl_name_version {
156 pub version: cl_version,
157 pub name: [cl_uchar; CL_NAME_VERSION_MAX_NAME_SIZE],
158}
159
160pub const CL_SUCCESS: cl_int = 0;
166pub const CL_DEVICE_NOT_FOUND: cl_int = -1;
167pub const CL_DEVICE_NOT_AVAILABLE: cl_int = -2;
168pub const CL_COMPILER_NOT_AVAILABLE: cl_int = -3;
169pub const CL_MEM_OBJECT_ALLOCATION_FAILURE: cl_int = -4;
170pub const CL_OUT_OF_RESOURCES: cl_int = -5;
171pub const CL_OUT_OF_HOST_MEMORY: cl_int = -6;
172pub const CL_PROFILING_INFO_NOT_AVAILABLE: cl_int = -7;
173pub const CL_MEM_COPY_OVERLAP: cl_int = -8;
174pub const CL_IMAGE_FORMAT_MISMATCH: cl_int = -9;
175pub const CL_IMAGE_FORMAT_NOT_SUPPORTED: cl_int = -10;
176pub const CL_BUILD_PROGRAM_FAILURE: cl_int = -11;
177pub const CL_MAP_FAILURE: cl_int = -12;
178pub const CL_MISALIGNED_SUB_BUFFER_OFFSET: cl_int = -13;
180pub const CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST: cl_int = -14;
181pub const CL_COMPILE_PROGRAM_FAILURE: cl_int = -15;
184pub const CL_LINKER_NOT_AVAILABLE: cl_int = -16;
185pub const CL_LINK_PROGRAM_FAILURE: cl_int = -17;
186pub const CL_DEVICE_PARTITION_FAILED: cl_int = -18;
187pub const CL_KERNEL_ARG_INFO_NOT_AVAILABLE: cl_int = -19;
188pub const CL_INVALID_VALUE: cl_int = -30;
191pub const CL_INVALID_DEVICE_TYPE: cl_int = -31;
192pub const CL_INVALID_PLATFORM: cl_int = -32;
193pub const CL_INVALID_DEVICE: cl_int = -33;
194pub const CL_INVALID_CONTEXT: cl_int = -34;
195pub const CL_INVALID_QUEUE_PROPERTIES: cl_int = -35;
196pub const CL_INVALID_COMMAND_QUEUE: cl_int = -36;
197pub const CL_INVALID_HOST_PTR: cl_int = -37;
198pub const CL_INVALID_MEM_OBJECT: cl_int = -38;
199pub const CL_INVALID_IMAGE_FORMAT_DESCRIPTOR: cl_int = -39;
200pub const CL_INVALID_IMAGE_SIZE: cl_int = -40;
201pub const CL_INVALID_SAMPLER: cl_int = -41;
202pub const CL_INVALID_BINARY: cl_int = -42;
203pub const CL_INVALID_BUILD_OPTIONS: cl_int = -43;
204pub const CL_INVALID_PROGRAM: cl_int = -44;
205pub const CL_INVALID_PROGRAM_EXECUTABLE: cl_int = -45;
206pub const CL_INVALID_KERNEL_NAME: cl_int = -46;
207pub const CL_INVALID_KERNEL_DEFINITION: cl_int = -47;
208pub const CL_INVALID_KERNEL: cl_int = -48;
209pub const CL_INVALID_ARG_INDEX: cl_int = -49;
210pub const CL_INVALID_ARG_VALUE: cl_int = -50;
211pub const CL_INVALID_ARG_SIZE: cl_int = -51;
212pub const CL_INVALID_KERNEL_ARGS: cl_int = -52;
213pub const CL_INVALID_WORK_DIMENSION: cl_int = -53;
214pub const CL_INVALID_WORK_GROUP_SIZE: cl_int = -54;
215pub const CL_INVALID_WORK_ITEM_SIZE: cl_int = -55;
216pub const CL_INVALID_GLOBAL_OFFSET: cl_int = -56;
217pub const CL_INVALID_EVENT_WAIT_LIST: cl_int = -57;
218pub const CL_INVALID_EVENT: cl_int = -58;
219pub const CL_INVALID_OPERATION: cl_int = -59;
220pub const CL_INVALID_GL_OBJECT: cl_int = -60;
221pub const CL_INVALID_BUFFER_SIZE: cl_int = -61;
222pub const CL_INVALID_MIP_LEVEL: cl_int = -62;
223pub const CL_INVALID_GLOBAL_WORK_SIZE: cl_int = -63;
224pub const CL_INVALID_PROPERTY: cl_int = -64;
226pub const CL_INVALID_IMAGE_DESCRIPTOR: cl_int = -65;
229pub const CL_INVALID_COMPILER_OPTIONS: cl_int = -66;
230pub const CL_INVALID_LINKER_OPTIONS: cl_int = -67;
231pub const CL_INVALID_DEVICE_PARTITION_COUNT: cl_int = -68;
232pub const CL_INVALID_PIPE_SIZE: cl_int = -69;
235pub const CL_INVALID_DEVICE_QUEUE: cl_int = -70;
236pub const CL_INVALID_SPEC_ID: cl_int = -71;
239pub const CL_MAX_SIZE_RESTRICTION_EXCEEDED: cl_int = -72;
240pub const CL_FALSE: cl_bool = 0;
244pub const CL_TRUE: cl_bool = 1;
245pub const CL_BLOCKING: cl_bool = CL_TRUE;
247pub const CL_NON_BLOCKING: cl_bool = CL_FALSE;
248pub const CL_PLATFORM_PROFILE: cl_platform_info = 0x0900;
252pub const CL_PLATFORM_VERSION: cl_platform_info = 0x0901;
253pub const CL_PLATFORM_NAME: cl_platform_info = 0x0902;
254pub const CL_PLATFORM_VENDOR: cl_platform_info = 0x0903;
255pub const CL_PLATFORM_EXTENSIONS: cl_platform_info = 0x0904;
256pub const CL_PLATFORM_HOST_TIMER_RESOLUTION: cl_platform_info = 0x0905;
258pub const CL_PLATFORM_NUMERIC_VERSION: cl_platform_info = 0x0906;
261pub const CL_PLATFORM_EXTENSIONS_WITH_VERSION: cl_platform_info = 0x0907;
262pub const CL_DEVICE_TYPE_DEFAULT: cl_device_type = 1 << 0;
266pub const CL_DEVICE_TYPE_CPU: cl_device_type = 1 << 1;
267pub const CL_DEVICE_TYPE_GPU: cl_device_type = 1 << 2;
268pub const CL_DEVICE_TYPE_ACCELERATOR: cl_device_type = 1 << 3;
269pub const CL_DEVICE_TYPE_CUSTOM: cl_device_type = 1 << 4;
271pub const CL_DEVICE_TYPE_ALL: cl_device_type = 0xFFFF_FFFF;
272pub const CL_DEVICE_TYPE: cl_device_info = 0x1000;
276pub const CL_DEVICE_VENDOR_ID: cl_device_info = 0x1001;
277pub const CL_DEVICE_MAX_COMPUTE_UNITS: cl_device_info = 0x1002;
278pub const CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS: cl_device_info = 0x1003;
279pub const CL_DEVICE_MAX_WORK_GROUP_SIZE: cl_device_info = 0x1004;
280pub const CL_DEVICE_MAX_WORK_ITEM_SIZES: cl_device_info = 0x1005;
281pub const CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR: cl_device_info = 0x1006;
282pub const CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT: cl_device_info = 0x1007;
283pub const CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT: cl_device_info = 0x1008;
284pub const CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG: cl_device_info = 0x1009;
285pub const CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT: cl_device_info = 0x100A;
286pub const CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE: cl_device_info = 0x100B;
287pub const CL_DEVICE_MAX_CLOCK_FREQUENCY: cl_device_info = 0x100C;
288pub const CL_DEVICE_ADDRESS_BITS: cl_device_info = 0x100D;
289pub const CL_DEVICE_MAX_READ_IMAGE_ARGS: cl_device_info = 0x100E;
290pub const CL_DEVICE_MAX_WRITE_IMAGE_ARGS: cl_device_info = 0x100F;
291pub const CL_DEVICE_MAX_MEM_ALLOC_SIZE: cl_device_info = 0x1010;
292pub const CL_DEVICE_IMAGE2D_MAX_WIDTH: cl_device_info = 0x1011;
293pub const CL_DEVICE_IMAGE2D_MAX_HEIGHT: cl_device_info = 0x1012;
294pub const CL_DEVICE_IMAGE3D_MAX_WIDTH: cl_device_info = 0x1013;
295pub const CL_DEVICE_IMAGE3D_MAX_HEIGHT: cl_device_info = 0x1014;
296pub const CL_DEVICE_IMAGE3D_MAX_DEPTH: cl_device_info = 0x1015;
297pub const CL_DEVICE_IMAGE_SUPPORT: cl_device_info = 0x1016;
298pub const CL_DEVICE_MAX_PARAMETER_SIZE: cl_device_info = 0x1017;
299pub const CL_DEVICE_MAX_SAMPLERS: cl_device_info = 0x1018;
300pub const CL_DEVICE_MEM_BASE_ADDR_ALIGN: cl_device_info = 0x1019;
301pub const CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE: cl_device_info = 0x101A;
302pub const CL_DEVICE_SINGLE_FP_CONFIG: cl_device_info = 0x101B;
303pub const CL_DEVICE_GLOBAL_MEM_CACHE_TYPE: cl_device_info = 0x101C;
304pub const CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE: cl_device_info = 0x101D;
305pub const CL_DEVICE_GLOBAL_MEM_CACHE_SIZE: cl_device_info = 0x101E;
306pub const CL_DEVICE_GLOBAL_MEM_SIZE: cl_device_info = 0x101F;
307pub const CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE: cl_device_info = 0x1020;
308pub const CL_DEVICE_MAX_CONSTANT_ARGS: cl_device_info = 0x1021;
309pub const CL_DEVICE_LOCAL_MEM_TYPE: cl_device_info = 0x1022;
310pub const CL_DEVICE_LOCAL_MEM_SIZE: cl_device_info = 0x1023;
311pub const CL_DEVICE_ERROR_CORRECTION_SUPPORT: cl_device_info = 0x1024;
312pub const CL_DEVICE_PROFILING_TIMER_RESOLUTION: cl_device_info = 0x1025;
313pub const CL_DEVICE_ENDIAN_LITTLE: cl_device_info = 0x1026;
314pub const CL_DEVICE_AVAILABLE: cl_device_info = 0x1027;
315pub const CL_DEVICE_COMPILER_AVAILABLE: cl_device_info = 0x1028;
316pub const CL_DEVICE_EXECUTION_CAPABILITIES: cl_device_info = 0x1029;
317pub const CL_DEVICE_QUEUE_PROPERTIES: cl_device_info = 0x102A; pub const CL_DEVICE_QUEUE_ON_HOST_PROPERTIES: cl_device_info = 0x102A;
320pub const CL_DEVICE_NAME: cl_device_info = 0x102B;
322pub const CL_DEVICE_VENDOR: cl_device_info = 0x102C;
323pub const CL_DRIVER_VERSION: cl_device_info = 0x102D;
324pub const CL_DEVICE_PROFILE: cl_device_info = 0x102E;
325pub const CL_DEVICE_VERSION: cl_device_info = 0x102F;
326pub const CL_DEVICE_EXTENSIONS: cl_device_info = 0x1030;
327pub const CL_DEVICE_PLATFORM: cl_device_info = 0x1031;
328pub const CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF: cl_device_info = 0x1034;
334pub const CL_DEVICE_HOST_UNIFIED_MEMORY: cl_device_info = 0x1035; pub const CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR: cl_device_info = 0x1036;
336pub const CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT: cl_device_info = 0x1037;
337pub const CL_DEVICE_NATIVE_VECTOR_WIDTH_INT: cl_device_info = 0x1038;
338pub const CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG: cl_device_info = 0x1039;
339pub const CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT: cl_device_info = 0x103A;
340pub const CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE: cl_device_info = 0x103B;
341pub const CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF: cl_device_info = 0x103C;
342pub const CL_DEVICE_OPENCL_C_VERSION: cl_device_info = 0x103D;
343pub const CL_DEVICE_LINKER_AVAILABLE: cl_device_info = 0x103E;
346pub const CL_DEVICE_BUILT_IN_KERNELS: cl_device_info = 0x103F;
347pub const CL_DEVICE_IMAGE_MAX_BUFFER_SIZE: cl_device_info = 0x1040;
348pub const CL_DEVICE_IMAGE_MAX_ARRAY_SIZE: cl_device_info = 0x1041;
349pub const CL_DEVICE_PARENT_DEVICE: cl_device_info = 0x1042;
350pub const CL_DEVICE_PARTITION_MAX_SUB_DEVICES: cl_device_info = 0x1043;
351pub const CL_DEVICE_PARTITION_PROPERTIES: cl_device_info = 0x1044;
352pub const CL_DEVICE_PARTITION_AFFINITY_DOMAIN: cl_device_info = 0x1045;
353pub const CL_DEVICE_PARTITION_TYPE: cl_device_info = 0x1046;
354pub const CL_DEVICE_REFERENCE_COUNT: cl_device_info = 0x1047;
355pub const CL_DEVICE_PREFERRED_INTEROP_USER_SYNC: cl_device_info = 0x1048;
356pub const CL_DEVICE_PRINTF_BUFFER_SIZE: cl_device_info = 0x1049;
357pub const CL_DEVICE_IMAGE_PITCH_ALIGNMENT: cl_device_info = 0x104A;
360pub const CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT: cl_device_info = 0x104B;
361pub const CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS: cl_device_info = 0x104C;
362pub const CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE: cl_device_info = 0x104D;
363pub const CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES: cl_device_info = 0x104E;
364pub const CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE: cl_device_info = 0x104F;
365pub const CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE: cl_device_info = 0x1050;
366pub const CL_DEVICE_MAX_ON_DEVICE_QUEUES: cl_device_info = 0x1051;
367pub const CL_DEVICE_MAX_ON_DEVICE_EVENTS: cl_device_info = 0x1052;
368pub const CL_DEVICE_SVM_CAPABILITIES: cl_device_info = 0x1053;
369pub const CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE: cl_device_info = 0x1054;
370pub const CL_DEVICE_MAX_PIPE_ARGS: cl_device_info = 0x1055;
371pub const CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS: cl_device_info = 0x1056;
372pub const CL_DEVICE_PIPE_MAX_PACKET_SIZE: cl_device_info = 0x1057;
373pub const CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT: cl_device_info = 0x1058;
374pub const CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT: cl_device_info = 0x1059;
375pub const CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT: cl_device_info = 0x105A;
376pub const CL_DEVICE_IL_VERSION: cl_device_info = 0x105B;
379pub const CL_DEVICE_MAX_NUM_SUB_GROUPS: cl_device_info = 0x105C;
380pub const CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS: cl_device_info = 0x105D;
381pub const CL_DEVICE_NUMERIC_VERSION: cl_device_info = 0x105E;
384pub const CL_DEVICE_EXTENSIONS_WITH_VERSION: cl_device_info = 0x1060;
385pub const CL_DEVICE_ILS_WITH_VERSION: cl_device_info = 0x1061;
386pub const CL_DEVICE_BUILT_IN_KERNELS_WITH_VERSION: cl_device_info = 0x1062;
387pub const CL_DEVICE_ATOMIC_MEMORY_CAPABILITIES: cl_device_info = 0x1063;
388pub const CL_DEVICE_ATOMIC_FENCE_CAPABILITIES: cl_device_info = 0x1064;
389pub const CL_DEVICE_NON_UNIFORM_WORK_GROUP_SUPPORT: cl_device_info = 0x1065;
390pub const CL_DEVICE_OPENCL_C_ALL_VERSIONS: cl_device_info = 0x1066;
391pub const CL_DEVICE_PREFERRED_WORK_GROUP_SIZE_MULTIPLE: cl_device_info = 0x1067;
392pub const CL_DEVICE_WORK_GROUP_COLLECTIVE_FUNCTIONS_SUPPORT: cl_device_info = 0x1068;
393pub const CL_DEVICE_GENERIC_ADDRESS_SPACE_SUPPORT: cl_device_info = 0x1069;
394pub const CL_DEVICE_OPENCL_C_FEATURES: cl_device_info = 0x106F;
396pub const CL_DEVICE_DEVICE_ENQUEUE_CAPABILITIES: cl_device_info = 0x1070;
397pub const CL_DEVICE_PIPE_SUPPORT: cl_device_info = 0x1071;
398pub const CL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED: cl_device_info = 0x1072;
399pub const CL_FP_DENORM: cl_device_fp_config = 1 << 0;
403pub const CL_FP_INF_NAN: cl_device_fp_config = 1 << 1;
404pub const CL_FP_ROUND_TO_NEAREST: cl_device_fp_config = 1 << 2;
405pub const CL_FP_ROUND_TO_ZERO: cl_device_fp_config = 1 << 3;
406pub const CL_FP_ROUND_TO_INF: cl_device_fp_config = 1 << 4;
407pub const CL_FP_FMA: cl_device_fp_config = 1 << 5;
408pub const CL_FP_SOFT_FLOAT: cl_device_fp_config = 1 << 6;
410pub const CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT: cl_device_fp_config = 1 << 7;
413pub const CL_NONE: cl_device_mem_cache_type = 0x0;
417pub const CL_READ_ONLY_CACHE: cl_device_mem_cache_type = 0x1;
418pub const CL_READ_WRITE_CACHE: cl_device_mem_cache_type = 0x2;
419
420pub const CL_LOCAL: cl_device_local_mem_type = 0x1;
422pub const CL_GLOBAL: cl_device_local_mem_type = 0x2;
423
424pub const CL_EXEC_KERNEL: cl_device_exec_capabilities = 1 << 0;
426pub const CL_EXEC_NATIVE_KERNEL: cl_device_exec_capabilities = 1 << 1;
427
428pub const CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE: cl_command_queue_properties = 1 << 0;
430pub const CL_QUEUE_PROFILING_ENABLE: cl_command_queue_properties = 1 << 1;
431pub const CL_QUEUE_ON_DEVICE: cl_command_queue_properties = 1 << 2;
433pub const CL_QUEUE_ON_DEVICE_DEFAULT: cl_command_queue_properties = 1 << 3;
434pub const CL_CONTEXT_REFERENCE_COUNT: cl_context_info = 0x1080;
438pub const CL_CONTEXT_DEVICES: cl_context_info = 0x1081;
439pub const CL_CONTEXT_PROPERTIES: cl_context_info = 0x1082;
440pub const CL_CONTEXT_NUM_DEVICES: cl_context_info = 0x1083;
442pub const CL_CONTEXT_PLATFORM: cl_context_properties = 0x1084;
446pub const CL_CONTEXT_INTEROP_USER_SYNC: cl_context_properties = 0x1085;
448pub const CL_DEVICE_PARTITION_EQUALLY: cl_device_partition_property = 0x1086;
454pub const CL_DEVICE_PARTITION_BY_COUNTS: cl_device_partition_property = 0x1087;
455pub const CL_DEVICE_PARTITION_BY_COUNTS_LIST_END: cl_device_partition_property = 0x0;
456pub const CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN: cl_device_partition_property = 0x1088;
457
458pub const CL_DEVICE_AFFINITY_DOMAIN_NUMA: cl_device_affinity_domain = 1 << 0;
464pub const CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE: cl_device_affinity_domain = 1 << 1;
465pub const CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE: cl_device_affinity_domain = 1 << 2;
466pub const CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE: cl_device_affinity_domain = 1 << 3;
467pub const CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE: cl_device_affinity_domain = 1 << 4;
468pub const CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE: cl_device_affinity_domain = 1 << 5;
469
470pub const CL_DEVICE_SVM_COARSE_GRAIN_BUFFER: cl_device_svm_capabilities = 1 << 0;
476pub const CL_DEVICE_SVM_FINE_GRAIN_BUFFER: cl_device_svm_capabilities = 1 << 1;
477pub const CL_DEVICE_SVM_FINE_GRAIN_SYSTEM: cl_device_svm_capabilities = 1 << 2;
478pub const CL_DEVICE_SVM_ATOMICS: cl_device_svm_capabilities = 1 << 3;
479
480pub const CL_QUEUE_CONTEXT: cl_command_queue_info = 0x1090;
484pub const CL_QUEUE_DEVICE: cl_command_queue_info = 0x1091;
485pub const CL_QUEUE_REFERENCE_COUNT: cl_command_queue_info = 0x1092;
486pub const CL_QUEUE_PROPERTIES: cl_command_queue_info = 0x1093;
487pub const CL_QUEUE_SIZE: cl_command_queue_info = 0x1094;
489pub const CL_QUEUE_DEVICE_DEFAULT: cl_command_queue_info = 0x1095;
492pub const CL_QUEUE_PROPERTIES_ARRAY: cl_command_queue_info = 0x1098;
495pub const CL_MEM_READ_WRITE: cl_mem_flags = 1 << 0;
499pub const CL_MEM_WRITE_ONLY: cl_mem_flags = 1 << 1;
500pub const CL_MEM_READ_ONLY: cl_mem_flags = 1 << 2;
501pub const CL_MEM_USE_HOST_PTR: cl_mem_flags = 1 << 3;
502pub const CL_MEM_ALLOC_HOST_PTR: cl_mem_flags = 1 << 4;
503pub const CL_MEM_COPY_HOST_PTR: cl_mem_flags = 1 << 5;
504pub const CL_MEM_HOST_WRITE_ONLY: cl_mem_flags = 1 << 7;
507pub const CL_MEM_HOST_READ_ONLY: cl_mem_flags = 1 << 8;
508pub const CL_MEM_HOST_NO_ACCESS: cl_mem_flags = 1 << 9;
509pub const CL_MEM_SVM_FINE_GRAIN_BUFFER: cl_svm_mem_flags = 1 << 10; pub const CL_MEM_SVM_ATOMICS: cl_svm_mem_flags = 1 << 11; pub const CL_MEM_KERNEL_READ_AND_WRITE: cl_svm_mem_flags = 1 << 12;
514pub const CL_MIGRATE_MEM_OBJECT_HOST: cl_svm_mem_flags = 1 << 0;
520pub const CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED: cl_svm_mem_flags = 1 << 1;
521pub const CL_R: cl_channel_order = 0x10B0;
525pub const CL_A: cl_channel_order = 0x10B1;
526pub const CL_RG: cl_channel_order = 0x10B2;
527pub const CL_RA: cl_channel_order = 0x10B3;
528pub const CL_RGB: cl_channel_order = 0x10B4;
529pub const CL_RGBA: cl_channel_order = 0x10B5;
530pub const CL_BGRA: cl_channel_order = 0x10B6;
531pub const CL_ARGB: cl_channel_order = 0x10B7;
532pub const CL_INTENSITY: cl_channel_order = 0x10B8;
533pub const CL_LUMINANCE: cl_channel_order = 0x10B9;
534pub const CL_Rx: cl_channel_order = 0x10BA;
536pub const CL_RGx: cl_channel_order = 0x10BB;
537pub const CL_RGBx: cl_channel_order = 0x10BC;
538pub const CL_DEPTH: cl_channel_order = 0x10BD;
541pub const CL_sRGB: cl_channel_order = 0x10BF;
542pub const CL_sRGBx: cl_channel_order = 0x10C0;
543pub const CL_sRGBA: cl_channel_order = 0x10C1;
544pub const CL_sBGRA: cl_channel_order = 0x10C2;
545pub const CL_ABGR: cl_channel_order = 0x10C3;
546pub const CL_SNORM_INT8: cl_channel_type = 0x10D0;
550pub const CL_SNORM_INT16: cl_channel_type = 0x10D1;
551pub const CL_UNORM_INT8: cl_channel_type = 0x10D2;
552pub const CL_UNORM_INT16: cl_channel_type = 0x10D3;
553pub const CL_UNORM_SHORT_565: cl_channel_type = 0x10D4;
554pub const CL_UNORM_SHORT_555: cl_channel_type = 0x10D5;
555pub const CL_UNORM_INT_101010: cl_channel_type = 0x10D6;
556pub const CL_SIGNED_INT8: cl_channel_type = 0x10D7;
557pub const CL_SIGNED_INT16: cl_channel_type = 0x10D8;
558pub const CL_SIGNED_INT32: cl_channel_type = 0x10D9;
559pub const CL_UNSIGNED_INT8: cl_channel_type = 0x10DA;
560pub const CL_UNSIGNED_INT16: cl_channel_type = 0x10DB;
561pub const CL_UNSIGNED_INT32: cl_channel_type = 0x10DC;
562pub const CL_HALF_FLOAT: cl_channel_type = 0x10DD;
563pub const CL_FLOAT: cl_channel_type = 0x10DE;
564pub const CL_UNORM_INT_101010_2: cl_channel_type = 0x10E0;
566pub const CL_MEM_OBJECT_BUFFER: cl_mem_object_type = 0x10F0;
570pub const CL_MEM_OBJECT_IMAGE2D: cl_mem_object_type = 0x10F1;
571pub const CL_MEM_OBJECT_IMAGE3D: cl_mem_object_type = 0x10F2;
572pub const CL_MEM_OBJECT_IMAGE2D_ARRAY: cl_mem_object_type = 0x10F3;
574pub const CL_MEM_OBJECT_IMAGE1D: cl_mem_object_type = 0x10F4;
575pub const CL_MEM_OBJECT_IMAGE1D_ARRAY: cl_mem_object_type = 0x10F5;
576pub const CL_MEM_OBJECT_IMAGE1D_BUFFER: cl_mem_object_type = 0x10F6;
577pub const CL_MEM_OBJECT_PIPE: cl_mem_object_type = 0x10F7;
580pub const CL_MEM_TYPE: cl_mem_info = 0x1100;
584pub const CL_MEM_FLAGS: cl_mem_info = 0x1101;
585pub const CL_MEM_SIZE: cl_mem_info = 0x1102;
586pub const CL_MEM_HOST_PTR: cl_mem_info = 0x1103;
587pub const CL_MEM_MAP_COUNT: cl_mem_info = 0x1104;
588pub const CL_MEM_REFERENCE_COUNT: cl_mem_info = 0x1105;
589pub const CL_MEM_CONTEXT: cl_mem_info = 0x1106;
590pub const CL_MEM_ASSOCIATED_MEMOBJECT: cl_mem_info = 0x1107;
592pub const CL_MEM_OFFSET: cl_mem_info = 0x1108;
593pub const CL_MEM_USES_SVM_POINTER: cl_mem_info = 0x1109;
596pub const CL_MEM_PROPERTIES: cl_mem_info = 0x110A;
599pub const CL_IMAGE_FORMAT: cl_image_info = 0x1110;
603pub const CL_IMAGE_ELEMENT_SIZE: cl_image_info = 0x1111;
604pub const CL_IMAGE_ROW_PITCH: cl_image_info = 0x1112;
605pub const CL_IMAGE_SLICE_PITCH: cl_image_info = 0x1113;
606pub const CL_IMAGE_WIDTH: cl_image_info = 0x1114;
607pub const CL_IMAGE_HEIGHT: cl_image_info = 0x1115;
608pub const CL_IMAGE_DEPTH: cl_image_info = 0x1116;
609pub const CL_IMAGE_ARRAY_SIZE: cl_image_info = 0x1117;
611pub const CL_IMAGE_BUFFER: cl_image_info = 0x1118;
612pub const CL_IMAGE_NUM_MIP_LEVELS: cl_image_info = 0x1119;
613pub const CL_IMAGE_NUM_SAMPLES: cl_image_info = 0x111A;
614pub const CL_PIPE_PACKET_SIZE: cl_pipe_info = 0x1120;
619pub const CL_PIPE_MAX_PACKETS: cl_pipe_info = 0x1121;
620pub const CL_PIPE_PROPERTIES: cl_pipe_info = 0x1122;
623pub const CL_ADDRESS_NONE: cl_addressing_mode = 0x1130;
627pub const CL_ADDRESS_CLAMP_TO_EDGE: cl_addressing_mode = 0x1131;
628pub const CL_ADDRESS_CLAMP: cl_addressing_mode = 0x1132;
629pub const CL_ADDRESS_REPEAT: cl_addressing_mode = 0x1133;
630pub const CL_ADDRESS_MIRRORED_REPEAT: cl_addressing_mode = 0x1134;
632pub const CL_FILTER_NEAREST: cl_filter_mode = 0x1140;
636pub const CL_FILTER_LINEAR: cl_filter_mode = 0x1141;
637
638pub const CL_SAMPLER_REFERENCE_COUNT: cl_sampler_info = 0x1150;
640pub const CL_SAMPLER_CONTEXT: cl_sampler_info = 0x1151;
641pub const CL_SAMPLER_NORMALIZED_COORDS: cl_sampler_info = 0x1152;
642pub const CL_SAMPLER_ADDRESSING_MODE: cl_sampler_info = 0x1153;
643pub const CL_SAMPLER_FILTER_MODE: cl_sampler_info = 0x1154;
644pub const CL_SAMPLER_MIP_FILTER_MODE: cl_sampler_info = 0x1155;
649pub const CL_SAMPLER_LOD_MIN: cl_sampler_info = 0x1156;
650pub const CL_SAMPLER_LOD_MAX: cl_sampler_info = 0x1157;
651pub const CL_SAMPLER_PROPERTIES: cl_sampler_info = 0x1158;
654pub const CL_MAP_READ: cl_map_flags = 1 << 0;
658pub const CL_MAP_WRITE: cl_map_flags = 1 << 1;
659pub const CL_MAP_WRITE_INVALIDATE_REGION: cl_map_flags = 1 << 2;
661pub const CL_PROGRAM_REFERENCE_COUNT: cl_program_info = 0x1160;
665pub const CL_PROGRAM_CONTEXT: cl_program_info = 0x1161;
666pub const CL_PROGRAM_NUM_DEVICES: cl_program_info = 0x1162;
667pub const CL_PROGRAM_DEVICES: cl_program_info = 0x1163;
668pub const CL_PROGRAM_SOURCE: cl_program_info = 0x1164;
669pub const CL_PROGRAM_BINARY_SIZES: cl_program_info = 0x1165;
670pub const CL_PROGRAM_BINARIES: cl_program_info = 0x1166;
671pub const CL_PROGRAM_NUM_KERNELS: cl_program_info = 0x1167;
673pub const CL_PROGRAM_KERNEL_NAMES: cl_program_info = 0x1168;
674pub const CL_PROGRAM_IL: cl_program_info = 0x1169;
677pub const CL_PROGRAM_SCOPE_GLOBAL_CTORS_PRESENT: cl_program_info = 0x116A;
680pub const CL_PROGRAM_SCOPE_GLOBAL_DTORS_PRESENT: cl_program_info = 0x116B;
681pub const CL_PROGRAM_BUILD_STATUS: cl_program_build_info = 0x1181;
685pub const CL_PROGRAM_BUILD_OPTIONS: cl_program_build_info = 0x1182;
686pub const CL_PROGRAM_BUILD_LOG: cl_program_build_info = 0x1183;
687pub const CL_PROGRAM_BINARY_TYPE: cl_program_build_info = 0x1184;
689pub const CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE: cl_program_build_info = 0x1185;
692pub const CL_PROGRAM_BINARY_TYPE_NONE: cl_program_binary_type = 0x0;
698pub const CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT: cl_program_binary_type = 0x1;
699pub const CL_PROGRAM_BINARY_TYPE_LIBRARY: cl_program_binary_type = 0x2;
700pub const CL_PROGRAM_BINARY_TYPE_EXECUTABLE: cl_program_binary_type = 0x4;
701
702pub const CL_BUILD_SUCCESS: cl_build_status = 0;
706pub const CL_BUILD_NONE: cl_build_status = -1;
707pub const CL_BUILD_ERROR: cl_build_status = -2;
708pub const CL_BUILD_IN_PROGRESS: cl_build_status = -3;
709
710pub const CL_KERNEL_FUNCTION_NAME: cl_kernel_info = 0x1190;
712pub const CL_KERNEL_NUM_ARGS: cl_kernel_info = 0x1191;
713pub const CL_KERNEL_REFERENCE_COUNT: cl_kernel_info = 0x1192;
714pub const CL_KERNEL_CONTEXT: cl_kernel_info = 0x1193;
715pub const CL_KERNEL_PROGRAM: cl_kernel_info = 0x1194;
716pub const CL_KERNEL_ATTRIBUTES: cl_kernel_info = 0x1195;
718pub const CL_KERNEL_ARG_ADDRESS_QUALIFIER: cl_kernel_arg_info = 0x1196;
724pub const CL_KERNEL_ARG_ACCESS_QUALIFIER: cl_kernel_arg_info = 0x1197;
725pub const CL_KERNEL_ARG_TYPE_NAME: cl_kernel_arg_info = 0x1198;
726pub const CL_KERNEL_ARG_TYPE_QUALIFIER: cl_kernel_arg_info = 0x1199;
727pub const CL_KERNEL_ARG_NAME: cl_kernel_arg_info = 0x119A;
728
729pub const CL_KERNEL_ARG_ADDRESS_GLOBAL: cl_kernel_arg_address_qualifier = 0x119B;
735pub const CL_KERNEL_ARG_ADDRESS_LOCAL: cl_kernel_arg_address_qualifier = 0x119C;
736pub const CL_KERNEL_ARG_ADDRESS_CONSTANT: cl_kernel_arg_address_qualifier = 0x119D;
737pub const CL_KERNEL_ARG_ADDRESS_PRIVATE: cl_kernel_arg_address_qualifier = 0x119E;
738
739pub const CL_KERNEL_ARG_ACCESS_READ_ONLY: cl_kernel_arg_access_qualifier = 0x11A0;
745pub const CL_KERNEL_ARG_ACCESS_WRITE_ONLY: cl_kernel_arg_access_qualifier = 0x11A1;
746pub const CL_KERNEL_ARG_ACCESS_READ_WRITE: cl_kernel_arg_access_qualifier = 0x11A2;
747pub const CL_KERNEL_ARG_ACCESS_NONE: cl_kernel_arg_access_qualifier = 0x11A3;
748
749pub const CL_KERNEL_ARG_TYPE_NONE: cl_kernel_arg_type_qualifier = 0;
755pub const CL_KERNEL_ARG_TYPE_CONST: cl_kernel_arg_type_qualifier = 1 << 0;
756pub const CL_KERNEL_ARG_TYPE_RESTRICT: cl_kernel_arg_type_qualifier = 1 << 1;
757pub const CL_KERNEL_ARG_TYPE_VOLATILE: cl_kernel_arg_type_qualifier = 1 << 2;
758pub const CL_KERNEL_ARG_TYPE_PIPE: cl_kernel_arg_type_qualifier = 1 << 3;
760pub const CL_KERNEL_WORK_GROUP_SIZE: cl_kernel_work_group_info = 0x11B0;
766pub const CL_KERNEL_COMPILE_WORK_GROUP_SIZE: cl_kernel_work_group_info = 0x11B1;
767pub const CL_KERNEL_LOCAL_MEM_SIZE: cl_kernel_work_group_info = 0x11B2;
768pub const CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE: cl_kernel_work_group_info = 0x11B3;
769pub const CL_KERNEL_PRIVATE_MEM_SIZE: cl_kernel_work_group_info = 0x11B4;
770pub const CL_KERNEL_GLOBAL_WORK_SIZE: cl_kernel_work_group_info = 0x11B5;
772pub const CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE: cl_kernel_sub_group_info = 0x2033;
778pub const CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE: cl_kernel_sub_group_info = 0x2034;
779pub const CL_KERNEL_LOCAL_SIZE_FOR_SUB_GROUP_COUNT: cl_kernel_sub_group_info = 0x11B8;
780pub const CL_KERNEL_MAX_NUM_SUB_GROUPS: cl_kernel_sub_group_info = 0x11B9;
781pub const CL_KERNEL_COMPILE_NUM_SUB_GROUPS: cl_kernel_sub_group_info = 0x11BA;
782
783pub const CL_KERNEL_EXEC_INFO_SVM_PTRS: cl_kernel_exec_info = 0x11B6;
789pub const CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM: cl_kernel_exec_info = 0x11B7;
790
791pub const CL_EVENT_COMMAND_QUEUE: cl_event_info = 0x11D0;
795pub const CL_EVENT_COMMAND_TYPE: cl_event_info = 0x11D1;
796pub const CL_EVENT_REFERENCE_COUNT: cl_event_info = 0x11D2;
797pub const CL_EVENT_COMMAND_EXECUTION_STATUS: cl_event_info = 0x11D3;
798pub const CL_EVENT_CONTEXT: cl_event_info = 0x11D4;
800pub const CL_COMMAND_NDRANGE_KERNEL: cl_command_type = 0x11F0;
804pub const CL_COMMAND_TASK: cl_command_type = 0x11F1;
805pub const CL_COMMAND_NATIVE_KERNEL: cl_command_type = 0x11F2;
806pub const CL_COMMAND_READ_BUFFER: cl_command_type = 0x11F3;
807pub const CL_COMMAND_WRITE_BUFFER: cl_command_type = 0x11F4;
808pub const CL_COMMAND_COPY_BUFFER: cl_command_type = 0x11F5;
809pub const CL_COMMAND_READ_IMAGE: cl_command_type = 0x11F6;
810pub const CL_COMMAND_WRITE_IMAGE: cl_command_type = 0x11F7;
811pub const CL_COMMAND_COPY_IMAGE: cl_command_type = 0x11F8;
812pub const CL_COMMAND_COPY_IMAGE_TO_BUFFER: cl_command_type = 0x11F9;
813pub const CL_COMMAND_COPY_BUFFER_TO_IMAGE: cl_command_type = 0x11FA;
814pub const CL_COMMAND_MAP_BUFFER: cl_command_type = 0x11FB;
815pub const CL_COMMAND_MAP_IMAGE: cl_command_type = 0x11FC;
816pub const CL_COMMAND_UNMAP_MEM_OBJECT: cl_command_type = 0x11FD;
817pub const CL_COMMAND_MARKER: cl_command_type = 0x11FE;
818pub const CL_COMMAND_ACQUIRE_GL_OBJECTS: cl_command_type = 0x11FF;
819pub const CL_COMMAND_RELEASE_GL_OBJECTS: cl_command_type = 0x1200;
820pub const CL_COMMAND_READ_BUFFER_RECT: cl_command_type = 0x1201;
822pub const CL_COMMAND_WRITE_BUFFER_RECT: cl_command_type = 0x1202;
823pub const CL_COMMAND_COPY_BUFFER_RECT: cl_command_type = 0x1203;
824pub const CL_COMMAND_USER: cl_command_type = 0x1204;
825pub const CL_COMMAND_BARRIER: cl_command_type = 0x1205;
828pub const CL_COMMAND_MIGRATE_MEM_OBJECTS: cl_command_type = 0x1206;
829pub const CL_COMMAND_FILL_BUFFER: cl_command_type = 0x1207;
830pub const CL_COMMAND_FILL_IMAGE: cl_command_type = 0x1208;
831pub const CL_COMMAND_SVM_FREE: cl_command_type = 0x1209;
834pub const CL_COMMAND_SVM_MEMCPY: cl_command_type = 0x120A;
835pub const CL_COMMAND_SVM_MEMFILL: cl_command_type = 0x120B;
836pub const CL_COMMAND_SVM_MAP: cl_command_type = 0x120C;
837pub const CL_COMMAND_SVM_UNMAP: cl_command_type = 0x120D;
838pub const CL_COMMAND_SVM_MIGRATE_MEM: cl_command_type = 0x120E;
841pub const CL_COMPLETE: cl_int = 0x0;
845pub const CL_RUNNING: cl_int = 0x1;
846pub const CL_SUBMITTED: cl_int = 0x2;
847pub const CL_QUEUED: cl_int = 0x3;
848
849pub const CL_BUFFER_CREATE_TYPE_REGION: cl_buffer_create_type = 0x1220;
852pub const CL_PROFILING_COMMAND_QUEUED: cl_profiling_info = 0x1280;
856pub const CL_PROFILING_COMMAND_SUBMIT: cl_profiling_info = 0x1281;
857pub const CL_PROFILING_COMMAND_START: cl_profiling_info = 0x1282;
858pub const CL_PROFILING_COMMAND_END: cl_profiling_info = 0x1283;
859pub const CL_PROFILING_COMMAND_COMPLETE: cl_profiling_info = 0x1284;
861pub const CL_DEVICE_ATOMIC_ORDER_RELAXED: cl_device_atomic_capabilities = 1 << 0;
866pub const CL_DEVICE_ATOMIC_ORDER_ACQ_REL: cl_device_atomic_capabilities = 1 << 1;
867pub const CL_DEVICE_ATOMIC_ORDER_SEQ_CST: cl_device_atomic_capabilities = 1 << 2;
868pub const CL_DEVICE_ATOMIC_SCOPE_WORK_ITEM: cl_device_atomic_capabilities = 1 << 3;
869pub const CL_DEVICE_ATOMIC_SCOPE_WORK_GROUP: cl_device_atomic_capabilities = 1 << 4;
870pub const CL_DEVICE_ATOMIC_SCOPE_DEVICE: cl_device_atomic_capabilities = 1 << 5;
871pub const CL_DEVICE_ATOMIC_SCOPE_ALL_DEVICES: cl_device_atomic_capabilities = 1 << 6;
872pub const CL_DEVICE_QUEUE_SUPPORTED: cl_device_device_enqueue_capabilities = 1 << 0;
877pub const CL_DEVICE_QUEUE_REPLACEABLE_DEFAULT: cl_device_device_enqueue_capabilities = 1 << 1;
878pub const CL_KHRONOS_VENDOR_ID_CODEPLAY: cl_khronos_vendor_id = 0x10004;
882
883pub const CL_VERSION_MAJOR_BITS: cl_version = 10;
887pub const CL_VERSION_MINOR_BITS: cl_version = 10;
888pub const CL_VERSION_PATCH_BITS: cl_version = 12;
889
890pub const CL_VERSION_MAJOR_MASK: cl_version = (1 << CL_VERSION_MAJOR_BITS) - 1;
891pub const CL_VERSION_MINOR_MASK: cl_version = (1 << CL_VERSION_MINOR_BITS) - 1;
892pub const CL_VERSION_PATCH_MASK: cl_version = (1 << CL_VERSION_PATCH_BITS) - 1;
893
894#[must_use]
895pub const fn version_major(version: cl_version) -> cl_version {
896 version >> (CL_VERSION_MINOR_BITS + CL_VERSION_PATCH_BITS)
897}
898
899#[must_use]
900pub const fn version_minor(version: cl_version) -> cl_version {
901 (version >> CL_VERSION_PATCH_BITS) & CL_VERSION_MINOR_MASK
902}
903
904#[must_use]
905pub const fn version_patch(version: cl_version) -> cl_version {
906 version & CL_VERSION_PATCH_MASK
907}
908
909#[must_use]
910pub const fn make_version(major: cl_version, minor: cl_version, patch: cl_version) -> cl_version {
911 ((major & CL_VERSION_MAJOR_MASK) << (CL_VERSION_MINOR_BITS + CL_VERSION_PATCH_BITS))
912 | ((minor & CL_VERSION_MINOR_MASK) << CL_VERSION_PATCH_BITS)
913 | (patch & CL_VERSION_PATCH_MASK)
914}
915
916#[cfg_attr(not(target_os = "macos"), link(name = "OpenCL"))]
919#[cfg_attr(target_os = "macos", link(name = "OpenCL", kind = "framework"))]
920#[cfg(feature = "static")]
921extern "system" {
922 pub fn clGetPlatformIDs(
924 num_entries: cl_uint,
925 platforms: *mut cl_platform_id,
926 num_platforms: *mut cl_uint,
927 ) -> cl_int;
928
929 pub fn clGetPlatformInfo(
930 platform: cl_platform_id,
931 param_name: cl_platform_info,
932 param_value_size: size_t,
933 param_value: *mut c_void,
934 param_value_size_ret: *mut size_t,
935 ) -> cl_int;
936
937 pub fn clGetDeviceIDs(
939 platform: cl_platform_id,
940 device_type: cl_device_type,
941 num_entries: cl_uint,
942 devices: *mut cl_device_id,
943 num_devices: *mut cl_uint,
944 ) -> cl_int;
945
946 pub fn clGetDeviceInfo(
947 device: cl_device_id,
948 param_name: cl_device_info,
949 param_value_size: size_t,
950 param_value: *mut c_void,
951 param_value_size_ret: *mut size_t,
952 ) -> cl_int;
953
954 #[cfg(feature = "CL_VERSION_1_2")]
955 pub fn clCreateSubDevices(
956 in_device: cl_device_id,
957 properties: *const cl_device_partition_property,
958 num_devices: cl_uint,
959 out_devices: *mut cl_device_id,
960 num_devices_ret: *mut cl_uint,
961 ) -> cl_int;
962
963 #[cfg(feature = "CL_VERSION_1_2")]
964 pub fn clRetainDevice(device: cl_device_id) -> cl_int;
965
966 #[cfg(feature = "CL_VERSION_1_2")]
967 pub fn clReleaseDevice(device: cl_device_id) -> cl_int;
968
969 #[cfg(feature = "CL_VERSION_2_1")]
970 pub fn clSetDefaultDeviceCommandQueue(
971 context: cl_context,
972 device: cl_device_id,
973 command_queue: cl_command_queue,
974 ) -> cl_int;
975
976 #[cfg(feature = "CL_VERSION_2_1")]
977 pub fn clGetDeviceAndHostTimer(
978 device: cl_device_id,
979 device_timestamp: *mut cl_ulong,
980 host_timestamp: *mut cl_ulong,
981 ) -> cl_int;
982
983 #[cfg(feature = "CL_VERSION_2_1")]
984 pub fn clGetHostTimer(device: cl_device_id, host_timestamp: *mut cl_ulong) -> cl_int;
985
986 pub fn clCreateContext(
988 properties: *const cl_context_properties,
989 num_devices: cl_uint,
990 devices: *const cl_device_id,
991 pfn_notify: Option<
992 unsafe extern "C" fn(
993 errinfo: *const c_char,
994 private_info: *const c_void,
995 cb: size_t,
996 user_data: *mut c_void,
997 ),
998 >,
999 user_data: *mut c_void,
1000 errcode_ret: *mut cl_int,
1001 ) -> cl_context;
1002
1003 pub fn clCreateContextFromType(
1004 properties: *const cl_context_properties,
1005 device_type: cl_device_type,
1006 pfn_notify: Option<
1007 unsafe extern "C" fn(
1008 errinfo: *const c_char,
1009 private_info: *const c_void,
1010 cb: size_t,
1011 user_data: *mut c_void,
1012 ),
1013 >,
1014 user_data: *mut c_void,
1015 errcode_ret: *mut cl_int,
1016 ) -> cl_context;
1017
1018 pub fn clRetainContext(context: cl_context) -> cl_int;
1019
1020 pub fn clReleaseContext(context: cl_context) -> cl_int;
1021
1022 pub fn clGetContextInfo(
1023 context: cl_context,
1024 param_name: cl_context_info,
1025 param_value_size: size_t,
1026 param_value: *mut c_void,
1027 param_value_size_ret: *mut size_t,
1028 ) -> cl_int;
1029
1030 #[cfg(feature = "CL_VERSION_3_0")]
1031 pub fn clSetContextDestructorCallback(
1032 context: cl_context,
1033 pfn_notify: Option<unsafe extern "C" fn(context: cl_context, user_data: *mut c_void)>,
1034 user_data: *mut c_void,
1035 ) -> cl_int;
1036
1037 #[cfg(feature = "CL_VERSION_2_0")]
1040 pub fn clCreateCommandQueueWithProperties(
1041 context: cl_context,
1042 device: cl_device_id,
1043 properties: *const cl_queue_properties,
1044 errcode_ret: *mut cl_int,
1045 ) -> cl_command_queue;
1046
1047 pub fn clRetainCommandQueue(command_queue: cl_command_queue) -> cl_int;
1048
1049 pub fn clReleaseCommandQueue(command_queue: cl_command_queue) -> cl_int;
1050
1051 pub fn clGetCommandQueueInfo(
1052 command_queue: cl_command_queue,
1053 param_name: cl_command_queue_info,
1054 param_value_size: size_t,
1055 param_value: *mut c_void,
1056 param_value_size_ret: *mut size_t,
1057 ) -> cl_int;
1058
1059 pub fn clCreateBuffer(
1061 context: cl_context,
1062 flags: cl_mem_flags,
1063 size: size_t,
1064 host_ptr: *mut c_void,
1065 errcode_ret: *mut cl_int,
1066 ) -> cl_mem;
1067
1068 pub fn clCreateSubBuffer(
1069 buffer: cl_mem,
1070 flags: cl_mem_flags,
1071 buffer_create_type: cl_buffer_create_type,
1072 buffer_create_info: *const c_void,
1073 errcode_ret: *mut cl_int,
1074 ) -> cl_mem;
1075
1076 #[cfg(feature = "CL_VERSION_1_2")]
1077 pub fn clCreateImage(
1078 context: cl_context,
1079 flags: cl_mem_flags,
1080 image_format: *const cl_image_format,
1081 image_desc: *const cl_image_desc,
1082 host_ptr: *mut c_void,
1083 errcode_ret: *mut cl_int,
1084 ) -> cl_mem;
1085
1086 #[cfg(feature = "CL_VERSION_2_0")]
1087 pub fn clCreatePipe(
1088 context: cl_context,
1089 flags: cl_mem_flags,
1090 pipe_packet_size: cl_uint,
1091 pipe_max_packets: cl_uint,
1092 properties: *const cl_pipe_properties,
1093 errcode_ret: *mut cl_int,
1094 ) -> cl_mem;
1095
1096 #[cfg(feature = "CL_VERSION_3_0")]
1097 pub fn clCreateBufferWithProperties(
1098 context: cl_context,
1099 properties: *const cl_mem_properties,
1100 flags: cl_mem_flags,
1101 size: size_t,
1102 host_ptr: *mut c_void,
1103 errcode_ret: *mut cl_int,
1104 ) -> cl_mem;
1105
1106 #[cfg(feature = "CL_VERSION_3_0")]
1107 pub fn clCreateImageWithProperties(
1108 context: cl_context,
1109 properties: *const cl_mem_properties,
1110 flags: cl_mem_flags,
1111 image_format: *const cl_image_format,
1112 image_desc: *const cl_image_desc,
1113 host_ptr: *mut c_void,
1114 errcode_ret: *mut cl_int,
1115 ) -> cl_mem;
1116
1117 pub fn clRetainMemObject(memobj: cl_mem) -> cl_int;
1118
1119 pub fn clReleaseMemObject(memobj: cl_mem) -> cl_int;
1120
1121 pub fn clGetSupportedImageFormats(
1122 context: cl_context,
1123 flags: cl_mem_flags,
1124 image_type: cl_mem_object_type,
1125 num_entries: cl_uint,
1126 image_formats: *mut cl_image_format,
1127 num_image_formats: *mut cl_uint,
1128 ) -> cl_int;
1129
1130 pub fn clGetMemObjectInfo(
1131 memobj: cl_mem,
1132 param_name: cl_mem_info,
1133 param_value_size: size_t,
1134 param_value: *mut c_void,
1135 param_value_size_ret: *mut size_t,
1136 ) -> cl_int;
1137
1138 pub fn clGetImageInfo(
1139 image: cl_mem,
1140 param_name: cl_image_info,
1141 param_value_size: size_t,
1142 param_value: *mut c_void,
1143 param_value_size_ret: *mut size_t,
1144 ) -> cl_int;
1145
1146 #[cfg(feature = "CL_VERSION_2_0")]
1147 pub fn clGetPipeInfo(
1148 pipe: cl_mem,
1149 param_name: cl_pipe_info,
1150 param_value_size: size_t,
1151 param_value: *mut c_void,
1152 param_value_size_ret: *mut size_t,
1153 ) -> cl_int;
1154
1155 #[cfg(feature = "CL_VERSION_1_1")]
1156 pub fn clSetMemObjectDestructorCallback(
1157 memobj: cl_mem,
1158 pfn_notify: Option<unsafe extern "C" fn(memobj: cl_mem, user_data: *mut c_void)>,
1159 user_data: *mut c_void,
1160 ) -> cl_int;
1161
1162 #[cfg(feature = "CL_VERSION_2_0")]
1165 pub fn clSVMAlloc(
1166 context: cl_context,
1167 flags: cl_svm_mem_flags,
1168 size: size_t,
1169 alignment: cl_uint,
1170 ) -> *mut c_void;
1171
1172 #[cfg(feature = "CL_VERSION_2_0")]
1173 pub fn clSVMFree(context: cl_context, svm_pointer: *mut c_void);
1174
1175 #[cfg(feature = "CL_VERSION_2_0")]
1178 pub fn clCreateSamplerWithProperties(
1179 context: cl_context,
1180 normalized_coords: *const cl_sampler_properties,
1181 errcode_ret: *mut cl_int,
1182 ) -> cl_sampler;
1183
1184 pub fn clRetainSampler(sampler: cl_sampler) -> cl_int;
1185
1186 pub fn clReleaseSampler(sampler: cl_sampler) -> cl_int;
1187
1188 pub fn clGetSamplerInfo(
1189 sampler: cl_sampler,
1190 param_name: cl_sampler_info,
1191 param_value_size: size_t,
1192 param_value: *mut c_void,
1193 param_value_size_ret: *mut size_t,
1194 ) -> cl_int;
1195
1196 pub fn clCreateProgramWithSource(
1198 context: cl_context,
1199 count: cl_uint,
1200 strings: *const *const c_char,
1201 lengths: *const size_t,
1202 errcode_ret: *mut cl_int,
1203 ) -> cl_program;
1204
1205 pub fn clCreateProgramWithBinary(
1206 context: cl_context,
1207 num_devices: cl_uint,
1208 device_list: *const cl_device_id,
1209 lengths: *const size_t,
1210 binaries: *const *const c_uchar,
1211 binary_status: *mut cl_int,
1212 errcode_ret: *mut cl_int,
1213 ) -> cl_program;
1214
1215 #[cfg(feature = "CL_VERSION_1_2")]
1216 pub fn clCreateProgramWithBuiltInKernels(
1217 context: cl_context,
1218 num_devices: cl_uint,
1219 device_list: *const cl_device_id,
1220 kernel_names: *const c_char,
1221 errcode_ret: *mut cl_int,
1222 ) -> cl_program;
1223
1224 #[cfg(feature = "CL_VERSION_2_1")]
1225 pub fn clCreateProgramWithIL(
1226 context: cl_context,
1227 il: *const c_void,
1228 length: size_t,
1229 errcode_ret: *mut cl_int,
1230 ) -> cl_program;
1231
1232 pub fn clRetainProgram(program: cl_program) -> cl_int;
1233
1234 pub fn clReleaseProgram(program: cl_program) -> cl_int;
1235
1236 pub fn clBuildProgram(
1237 program: cl_program,
1238 num_devices: cl_uint,
1239 device_list: *const cl_device_id,
1240 options: *const c_char,
1241 pfn_notify: Option<unsafe extern "C" fn(program: cl_program, user_data: *mut c_void)>,
1242 user_data: *mut c_void,
1243 ) -> cl_int;
1244
1245 #[cfg(feature = "CL_VERSION_1_2")]
1246 pub fn clCompileProgram(
1247 program: cl_program,
1248 num_devices: cl_uint,
1249 device_list: *const cl_device_id,
1250 options: *const c_char,
1251 num_input_headers: cl_uint,
1252 input_headers: *const cl_program,
1253 header_include_names: *const *const c_char,
1254 pfn_notify: Option<unsafe extern "C" fn(program: cl_program, user_data: *mut c_void)>,
1255 user_data: *mut c_void,
1256 ) -> cl_int;
1257
1258 #[cfg(feature = "CL_VERSION_1_2")]
1259 pub fn clLinkProgram(
1260 context: cl_context,
1261 num_devices: cl_uint,
1262 device_list: *const cl_device_id,
1263 options: *const c_char,
1264 num_input_programs: cl_uint,
1265 input_programs: *const cl_program,
1266 pfn_notify: Option<unsafe extern "C" fn(program: cl_program, user_data: *mut c_void)>,
1267 user_data: *mut c_void,
1268 errcode_ret: *mut cl_int,
1269 ) -> cl_program;
1270
1271 #[cfg(feature = "CL_VERSION_2_2")]
1272 #[cfg_attr(
1273 feature = "CL_VERSION_3_0",
1274 deprecated(since = "0.1.0", note = "From CL_VERSION_3_0")
1275 )]
1276 pub fn clSetProgramReleaseCallback(
1277 program: cl_program,
1278 pfn_notify: Option<unsafe extern "C" fn(program: cl_program, user_data: *mut c_void)>,
1279 user_data: *mut c_void,
1280 ) -> cl_int;
1281
1282 #[cfg(feature = "CL_VERSION_2_2")]
1283 pub fn clSetProgramSpecializationConstant(
1284 program: cl_program,
1285 spec_id: cl_uint,
1286 spec_size: size_t,
1287 spec_value: *const c_void,
1288 ) -> cl_int;
1289
1290 #[cfg(feature = "CL_VERSION_1_2")]
1291 pub fn clUnloadPlatformCompiler(platform: cl_platform_id) -> cl_int;
1292
1293 pub fn clGetProgramInfo(
1294 program: cl_program,
1295 param_name: cl_program_info,
1296 param_value_size: size_t,
1297 param_value: *mut c_void,
1298 param_value_size_ret: *mut size_t,
1299 ) -> cl_int;
1300
1301 pub fn clGetProgramBuildInfo(
1302 program: cl_program,
1303 device: cl_device_id,
1304 param_name: cl_program_build_info,
1305 param_value_size: size_t,
1306 param_value: *mut c_void,
1307 param_value_size_ret: *mut size_t,
1308 ) -> cl_int;
1309
1310 pub fn clCreateKernel(
1312 program: cl_program,
1313 kernel_name: *const c_char,
1314 errcode_ret: *mut cl_int,
1315 ) -> cl_kernel;
1316
1317 pub fn clCreateKernelsInProgram(
1318 program: cl_program,
1319 num_kernels: cl_uint,
1320 kernels: *mut cl_kernel,
1321 num_kernels_ret: *mut cl_uint,
1322 ) -> cl_int;
1323
1324 #[cfg(feature = "CL_VERSION_2_1")]
1325 pub fn clCloneKernel(source_kernel: cl_kernel, errcode_ret: *mut cl_int) -> cl_kernel;
1326
1327 pub fn clRetainKernel(kernel: cl_kernel) -> cl_int;
1328
1329 pub fn clReleaseKernel(kernel: cl_kernel) -> cl_int;
1330
1331 pub fn clSetKernelArg(
1332 kernel: cl_kernel,
1333 arg_index: cl_uint,
1334 arg_size: size_t,
1335 arg_value: *const c_void,
1336 ) -> cl_int;
1337
1338 #[cfg(feature = "CL_VERSION_2_0")]
1339 pub fn clSetKernelArgSVMPointer(
1340 kernel: cl_kernel,
1341 arg_index: cl_uint,
1342 arg_value: *const c_void,
1343 ) -> cl_int;
1344
1345 #[cfg(feature = "CL_VERSION_2_0")]
1346 pub fn clSetKernelExecInfo(
1347 kernel: cl_kernel,
1348 param_name: cl_kernel_exec_info,
1349 param_value_size: size_t,
1350 param_value: *const c_void,
1351 ) -> cl_int;
1352
1353 pub fn clGetKernelInfo(
1354 kernel: cl_kernel,
1355 param_name: cl_kernel_info,
1356 param_value_size: size_t,
1357 param_value: *mut c_void,
1358 param_value_size_ret: *mut size_t,
1359 ) -> cl_int;
1360
1361 #[cfg(feature = "CL_VERSION_1_2")]
1362 pub fn clGetKernelArgInfo(
1363 kernel: cl_kernel,
1364 arg_indx: cl_uint,
1365 param_name: cl_kernel_arg_info,
1366 param_value_size: size_t,
1367 param_value: *mut c_void,
1368 param_value_size_ret: *mut size_t,
1369 ) -> cl_int;
1370
1371 pub fn clGetKernelWorkGroupInfo(
1372 kernel: cl_kernel,
1373 device: cl_device_id,
1374 param_name: cl_kernel_work_group_info,
1375 param_value_size: size_t,
1376 param_value: *mut c_void,
1377 param_value_size_ret: *mut size_t,
1378 ) -> cl_int;
1379
1380 #[cfg(feature = "CL_VERSION_2_1")]
1381 pub fn clGetKernelSubGroupInfo(
1382 kernel: cl_kernel,
1383 device: cl_device_id,
1384 param_name: cl_kernel_sub_group_info,
1385 input_value_size: size_t,
1386 input_value: *const c_void,
1387 param_value_size: size_t,
1388 param_value: *mut c_void,
1389 param_value_size_ret: *mut size_t,
1390 ) -> cl_int;
1391
1392 pub fn clWaitForEvents(num_events: cl_uint, event_list: *const cl_event) -> cl_int;
1394
1395 pub fn clGetEventInfo(
1396 event: cl_event,
1397 param_name: cl_event_info,
1398 param_value_size: size_t,
1399 param_value: *mut c_void,
1400 param_value_size_ret: *mut size_t,
1401 ) -> cl_int;
1402
1403 #[cfg(feature = "CL_VERSION_1_1")]
1404 pub fn clCreateUserEvent(context: cl_context, errcode_ret: *mut cl_int) -> cl_event;
1405
1406 pub fn clRetainEvent(event: cl_event) -> cl_int;
1407
1408 pub fn clReleaseEvent(event: cl_event) -> cl_int;
1409
1410 #[cfg(feature = "CL_VERSION_1_1")]
1411 pub fn clSetUserEventStatus(event: cl_event, execution_status: cl_int) -> cl_int;
1412
1413 #[cfg(feature = "CL_VERSION_1_1")]
1414 pub fn clSetEventCallback(
1415 event: cl_event,
1416 command_exec_callback_type: cl_int,
1417 pfn_notify: Option<
1418 unsafe extern "C" fn(
1419 event: cl_event,
1420 event_command_status: cl_int,
1421 user_data: *mut c_void,
1422 ),
1423 >,
1424 user_data: *mut c_void,
1425 ) -> cl_int;
1426
1427 pub fn clGetEventProfilingInfo(
1429 event: cl_event,
1430 param_name: cl_profiling_info,
1431 param_value_size: size_t,
1432 param_value: *mut c_void,
1433 param_value_size_ret: *mut size_t,
1434 ) -> cl_int;
1435
1436 pub fn clFlush(command_queue: cl_command_queue) -> cl_int;
1438
1439 pub fn clFinish(command_queue: cl_command_queue) -> cl_int;
1440
1441 pub fn clEnqueueReadBuffer(
1443 command_queue: cl_command_queue,
1444 buffer: cl_mem,
1445 blocking_read: cl_bool,
1446 offset: size_t,
1447 cb: size_t,
1448 ptr: *mut c_void,
1449 num_events_in_wait_list: cl_uint,
1450 event_wait_list: *const cl_event,
1451 event: *mut cl_event,
1452 ) -> cl_int;
1453
1454 #[cfg(feature = "CL_VERSION_1_1")]
1455 pub fn clEnqueueReadBufferRect(
1456 command_queue: cl_command_queue,
1457 buffer: cl_mem,
1458 blocking_read: cl_bool,
1459 buffer_origin: *const size_t,
1460 host_origin: *const size_t,
1461 region: *const size_t,
1462 buffer_row_pitch: size_t,
1463 buffer_slc_pitch: size_t,
1464 host_row_pitch: size_t,
1465 host_slc_pitch: size_t,
1466 ptr: *mut c_void,
1467 num_events_in_wait_list: cl_uint,
1468 event_wait_list: *const cl_event,
1469 event: *mut cl_event,
1470 ) -> cl_int;
1471
1472 pub fn clEnqueueWriteBuffer(
1473 command_queue: cl_command_queue,
1474 buffer: cl_mem,
1475 blocking_write: cl_bool,
1476 offset: size_t,
1477 cb: size_t,
1478 ptr: *const c_void,
1479 num_events_in_wait_list: cl_uint,
1480 event_wait_list: *const cl_event,
1481 event: *mut cl_event,
1482 ) -> cl_int;
1483
1484 #[cfg(feature = "CL_VERSION_1_1")]
1485 pub fn clEnqueueWriteBufferRect(
1486 command_queue: cl_command_queue,
1487 buffer: cl_mem,
1488 blocking_write: cl_bool,
1489 buffer_origin: *const size_t,
1490 host_origin: *const size_t,
1491 region: *const size_t,
1492 buffer_row_pitch: size_t,
1493 buffer_slc_pitch: size_t,
1494 host_row_pitch: size_t,
1495 host_slc_pitch: size_t,
1496 ptr: *const c_void,
1497 num_events_in_wait_list: cl_uint,
1498 event_wait_list: *const cl_event,
1499 event: *mut cl_event,
1500 ) -> cl_int;
1501
1502 #[cfg(feature = "CL_VERSION_1_2")]
1503 pub fn clEnqueueFillBuffer(
1504 command_queue: cl_command_queue,
1505 buffer: cl_mem,
1506 pattern: *const c_void,
1507 pattern_size: size_t,
1508 offset: size_t,
1509 size: size_t,
1510 num_events_in_wait_list: cl_uint,
1511 event_wait_list: *const cl_event,
1512 event: *mut cl_event,
1513 ) -> cl_int;
1514
1515 pub fn clEnqueueCopyBuffer(
1516 command_queue: cl_command_queue,
1517 src_buffer: cl_mem,
1518 dst_buffer: cl_mem,
1519 src_offset: size_t,
1520 dst_offset: size_t,
1521 cb: size_t,
1522 num_events_in_wait_list: cl_uint,
1523 event_wait_list: *const cl_event,
1524 event: *mut cl_event,
1525 ) -> cl_int;
1526
1527 #[cfg(feature = "CL_VERSION_1_1")]
1528 pub fn clEnqueueCopyBufferRect(
1529 command_queue: cl_command_queue,
1530 src_buffer: cl_mem,
1531 dst_buffer: cl_mem,
1532 src_origin: *const size_t,
1533 dst_origin: *const size_t,
1534 region: *const size_t,
1535 src_row_pitch: size_t,
1536 src_slice_pitch: size_t,
1537 dst_row_pitch: size_t,
1538 dst_slice_pitch: size_t,
1539 num_events_in_wait_list: cl_uint,
1540 event_wait_list: *const cl_event,
1541 event: *mut cl_event,
1542 ) -> cl_int;
1543
1544 pub fn clEnqueueReadImage(
1545 command_queue: cl_command_queue,
1546 image: cl_mem,
1547 blocking_read: cl_bool,
1548 origin: *const size_t,
1549 region: *const size_t,
1550 row_pitch: size_t,
1551 slice_pitch: size_t,
1552 ptr: *mut c_void,
1553 num_events_in_wait_list: cl_uint,
1554 event_wait_list: *const cl_event,
1555 event: *mut cl_event,
1556 ) -> cl_int;
1557
1558 pub fn clEnqueueWriteImage(
1559 command_queue: cl_command_queue,
1560 image: cl_mem,
1561 blocking_write: cl_bool,
1562 origin: *const size_t,
1563 region: *const size_t,
1564 input_row_pitch: size_t,
1565 input_slice_pitch: size_t,
1566 ptr: *const c_void,
1567 num_events_in_wait_list: cl_uint,
1568 event_wait_list: *const cl_event,
1569 event: *mut cl_event,
1570 ) -> cl_int;
1571
1572 #[cfg(feature = "CL_VERSION_1_2")]
1573 pub fn clEnqueueFillImage(
1574 command_queue: cl_command_queue,
1575 image: cl_mem,
1576 fill_color: *const c_void,
1577 origin: *const size_t,
1578 region: *const size_t,
1579 num_events_in_wait_list: cl_uint,
1580 event_wait_list: *const cl_event,
1581 event: *mut cl_event,
1582 ) -> cl_int;
1583
1584 pub fn clEnqueueCopyImage(
1585 command_queue: cl_command_queue,
1586 src_image: cl_mem,
1587 dst_image: cl_mem,
1588 src_origin: *const size_t,
1589 dst_origin: *const size_t,
1590 region: *const size_t,
1591 num_events_in_wait_list: cl_uint,
1592 event_wait_list: *const cl_event,
1593 event: *mut cl_event,
1594 ) -> cl_int;
1595
1596 pub fn clEnqueueCopyImageToBuffer(
1597 command_queue: cl_command_queue,
1598 src_image: cl_mem,
1599 dst_buffer: cl_mem,
1600 src_origin: *const size_t,
1601 region: *const size_t,
1602 dst_offset: size_t,
1603 num_events_in_wait_list: cl_uint,
1604 event_wait_list: *const cl_event,
1605 event: *mut cl_event,
1606 ) -> cl_int;
1607
1608 pub fn clEnqueueCopyBufferToImage(
1609 command_queue: cl_command_queue,
1610 src_buffer: cl_mem,
1611 dst_image: cl_mem,
1612 src_offset: size_t,
1613 dst_origin: *const size_t,
1614 region: *const size_t,
1615 num_events_in_wait_list: cl_uint,
1616 event_wait_list: *const cl_event,
1617 event: *mut cl_event,
1618 ) -> cl_int;
1619
1620 pub fn clEnqueueMapBuffer(
1621 command_queue: cl_command_queue,
1622 buffer: cl_mem,
1623 blocking_map: cl_bool,
1624 map_flags: cl_map_flags,
1625 offset: size_t,
1626 size: size_t,
1627 num_events_in_wait_list: cl_uint,
1628 event_wait_list: *const cl_event,
1629 event: *mut cl_event,
1630 errcode_ret: *mut cl_int,
1631 ) -> *mut c_void;
1632
1633 pub fn clEnqueueMapImage(
1634 command_queue: cl_command_queue,
1635 image: cl_mem,
1636 blocking_map: cl_bool,
1637 map_flags: cl_map_flags,
1638 origin: *const size_t,
1639 region: *const size_t,
1640 image_row_pitch: *mut size_t,
1641 image_slice_pitch: *mut size_t,
1642 num_events_in_wait_list: cl_uint,
1643 event_wait_list: *const cl_event,
1644 event: *mut cl_event,
1645 errcode_ret: *mut cl_int,
1646 ) -> *mut c_void;
1647
1648 pub fn clEnqueueUnmapMemObject(
1649 command_queue: cl_command_queue,
1650 memobj: cl_mem,
1651 mapped_ptr: *mut c_void,
1652 num_events_in_wait_list: cl_uint,
1653 event_wait_list: *const cl_event,
1654 event: *mut cl_event,
1655 ) -> cl_int;
1656
1657 #[cfg(feature = "CL_VERSION_1_2")]
1658 pub fn clEnqueueMigrateMemObjects(
1659 command_queue: cl_command_queue,
1660 num_mem_objects: cl_uint,
1661 mem_objects: *const cl_mem,
1662 flags: cl_mem_migration_flags,
1663 num_events_in_wait_list: cl_uint,
1664 event_wait_list: *const cl_event,
1665 event: *mut cl_event,
1666 ) -> cl_int;
1667
1668 pub fn clEnqueueNDRangeKernel(
1669 command_queue: cl_command_queue,
1670 kernel: cl_kernel,
1671 work_dim: cl_uint,
1672 global_work_offset: *const size_t,
1673 global_work_dims: *const size_t,
1674 local_work_dims: *const size_t,
1675 num_events_in_wait_list: cl_uint,
1676 event_wait_list: *const cl_event,
1677 event: *mut cl_event,
1678 ) -> cl_int;
1679
1680 pub fn clEnqueueNativeKernel(
1681 command_queue: cl_command_queue,
1682 user_func: Option<unsafe extern "C" fn(arg1: *mut c_void)>,
1683 args: *mut c_void,
1684 cb_args: size_t,
1685 num_mem_objects: cl_uint,
1686 mem_list: *const cl_mem,
1687 args_mem_loc: *const *const c_void,
1688 num_events_in_wait_list: cl_uint,
1689 event_wait_list: *const cl_event,
1690 event: *mut cl_event,
1691 ) -> cl_int;
1692
1693 #[cfg(feature = "CL_VERSION_1_2")]
1694 pub fn clEnqueueMarkerWithWaitList(
1695 command_queue: cl_command_queue,
1696 num_events_in_wait_list: cl_uint,
1697 event_wait_list: *const cl_event,
1698 event: *mut cl_event,
1699 ) -> cl_int;
1700
1701 #[cfg(feature = "CL_VERSION_1_2")]
1702 pub fn clEnqueueBarrierWithWaitList(
1703 command_queue: cl_command_queue,
1704 num_events_in_wait_list: cl_uint,
1705 event_wait_list: *const cl_event,
1706 event: *mut cl_event,
1707 ) -> cl_int;
1708
1709 #[cfg(feature = "CL_VERSION_2_0")]
1710 pub fn clEnqueueSVMFree(
1711 command_queue: cl_command_queue,
1712 num_svm_pointers: cl_uint,
1713 svm_pointers: *const *const c_void,
1714 pfn_free_func: Option<
1715 unsafe extern "C" fn(
1716 queue: cl_command_queue,
1717 num_svm_pointers: cl_uint,
1718 svm_pointers: *mut *mut c_void,
1719 user_data: *mut c_void,
1720 ),
1721 >,
1722 user_data: *mut c_void,
1723 num_events_in_wait_list: cl_uint,
1724 event_wait_list: *const cl_event,
1725 event: *mut cl_event,
1726 ) -> cl_int;
1727
1728 #[cfg(feature = "CL_VERSION_2_0")]
1729 pub fn clEnqueueSVMMemcpy(
1730 command_queue: cl_command_queue,
1731 blocking_copy: cl_bool,
1732 dst_ptr: *mut c_void,
1733 src_ptr: *const c_void,
1734 size: size_t,
1735 num_events_in_wait_list: cl_uint,
1736 event_wait_list: *const cl_event,
1737 event: *mut cl_event,
1738 ) -> cl_int;
1739
1740 #[cfg(feature = "CL_VERSION_2_0")]
1741 pub fn clEnqueueSVMMemFill(
1742 command_queue: cl_command_queue,
1743 svm_ptr: *mut c_void,
1744 pattern: *const c_void,
1745 pattern_size: size_t,
1746 size: size_t,
1747 num_events_in_wait_list: cl_uint,
1748 event_wait_list: *const cl_event,
1749 event: *mut cl_event,
1750 ) -> cl_int;
1751
1752 #[cfg(feature = "CL_VERSION_2_0")]
1753 pub fn clEnqueueSVMMap(
1754 command_queue: cl_command_queue,
1755 blocking_map: cl_bool,
1756 flags: cl_map_flags,
1757 svm_ptr: *mut c_void,
1758 size: size_t,
1759 num_events_in_wait_list: cl_uint,
1760 event_wait_list: *const cl_event,
1761 event: *mut cl_event,
1762 ) -> cl_int;
1763
1764 #[cfg(feature = "CL_VERSION_2_0")]
1765 pub fn clEnqueueSVMUnmap(
1766 command_queue: cl_command_queue,
1767 svm_ptr: *mut c_void,
1768 num_events_in_wait_list: cl_uint,
1769 event_wait_list: *const cl_event,
1770 event: *mut cl_event,
1771 ) -> cl_int;
1772
1773 #[cfg(feature = "CL_VERSION_2_1")]
1774 pub fn clEnqueueSVMMigrateMem(
1775 command_queue: cl_command_queue,
1776 num_svm_pointers: cl_uint,
1777 svm_pointers: *const *const c_void,
1778 sizes: *const size_t,
1779 flags: cl_mem_migration_flags,
1780 num_events_in_wait_list: cl_uint,
1781 event_wait_list: *const cl_event,
1782 event: *mut cl_event,
1783 ) -> cl_int;
1784
1785 #[cfg(feature = "CL_VERSION_1_2")]
1786 pub fn clGetExtensionFunctionAddressForPlatform(
1787 platform: cl_platform_id,
1788 func_name: *const c_char,
1789 ) -> *mut c_void;
1790
1791 #[cfg_attr(
1794 any(
1795 feature = "CL_VERSION_1_2",
1796 feature = "CL_VERSION_2_0",
1797 feature = "CL_VERSION_2_1",
1798 feature = "CL_VERSION_2_2",
1799 feature = "CL_VERSION_3_0"
1800 ),
1801 deprecated(since = "0.1.0", note = "From CL_VERSION_1_2 use clCreateImage")
1802 )]
1803 pub fn clCreateImage2D(
1804 context: cl_context,
1805 flags: cl_mem_flags,
1806 image_format: *mut cl_image_format,
1807 image_width: size_t,
1808 image_depth: size_t,
1809 image_row_pitch: size_t,
1810 host_ptr: *mut c_void,
1811 errcode_ret: *mut cl_int,
1812 ) -> cl_mem;
1813
1814 #[cfg_attr(
1815 any(
1816 feature = "CL_VERSION_1_2",
1817 feature = "CL_VERSION_2_0",
1818 feature = "CL_VERSION_2_1",
1819 feature = "CL_VERSION_2_2",
1820 feature = "CL_VERSION_3_0"
1821 ),
1822 deprecated(since = "0.1.0", note = "From CL_VERSION_1_2 use clCreateImage")
1823 )]
1824 pub fn clCreateImage3D(
1825 context: cl_context,
1826 flags: cl_mem_flags,
1827 image_format: *mut cl_image_format,
1828 image_width: size_t,
1829 image_height: size_t,
1830 image_depth: size_t,
1831 image_row_pitch: size_t,
1832 image_slice_pitch: size_t,
1833 host_ptr: *mut c_void,
1834 errcode_ret: *mut cl_int,
1835 ) -> cl_mem;
1836
1837 #[cfg_attr(
1838 any(
1839 feature = "CL_VERSION_1_2",
1840 feature = "CL_VERSION_2_0",
1841 feature = "CL_VERSION_2_1",
1842 feature = "CL_VERSION_2_2",
1843 feature = "CL_VERSION_3_0"
1844 ),
1845 deprecated(
1846 since = "0.1.0",
1847 note = "From CL_VERSION_1_2 use clEnqueueMarkerWithWaitList"
1848 )
1849 )]
1850 pub fn clEnqueueMarker(command_queue: cl_command_queue, event: *mut cl_event) -> cl_int;
1851
1852 #[deprecated(since = "0.1.0", note = "From CL_VERSION_1_2")]
1853 pub fn clEnqueueWaitForEvents(
1854 command_queue: cl_command_queue,
1855 num_events: cl_uint,
1856 event_list: *mut cl_event,
1857 ) -> cl_int;
1858
1859 #[cfg_attr(
1860 any(
1861 feature = "CL_VERSION_1_2",
1862 feature = "CL_VERSION_2_0",
1863 feature = "CL_VERSION_2_1",
1864 feature = "CL_VERSION_2_2",
1865 feature = "CL_VERSION_3_0"
1866 ),
1867 deprecated(
1868 since = "0.1.0",
1869 note = "From CL_VERSION_1_2 use clEnqueueBarrierWithWaitList"
1870 )
1871 )]
1872 pub fn clEnqueueBarrier(command_queue: cl_command_queue) -> cl_int;
1873
1874 #[cfg_attr(
1875 any(
1876 feature = "CL_VERSION_1_2",
1877 feature = "CL_VERSION_2_0",
1878 feature = "CL_VERSION_2_1",
1879 feature = "CL_VERSION_2_2",
1880 feature = "CL_VERSION_3_0"
1881 ),
1882 deprecated(
1883 since = "0.1.0",
1884 note = "From CL_VERSION_1_2 use clUnloadPlatformCompiler"
1885 )
1886 )]
1887 pub fn clUnloadCompiler() -> cl_int;
1888
1889 #[cfg_attr(
1890 any(
1891 feature = "CL_VERSION_1_2",
1892 feature = "CL_VERSION_2_0",
1893 feature = "CL_VERSION_2_1",
1894 feature = "CL_VERSION_2_2",
1895 feature = "CL_VERSION_3_0"
1896 ),
1897 deprecated(
1898 since = "0.1.0",
1899 note = "From CL_VERSION_1_2 use clGetExtensionFunctionAddressForPlatform"
1900 )
1901 )]
1902 pub fn clGetExtensionFunctionAddress(func_name: *const c_char);
1903
1904 #[cfg_attr(
1907 any(
1908 feature = "CL_VERSION_2_0",
1909 feature = "CL_VERSION_2_1",
1910 feature = "CL_VERSION_2_2",
1911 feature = "CL_VERSION_3_0"
1912 ),
1913 deprecated(
1914 since = "0.1.0",
1915 note = "From CL_VERSION_2_0 use clCreateCommandQueueWithProperties"
1916 )
1917 )]
1918 pub fn clCreateCommandQueue(
1919 context: cl_context,
1920 device: cl_device_id,
1921 properties: cl_command_queue_properties,
1922 errcode_ret: *mut cl_int,
1923 ) -> cl_command_queue;
1924
1925 #[cfg_attr(
1926 any(
1927 feature = "CL_VERSION_2_0",
1928 feature = "CL_VERSION_2_1",
1929 feature = "CL_VERSION_2_2",
1930 feature = "CL_VERSION_3_0"
1931 ),
1932 deprecated(
1933 since = "0.1.0",
1934 note = "From CL_VERSION_2_0 use clCreateSamplerWithProperties"
1935 )
1936 )]
1937 pub fn clCreateSampler(
1938 context: cl_context,
1939 normalize_coords: cl_bool,
1940 addressing_mode: cl_addressing_mode,
1941 filter_mode: cl_filter_mode,
1942 errcode_ret: *mut cl_int,
1943 ) -> cl_sampler;
1944
1945 #[cfg_attr(
1947 any(
1948 feature = "CL_VERSION_2_0",
1949 feature = "CL_VERSION_2_1",
1950 feature = "CL_VERSION_2_2",
1951 feature = "CL_VERSION_3_0"
1952 ),
1953 deprecated(
1954 since = "0.1.0",
1955 note = "From CL_VERSION_2_0 use clEnqueueNDRangeKernel"
1956 )
1957 )]
1958 pub fn clEnqueueTask(
1959 command_queue: cl_command_queue,
1960 kernel: cl_kernel,
1961 num_events_in_wait_list: cl_uint,
1962 event_wait_list: *const cl_event,
1963 event: *mut cl_event,
1964 ) -> cl_int;
1965}
1966
1967#[cfg(test)]
1968mod tests {
1969 use super::*;
1970
1971 #[test]
1972 #[allow(deref_nullptr)]
1973 fn bindgen_test_layout_cl_image_format() {
1974 assert_eq!(
1975 ::core::mem::size_of::<cl_image_format>(),
1976 8usize,
1977 concat!("Size of: ", stringify!(cl_image_format))
1978 );
1979 assert_eq!(
1980 ::core::mem::align_of::<cl_image_format>(),
1981 4usize,
1982 concat!("Alignment of ", stringify!(cl_image_format))
1983 );
1984 assert_eq!(
1985 unsafe {
1986 &(*(::core::ptr::null::<cl_image_format>())).image_channel_order as *const _
1987 as usize
1988 },
1989 0usize,
1990 concat!(
1991 "Offset of field: ",
1992 stringify!(cl_image_format),
1993 "::",
1994 stringify!(image_channel_order)
1995 )
1996 );
1997 assert_eq!(
1998 unsafe {
1999 &(*(::core::ptr::null::<cl_image_format>())).image_channel_data_type as *const _
2000 as usize
2001 },
2002 4usize,
2003 concat!(
2004 "Offset of field: ",
2005 stringify!(cl_image_format),
2006 "::",
2007 stringify!(image_channel_data_type)
2008 )
2009 );
2010 }
2011
2012 #[test]
2013 #[allow(deref_nullptr)]
2014 fn bindgen_test_layout_cl_image_desc() {
2015 assert_eq!(
2016 ::core::mem::size_of::<cl_image_desc>(),
2017 72usize,
2018 concat!("Size of: ", stringify!(cl_image_desc))
2019 );
2020 assert_eq!(
2021 ::core::mem::align_of::<cl_image_desc>(),
2022 8usize,
2023 concat!("Alignment of ", stringify!(cl_image_desc))
2024 );
2025 assert_eq!(
2026 unsafe { &(*(::core::ptr::null::<cl_image_desc>())).image_type as *const _ as usize },
2027 0usize,
2028 concat!(
2029 "Offset of field: ",
2030 stringify!(cl_image_desc),
2031 "::",
2032 stringify!(image_type)
2033 )
2034 );
2035 assert_eq!(
2036 unsafe { &(*(::core::ptr::null::<cl_image_desc>())).image_width as *const _ as usize },
2037 8usize,
2038 concat!(
2039 "Offset of field: ",
2040 stringify!(cl_image_desc),
2041 "::",
2042 stringify!(image_width)
2043 )
2044 );
2045 assert_eq!(
2046 unsafe { &(*(::core::ptr::null::<cl_image_desc>())).image_height as *const _ as usize },
2047 16usize,
2048 concat!(
2049 "Offset of field: ",
2050 stringify!(cl_image_desc),
2051 "::",
2052 stringify!(image_height)
2053 )
2054 );
2055 assert_eq!(
2056 unsafe { &(*(::core::ptr::null::<cl_image_desc>())).image_depth as *const _ as usize },
2057 24usize,
2058 concat!(
2059 "Offset of field: ",
2060 stringify!(cl_image_desc),
2061 "::",
2062 stringify!(image_depth)
2063 )
2064 );
2065 assert_eq!(
2066 unsafe {
2067 &(*(::core::ptr::null::<cl_image_desc>())).image_array_size as *const _ as usize
2068 },
2069 32usize,
2070 concat!(
2071 "Offset of field: ",
2072 stringify!(cl_image_desc),
2073 "::",
2074 stringify!(image_array_size)
2075 )
2076 );
2077 assert_eq!(
2078 unsafe {
2079 &(*(::core::ptr::null::<cl_image_desc>())).image_row_pitch as *const _ as usize
2080 },
2081 40usize,
2082 concat!(
2083 "Offset of field: ",
2084 stringify!(cl_image_desc),
2085 "::",
2086 stringify!(image_row_pitch)
2087 )
2088 );
2089 assert_eq!(
2090 unsafe {
2091 &(*(::core::ptr::null::<cl_image_desc>())).image_slice_pitch as *const _ as usize
2092 },
2093 48usize,
2094 concat!(
2095 "Offset of field: ",
2096 stringify!(cl_image_desc),
2097 "::",
2098 stringify!(image_slice_pitch)
2099 )
2100 );
2101 assert_eq!(
2102 unsafe {
2103 &(*(::core::ptr::null::<cl_image_desc>())).num_mip_levels as *const _ as usize
2104 },
2105 56usize,
2106 concat!(
2107 "Offset of field: ",
2108 stringify!(cl_image_desc),
2109 "::",
2110 stringify!(num_mip_levels)
2111 )
2112 );
2113 assert_eq!(
2114 unsafe { &(*(::core::ptr::null::<cl_image_desc>())).num_samples as *const _ as usize },
2115 60usize,
2116 concat!(
2117 "Offset of field: ",
2118 stringify!(cl_image_desc),
2119 "::",
2120 stringify!(num_samples)
2121 )
2122 );
2123 }
2124
2125 #[test]
2126 #[allow(deref_nullptr)]
2127 fn bindgen_test_layout_cl_buffer_region() {
2128 assert_eq!(
2129 ::core::mem::size_of::<cl_buffer_region>(),
2130 16usize,
2131 concat!("Size of: ", stringify!(cl_buffer_region))
2132 );
2133 assert_eq!(
2134 ::core::mem::align_of::<cl_buffer_region>(),
2135 8usize,
2136 concat!("Alignment of ", stringify!(cl_buffer_region))
2137 );
2138 assert_eq!(
2139 unsafe { &(*(::core::ptr::null::<cl_buffer_region>())).origin as *const _ as usize },
2140 0usize,
2141 concat!(
2142 "Offset of field: ",
2143 stringify!(cl_buffer_region),
2144 "::",
2145 stringify!(origin)
2146 )
2147 );
2148 assert_eq!(
2149 unsafe { &(*(::core::ptr::null::<cl_buffer_region>())).size as *const _ as usize },
2150 8usize,
2151 concat!(
2152 "Offset of field: ",
2153 stringify!(cl_buffer_region),
2154 "::",
2155 stringify!(size)
2156 )
2157 );
2158 }
2159
2160 #[test]
2161 #[allow(deref_nullptr)]
2162 fn bindgen_test_layout_cl_name_version() {
2163 assert_eq!(
2164 ::core::mem::size_of::<cl_name_version>(),
2165 68usize,
2166 concat!("Size of: ", stringify!(cl_name_version))
2167 );
2168 assert_eq!(
2169 ::core::mem::align_of::<cl_name_version>(),
2170 4usize,
2171 concat!("Alignment of ", stringify!(cl_name_version))
2172 );
2173 assert_eq!(
2174 unsafe { &(*(::core::ptr::null::<cl_name_version>())).version as *const _ as usize },
2175 0usize,
2176 concat!(
2177 "Offset of field: ",
2178 stringify!(cl_name_version),
2179 "::",
2180 stringify!(version)
2181 )
2182 );
2183 assert_eq!(
2184 unsafe { &(*(::core::ptr::null::<cl_name_version>())).name as *const _ as usize },
2185 4usize,
2186 concat!(
2187 "Offset of field: ",
2188 stringify!(cl_name_version),
2189 "::",
2190 stringify!(name)
2191 )
2192 );
2193 }
2194}