1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
// Copyright (c) 2023 Via Technology Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//! FFI bindings for [cl_function_types.h](https://github.com/KhronosGroup/OpenCL-Headers/blob/main/CL/cl_function_types.h)

#![allow(non_camel_case_types)]

pub use super::cl::{
    cl_addressing_mode, cl_bitfield, cl_bool, cl_buffer_create_type, cl_channel_type,
    cl_command_queue, cl_command_queue_info, cl_command_queue_properties, cl_command_type,
    cl_context, cl_context_info, cl_context_properties, cl_device_id, cl_device_info,
    cl_device_partition_property, cl_device_type, cl_event, cl_event_info, cl_filter_mode,
    cl_image_desc, cl_image_format, cl_image_info, cl_kernel, cl_kernel_arg_info,
    cl_kernel_exec_info, cl_kernel_info, cl_kernel_sub_group_info, cl_kernel_work_group_info,
    cl_map_flags, cl_mem, cl_mem_flags, cl_mem_info, cl_mem_migration_flags, cl_mem_object_type,
    cl_mem_properties, cl_pipe_info, cl_pipe_properties, cl_platform_id, cl_platform_info,
    cl_profiling_info, cl_program, cl_program_build_info, cl_program_info, cl_properties,
    cl_queue_properties, cl_sampler, cl_sampler_info, cl_sampler_properties, cl_svm_mem_flags,
};
use super::cl_platform::{cl_int, cl_uint, cl_ulong};
use libc::{c_char, c_void, size_t};

pub type clGetPlatformIDs_t = Option<
    unsafe extern "C" fn(
        num_entries: cl_uint,
        platforms: *mut cl_platform_id,
        num_platforms: *mut cl_uint,
    ) -> cl_int,
>;
pub type clGetPlatformIDs_fn = clGetPlatformIDs_t;

pub type clGetPlatformInfo_t = Option<
    unsafe extern "C" fn(
        platform: cl_platform_id,
        param_name: cl_platform_info,
        param_value_size: size_t,
        param_value: *mut c_void,
        param_value_size_ret: *mut size_t,
    ) -> cl_int,
>;
pub type clGetPlatformInfo_fn = clGetPlatformInfo_t;

pub type clGetDeviceIDs_t = Option<
    unsafe extern "C" fn(
        platform: cl_platform_id,
        device_type: cl_device_type,
        num_entries: cl_uint,
        devices: *mut cl_device_id,
        num_devices: *mut cl_uint,
    ) -> cl_int,
>;
pub type clGetDeviceIDs_fn = clGetDeviceIDs_t;

pub type clGetDeviceInfo_t = Option<
    unsafe extern "C" fn(
        device: cl_device_id,
        param_name: cl_device_info,
        param_value_size: size_t,
        param_value: *mut c_void,
        param_value_size_ret: *mut size_t,
    ) -> cl_int,
>;
pub type clGetDeviceInfo_fn = clGetDeviceInfo_t;

pub type clCreateContext_t = Option<
    unsafe extern "C" fn(
        properties: *const cl_context_properties,
        num_devices: cl_uint,
        devices: *const cl_device_id,
        pfn_notify: Option<
            unsafe extern "C" fn(
                errinfo: *const c_char,
                private_info: *const c_void,
                cb: size_t,
                user_data: *mut c_void,
            ),
        >,
        user_data: *mut c_void,
        errcode_ret: *mut cl_int,
    ) -> cl_context,
>;
pub type clCreateContext_fn = clCreateContext_t;

pub type clCreateContextFromType_t = Option<
    unsafe extern "C" fn(
        properties: *const cl_context_properties,
        device_type: cl_device_type,
        pfn_notify: Option<
            unsafe extern "C" fn(
                errinfo: *const c_char,
                private_info: *const c_void,
                cb: size_t,
                user_data: *mut c_void,
            ),
        >,
        user_data: *mut c_void,
        errcode_ret: *mut cl_int,
    ) -> cl_context,
>;
pub type clCreateContextFromType_fn = clCreateContextFromType_t;

pub type clRetainContext_t = Option<unsafe extern "C" fn(context: cl_context) -> cl_int>;
pub type clRetainContext_fn = clRetainContext_t;

pub type clReleaseContext_t = Option<unsafe extern "C" fn(context: cl_context) -> cl_int>;
pub type clReleaseContext_fn = clReleaseContext_t;

pub type clGetContextInfo_t = Option<
    unsafe extern "C" fn(
        context: cl_context,
        param_name: cl_context_info,
        param_value_size: size_t,
        param_value: *mut c_void,
        param_value_size_ret: *mut size_t,
    ) -> cl_int,
>;
pub type clGetContextInfo_fn = clGetContextInfo_t;

pub type clRetainCommandQueue_t =
    Option<unsafe extern "C" fn(command_queue: cl_command_queue) -> cl_int>;
pub type clRetainCommandQueue_fn = clRetainCommandQueue_t;

pub type clReleaseCommandQueue_t =
    Option<unsafe extern "C" fn(command_queue: cl_command_queue) -> cl_int>;
pub type clReleaseCommandQueue_fn = clReleaseCommandQueue_t;

pub type clGetCommandQueueInfo_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        param_name: cl_command_queue_info,
        param_value_size: size_t,
        param_value: *mut c_void,
        param_value_size_ret: *mut size_t,
    ) -> cl_int,
