Halide 19.0.0
Halide compiler and libraries
Loading...
Searching...
No Matches
cl_functions.h
Go to the documentation of this file.
1// Note that this header intentionally does not use include
2// guards. The intended usage of this file is to define the meaning of
3// the CL_FN macro, and then include this file, sometimes repeatedly
4// within the same compilation unit.
5
6// clang-format off
7
8#ifndef CL_FN
9#define CL_FN(ret, fn, args)
10#endif
11
12#ifndef CL_12_FN
13#define CL_12_FN(ret, fn, args) CL_FN(ret, fn, args)
14#endif
15
16/* Platform API */
18 clGetPlatformIDs, (cl_uint /* num_entries */,
19 cl_platform_id * /* platforms */,
20 cl_uint * /* num_platforms */));
21
23 clGetPlatformInfo, (cl_platform_id /* platform */,
24 cl_platform_info /* param_name */,
25 size_t /* param_value_size */,
26 void * /* param_value */,
27 size_t * /* param_value_size_ret */));
28
29/* Device APIs */
31 clGetDeviceIDs, (cl_platform_id /* platform */,
32 cl_device_type /* device_type */,
33 cl_uint /* num_entries */,
34 cl_device_id * /* devices */,
35 cl_uint * /* num_devices */));
36
38 clGetDeviceInfo, (cl_device_id /* device */,
39 cl_device_info /* param_name */,
40 size_t /* param_value_size */,
41 void * /* param_value */,
42 size_t * /* param_value_size_ret */));
43
45 clCreateSubDevices, (cl_device_id /* in_device */,
46 const cl_device_partition_property * /* properties */,
47 cl_uint /* num_devices */,
48 cl_device_id * /* out_devices */,
49 cl_uint * /* num_devices_ret */));
50
52 clRetainDevice, (cl_device_id /* device */));
53
55 clReleaseDevice, (cl_device_id /* device */));
56
57/* Context APIs */
59 clCreateContext, (const cl_context_properties * /* properties */,
60 cl_uint /* num_devices */,
61 const cl_device_id * /* devices */,
62 void (CL_CALLBACK * /* pfn_notify */)(const char *, const void *, size_t, void *),
63 void * /* user_data */,
64 cl_int * /* errcode_ret */));
65
67 clCreateContextFromType, (const cl_context_properties * /* properties */,
68 cl_device_type /* device_type */,
69 void (CL_CALLBACK * /* pfn_notify*/ )(const char *, const void *, size_t, void *),
70 void * /* user_data */,
71 cl_int * /* errcode_ret */));
72
74 clRetainContext, (cl_context /* context */));
75
77 clReleaseContext, (cl_context /* context */));
78
80 clGetContextInfo, (cl_context /* context */,
81 cl_context_info /* param_name */,
82 size_t /* param_value_size */,
83 void * /* param_value */,
84 size_t * /* param_value_size_ret */));
85
86/* Command Queue APIs */
88 clCreateCommandQueue, (cl_context /* context */,
89 cl_device_id /* device */,
90 cl_command_queue_properties /* properties */,
91 cl_int * /* errcode_ret */));
92
94 clRetainCommandQueue, (cl_command_queue /* command_queue */));
95
97 clReleaseCommandQueue, (cl_command_queue /* command_queue */));
98
100 clGetCommandQueueInfo, (cl_command_queue /* command_queue */,
101 cl_command_queue_info /* param_name */,
102 size_t /* param_value_size */,
103 void * /* param_value */,
104 size_t * /* param_value_size_ret */));
105
106/* Memory Object APIs */
108 clCreateBuffer, (cl_context /* context */,
109 cl_mem_flags /* flags */,
110 size_t /* size */,
111 void * /* host_ptr */,
112 cl_int * /* errcode_ret */));
113
115 clCreateSubBuffer, (cl_mem /* buffer */,
116 cl_mem_flags /* flags */,
117 cl_buffer_create_type /* buffer_create_type */,
118 const void * /* buffer_create_info */,
119 cl_int * /* errcode_ret */));
120
122 clCreateImage, (cl_context /* context */,
123 cl_mem_flags /* flags */,
124 const cl_image_format * /* image_format */,
125 const cl_image_desc * /* image_desc */,
126 void * /* host_ptr */,
127 cl_int * /* errcode_ret */));
128
130 clRetainMemObject, (cl_mem /* memobj */));
131
133 clReleaseMemObject, (cl_mem /* memobj */));
134
136 clGetSupportedImageFormats, (cl_context /* context */,
137 cl_mem_flags /* flags */,
138 cl_mem_object_type /* image_type */,
139 cl_uint /* num_entries */,
140 cl_image_format * /* image_formats */,
141 cl_uint * /* num_image_formats */));
142
144 clGetMemObjectInfo, (cl_mem /* memobj */,
145 cl_mem_info /* param_name */,
146 size_t /* param_value_size */,
147 void * /* param_value */,
148 size_t * /* param_value_size_ret */));
149
151 clGetImageInfo, (cl_mem /* image */,
152 cl_image_info /* param_name */,
153 size_t /* param_value_size */,
154 void * /* param_value */,
155 size_t * /* param_value_size_ret */));
156
158 clSetMemObjectDestructorCallback, (cl_mem /* memobj */,
159 void (CL_CALLBACK * /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/),
160 void * /*user_data */ ));
161
162/* Program Object APIs */
164 clCreateProgramWithSource, (cl_context /* context */,
165 cl_uint /* count */,
166 const char ** /* strings */,
167 const size_t * /* lengths */,
168 cl_int * /* errcode_ret */));
170 clRetainProgram, (cl_program /* program */));
171
173 clReleaseProgram, (cl_program /* program */));
174
176 clBuildProgram, (cl_program /* program */,
177 cl_uint /* num_devices */,
178 const cl_device_id * /* device_list */,
179 const char * /* options */,
180 void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */),
181 void * /* user_data */));
182
184 clGetProgramBuildInfo, (cl_program /* program */,
185 cl_device_id /* device */,
186 cl_program_build_info /* param_name */,
187 size_t /* param_value_size */,
188 void * /* param_value */,
189 size_t * /* param_value_size_ret */));
190
191/* Kernel Object APIs */
193 clCreateKernel, (cl_program /* program */,
194 const char * /* kernel_name */,
195 cl_int * /* errcode_ret */));
196
198 clRetainKernel, (cl_kernel /* kernel */));
199
201 clReleaseKernel, (cl_kernel /* kernel */));
202
204 clSetKernelArg, (cl_kernel /* kernel */,
205 cl_uint /* arg_index */,
206 size_t /* arg_size */,
207 const void * /* arg_value */));
208
209/* Flush and Finish APIs */
211 clFlush, (cl_command_queue /* command_queue */));
212
214 clFinish, (cl_command_queue /* command_queue */));
215
216/* Enqueued Commands APIs */
218 clEnqueueReadBuffer, (cl_command_queue /* command_queue */,
219 cl_mem /* buffer */,
220 cl_bool /* blocking_read */,
221 size_t /* offset */,
222 size_t /* size */,
223 void * /* ptr */,
224 cl_uint /* num_events_in_wait_list */,
225 const cl_event * /* event_wait_list */,
226 cl_event * /* event */));
227
229 clEnqueueReadBufferRect, (cl_command_queue /* command_queue */,
230 cl_mem /* buffer */,
231 cl_bool /* blocking_read */,
232 const size_t * /* buffer_offset */,
233 const size_t * /* host_offset */,
234 const size_t * /* region */,
235 size_t /* buffer_row_pitch */,
236 size_t /* buffer_slice_pitch */,
237 size_t /* host_row_pitch */,
238 size_t /* host_slice_pitch */,
239 void * /* ptr */,
240 cl_uint /* num_events_in_wait_list */,
241 const cl_event * /* event_wait_list */,
242 cl_event * /* event */));
243
245 clEnqueueWriteBuffer, (cl_command_queue /* command_queue */,
246 cl_mem /* buffer */,
247 cl_bool /* blocking_write */,
248 size_t /* offset */,
249 size_t /* size */,
250 const void * /* ptr */,
251 cl_uint /* num_events_in_wait_list */,
252 const cl_event * /* event_wait_list */,
253 cl_event * /* event */));
254
256 clEnqueueWriteBufferRect, (cl_command_queue /* command_queue */,
257 cl_mem /* buffer */,
258 cl_bool /* blocking_write */,
259 const size_t * /* buffer_offset */,
260 const size_t * /* host_offset */,
261 const size_t * /* region */,
262 size_t /* buffer_row_pitch */,
263 size_t /* buffer_slice_pitch */,
264 size_t /* host_row_pitch */,
265 size_t /* host_slice_pitch */,
266 const void * /* ptr */,
267 cl_uint /* num_events_in_wait_list */,
268 const cl_event * /* event_wait_list */,
269 cl_event * /* event */));
270
271
273 clEnqueueCopyBuffer, (cl_command_queue /* command_queue */,
274 cl_mem /* src_buffer */,
275 cl_mem /* dst_buffer */,
276 size_t /* src_offset */,
277 size_t /* dst_offset */,
278 size_t /* cb */,
279 cl_uint /* num_events_in_wait_list */,
280 const cl_event * /* event_wait_list */,
281 cl_event * /* event */));
282
284 clEnqueueReadImage, (cl_command_queue /* command_queue */,
285 cl_mem /* image */,
286 cl_bool /* blocking_read */,
287 const size_t * /* origin[3] */,
288 const size_t * /* region[3] */,
289 size_t /* row_pitch */,
290 size_t /* slice_pitch */,
291 void * /* ptr */,
292 cl_uint /* num_events_in_wait_list */,
293 const cl_event * /* event_wait_list */,
294 cl_event * /* event */));
295
297 clEnqueueWriteImage, (cl_command_queue /* command_queue */,
298 cl_mem /* image */,
299 cl_bool /* blocking_write */,
300 const size_t * /* origin[3] */,
301 const size_t * /* region[3] */,
302 size_t /* input_row_pitch */,
303 size_t /* input_slice_pitch */,
304 const void * /* ptr */,
305 cl_uint /* num_events_in_wait_list */,
306 const cl_event * /* event_wait_list */,
307 cl_event * /* event */));
308
309CL_FN(void *,
310 clEnqueueMapBuffer, (cl_command_queue /* command_queue */,
311 cl_mem /* buffer */,
312 cl_bool /* blocking_map */,
313 cl_map_flags /* map_flags */,
314 size_t /* offset */,
315 size_t /* size */,
316 cl_uint /* num_events_in_wait_list */,
317 const cl_event * /* event_wait_list */,
318 cl_event * /* event */,
319 cl_int * /* errcode_ret */));
320
321CL_FN(void *,
322 clEnqueueMapImage, (cl_command_queue /* command_queue */,
323 cl_mem /* image */,
324 cl_bool /* blocking_map */,
325 cl_map_flags /* map_flags */,
326 const size_t * /* origin[3] */,
327 const size_t * /* region[3] */,
328 size_t * /* image_row_pitch */,
329 size_t * /* image_slice_pitch */,
330 cl_uint /* num_events_in_wait_list */,
331 const cl_event * /* event_wait_list */,
332 cl_event * /* event */,
333 cl_int * /* errcode_ret */));
334
336 clEnqueueUnmapMemObject, (cl_command_queue /* command_queue */,
337 cl_mem /* memobj */,
338 void * /* mapped_ptr */,
339 cl_uint /* num_events_in_wait_list */,
340 const cl_event * /* event_wait_list */,
341 cl_event * /* event */));
342
344 clEnqueueNDRangeKernel, (cl_command_queue /* command_queue */,
345 cl_kernel /* kernel */,
346 cl_uint /* work_dim */,
347 const size_t * /* global_work_offset */,
348 const size_t * /* global_work_size */,
349 const size_t * /* local_work_size */,
350 cl_uint /* num_events_in_wait_list */,
351 const cl_event * /* event_wait_list */,
352 cl_event * /* event */));
353
354#undef CL_FN
355#undef CL_12_FN
356
357// clang-format on
#define CL_FN(ret, fn, args)
Definition cl_functions.h:9
#define CL_12_FN(ret, fn, args)
cl_uint cl_context_info
Definition mini_cl.h:79
#define CL_CALLBACK
Definition mini_cl.h:32
struct _cl_event * cl_event
Definition mini_cl.h:62
struct _cl_platform_id * cl_platform_id
Definition mini_cl.h:55
cl_uint cl_program_build_info
Definition mini_cl.h:94
cl_bitfield cl_mem_flags
Definition mini_cl.h:83
intptr_t cl_context_properties
Definition mini_cl.h:78
int32_t cl_int
Definition mini_cl.h:44
cl_bitfield cl_device_type
Definition mini_cl.h:67
struct _cl_program * cl_program
Definition mini_cl.h:60
uint32_t cl_uint
Definition mini_cl.h:45
cl_uint cl_command_queue_info
Definition mini_cl.h:80
cl_bitfield cl_map_flags
Definition mini_cl.h:92
cl_uint cl_mem_object_type
Definition mini_cl.h:84
cl_uint cl_bool
Definition mini_cl.h:65
cl_uint cl_buffer_create_type
Definition mini_cl.h:88
struct _cl_context * cl_context
Definition mini_cl.h:57
cl_uint cl_image_info
Definition mini_cl.h:87
cl_uint cl_device_info
Definition mini_cl.h:69
struct _cl_device_id * cl_device_id
Definition mini_cl.h:56
struct _cl_command_queue * cl_command_queue
Definition mini_cl.h:58
struct _cl_kernel * cl_kernel
Definition mini_cl.h:61
cl_uint cl_platform_info
Definition mini_cl.h:68
cl_bitfield cl_command_queue_properties
Definition mini_cl.h:74
struct _cl_mem * cl_mem
Definition mini_cl.h:59
intptr_t cl_device_partition_property
Definition mini_cl.h:75
cl_uint cl_mem_info
Definition mini_cl.h:85