opencl_dynamic_sys/types/
mod.rs1#![allow(non_camel_case_types, non_upper_case_globals)]
2
3pub use libc::{c_char, c_int, c_uchar, c_void, intptr_t, size_t};
4
5use crate::constants::CL_NAME_VERSION_MAX_NAME_SIZE;
6
7pub mod cl_d3d10;
8pub mod cl_d3d11;
9pub mod cl_dx9_media_sharing;
10pub mod cl_egl;
11pub mod cl_ext;
12pub mod cl_function_types;
13pub mod cl_gl;
14pub mod cl_icd;
15pub mod cl_layer;
16
17pub mod cl_platform;
18use cl_platform::*;
19
20pub type cl_platform_id = *mut c_void;
23pub type cl_device_id = *mut c_void;
24pub type cl_context = *mut c_void;
25pub type cl_command_queue = *mut c_void;
26pub type cl_mem = *mut c_void;
27pub type cl_program = *mut c_void;
28pub type cl_kernel = *mut c_void;
29pub type cl_event = *mut c_void;
30pub type cl_sampler = *mut c_void;
31
32pub type cl_bool = cl_uint;
33pub type cl_bitfield = cl_ulong;
34pub type cl_properties = cl_ulong;
35pub type cl_device_type = cl_bitfield;
36pub type cl_platform_info = cl_uint;
37pub type cl_device_info = cl_uint;
38pub type cl_device_fp_config = cl_bitfield;
39pub type cl_device_mem_cache_type = cl_uint;
40pub type cl_device_local_mem_type = cl_uint;
41pub type cl_device_exec_capabilities = cl_bitfield;
42pub type cl_device_svm_capabilities = cl_bitfield;
43pub type cl_command_queue_properties = cl_bitfield;
44pub type cl_device_partition_property = intptr_t;
45pub type cl_device_affinity_domain = cl_bitfield;
46
47pub type cl_context_properties = intptr_t;
48pub type cl_context_info = cl_uint;
49pub type cl_queue_properties = cl_properties;
50pub type cl_command_queue_info = cl_uint;
51pub type cl_channel_order = cl_uint;
52pub type cl_channel_type = cl_uint;
53pub type cl_mem_flags = cl_bitfield;
54pub type cl_svm_mem_flags = cl_bitfield;
55pub type cl_mem_object_type = cl_uint;
56pub type cl_mem_info = cl_uint;
57pub type cl_mem_migration_flags = cl_bitfield;
58pub type cl_image_info = cl_uint;
59pub type cl_buffer_create_type = cl_uint;
60pub type cl_addressing_mode = cl_uint;
61pub type cl_filter_mode = cl_uint;
62pub type cl_sampler_info = cl_uint;
63pub type cl_map_flags = cl_bitfield;
64pub type cl_pipe_properties = intptr_t;
65pub type cl_pipe_info = cl_uint;
66pub type cl_program_info = cl_uint;
67pub type cl_program_build_info = cl_uint;
68pub type cl_program_binary_type = cl_uint;
69pub type cl_build_status = cl_int;
70pub type cl_kernel_info = cl_uint;
71pub type cl_kernel_arg_info = cl_uint;
72pub type cl_kernel_arg_address_qualifier = cl_uint;
73pub type cl_kernel_arg_access_qualifier = cl_uint;
74pub type cl_kernel_arg_type_qualifier = cl_uint;
75pub type cl_kernel_work_group_info = cl_uint;
76pub type cl_kernel_sub_group_info = cl_uint;
77pub type cl_event_info = cl_uint;
78pub type cl_command_type = cl_uint;
79pub type cl_profiling_info = cl_uint;
80pub type cl_sampler_properties = cl_bitfield;
81pub type cl_kernel_exec_info = cl_uint;
82pub type cl_device_atomic_capabilities = cl_bitfield;
83pub type cl_device_device_enqueue_capabilities = cl_bitfield;
84pub type cl_khronos_vendor_id = cl_uint;
85pub type cl_mem_properties = cl_properties;
86pub type cl_version = cl_uint;
87
88#[repr(C)]
89#[derive(Debug, Default, Copy, Clone)]
90pub struct cl_image_format {
91 pub image_channel_order: cl_channel_order,
92 pub image_channel_data_type: cl_channel_type,
93}
94
95#[repr(C)]
96#[derive(Debug, Copy, Clone)]
97pub struct cl_image_desc {
98 pub image_type: cl_mem_object_type,
99 pub image_width: size_t,
100 pub image_height: size_t,
101 pub image_depth: size_t,
102 pub image_array_size: size_t,
103 pub image_row_pitch: size_t,
104 pub image_slice_pitch: size_t,
105 pub num_mip_levels: cl_uint,
106 pub num_samples: cl_uint,
107 pub buffer: cl_mem,
108}
109
110#[repr(C)]
111#[derive(Debug, Default, Copy, Clone)]
112pub struct cl_buffer_region {
113 pub origin: size_t,
114 pub size: size_t,
115}
116
117#[repr(C)]
118#[derive(Debug, Copy, Clone)]
119pub struct cl_name_version {
120 pub version: cl_version,
121 pub name: [cl_uchar; CL_NAME_VERSION_MAX_NAME_SIZE],
122}