>;
pub type clGetCommandQueueInfo_fn = clGetCommandQueueInfo_t;

pub type clCreateBuffer_t = Option<
    unsafe extern "C" fn(
        context: cl_context,
        flags: cl_mem_flags,
        size: size_t,
        host_ptr: *mut c_void,
        errcode_ret: *mut cl_int,
    ) -> cl_mem,
>;
pub type clCreateBuffer_fn = clCreateBuffer_t;

pub type clRetainMemObject_t = Option<unsafe extern "C" fn(memobj: cl_mem) -> cl_int>;
pub type clRetainMemObject_fn = clRetainMemObject_t;

pub type clReleaseMemObject_t = Option<unsafe extern "C" fn(memobj: cl_mem) -> cl_int>;
pub type clReleaseMemObject_fn = clReleaseMemObject_t;

pub type clGetSupportedImageFormats_t = Option<
    unsafe extern "C" fn(
        context: cl_context,
        flags: cl_mem_flags,
        image_type: cl_mem_object_type,
        num_entries: cl_uint,
        image_formats: *mut cl_image_format,
        num_image_formats: *mut cl_uint,
    ) -> cl_int,
>;
pub type clGetSupportedImageFormats_fn = clGetSupportedImageFormats_t;

pub type clGetMemObjectInfo_t = Option<
    unsafe extern "C" fn(
        memobj: cl_mem,
        param_name: cl_mem_info,
        param_value_size: size_t,
        param_value: *mut c_void,
        param_value_size_ret: *mut size_t,
    ) -> cl_int,
>;
pub type clGetMemObjectInfo_fn = clGetMemObjectInfo_t;

pub type clGetImageInfo_t = Option<
    unsafe extern "C" fn(
        image: cl_mem,
        param_name: cl_image_info,
        param_value_size: size_t,
        param_value: *mut c_void,
        param_value_size_ret: *mut size_t,
    ) -> cl_int,
>;
pub type clGetImageInfo_fn = clGetImageInfo_t;

pub type clRetainSampler_t = Option<unsafe extern "C" fn(sampler: cl_sampler) -> cl_int>;
pub type clRetainSampler_fn = clRetainSampler_t;

pub type clReleaseSampler_t = Option<unsafe extern "C" fn(sampler: cl_sampler) -> cl_int>;
pub type clReleaseSampler_fn = clReleaseSampler_t;

pub type clGetSamplerInfo_t = Option<
    unsafe extern "C" fn(
        sampler: cl_sampler,
        param_name: cl_sampler_info,
        param_value_size: size_t,
        param_value: *mut c_void,
        param_value_size_ret: *mut size_t,
    ) -> cl_int,
>;
pub type clGetSamplerInfo_fn = clGetSamplerInfo_t;

pub type clCreateProgramWithSource_t = Option<
    unsafe extern "C" fn(
        context: cl_context,
        count: cl_uint,
        strings: *mut *const c_char,
        lengths: *const size_t,
        errcode_ret: *mut cl_int,
    ) -> cl_program,
>;
pub type clCreateProgramWithSource_fn = clCreateProgramWithSource_t;

pub type clCreateProgramWithBinary_t = Option<
    unsafe extern "C" fn(
        context: cl_context,
        num_devices: cl_uint,
        device_list: *const cl_device_id,
        lengths: *const size_t,
        binaries: *mut *const ::core::ffi::c_uchar,
        binary_status: *mut cl_int,
        errcode_ret: *mut cl_int,
    ) -> cl_program,
>;
pub type clCreateProgramWithBinary_fn = clCreateProgramWithBinary_t;

pub type clRetainProgram_t = Option<unsafe extern "C" fn(program: cl_program) -> cl_int>;
pub type clRetainProgram_fn = clRetainProgram_t;

pub type clReleaseProgram_t = Option<unsafe extern "C" fn(program: cl_program) -> cl_int>;
pub type clReleaseProgram_fn = clReleaseProgram_t;

pub type clBuildProgram_t = Option<
    unsafe extern "C" fn(
        program: cl_program,
        num_devices: cl_uint,
        device_list: *const cl_device_id,
        options: *const c_char,
        pfn_notify: Option<unsafe extern "C" fn(program: cl_program, user_data: *mut c_void)>,
        user_data: *mut c_void,
    ) -> cl_int,
>;
pub type clBuildProgram_fn = clBuildProgram_t;

pub type clGetProgramInfo_t = Option<
    unsafe extern "C" fn(
        program: cl_program,
        param_name: cl_program_info,
        param_value_size: size_t,
        param_value: *mut c_void,
        param_value_size_ret: *mut size_t,
    ) -> cl_int,
>;
pub type clGetProgramInfo_fn = clGetProgramInfo_t;

pub type clGetProgramBuildInfo_t = Option<
    unsafe extern "C" fn(
        program: cl_program,
        device: cl_device_id,
        param_name: cl_program_build_info,
        param_value_size: size_t,
        param_value: *mut c_void,
        param_value_size_ret: *mut size_t,
    ) -> cl_int,
>;
pub type clGetProgramBuildInfo_fn = clGetProgramBuildInfo_t;

