1 // -----------------[ Core typedefs ]-----------------
2 
3 typedef struct _cl_platform_id *    cl_platform_id;
4 typedef struct _cl_device_id *      cl_device_id;
5 typedef struct _cl_context *        cl_context;
6 typedef struct _cl_command_queue *  cl_command_queue;
7 typedef struct _cl_mem *            cl_mem;
8 typedef struct _cl_program *        cl_program;
9 typedef struct _cl_kernel *         cl_kernel;
10 typedef struct _cl_event *          cl_event;
11 typedef struct _cl_sampler *        cl_sampler;
12 
13 typedef 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. */
14 typedef cl_ulong            cl_bitfield;
15 typedef cl_bitfield         cl_device_type;
16 typedef cl_uint             cl_platform_info;
17 typedef cl_uint             cl_device_info;
18 typedef cl_bitfield         cl_device_fp_config;
19 typedef cl_uint             cl_device_mem_cache_type;
20 typedef cl_uint             cl_device_local_mem_type;
21 typedef cl_bitfield         cl_device_exec_capabilities;
22 typedef cl_bitfield         cl_command_queue_properties;
23 typedef intptr_t            cl_device_partition_property;
24 typedef cl_bitfield         cl_device_affinity_domain;
25 
26 typedef intptr_t            cl_context_properties;
27 typedef cl_uint             cl_context_info;
28 typedef cl_uint             cl_command_queue_info;
29 typedef cl_uint             cl_channel_order;
30 typedef cl_uint             cl_channel_type;
31 typedef cl_bitfield         cl_mem_flags;
32 typedef cl_uint             cl_mem_object_type;
33 typedef cl_uint             cl_mem_info;
34 typedef cl_bitfield         cl_mem_migration_flags;
35 typedef cl_uint             cl_image_info;
36 typedef cl_uint             cl_buffer_create_type;
37 typedef cl_uint             cl_addressing_mode;
38 typedef cl_uint             cl_filter_mode;
39 typedef cl_uint             cl_sampler_info;
40 typedef cl_bitfield         cl_map_flags;
41 typedef cl_uint             cl_program_info;
42 typedef cl_uint             cl_program_build_info;
43 typedef cl_uint             cl_program_binary_type;
44 typedef cl_int              cl_build_status;
45 typedef cl_uint             cl_kernel_info;
46 typedef cl_uint             cl_kernel_arg_info;
47 typedef cl_uint             cl_kernel_arg_address_qualifier;
48 typedef cl_uint             cl_kernel_arg_access_qualifier;
49 typedef cl_uint             cl_kernel_work_group_info;
50 typedef cl_uint             cl_event_info;
51 typedef cl_uint             cl_command_type;
52 typedef cl_uint             cl_profiling_info;
53 
54 typedef struct _cl_image_format {
55     cl_channel_order        image_channel_order;
56     cl_channel_type         image_channel_data_type;
57 } cl_image_format;
58 
59 typedef struct _cl_image_desc {
60     cl_mem_object_type      image_type;
61     size_t                  image_width;
62     size_t                  image_height;
63     size_t                  image_depth;
64     size_t                  image_array_size;
65     size_t                  image_row_pitch;
66     size_t                  image_slice_pitch;
67     cl_uint                 num_mip_levels;
68     cl_uint                 num_samples;
69     cl_mem                  buffer;
70 } cl_image_desc;
71 
72 typedef struct _cl_buffer_region {
73     size_t                  origin;
74     size_t                  size;
75 } cl_buffer_region;
76 
77 // cl_gl.h
78 typedef cl_uint             cl_gl_platform_info;
79 typedef cl_uint             cl_gl_context_info;
80 typedef cl_uint             cl_gl_object_type;
81 typedef cl_uint             cl_gl_texture_info;
82 
83 // -----------------[ Extension typedefs ]-----------------
84 
85 // EXT_device_fission
86 typedef cl_ulong            cl_device_partition_property_ext;
87 // EXT_migrate_memobject
88 typedef cl_bitfield         cl_mem_migration_flags_ext;
89 
90 // KHR_subgroups
91 typedef cl_uint             cl_kernel_sub_group_info;
92 
93 // -----------------[ Convenience typedefs ]-----------------
94 
95 typedef void                cl_void;
96