pub type clCreateKernel_t = Option<
    unsafe extern "C" fn(
        program: cl_program,
        kernel_name: *const c_char,
        errcode_ret: *mut cl_int,
    ) -> cl_kernel,
>;
pub type clCreateKernel_fn = clCreateKernel_t;

pub type clCreateKernelsInProgram_t = Option<
    unsafe extern "C" fn(
        program: cl_program,
        num_kernels: cl_uint,
        kernels: *mut cl_kernel,
        num_kernels_ret: *mut cl_uint,
    ) -> cl_int,
>;
pub type clCreateKernelsInProgram_fn = clCreateKernelsInProgram_t;

pub type clRetainKernel_t = Option<unsafe extern "C" fn(kernel: cl_kernel) -> cl_int>;
pub type clRetainKernel_fn = clRetainKernel_t;

pub type clReleaseKernel_t = Option<unsafe extern "C" fn(kernel: cl_kernel) -> cl_int>;
pub type clReleaseKernel_fn = clReleaseKernel_t;

pub type clSetKernelArg_t = Option<
    unsafe extern "C" fn(
        kernel: cl_kernel,
        arg_index: cl_uint,
        arg_size: size_t,
        arg_value: *const c_void,
    ) -> cl_int,
>;
pub type clSetKernelArg_fn = clSetKernelArg_t;

pub type clGetKernelInfo_t = Option<
    unsafe extern "C" fn(
        kernel: cl_kernel,
        param_name: cl_kernel_info,
        param_value_size: size_t,
        param_value: *mut c_void,
        param_value_size_ret: *mut size_t,
    ) -> cl_int,
>;
pub type clGetKernelInfo_fn = clGetKernelInfo_t;

pub type clGetKernelWorkGroupInfo_t = Option<
    unsafe extern "C" fn(
        kernel: cl_kernel,
        device: cl_device_id,
        param_name: cl_kernel_work_group_info,
        param_value_size: size_t,
        param_value: *mut c_void,
        param_value_size_ret: *mut size_t,
    ) -> cl_int,
>;
pub type clGetKernelWorkGroupInfo_fn = clGetKernelWorkGroupInfo_t;

pub type clWaitForEvents_t =
    Option<unsafe extern "C" fn(num_events: cl_uint, event_list: *const cl_event) -> cl_int>;
pub type clWaitForEvents_fn = clWaitForEvents_t;

pub type clGetEventInfo_t = Option<
    unsafe extern "C" fn(
        event: cl_event,
        param_name: cl_event_info,
        param_value_size: size_t,
        param_value: *mut c_void,
        param_value_size_ret: *mut size_t,
    ) -> cl_int,
>;
pub type clGetEventInfo_fn = clGetEventInfo_t;

pub type clRetainEvent_t = Option<unsafe extern "C" fn(event: cl_event) -> cl_int>;
pub type clRetainEvent_fn = clRetainEvent_t;

pub type clReleaseEvent_t = Option<unsafe extern "C" fn(event: cl_event) -> cl_int>;
pub type clReleaseEvent_fn = clReleaseEvent_t;

pub type clGetEventProfilingInfo_t = Option<
    unsafe extern "C" fn(
        event: cl_event,
        param_name: cl_profiling_info,
        param_value_size: size_t,
        param_value: *mut c_void,
        param_value_size_ret: *mut size_t,
    ) -> cl_int,
>;
pub type clGetEventProfilingInfo_fn = clGetEventProfilingInfo_t;

pub type clFlush_t = Option<unsafe extern "C" fn(command_queue: cl_command_queue) -> cl_int>;
pub type clFlush_fn = clFlush_t;

pub type clFinish_t = Option<unsafe extern "C" fn(command_queue: cl_command_queue) -> cl_int>;
pub type clFinish_fn = clFinish_t;

pub type clEnqueueReadBuffer_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        buffer: cl_mem,
        blocking_read: cl_bool,
        offset: size_t,
        size: size_t,
        ptr: *mut c_void,
        num_events_in_wait_list: cl_uint,
        event_wait_list: *const cl_event,
        event: *mut cl_event,
    ) -> cl_int,
>;
pub type clEnqueueReadBuffer_fn = clEnqueueReadBuffer_t;

pub type clEnqueueWriteBuffer_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        buffer: cl_mem,
        blocking_write: cl_bool,
        offset: size_t,
        size: size_t,
        ptr: *const c_void,
        num_events_in_wait_list: cl_uint,
        event_wait_list: *const cl_event,
        event: *mut cl_event,
    ) -> cl_int,
>;
pub type clEnqueueWriteBuffer_fn = clEnqueueWriteBuffer_t;

pub type clEnqueueCopyBuffer_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        src_buffer: cl_mem,
        dst_buffer: cl_mem,
        src_offset: size_t,
        dst_offset: size_t,
        size: size_t,
        num_events_in_wait_list: cl_uint,
        event_wait_list: *const cl_event,
        event: *mut cl_event,
    ) -> cl_int,
>;
pub type clEnqueueCopyBuffer_fn = clEnqueueCopyBuffer_t;

pub type clEnqueueReadImage_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        image: cl_mem,
        blocking_read: cl_bool,
        origin: *const size_t,
        region: *const size_t,
        row_pitch: size_t,
        slice_pitch: size_t,
        ptr: *mut c_void,
        num_events_in_wait_list: cl_uint,
        event_wait_list: *const cl_event,
        event: *mut cl_event,
    ) -> cl_int,
>;
pub type clEnqueueReadImage_fn = clEnqueueReadImage_t;

pub type clEnqueueWriteImage_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        image: cl_mem,
        blocking_write: cl_bool,
        origin: *const size_t,
        region: *const size_t,
        input_row_pitch: size_t,
        input_slice_pitch: size_t,
        ptr: *const c_void,
        num_events_in_wait_list: cl_uint,
        event_wait_list: *const cl_event,
        event: *mut cl_event,
    ) -> cl_int,
>;
pub type clEnqueueWriteImage_fn = clEnqueueWriteImage_t;

pub type clEnqueueCopyImage_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        src_image: cl_mem,
        dst_image: cl_mem,
        src_origin: *const size_t,
        dst_origin: *const size_t,
        region: *const size_t,
        num_events_in_wait_list: cl_uint,
        event_wait_list: *const cl_event,
        event: *mut cl_event,
    ) -> cl_int,
>;
pub type clEnqueueCopyImage_fn = clEnqueueCopyImage_t;

pub type clEnqueueCopyImageToBuffer_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        src_image: cl_mem,
        dst_buffer: cl_mem,
        src_origin: *const size_t,
        region: *const size_t,
        dst_offset: size_t,
        num_events_in_wait_list: cl_uint,
        event_wait_list: *const cl_event,
        event: *mut cl_event,
    ) -> cl_int,
>;
pub type clEnqueueCopyImageToBuffer_fn = clEnqueueCopyImageToBuffer_t;

pub type clEnqueueCopyBufferToImage_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        src_buffer: cl_mem,
        dst_image: cl_mem,
        src_offset: size_t,
        dst_origin: *const size_t,
        region: *const size_t,
        num_events_in_wait_list: cl_uint,
        event_wait_list: *const cl_event,
        event: *mut cl_event,
    ) -> cl_int,
>;
pub type clEnqueueCopyBufferToImage_fn = clEnqueueCopyBufferToImage_t;

pub type clEnqueueMapBuffer_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        buffer: cl_mem,
        blocking_map: cl_bool,
        map_flags: cl_map_flags,
        offset: size_t,
        size: size_t,
        num_events_in_wait_list: cl_uint,
        event_wait_list: *const cl_event,
        event: *mut cl_event,
        errcode_ret: *mut cl_int,
    ) -> *mut c_void,
>;
pub type clEnqueueMapBuffer_fn = clEnqueueMapBuffer_t;

pub type clEnqueueMapImage_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        image: cl_mem,
        blocking_map: cl_bool,
        map_flags: cl_map_flags,
        origin: *const size_t,
        region: *const size_t,
        image_row_pitch: *mut size_t,
        image_slice_pitch: *mut size_t,
        num_events_in_wait_list: cl_uint,
        event_wait_list: *const cl_event,
        event: *mut cl_event,
        errcode_ret: *mut cl_int,
    ) -> *mut c_void,
>;
pub type clEnqueueMapImage_fn = clEnqueueMapImage_t;

pub type clEnqueueUnmapMemObject_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        memobj: cl_mem,
        mapped_ptr: *mut c_void,
        num_events_in_wait_list: cl_uint,
        event_wait_list: *const cl_event,
        event: *mut cl_event,
    ) -> cl_int,
>;
pub type clEnqueueUnmapMemObject_fn = clEnqueueUnmapMemObject_t;

pub type clEnqueueNDRangeKernel_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        kernel: cl_kernel,
        work_dim: cl_uint,
        global_work_offset: *const size_t,
        global_work_size: *const size_t,
        local_work_size: *const size_t,
        num_events_in_wait_list: cl_uint,
        event_wait_list: *const cl_event,
        event: *mut cl_event,
    ) -> cl_int,
>;
pub type clEnqueueNDRangeKernel_fn = clEnqueueNDRangeKernel_t;

pub type clEnqueueNativeKernel_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        user_func: Option<unsafe extern "C" fn(arg1: *mut c_void)>,
        args: *mut c_void,
        cb_args: size_t,
        num_mem_objects: cl_uint,
        mem_list: *const cl_mem,
        args_mem_loc: *mut *const c_void,
        num_events_in_wait_list: cl_uint,
        event_wait_list: *const cl_event,
        event: *mut cl_event,
    ) -> cl_int,
>;
pub type clEnqueueNativeKernel_fn = clEnqueueNativeKernel_t;

pub type clSetCommandQueueProperty_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        properties: cl_command_queue_properties,
        enable: cl_bool,
        old_properties: *mut cl_command_queue_properties,
    ) -> cl_int,
>;
pub type clSetCommandQueueProperty_fn = clSetCommandQueueProperty_t;

pub type clCreateImage2D_t = Option<
    unsafe extern "C" fn(
        context: cl_context,
        flags: cl_mem_flags,
        image_format: *const cl_image_format,
        image_width: size_t,
        image_height: size_t,
        image_row_pitch: size_t,
        host_ptr: *mut c_void,
        errcode_ret: *mut cl_int,
    ) -> cl_mem,
>;
pub type clCreateImage2D_fn = clCreateImage2D_t;

pub type clCreateImage3D_t = Option<
    unsafe extern "C" fn(
        context: cl_context,
        flags: cl_mem_flags,
        image_format: *const cl_image_format,
        image_width: size_t,
        image_height: size_t,
        image_depth: size_t,
        image_row_pitch: size_t,
        image_slice_pitch: size_t,
        host_ptr: *mut c_void,
        errcode_ret: *mut cl_int,
    ) -> cl_mem,
>;
pub type clCreateImage3D_fn = clCreateImage3D_t;

pub type clEnqueueMarker_t =
    Option<unsafe extern "C" fn(command_queue: cl_command_queue, event: *mut cl_event) -> cl_int>;
pub type clEnqueueMarker_fn = clEnqueueMarker_t;

pub type clEnqueueWaitForEvents_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        num_events: cl_uint,
        event_list: *const cl_event,
    ) -> cl_int,
>;
pub type clEnqueueWaitForEvents_fn = clEnqueueWaitForEvents_t;

pub type clEnqueueBarrier_t =
    Option<unsafe extern "C" fn(command_queue: cl_command_queue) -> cl_int>;
pub type clEnqueueBarrier_fn = clEnqueueBarrier_t;

pub type clUnloadCompiler_t = Option<unsafe extern "C" fn() -> cl_int>;
pub type clUnloadCompiler_fn = clUnloadCompiler_t;

pub type clGetExtensionFunctionAddress_t =
    Option<unsafe extern "C" fn(func_name: *const c_char) -> *mut c_void>;
pub type clGetExtensionFunctionAddress_fn = clGetExtensionFunctionAddress_t;

pub type clCreateCommandQueue_t = Option<
    unsafe extern "C" fn(
        context: cl_context,
        device: cl_device_id,
        properties: cl_command_queue_properties,
        errcode_ret: *mut cl_int,
    ) -> cl_command_queue,
>;
pub type clCreateCommandQueue_fn = clCreateCommandQueue_t;

pub type clCreateSampler_t = Option<
    unsafe extern "C" fn(
        context: cl_context,
        normalized_coords: cl_bool,
        addressing_mode: cl_addressing_mode,
        filter_mode: cl_filter_mode,
        errcode_ret: *mut cl_int,
    ) -> cl_sampler,
>;
pub type clCreateSampler_fn = clCreateSampler_t;

pub type clEnqueueTask_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        kernel: cl_kernel,
        num_events_in_wait_list: cl_uint,
        event_wait_list: *const cl_event,
        event: *mut cl_event,
    ) -> cl_int,
>;
pub type clEnqueueTask_fn = clEnqueueTask_t;

pub type clCreateSubBuffer_t = Option<
    unsafe extern "C" fn(
        buffer: cl_mem,
        flags: cl_mem_flags,
        buffer_create_type: cl_buffer_create_type,
        buffer_create_info: *const c_void,
        errcode_ret: *mut cl_int,
    ) -> cl_mem,
>;
pub type clCreateSubBuffer_fn = clCreateSubBuffer_t;

pub type clSetMemObjectDestructorCallback_t = Option<
    unsafe extern "C" fn(
        memobj: cl_mem,
        pfn_notify: Option<unsafe extern "C" fn(memobj: cl_mem, user_data: *mut c_void)>,
        user_data: *mut c_void,
    ) -> cl_int,
>;
pub type clSetMemObjectDestructorCallback_fn = clSetMemObjectDestructorCallback_t;

pub type clCreateUserEvent_t =
    Option<unsafe extern "C" fn(context: cl_context, errcode_ret: *mut cl_int) -> cl_event>;
pub type clCreateUserEvent_fn = clCreateUserEvent_t;

pub type clSetUserEventStatus_t =
    Option<unsafe extern "C" fn(event: cl_event, execution_status: cl_int) -> cl_int>;
pub type clSetUserEventStatus_fn = clSetUserEventStatus_t;

pub type clSetEventCallback_t = Option<
    unsafe extern "C" fn(
        event: cl_event,
        command_exec_callback_type: cl_int,
        pfn_notify: Option<
            unsafe extern "C" fn(
                event: cl_event,
                event_command_status: cl_int,
                user_data: *mut c_void,
            ),
        >,
        user_data: *mut c_void,
    ) -> cl_int,
>;
pub type clSetEventCallback_fn = clSetEventCallback_t;

pub type clEnqueueReadBufferRect_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        buffer: cl_mem,
        blocking_read: cl_bool,
        buffer_origin: *const size_t,
        host_origin: *const size_t,
        region: *const size_t,
        buffer_row_pitch: size_t,
        buffer_slice_pitch: size_t,
        host_row_pitch: size_t,
        host_slice_pitch: size_t,
        ptr: *mut c_void,
        num_events_in_wait_list: cl_uint,
        event_wait_list: *const cl_event,
        event: *mut cl_event,
    ) -> cl_int,
>;
pub type clEnqueueReadBufferRect_fn = clEnqueueReadBufferRect_t;

pub type clEnqueueWriteBufferRect_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        buffer: cl_mem,
        blocking_write: cl_bool,
        buffer_origin: *const size_t,
        host_origin: *const size_t,
        region: *const size_t,
        buffer_row_pitch: size_t,
        buffer_slice_pitch: size_t,
        host_row_pitch: size_t,
        host_slice_pitch: size_t,
        ptr: *const c_void,
        num_events_in_wait_list: cl_uint,
        event_wait_list: *const cl_event,
        event: *mut cl_event,
    ) -> cl_int,
>;
pub type clEnqueueWriteBufferRect_fn = clEnqueueWriteBufferRect_t;

pub type clEnqueueCopyBufferRect_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        src_buffer: cl_mem,
        dst_buffer: cl_mem,
        src_origin: *const size_t,
        dst_origin: *const size_t,
        region: *const size_t,
        src_row_pitch: size_t,
        src_slice_pitch: size_t,
        dst_row_pitch: size_t,
        dst_slice_pitch: size_t,
        num_events_in_wait_list: cl_uint,
        event_wait_list: *const cl_event,
        event: *mut cl_event,
    ) -> cl_int,
>;
pub type clEnqueueCopyBufferRect_fn = clEnqueueCopyBufferRect_t;

pub type clCreateSubDevices_t = Option<
    unsafe extern "C" fn(
        in_device: cl_device_id,
        properties: *const cl_device_partition_property,
        num_devices: cl_uint,
        out_devices: *mut cl_device_id,
        num_devices_ret: *mut cl_uint,
    ) -> cl_int,
>;
pub type clCreateSubDevices_fn = clCreateSubDevices_t;

pub type clRetainDevice_t = Option<unsafe extern "C" fn(device: cl_device_id) -> cl_int>;
pub type clRetainDevice_fn = clRetainDevice_t;

pub type clReleaseDevice_t = Option<unsafe extern "C" fn(device: cl_device_id) -> cl_int>;
pub type clReleaseDevice_fn = clReleaseDevice_t;

pub type clCreateImage_t = Option<
    unsafe extern "C" fn(
        context: cl_context,
        flags: cl_mem_flags,
        image_format: *const cl_image_format,
        image_desc: *const cl_image_desc,
        host_ptr: *mut c_void,
        errcode_ret: *mut cl_int,
    ) -> cl_mem,
>;
pub type clCreateImage_fn = clCreateImage_t;

pub type clCreateProgramWithBuiltInKernels_t = Option<
    unsafe extern "C" fn(
        context: cl_context,
        num_devices: cl_uint,
        device_list: *const cl_device_id,
        kernel_names: *const c_char,
        errcode_ret: *mut cl_int,
    ) -> cl_program,
>;
pub type clCreateProgramWithBuiltInKernels_fn = clCreateProgramWithBuiltInKernels_t;

pub type clCompileProgram_t = Option<
    unsafe extern "C" fn(
        program: cl_program,
        num_devices: cl_uint,
        device_list: *const cl_device_id,
        options: *const c_char,
        num_input_headers: cl_uint,
        input_headers: *const cl_program,
        header_include_names: *mut *const c_char,
        pfn_notify: Option<unsafe extern "C" fn(program: cl_program, user_data: *mut c_void)>,
        user_data: *mut c_void,
    ) -> cl_int,
>;
pub type clCompileProgram_fn = clCompileProgram_t;

pub type clLinkProgram_t = Option<
    unsafe extern "C" fn(
        context: cl_context,
        num_devices: cl_uint,
        device_list: *const cl_device_id,
        options: *const c_char,
        num_input_programs: cl_uint,
        input_programs: *const cl_program,
        pfn_notify: Option<unsafe extern "C" fn(program: cl_program, user_data: *mut c_void)>,
        user_data: *mut c_void,
        errcode_ret: *mut cl_int,
    ) -> cl_program,
>;
pub type clLinkProgram_fn = clLinkProgram_t;

pub type clUnloadPlatformCompiler_t =
    Option<unsafe extern "C" fn(platform: cl_platform_id) -> cl_int>;
pub type clUnloadPlatformCompiler_fn = clUnloadPlatformCompiler_t;

pub type clGetKernelArgInfo_t = Option<
    unsafe extern "C" fn(
        kernel: cl_kernel,
        arg_index: cl_uint,
        param_name: cl_kernel_arg_info,
        param_value_size: size_t,
        param_value: *mut c_void,
        param_value_size_ret: *mut size_t,
    ) -> cl_int,
>;
pub type clGetKernelArgInfo_fn = clGetKernelArgInfo_t;

pub type clEnqueueFillBuffer_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        buffer: cl_mem,
        pattern: *const c_void,
        pattern_size: size_t,
        offset: size_t,
        size: size_t,
        num_events_in_wait_list: cl_uint,
        event_wait_list: *const cl_event,
        event: *mut cl_event,
    ) -> cl_int,
>;
pub type clEnqueueFillBuffer_fn = clEnqueueFillBuffer_t;

pub type clEnqueueFillImage_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        image: cl_mem,
        fill_color: *const c_void,
        origin: *const size_t,
        region: *const size_t,
        num_events_in_wait_list: cl_uint,
        event_wait_list: *const cl_event,
        event: *mut cl_event,
    ) -> cl_int,
>;
pub type clEnqueueFillImage_fn = clEnqueueFillImage_t;

pub type clEnqueueMigrateMemObjects_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        num_mem_objects: cl_uint,
        mem_objects: *const cl_mem,
        flags: cl_mem_migration_flags,
        num_events_in_wait_list: cl_uint,
        event_wait_list: *const cl_event,
        event: *mut cl_event,
    ) -> cl_int,
>;
pub type clEnqueueMigrateMemObjects_fn = clEnqueueMigrateMemObjects_t;

pub type clEnqueueMarkerWithWaitList_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        num_events_in_wait_list: cl_uint,
        event_wait_list: *const cl_event,
        event: *mut cl_event,
    ) -> cl_int,
>;
pub type clEnqueueMarkerWithWaitList_fn = clEnqueueMarkerWithWaitList_t;

pub type clEnqueueBarrierWithWaitList_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        num_events_in_wait_list: cl_uint,
        event_wait_list: *const cl_event,
        event: *mut cl_event,
    ) -> cl_int,
>;
pub type clEnqueueBarrierWithWaitList_fn = clEnqueueBarrierWithWaitList_t;

pub type clGetExtensionFunctionAddressForPlatform_t =
    Option<unsafe extern "C" fn(platform: cl_platform_id, func_name: *const c_char) -> *mut c_void>;
pub type clGetExtensionFunctionAddressForPlatform_fn = clGetExtensionFunctionAddressForPlatform_t;

pub type clCreateCommandQueueWithProperties_t = Option<
    unsafe extern "C" fn(
        context: cl_context,
        device: cl_device_id,
        properties: *const cl_queue_properties,
        errcode_ret: *mut cl_int,
    ) -> cl_command_queue,
>;
pub type clCreateCommandQueueWithProperties_fn = clCreateCommandQueueWithProperties_t;

pub type clCreatePipe_t = Option<
    unsafe extern "C" fn(
        context: cl_context,
        flags: cl_mem_flags,
        pipe_packet_size: cl_uint,
        pipe_max_packets: cl_uint,
        properties: *const cl_pipe_properties,
        errcode_ret: *mut cl_int,
    ) -> cl_mem,
>;
pub type clCreatePipe_fn = clCreatePipe_t;

pub type clGetPipeInfo_t = Option<
    unsafe extern "C" fn(
        pipe: cl_mem,
        param_name: cl_pipe_info,
        param_value_size: size_t,
        param_value: *mut c_void,
        param_value_size_ret: *mut size_t,
    ) -> cl_int,
>;
pub type clGetPipeInfo_fn = clGetPipeInfo_t;

pub type clSVMAlloc_t = Option<
    unsafe extern "C" fn(
        context: cl_context,
        flags: cl_svm_mem_flags,
        size: size_t,
        alignment: cl_uint,
    ) -> *mut c_void,
>;
pub type clSVMAlloc_fn = clSVMAlloc_t;

pub type clSVMFree_t = Option<unsafe extern "C" fn(context: cl_context, svm_pointer: *mut c_void)>;
pub type clSVMFree_fn = clSVMFree_t;

pub type clCreateSamplerWithProperties_t = Option<
    unsafe extern "C" fn(
        context: cl_context,
        sampler_properties: *const cl_sampler_properties,
        errcode_ret: *mut cl_int,
    ) -> cl_sampler,
>;
pub type clCreateSamplerWithProperties_fn = clCreateSamplerWithProperties_t;

pub type clSetKernelArgSVMPointer_t = Option<
    unsafe extern "C" fn(kernel: cl_kernel, arg_index: cl_uint, arg_value: *const c_void) -> cl_int,
>;
pub type clSetKernelArgSVMPointer_fn = clSetKernelArgSVMPointer_t;

pub type clSetKernelExecInfo_t = Option<
    unsafe extern "C" fn(
        kernel: cl_kernel,
        param_name: cl_kernel_exec_info,
        param_value_size: size_t,
        param_value: *const c_void,
    ) -> cl_int,
>;
pub type clSetKernelExecInfo_fn = clSetKernelExecInfo_t;

pub type clEnqueueSVMFree_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        num_svm_pointers: cl_uint,
        svm_pointers: *mut *mut c_void,
        pfn_free_func: Option<
            unsafe extern "C" fn(
                queue: cl_command_queue,
                num_svm_pointers: cl_uint,
                svm_pointers: *mut *mut c_void,
                user_data: *mut c_void,
            ),
        >,
        user_data: *mut c_void,
        num_events_in_wait_list: cl_uint,
        event_wait_list: *const cl_event,
        event: *mut cl_event,
    ) -> cl_int,
>;
pub type clEnqueueSVMFree_fn = clEnqueueSVMFree_t;

pub type clEnqueueSVMMemcpy_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        blocking_copy: cl_bool,
        dst_ptr: *mut c_void,
        src_ptr: *const c_void,
        size: size_t,
        num_events_in_wait_list: cl_uint,
        event_wait_list: *const cl_event,
        event: *mut cl_event,
    ) -> cl_int,
>;
pub type clEnqueueSVMMemcpy_fn = clEnqueueSVMMemcpy_t;

pub type clEnqueueSVMMemFill_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        svm_ptr: *mut c_void,
        pattern: *const c_void,
        pattern_size: size_t,
        size: size_t,
        num_events_in_wait_list: cl_uint,
        event_wait_list: *const cl_event,
        event: *mut cl_event,
    ) -> cl_int,
>;
pub type clEnqueueSVMMemFill_fn = clEnqueueSVMMemFill_t;

pub type clEnqueueSVMMap_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        blocking_map: cl_bool,
        flags: cl_map_flags,
        svm_ptr: *mut c_void,
        size: size_t,
        num_events_in_wait_list: cl_uint,
        event_wait_list: *const cl_event,
        event: *mut cl_event,
    ) -> cl_int,
>;
pub type clEnqueueSVMMap_fn = clEnqueueSVMMap_t;

pub type clEnqueueSVMUnmap_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        svm_ptr: *mut c_void,
        num_events_in_wait_list: cl_uint,
        event_wait_list: *const cl_event,
        event: *mut cl_event,
    ) -> cl_int,
>;
pub type clEnqueueSVMUnmap_fn = clEnqueueSVMUnmap_t;

pub type clSetDefaultDeviceCommandQueue_t = Option<
    unsafe extern "C" fn(
        context: cl_context,
        device: cl_device_id,
        command_queue: cl_command_queue,
    ) -> cl_int,
>;
pub type clSetDefaultDeviceCommandQueue_fn = clSetDefaultDeviceCommandQueue_t;

pub type clGetDeviceAndHostTimer_t = Option<
    unsafe extern "C" fn(
        device: cl_device_id,
        device_timestamp: *mut cl_ulong,
        host_timestamp: *mut cl_ulong,
    ) -> cl_int,
>;
pub type clGetDeviceAndHostTimer_fn = clGetDeviceAndHostTimer_t;

pub type clGetHostTimer_t =
    Option<unsafe extern "C" fn(device: cl_device_id, host_timestamp: *mut cl_ulong) -> cl_int>;
pub type clGetHostTimer_fn = clGetHostTimer_t;

pub type clCreateProgramWithIL_t = Option<
    unsafe extern "C" fn(
        context: cl_context,
        il: *const c_void,
        length: size_t,
        errcode_ret: *mut cl_int,
    ) -> cl_program,
>;
pub type clCreateProgramWithIL_fn = clCreateProgramWithIL_t;

pub type clCloneKernel_t =
    Option<unsafe extern "C" fn(source_kernel: cl_kernel, errcode_ret: *mut cl_int) -> cl_kernel>;
pub type clCloneKernel_fn = clCloneKernel_t;

pub type clGetKernelSubGroupInfo_t = Option<
    unsafe extern "C" fn(
        kernel: cl_kernel,
        device: cl_device_id,
        param_name: cl_kernel_sub_group_info,
        input_value_size: size_t,
        input_value: *const c_void,
        param_value_size: size_t,
        param_value: *mut c_void,
        param_value_size_ret: *mut size_t,
    ) -> cl_int,
>;
pub type clGetKernelSubGroupInfo_fn = clGetKernelSubGroupInfo_t;

pub type clEnqueueSVMMigrateMem_t = Option<
    unsafe extern "C" fn(
        command_queue: cl_command_queue,
        num_svm_pointers: cl_uint,
        svm_pointers: *mut *const c_void,
        sizes: *const size_t,
        flags: cl_mem_migration_flags,
        num_events_in_wait_list: cl_uint,
        event_wait_list: *const cl_event,
        event: *mut cl_event,
    ) -> cl_int,
>;
pub type clEnqueueSVMMigrateMem_fn = clEnqueueSVMMigrateMem_t;

pub type clSetProgramSpecializationConstant_t = Option<
    unsafe extern "C" fn(
        program: cl_program,
        spec_id: cl_uint,
        spec_size: size_t,
        spec_value: *const c_void,
    ) -> cl_int,
>;
pub type clSetProgramSpecializationConstant_fn = clSetProgramSpecializationConstant_t;

pub type clSetProgramReleaseCallback_t = Option<
    unsafe extern "C" fn(
        program: cl_program,
        pfn_notify: Option<unsafe extern "C" fn(program: cl_program, user_data: *mut c_void)>,
        user_data: *mut c_void,
    ) -> cl_int,
>;
pub type clSetProgramReleaseCallback_fn = clSetProgramReleaseCallback_t;

pub type clSetContextDestructorCallback_t = Option<
    unsafe extern "C" fn(
        context: cl_context,
        pfn_notify: Option<unsafe extern "C" fn(context: cl_context, user_data: *mut c_void)>,
        user_data: *mut c_void,
    ) -> cl_int,
>;
pub type clSetContextDestructorCallback_fn = clSetContextDestructorCallback_t;

pub type clCreateBufferWithProperties_t = Option<
    unsafe extern "C" fn(
        context: cl_context,
        properties: *const cl_mem_properties,
        flags: cl_mem_flags,
        size: size_t,
        host_ptr: *mut c_void,
        errcode_ret: *mut cl_int,
    ) -> cl_mem,
>;
pub type clCreateBufferWithProperties_fn = clCreateBufferWithProperties_t;

pub type clCreateImageWithProperties_t = Option<
    unsafe extern "C" fn(
        context: cl_context,
        properties: *const cl_mem_properties,
        flags: cl_mem_flags,
        image_format: *const cl_image_format,
        image_desc: *const cl_image_desc,
        host_ptr: *mut c_void,
        errcode_ret: *mut cl_int,
    ) -> cl_mem,
>;
pub type clCreateImageWithProperties_fn = clCreateImageWithProperties_t;