singe-cuda-sys 0.1.0

Low-level FFI bindings for the CUDA driver and runtime APIs and the CUDA libraries that ship with them, such as NVRTC.
Documentation
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
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
/* automatically generated by rust-bindgen 0.72.1 */

/// Version of the NVTX annotation interface used to generate these bindings.
pub const NVTX_VERSION: u32 = 3;
/// Result Codes used for the NVTX tool loader.
pub const NVTX_SUCCESS: u32 = 0;
/// Unspecified failure from the NVTX tool loader.
pub const NVTX_FAIL: u32 = 1;
/// The NVTX tool loader could not obtain its injection-library configuration.
pub const NVTX_ERR_INIT_LOAD_PROPERTY: u32 = 2;
/// The NVTX injection library could not be accessed.
pub const NVTX_ERR_INIT_ACCESS_LIBRARY: u32 = 3;
/// The NVTX injection library could not be loaded.
pub const NVTX_ERR_INIT_LOAD_LIBRARY: u32 = 4;
/// The injection library does not export the required NVTX initialization entry point.
pub const NVTX_ERR_INIT_MISSING_LIBRARY_ENTRY_POINT: u32 = 5;
/// The NVTX injection-library initialization entry point reported failure.
pub const NVTX_ERR_INIT_FAILED_LIBRARY_ENTRY_POINT: u32 = 6;
/// No NVTX injection library is available to the tool loader.
pub const NVTX_ERR_NO_INJECTION_LIBRARY_AVAILABLE: u32 = 7;
/// Resource class used by platform-independent NVTX resource identifiers.
pub const NVTX_RESOURCE_CLASS_GENERIC: u32 = 1;
/// Native C wide-character code unit used by wide-string entry points.
pub type wchar_t = ::core::ffi::c_int;
/// Correlation identifier returned when starting a process range and passed when ending that range.
pub type nvtxRangeId_t = u64;
/// Forward declaration of opaque domain registration structure
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct nvtxDomainRegistration_st {
    _unused: [u8; 0],
}
/// Forward declaration of opaque domain registration structure
pub type nvtxDomainRegistration = nvtxDomainRegistration_st;
/// Domain Handle Structure.
///
/// This structure is opaque to the user and is used as a handle to reference a domain.  This type is returned from tools when using the NVTX API to create a domain.
pub type nvtxDomainHandle_t = *mut nvtxDomainRegistration;
/// Forward declaration of opaque string registration structure
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct nvtxStringRegistration_st {
    _unused: [u8; 0],
}
/// Forward declaration of opaque string registration structure
pub type nvtxStringRegistration = nvtxStringRegistration_st;
/// Registered String Handle Structure.
///
/// This structure is opaque to the user and is used as a handle to reference a registered string.  This type is returned from tools when using the NVTX API to create a registered string.
pub type nvtxStringHandle_t = *mut nvtxStringRegistration;
impl nvtxColorType_t {
    /// Color attribute is unused.
    pub const NVTX_COLOR_UNKNOWN: nvtxColorType_t = nvtxColorType_t(0);
    /// An ARGB color is provided.
    pub const NVTX_COLOR_ARGB: nvtxColorType_t = nvtxColorType_t(1);
}
/// --------------------------------------------------------------------------- Color Types -------------------------------------------------------------------------
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct nvtxColorType_t(pub ::core::ffi::c_uint);
impl nvtxMessageType_t {
    /// Message attribute is unused.
    pub const NVTX_MESSAGE_UNKNOWN: nvtxMessageType_t = nvtxMessageType_t(0);
    /// A character sequence is used as payload.
    pub const NVTX_MESSAGE_TYPE_ASCII: nvtxMessageType_t = nvtxMessageType_t(1);
    /// A wide character sequence is used as payload.
    pub const NVTX_MESSAGE_TYPE_UNICODE: nvtxMessageType_t = nvtxMessageType_t(2);
    /// A unique string handle that was registered with [`nvtxDomainRegisterStringA`] or nvtxDomainRegisterStringW().
    pub const NVTX_MESSAGE_TYPE_REGISTERED: nvtxMessageType_t = nvtxMessageType_t(3);
}
/// --------------------------------------------------------------------------- Message Types -------------------------------------------------------------------------
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct nvtxMessageType_t(pub ::core::ffi::c_uint);
/// NVTX message representation selected by an event or resource message-type field.
#[repr(C)]
#[derive(Copy, Clone)]
pub union nvtxMessageValue_t {
    /// Pointer to a null-terminated narrow-character message.
    pub ascii: *const ::core::ffi::c_char,
    /// Pointer to a null-terminated wide-character message.
    pub unicode: *const wchar_t,
    /// NVTX_VERSION_2
    pub registered: nvtxStringHandle_t,
}
impl Default for nvtxMessageValue_t {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
singe_loader::functions! { crate::NVTX;
    /// Force initialization (optional).
    ///
    /// Force NVTX library to initialize. The first call to any NVTX API function will automatically initialize the entire API. This can make the first call much slower than subsequent calls. In applications where the first call to NVTX may be in a performance-critical section, calling nvtxInitialize before any performance-critical sections will ensure NVTX initialization occurs at an acceptable time. Since nvtxInitialize takes no parameters and has no expected behavior besides initialization, it is convenient to add a call to nvtxInitialize in NVTX-instrumented applications that need to force earlier initialization without changing any other code. For example, if an app's first NVTX call is nvtxDomainCreate, and it is difficult to move that call earlier because the domain handle must be stored in an object only created at that point, adding a call to nvtxInitialize at the top of main() will ensure the later call to nvtxDomainCreate is as fast as possible.
    ///
    /// # Parameters
    ///
    /// - `reserved`: must be zero or NULL.
    pub fn nvtxInitialize(reserved: *const ::core::ffi::c_void);
}
impl nvtxPayloadType_t {
    /// Payload attribute is unused.
    pub const NVTX_PAYLOAD_UNKNOWN: nvtxPayloadType_t = nvtxPayloadType_t(0);
    /// A 64 bit unsigned integer value is used as payload.
    pub const NVTX_PAYLOAD_TYPE_UNSIGNED_INT64: nvtxPayloadType_t = nvtxPayloadType_t(1);
    /// A 64 bit signed integer value is used as payload.
    pub const NVTX_PAYLOAD_TYPE_INT64: nvtxPayloadType_t = nvtxPayloadType_t(2);
    /// A 64 bit floating point value is used as payload.
    pub const NVTX_PAYLOAD_TYPE_DOUBLE: nvtxPayloadType_t = nvtxPayloadType_t(3);
    /// A 32-bit unsigned integer value is used as payload.
    pub const NVTX_PAYLOAD_TYPE_UNSIGNED_INT32: nvtxPayloadType_t = nvtxPayloadType_t(4);
    /// A 32-bit signed integer value is used as payload.
    pub const NVTX_PAYLOAD_TYPE_INT32: nvtxPayloadType_t = nvtxPayloadType_t(5);
    /// A 32 bit floating point value is used as payload.
    pub const NVTX_PAYLOAD_TYPE_FLOAT: nvtxPayloadType_t = nvtxPayloadType_t(6);
}
/// --------------------------------------------------------------------------- Payload Types -------------------------------------------------------------------------
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct nvtxPayloadType_t(pub ::core::ffi::c_uint);
/// Event Attribute Structure.
///
/// This structure is used to describe the attributes of an event. The layout of the structure is defined by a specific version of the tools extension library and can change between different versions of the Tools Extension library.
///
///
///
/// The caller should always perform the following three tasks when using attributes: &lt;ul> &lt;li>Zero the structure &lt;li>Set the version field &lt;li>Set the size field &lt;/ul>
///
/// Zeroing the structure sets all the event attributes types and values to the default value.
///
/// The version and size field are used by the Tools Extension implementation to handle multiple versions of the attributes structure.
///
/// It is recommended that the caller use one of the following to methods to initialize the event attributes structure:
///
///
///
/// Initializing nvtxEventAttributes for future compatibility:
///
///
///
/// ```text
///  nvtxEventAttributes_t eventAttrib = {0};
///  eventAttrib.version = NVTX_VERSION;
///  eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
/// ```
///
///
///
/// Initializing nvtxEventAttributes for a specific version:
///
///
///
/// ```text
///  nvtxEventAttributes_t eventAttrib = {0};
///  eventAttrib.version = 1;
///  eventAttrib.size = (uint16_t)(sizeof(nvtxEventAttributes_v1));
/// ```
///
/// If the caller uses Method 1 it is critical that the entire binary layout of the structure be configured to 0 so that all fields are initialized to the default value.
///
/// The caller should either use both NVTX_VERSION and NVTX_EVENT_ATTRIB_STRUCT_SIZE (Method 1) or use explicit values and a versioned type (Method 2).  Using a mix of the two methods will likely cause either source level incompatibility or binary incompatibility in the future.
///
///
///
/// Populate an attributes structure:
///
///
///
/// ```text
///  // Initialize
///  nvtxEventAttributes_t eventAttrib = {0};
///  eventAttrib.version = NVTX_VERSION;
///  eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
///
///  // Configure the Attributes
///  eventAttrib.colorType = NVTX_COLOR_ARGB;
///  eventAttrib.color = 0xFF880000;
///  eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
///  eventAttrib.message.ascii = "Example";
/// ```
///
/// In the example the caller does not have to set the value of `::nvtxEventAttributes_v2::category` or `::nvtxEventAttributes_v2::payload` as these fields were set to the default value by {0}.
///
/// See also: ::nvtxDomainMarkEx ::nvtxDomainRangeStartEx ::nvtxDomainRangePushEx
#[repr(C)]
#[derive(Copy, Clone)]
pub struct nvtxEventAttributes_v2 {
    /// Version flag of the structure.
    ///
    /// Needs to be set to NVTX_VERSION to indicate the version of NVTX APIs supported in this header file. This can optionally be overridden to another version of the tools extension library.
    pub version: u16,
    /// Size of the structure.
    ///
    /// Needs to be set to the size in bytes of the event attribute structure used to specify the event.
    pub size: u16,
    /// ID of the category the event is assigned to.
    ///
    /// A category is a user-controlled ID that can be used to group events.  The tool may use category IDs to improve filtering or enable grouping of events in the same category. The functions `::nvtxNameCategoryA` or `::nvtxNameCategoryW` can be used to name a category.
    ///
    /// Default Value is 0
    pub category: u32,
    /// nvtxColorType_t
    pub colorType: i32,
    /// Color assigned to this event.
    ///
    /// The color that the tool should use to visualize the event.
    pub color: u32,
    /// nvtxPayloadType_t
    pub payloadType: i32,
    /// Reserved native event-attribute field.
    pub reserved0: i32,
    /// Payload assigned to this event.
    ///
    /// A numerical value that can be used to annotate an event. The tool could use the payload data to reconstruct graphs and diagrams.
    pub payload: nvtxEventAttributes_v2_payload_t,
    /// nvtxMessageType_t
    pub messageType: i32,
    /// Message assigned to this attribute structure.
    ///
    /// The text message that is attached to an event.
    pub message: nvtxMessageValue_t,
}
/// Payload assigned to this event.
///
/// A numerical value that can be used to annotate an event. The tool could use the payload data to reconstruct graphs and diagrams.
#[repr(C)]
#[derive(Copy, Clone)]
pub union nvtxEventAttributes_v2_payload_t {
    /// Unsigned 64-bit integer payload.
    pub ullValue: u64,
    /// Signed 64-bit integer payload.
    pub llValue: i64,
    /// Double-precision floating-point payload.
    pub dValue: f64,
    /// NVTX_VERSION_2
    pub uiValue: u32,
    /// Signed 32-bit integer payload.
    pub iValue: i32,
    /// Single-precision floating-point payload.
    pub fValue: f32,
}
impl Default for nvtxEventAttributes_v2_payload_t {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for nvtxEventAttributes_v2 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Event Attribute Structure.
///
/// This structure is used to describe the attributes of an event. The layout of the structure is defined by a specific version of the tools extension library and can change between different versions of the Tools Extension library.
///
///
///
/// The caller should always perform the following three tasks when using attributes: &lt;ul> &lt;li>Zero the structure &lt;li>Set the version field &lt;li>Set the size field &lt;/ul>
///
/// Zeroing the structure sets all the event attributes types and values to the default value.
///
/// The version and size field are used by the Tools Extension implementation to handle multiple versions of the attributes structure.
///
/// It is recommended that the caller use one of the following to methods to initialize the event attributes structure:
///
///
///
/// Initializing nvtxEventAttributes for future compatibility:
///
///
///
/// ```text
///  nvtxEventAttributes_t eventAttrib = {0};
///  eventAttrib.version = NVTX_VERSION;
///  eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
/// ```
///
///
///
/// Initializing nvtxEventAttributes for a specific version:
///
///
///
/// ```text
///  nvtxEventAttributes_t eventAttrib = {0};
///  eventAttrib.version = 1;
///  eventAttrib.size = (uint16_t)(sizeof(nvtxEventAttributes_v1));
/// ```
///
/// If the caller uses Method 1 it is critical that the entire binary layout of the structure be configured to 0 so that all fields are initialized to the default value.
///
/// The caller should either use both NVTX_VERSION and NVTX_EVENT_ATTRIB_STRUCT_SIZE (Method 1) or use explicit values and a versioned type (Method 2).  Using a mix of the two methods will likely cause either source level incompatibility or binary incompatibility in the future.
///
///
///
/// Populate an attributes structure:
///
///
///
/// ```text
///  // Initialize
///  nvtxEventAttributes_t eventAttrib = {0};
///  eventAttrib.version = NVTX_VERSION;
///  eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
///
///  // Configure the Attributes
///  eventAttrib.colorType = NVTX_COLOR_ARGB;
///  eventAttrib.color = 0xFF880000;
///  eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
///  eventAttrib.message.ascii = "Example";
/// ```
///
/// In the example the caller does not have to set the value of `::nvtxEventAttributes_v2::category` or `::nvtxEventAttributes_v2::payload` as these fields were set to the default value by {0}.
///
/// See also: ::nvtxDomainMarkEx ::nvtxDomainRangeStartEx ::nvtxDomainRangePushEx
pub type nvtxEventAttributes_t = nvtxEventAttributes_v2;
singe_loader::functions! { crate::NVTX;
    /// Marks an instantaneous event in the application.
    ///
    /// A marker can contain a text message or specify additional information using the event attributes structure. These attributes include a text message, color, category, and a payload. Each of the attributes is optional and can only be sent out using the [`nvtxDomainMarkEx`] function.
    ///
    /// nvtxDomainMarkEx(NULL, event) is equivalent to calling nvtxMarkEx(event).
    ///
    /// # Parameters
    ///
    /// - `domain`: The domain of scoping the category.
    /// - `eventAttrib`: The event attribute structure defining the marker's attribute types and attribute values.
    pub fn nvtxDomainMarkEx(
        domain: nvtxDomainHandle_t,
        eventAttrib: *const nvtxEventAttributes_t,
    );
}
singe_loader::functions! { crate::NVTX;
    /// Marks an instantaneous event in the application.
    ///
    /// A marker can contain a text message or specify additional information using the event attributes structure. These attributes include a text message, color, category, and a payload. Each of the attributes is optional and can only be sent out using the [`nvtxMarkEx`] function. If [`nvtxMarkA`] or nvtxMarkW are used to specify the marker or if an attribute is unspecified then a default value will be used.
    ///
    /// # Parameters
    ///
    /// - `eventAttrib`: The event attribute structure defining the marker's attribute types and attribute values.
    pub fn nvtxMarkEx(eventAttrib: *const nvtxEventAttributes_t);
}
singe_loader::functions! { crate::NVTX;
    /// Marks an instantaneous event in the application.
    ///
    /// A marker created using [`nvtxMarkA`] or nvtxMarkW contains only a text message.
    ///
    /// # Parameters
    ///
    /// - `message`: The message associated to this marker event.
    pub fn nvtxMarkA(message: *const ::core::ffi::c_char);
}
singe_loader::functions! { crate::NVTX;
    /// Marks an instantaneous event with a wide-character message.
    ///
    /// Wide-character form of [`nvtxMarkA`].
    ///
    /// # Parameters
    ///
    /// - `message`: Null-terminated wide-character string.
    pub fn nvtxMarkW(message: *const wchar_t);
}
singe_loader::functions! { crate::NVTX;
    /// Starts a process range in a domain.
    ///
    /// # Parameters
    ///
    /// - `domain`: The domain of scoping the category.
    /// - `eventAttrib`: The event attribute structure defining the range's attribute types and attribute values.
    pub fn nvtxDomainRangeStartEx(
        domain: nvtxDomainHandle_t,
        eventAttrib: *const nvtxEventAttributes_t,
    ) -> nvtxRangeId_t;
}
singe_loader::functions! { crate::NVTX;
    /// Starts a process range.
    ///
    /// # Parameters
    ///
    /// - `eventAttrib`: The event attribute structure defining the range's attribute types and attribute values.
    pub fn nvtxRangeStartEx(eventAttrib: *const nvtxEventAttributes_t) -> nvtxRangeId_t;
}
singe_loader::functions! { crate::NVTX;
    /// Starts a process range.
    ///
    /// # Parameters
    ///
    /// - `message`: The event message associated to this range event.
    pub fn nvtxRangeStartA(message: *const ::core::ffi::c_char) -> nvtxRangeId_t;
}
singe_loader::functions! { crate::NVTX;
    /// Starts a process range with a wide-character message and returns its range identifier.
    ///
    /// Wide-character form of [`nvtxRangeStartA`].
    ///
    /// # Parameters
    ///
    /// - `message`: Null-terminated wide-character string.
    pub fn nvtxRangeStartW(message: *const wchar_t) -> nvtxRangeId_t;
}
singe_loader::functions! { crate::NVTX;
    /// Ends a process range.
    ///
    /// # Parameters
    ///
    /// - `domain`: The domain.
    /// - `id`: The correlation ID returned from a nvtxRangeStart call.
    pub fn nvtxDomainRangeEnd(domain: nvtxDomainHandle_t, id: nvtxRangeId_t);
}
singe_loader::functions! { crate::NVTX;
    /// Ends a process range.
    ///
    /// # Parameters
    ///
    /// - `id`: The correlation ID returned from an nvtxRangeStart call.
    pub fn nvtxRangeEnd(id: nvtxRangeId_t);
}
singe_loader::functions! { crate::NVTX;
    /// Starts a nested thread range.
    ///
    /// # Parameters
    ///
    /// - `domain`: The domain of scoping.
    /// - `eventAttrib`: The event attribute structure defining the range's attribute types and attribute values.
    pub fn nvtxDomainRangePushEx(
        domain: nvtxDomainHandle_t,
        eventAttrib: *const nvtxEventAttributes_t,
    ) -> ::core::ffi::c_int;
}
singe_loader::functions! { crate::NVTX;
    /// Starts a nested thread range.
    ///
    /// # Parameters
    ///
    /// - `eventAttrib`: The event attribute structure defining the range's attribute types and attribute values.
    pub fn nvtxRangePushEx(
        eventAttrib: *const nvtxEventAttributes_t,
    ) -> ::core::ffi::c_int;
}
singe_loader::functions! { crate::NVTX;
    /// Starts a nested thread range.
    ///
    /// # Parameters
    ///
    /// - `message`: The event message associated to this range event.
    pub fn nvtxRangePushA(message: *const ::core::ffi::c_char) -> ::core::ffi::c_int;
}
singe_loader::functions! { crate::NVTX;
    /// Starts a nested thread range with a wide-character message.
    ///
    /// Wide-character form of [`nvtxRangePushA`].
    ///
    /// # Parameters
    ///
    /// - `message`: Null-terminated wide-character string.
    pub fn nvtxRangePushW(message: *const wchar_t) -> ::core::ffi::c_int;
}
singe_loader::functions! { crate::NVTX;
    /// Ends a nested thread range.
    pub fn nvtxDomainRangePop(domain: nvtxDomainHandle_t) -> ::core::ffi::c_int;
}
singe_loader::functions! { crate::NVTX;
    /// Ends a nested thread range.
    pub fn nvtxRangePop() -> ::core::ffi::c_int;
}
impl nvtxResourceGenericType_t {
    /// No supported NVTX resource identifier type is selected.
    pub const NVTX_RESOURCE_TYPE_UNKNOWN: nvtxResourceGenericType_t = nvtxResourceGenericType_t(
        0,
    );
    /// Generic pointer assumed to have no collisions with other pointers.
    pub const NVTX_RESOURCE_TYPE_GENERIC_POINTER: nvtxResourceGenericType_t = nvtxResourceGenericType_t(
        65537,
    );
    /// Generic handle assumed to have no collisions with other handles.
    pub const NVTX_RESOURCE_TYPE_GENERIC_HANDLE: nvtxResourceGenericType_t = nvtxResourceGenericType_t(
        65538,
    );
    /// OS native thread identifier.
    pub const NVTX_RESOURCE_TYPE_GENERIC_THREAD_NATIVE: nvtxResourceGenericType_t = nvtxResourceGenericType_t(
        65539,
    );
    /// POSIX pthread identifier.
    pub const NVTX_RESOURCE_TYPE_GENERIC_THREAD_POSIX: nvtxResourceGenericType_t = nvtxResourceGenericType_t(
        65540,
    );
}
/// Generic resource type for when a resource class is not available.
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct nvtxResourceGenericType_t(pub ::core::ffi::c_uint);
/// Resource Attribute Structure.
///
/// This structure is used to describe the attributes of a resource. The layout of the structure is defined by a specific version of the tools extension library and can change between different versions of the Tools Extension library.
///
///
///
/// The caller should always perform the following three tasks when using attributes: &lt;ul> &lt;li>Zero the structure &lt;li>Set the version field &lt;li>Set the size field &lt;/ul>
///
/// Zeroing the structure sets all the resource attributes types and values to the default value.
///
/// The version and size field are used by the Tools Extension implementation to handle multiple versions of the attributes structure.
///
/// It is recommended that the caller use one of the following to methods to initialize the event attributes structure:
///
///
///
/// Initializing nvtxEventAttributes for future compatibility:
///
///
///
/// ```text
///  nvtxResourceAttributes_t attribs = {0};
///  attribs.version = NVTX_VERSION;
///  attribs.size = NVTX_RESOURCE_ATTRIB_STRUCT_SIZE;
/// ```
///
///
///
/// Initializing nvtxEventAttributes for a specific version:
///
///
///
/// ```text
///  nvtxResourceAttributes_v0 attribs = {0};
///  attribs.version = 2;
///  attribs.size = (uint16_t)(sizeof(nvtxResourceAttributes_v0));
/// ```
///
/// If the caller uses Method 1 it is critical that the entire binary layout of the structure be configured to 0 so that all fields are initialized to the default value.
///
/// The caller should either use both NVTX_VERSION and NVTX_RESOURCE_ATTRIB_STRUCT_SIZE (Method 1) or use explicit values and a versioned type (Method 2).  Using a mix of the two methods will likely cause either source level incompatibility or binary incompatibility in the future.
///
///
///
/// Register a resource and populate its attributes:
///
///
///
/// ```text
///  nvtxDomainHandle_t domain = nvtxDomainCreateA("example domain");
///
///  // Initialize
///  nvtxResourceAttributes_t attribs = {0};
///  attribs.version = NVTX_VERSION;
///  attribs.size = NVTX_RESOURCE_ATTRIB_STRUCT_SIZE;
///
///  // Configure the Attributes
///  attribs.identifierType = NVTX_RESOURCE_TYPE_GENERIC_POINTER;
///  attribs.identifier.pValue = (const void*)pMutex;
///  attribs.messageType = NVTX_MESSAGE_TYPE_ASCII;
///  attribs.message.ascii = "Single thread access to database.";
///
///  nvtxResourceHandle_t handle = nvtxDomainResourceCreate(domain, &attribs);
/// ```
///
///
///
/// See also: ::nvtxDomainResourceCreate
#[repr(C)]
#[derive(Copy, Clone)]
pub struct nvtxResourceAttributes_v0 {
    /// Version flag of the structure.
    ///
    /// Needs to be set to NVTX_VERSION to indicate the version of NVTX APIs supported in this header file. This can optionally be overridden to another version of the tools extension library.
    pub version: u16,
    /// Size of the structure.
    ///
    /// Needs to be set to the size in bytes of this attribute structure.
    pub size: u16,
    /// values from enums following the pattern nvtxResource\[name\]Type_t
    pub identifierType: i32,
    /// Identifier for the resource.
    ///
    /// An identifier may be a pointer or a handle to an OS or middleware API object. The resource type will assist in avoiding collisions where handles values may collide.
    pub identifier: nvtxResourceAttributes_v0_identifier_t,
    /// nvtxMessageType_t
    pub messageType: i32,
    /// Message assigned to this attribute structure.
    ///
    /// The text message that is attached to a resource.
    pub message: nvtxMessageValue_t,
}
/// Identifier for the resource.
///
/// An identifier may be a pointer or a handle to an OS or middleware API object. The resource type will assist in avoiding collisions where handles values may collide.
#[repr(C)]
#[derive(Copy, Clone)]
pub union nvtxResourceAttributes_v0_identifier_t {
    /// Pointer-valued resource identifier.
    pub pValue: *const ::core::ffi::c_void,
    /// Unsigned 64-bit resource identifier.
    pub ullValue: u64,
}
impl Default for nvtxResourceAttributes_v0_identifier_t {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for nvtxResourceAttributes_v0 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
/// Resource Attribute Structure.
///
/// This structure is used to describe the attributes of a resource. The layout of the structure is defined by a specific version of the tools extension library and can change between different versions of the Tools Extension library.
///
///
///
/// The caller should always perform the following three tasks when using attributes: &lt;ul> &lt;li>Zero the structure &lt;li>Set the version field &lt;li>Set the size field &lt;/ul>
///
/// Zeroing the structure sets all the resource attributes types and values to the default value.
///
/// The version and size field are used by the Tools Extension implementation to handle multiple versions of the attributes structure.
///
/// It is recommended that the caller use one of the following to methods to initialize the event attributes structure:
///
///
///
/// Initializing nvtxEventAttributes for future compatibility:
///
///
///
/// ```text
///  nvtxResourceAttributes_t attribs = {0};
///  attribs.version = NVTX_VERSION;
///  attribs.size = NVTX_RESOURCE_ATTRIB_STRUCT_SIZE;
/// ```
///
///
///
/// Initializing nvtxEventAttributes for a specific version:
///
///
///
/// ```text
///  nvtxResourceAttributes_v0 attribs = {0};
///  attribs.version = 2;
///  attribs.size = (uint16_t)(sizeof(nvtxResourceAttributes_v0));
/// ```
///
/// If the caller uses Method 1 it is critical that the entire binary layout of the structure be configured to 0 so that all fields are initialized to the default value.
///
/// The caller should either use both NVTX_VERSION and NVTX_RESOURCE_ATTRIB_STRUCT_SIZE (Method 1) or use explicit values and a versioned type (Method 2).  Using a mix of the two methods will likely cause either source level incompatibility or binary incompatibility in the future.
///
///
///
/// Register a resource and populate its attributes:
///
///
///
/// ```text
///  nvtxDomainHandle_t domain = nvtxDomainCreateA("example domain");
///
///  // Initialize
///  nvtxResourceAttributes_t attribs = {0};
///  attribs.version = NVTX_VERSION;
///  attribs.size = NVTX_RESOURCE_ATTRIB_STRUCT_SIZE;
///
///  // Configure the Attributes
///  attribs.identifierType = NVTX_RESOURCE_TYPE_GENERIC_POINTER;
///  attribs.identifier.pValue = (const void*)pMutex;
///  attribs.messageType = NVTX_MESSAGE_TYPE_ASCII;
///  attribs.message.ascii = "Single thread access to database.";
///
///  nvtxResourceHandle_t handle = nvtxDomainResourceCreate(domain, &attribs);
/// ```
///
///
///
/// See also: ::nvtxDomainResourceCreate
pub type nvtxResourceAttributes_t = nvtxResourceAttributes_v0;
/// Incomplete native type used by [`nvtxResourceHandle_t`] handles. The native API owns its layout.
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct nvtxResourceHandle {
    _unused: [u8; 0],
}
/// Opaque handle identifying a named resource within an NVTX domain.
pub type nvtxResourceHandle_t = *mut nvtxResourceHandle;
singe_loader::functions! { crate::NVTX;
    /// Create a resource object to track and associate data with OS and middleware objects.
    ///
    /// Allows users to associate an API handle or pointer with a user-provided name.
    ///
    /// # Parameters
    ///
    /// - `domain`: Domain to own the resource object.
    /// - `attribs`: Attributes to be associated with the resource.
    pub fn nvtxDomainResourceCreate(
        domain: nvtxDomainHandle_t,
        attribs: *mut nvtxResourceAttributes_t,
    ) -> nvtxResourceHandle_t;
}
singe_loader::functions! { crate::NVTX;
    /// Destroy a resource object to track and associate data with OS and middleware objects.
    ///
    /// Allows users to associate an API handle or pointer with a user-provided name.
    ///
    /// # Parameters
    ///
    /// - `resource`: Handle to the resource in which to operate.
    pub fn nvtxDomainResourceDestroy(resource: nvtxResourceHandle_t);
}
singe_loader::functions! { crate::NVTX;
    /// Annotate an NVTX category used within a domain.
    ///
    /// Categories are used to group sets of events. Each category is identified through a unique ID and that ID is passed into any of the marker/range events to assign that event to a specific category. The nvtxDomainNameCategory function calls allow the user to assign a name to a category ID that is specific to the domain.
    ///
    /// nvtxDomainNameCategory(NULL, category, name) is equivalent to calling nvtxNameCategory(category, name).
    ///
    /// # Parameters
    ///
    /// - `domain`: The domain of scoping the category.
    /// - `category`: The category ID to name.
    /// - `name`: The name of the category.
    pub fn nvtxDomainNameCategoryA(
        domain: nvtxDomainHandle_t,
        category: u32,
        name: *const ::core::ffi::c_char,
    );
}
singe_loader::functions! { crate::NVTX;
    /// Names a category in an NVTX domain using a wide-character string.
    ///
    /// Wide-character form of [`nvtxDomainNameCategoryA`].
    ///
    /// # Parameters
    ///
    /// - `name`: Null-terminated wide-character string.
    pub fn nvtxDomainNameCategoryW(
        domain: nvtxDomainHandle_t,
        category: u32,
        name: *const wchar_t,
    );
}
singe_loader::functions! { crate::NVTX;
    /// Annotate an NVTX category.
    ///
    /// Categories are used to group sets of events. Each category is identified through a unique ID and that ID is passed into any of the marker/range events to assign that event to a specific category. The nvtxNameCategory function calls allow the user to assign a name to a category ID.
    ///
    /// # Parameters
    ///
    /// - `category`: The category ID to name.
    /// - `name`: The name of the category.
    pub fn nvtxNameCategoryA(category: u32, name: *const ::core::ffi::c_char);
}
singe_loader::functions! { crate::NVTX;
    /// Names a category in the default NVTX domain using a wide-character string.
    ///
    /// Wide-character form of [`nvtxNameCategoryA`].
    ///
    /// # Parameters
    ///
    /// - `name`: Null-terminated wide-character string.
    pub fn nvtxNameCategoryW(category: u32, name: *const wchar_t);
}
singe_loader::functions! { crate::NVTX;
    /// Annotate an OS thread.
    ///
    /// Allows the user to name an active thread of the current process. If an invalid thread ID is provided or a thread ID from a different process is used the behavior of the tool is implementation dependent.
    ///
    /// Tools expect thread ID to be a number that uniquely identifies the thread at the time of the call. Note that a thread's ID can be reused after it is destroyed. Tools may choose how to handle aliasing of thread IDs.
    ///
    /// POSIX pthread_t type returned by pthread_self() may not comply with these expectations. Please use OS-specific thread ID instead of pthread_t.
    ///
    /// The thread name is associated to the default domain. To support domains use resource objects via [`nvtxDomainResourceCreate`].
    ///
    /// Windows:
    ///
    /// #include &lt;windows.h>
    ///
    /// nvtxNameOsThread(GetCurrentThreadId(), "Current thread");
    ///
    /// nvtxNameOsThread(GetThreadId(SomeThreadHandle), "Other thread");
    ///
    /// Android:
    ///
    /// #include &lt;unistd.h>
    ///
    /// [`nvtxNameOsThreadA`](gettid(), "Current thread");
    ///
    /// [`nvtxNameOsThreadA`](getpid(), "Main thread");
    ///
    /// [`nvtxNameOsThreadA`]
    ///
    /// NVTX_DECLSPEC void NVTX_API nvtxNameOsThreadA(uint32_t threadId, const char \*name)
    ///
    /// Annotate an OS thread.
    ///
    /// Linux:
    ///
    /// #include &lt;sys/syscall.h>
    ///
    /// [`nvtxNameOsThreadA`](syscall(SYS_gettid), "Current thread");
    ///
    /// #include &lt;unistd.h>
    ///
    /// [`nvtxNameOsThreadA`](getpid(), "Main thread");
    ///
    /// macOS:
    ///
    /// #include &lt;sys/syscall.h>
    ///
    /// [`nvtxNameOsThreadA`](syscall(SYS_thread_selfid), "Current thread");
    ///
    /// #include &lt;pthread.h>
    ///
    /// __uint64_t id;
    ///
    /// pthread_threadid_np(pthread_self(), &id);
    ///
    /// [`nvtxNameOsThreadA`](id, "Current thread");
    ///
    /// pthread_threadid_np(somePThreadId, &id);
    ///
    /// [`nvtxNameOsThreadA`](id, "Other thread");.
    ///
    /// # Parameters
    ///
    /// - `threadId`: The ID of the thread to name.
    /// - `name`: The name of the thread.
    pub fn nvtxNameOsThreadA(threadId: u32, name: *const ::core::ffi::c_char);
}
singe_loader::functions! { crate::NVTX;
    /// Names an active OS thread of this process using a wide-character string.
    ///
    /// Wide-character form of [`nvtxNameOsThreadA`].
    ///
    /// # Parameters
    ///
    /// - `name`: Null-terminated wide-character string.
    pub fn nvtxNameOsThreadW(threadId: u32, name: *const wchar_t);
}
singe_loader::functions! { crate::NVTX;
    /// Register a string.
    ///
    /// Registers an immutable string with NVTX. Once registered the pointer used to register the domain name can be used in nvtxEventAttributes_t [MESSAGE_FIELD](https://nvidia.github.io/NVTX/doxygen/structnvtx_event_attributes__v2.html#MESSAGE_FIELD). This allows NVTX implementation to skip copying the contents of the message on each event invocation.
    ///
    /// String registration is an optimization. It is recommended to use string registration if the string will be passed to an event many times.
    ///
    /// Strings are not unregistered, except that by unregistering the entire domain.
    ///
    /// # Parameters
    ///
    /// - `domain`: Domain handle. If NULL then the global domain is used.
    /// - `string`: A unique pointer to a sequence of characters.
    pub fn nvtxDomainRegisterStringA(
        domain: nvtxDomainHandle_t,
        string: *const ::core::ffi::c_char,
    ) -> nvtxStringHandle_t;
}
singe_loader::functions! { crate::NVTX;
    /// Registers an immutable wide-character string in an NVTX domain.
    ///
    /// Wide-character form of [`nvtxDomainRegisterStringA`].
    ///
    /// # Parameters
    ///
    /// - `string`: Null-terminated wide-character string.
    pub fn nvtxDomainRegisterStringW(
        domain: nvtxDomainHandle_t,
        string: *const wchar_t,
    ) -> nvtxStringHandle_t;
}
singe_loader::functions! { crate::NVTX;
    /// Register a NVTX domain.
    ///
    /// Domains are used to scope annotations. All NVTX_VERSION_0 and NVTX_VERSION_1 annotations are scoped to the global domain. The function nvtxDomainCreate creates a new named domain.
    ///
    /// Each domain maintains its own nvtxRangePush and nvtxRangePop stack.
    ///
    /// # Parameters
    ///
    /// - `name`: A unique string representing the domain.
    pub fn nvtxDomainCreateA(name: *const ::core::ffi::c_char) -> nvtxDomainHandle_t;
}
singe_loader::functions! { crate::NVTX;
    /// Registers a named NVTX annotation domain using a wide-character string.
    ///
    /// Wide-character form of [`nvtxDomainCreateA`].
    ///
    /// # Parameters
    ///
    /// - `name`: Null-terminated wide-character string.
    pub fn nvtxDomainCreateW(name: *const wchar_t) -> nvtxDomainHandle_t;
}
singe_loader::functions! { crate::NVTX;
    /// Unregister a NVTX domain.
    ///
    /// Unregisters the domain handle and frees all domain specific resources.
    ///
    /// # Parameters
    ///
    /// - `domain`: the domain handle.
    pub fn nvtxDomainDestroy(domain: nvtxDomainHandle_t);
}
/// CUDA driver device identifier in the platform-independent NVTX injection ABI.
pub type nvtx_CUdevice = ::core::ffi::c_int;
/// CUDA driver context handle in the platform-independent NVTX injection ABI.
pub type nvtx_CUcontext = *mut ::core::ffi::c_void;
/// CUDA driver stream handle in the platform-independent NVTX injection ABI.
pub type nvtx_CUstream = *mut ::core::ffi::c_void;
/// CUDA driver event handle in the platform-independent NVTX injection ABI.
pub type nvtx_CUevent = *mut ::core::ffi::c_void;
/// CUDA runtime stream handle in the platform-independent NVTX injection ABI.
pub type nvtx_cudaStream_t = *mut ::core::ffi::c_void;
/// CUDA runtime event handle in the platform-independent NVTX injection ABI.
pub type nvtx_cudaEvent_t = *mut ::core::ffi::c_void;
/// OpenCL platform identifier in the platform-independent NVTX injection ABI.
pub type nvtx_cl_platform_id = *mut ::core::ffi::c_void;
/// OpenCL device identifier in the platform-independent NVTX injection ABI.
pub type nvtx_cl_device_id = *mut ::core::ffi::c_void;
/// OpenCL context handle in the platform-independent NVTX injection ABI.
pub type nvtx_cl_context = *mut ::core::ffi::c_void;
/// OpenCL command-queue handle in the platform-independent NVTX injection ABI.
pub type nvtx_cl_command_queue = *mut ::core::ffi::c_void;
/// OpenCL memory-object handle in the platform-independent NVTX injection ABI.
pub type nvtx_cl_mem = *mut ::core::ffi::c_void;
/// OpenCL program handle in the platform-independent NVTX injection ABI.
pub type nvtx_cl_program = *mut ::core::ffi::c_void;
/// OpenCL kernel handle in the platform-independent NVTX injection ABI.
pub type nvtx_cl_kernel = *mut ::core::ffi::c_void;
/// OpenCL event handle in the platform-independent NVTX injection ABI.
pub type nvtx_cl_event = *mut ::core::ffi::c_void;
/// OpenCL sampler handle in the platform-independent NVTX injection ABI.
pub type nvtx_cl_sampler = *mut ::core::ffi::c_void;
/// NVTX user-synchronization object handle in the platform-independent NVTX injection ABI.
pub type nvtx_nvtxSyncUser_t = *mut ::core::ffi::c_void;
/// Opaque NVTX user-synchronization attributes in the platform-independent NVTX injection ABI.
pub type nvtx_nvtxSyncUserAttributes_t = ::core::ffi::c_void;
/// Optional tool-injection handler for the [`nvtxMarkEx`] annotation operation. `None` means no handler is installed.
pub type nvtxMarkEx_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(eventAttrib: *const nvtxEventAttributes_t),
>;
/// Optional tool-injection handler for the [`nvtxMarkA`] annotation operation. `None` means no handler is installed.
pub type nvtxMarkA_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(message: *const ::core::ffi::c_char),
>;
/// Optional tool-injection handler for the [`nvtxMarkW`] annotation operation. `None` means no handler is installed.
pub type nvtxMarkW_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(message: *const wchar_t),
>;
/// Optional tool-injection handler for the [`nvtxRangeStartEx`] annotation operation. `None` means no handler is installed.
pub type nvtxRangeStartEx_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(eventAttrib: *const nvtxEventAttributes_t) -> nvtxRangeId_t,
>;
/// Optional tool-injection handler for the [`nvtxRangeStartA`] annotation operation. `None` means no handler is installed.
pub type nvtxRangeStartA_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(message: *const ::core::ffi::c_char) -> nvtxRangeId_t,
>;
/// Optional tool-injection handler for the [`nvtxRangeStartW`] annotation operation. `None` means no handler is installed.
pub type nvtxRangeStartW_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(message: *const wchar_t) -> nvtxRangeId_t,
>;
/// Optional tool-injection handler for the [`nvtxRangeEnd`] annotation operation. `None` means no handler is installed.
pub type nvtxRangeEnd_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(id: nvtxRangeId_t),
>;
/// Optional tool-injection handler for the [`nvtxRangePushEx`] annotation operation. `None` means no handler is installed.
pub type nvtxRangePushEx_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(eventAttrib: *const nvtxEventAttributes_t) -> ::core::ffi::c_int,
>;
/// Optional tool-injection handler for the [`nvtxRangePushA`] annotation operation. `None` means no handler is installed.
pub type nvtxRangePushA_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(message: *const ::core::ffi::c_char) -> ::core::ffi::c_int,
>;
/// Optional tool-injection handler for the [`nvtxRangePushW`] annotation operation. `None` means no handler is installed.
pub type nvtxRangePushW_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(message: *const wchar_t) -> ::core::ffi::c_int,
>;
/// Optional tool-injection handler for the [`nvtxRangePop`] annotation operation. `None` means no handler is installed.
pub type nvtxRangePop_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn() -> ::core::ffi::c_int,
>;
/// Optional tool-injection handler for the [`nvtxNameCategoryA`] annotation operation. `None` means no handler is installed.
pub type nvtxNameCategoryA_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(category: u32, name: *const ::core::ffi::c_char),
>;
/// Optional tool-injection handler for the [`nvtxNameCategoryW`] annotation operation. `None` means no handler is installed.
pub type nvtxNameCategoryW_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(category: u32, name: *const wchar_t),
>;
/// Optional tool-injection handler for the [`nvtxNameOsThreadA`] annotation operation. `None` means no handler is installed.
pub type nvtxNameOsThreadA_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(threadId: u32, name: *const ::core::ffi::c_char),
>;
/// Optional tool-injection handler for the [`nvtxNameOsThreadW`] annotation operation. `None` means no handler is installed.
pub type nvtxNameOsThreadW_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(threadId: u32, name: *const wchar_t),
>;
/// Optional tool-injection handler for the `nvtxNameCuDeviceA` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxNameCuDeviceA_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(device: nvtx_CUdevice, name: *const ::core::ffi::c_char),
>;
/// Optional tool-injection handler for the `nvtxNameCuDeviceW` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxNameCuDeviceW_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(device: nvtx_CUdevice, name: *const wchar_t),
>;
/// Optional tool-injection handler for the `nvtxNameCuContextA` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxNameCuContextA_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(context: nvtx_CUcontext, name: *const ::core::ffi::c_char),
>;
/// Optional tool-injection handler for the `nvtxNameCuContextW` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxNameCuContextW_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(context: nvtx_CUcontext, name: *const wchar_t),
>;
/// Optional tool-injection handler for the `nvtxNameCuStreamA` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxNameCuStreamA_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(stream: nvtx_CUstream, name: *const ::core::ffi::c_char),
>;
/// Optional tool-injection handler for the `nvtxNameCuStreamW` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxNameCuStreamW_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(stream: nvtx_CUstream, name: *const wchar_t),
>;
/// Optional tool-injection handler for the `nvtxNameCuEventA` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxNameCuEventA_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(event: nvtx_CUevent, name: *const ::core::ffi::c_char),
>;
/// Optional tool-injection handler for the `nvtxNameCuEventW` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxNameCuEventW_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(event: nvtx_CUevent, name: *const wchar_t),
>;
/// Optional tool-injection handler for the `nvtxNameClDeviceA` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxNameClDeviceA_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(device: nvtx_cl_device_id, name: *const ::core::ffi::c_char),
>;
/// Optional tool-injection handler for the `nvtxNameClDeviceW` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxNameClDeviceW_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(device: nvtx_cl_device_id, name: *const wchar_t),
>;
/// Optional tool-injection handler for the `nvtxNameClContextA` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxNameClContextA_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(context: nvtx_cl_context, name: *const ::core::ffi::c_char),
>;
/// Optional tool-injection handler for the `nvtxNameClContextW` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxNameClContextW_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(context: nvtx_cl_context, name: *const wchar_t),
>;
/// Optional tool-injection handler for the `nvtxNameClCommandQueueA` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxNameClCommandQueueA_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(
        command_queue: nvtx_cl_command_queue,
        name: *const ::core::ffi::c_char,
    ),
>;
/// Optional tool-injection handler for the `nvtxNameClCommandQueueW` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxNameClCommandQueueW_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(command_queue: nvtx_cl_command_queue, name: *const wchar_t),
>;
/// Optional tool-injection handler for the `nvtxNameClMemObjectA` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxNameClMemObjectA_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(memobj: nvtx_cl_mem, name: *const ::core::ffi::c_char),
>;
/// Optional tool-injection handler for the `nvtxNameClMemObjectW` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxNameClMemObjectW_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(memobj: nvtx_cl_mem, name: *const wchar_t),
>;
/// Optional tool-injection handler for the `nvtxNameClSamplerA` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxNameClSamplerA_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(sampler: nvtx_cl_sampler, name: *const ::core::ffi::c_char),
>;
/// Optional tool-injection handler for the `nvtxNameClSamplerW` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxNameClSamplerW_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(sampler: nvtx_cl_sampler, name: *const wchar_t),
>;
/// Optional tool-injection handler for the `nvtxNameClProgramA` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxNameClProgramA_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(program: nvtx_cl_program, name: *const ::core::ffi::c_char),
>;
/// Optional tool-injection handler for the `nvtxNameClProgramW` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxNameClProgramW_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(program: nvtx_cl_program, name: *const wchar_t),
>;
/// Optional tool-injection handler for the `nvtxNameClEventA` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxNameClEventA_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(evnt: nvtx_cl_event, name: *const ::core::ffi::c_char),
>;
/// Optional tool-injection handler for the `nvtxNameClEventW` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxNameClEventW_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(evnt: nvtx_cl_event, name: *const wchar_t),
>;
/// Optional tool-injection handler for the `nvtxNameCudaDeviceA` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxNameCudaDeviceA_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(device: ::core::ffi::c_int, name: *const ::core::ffi::c_char),
>;
/// Optional tool-injection handler for the `nvtxNameCudaDeviceW` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxNameCudaDeviceW_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(device: ::core::ffi::c_int, name: *const wchar_t),
>;
/// Optional tool-injection handler for the `nvtxNameCudaStreamA` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxNameCudaStreamA_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(stream: nvtx_cudaStream_t, name: *const ::core::ffi::c_char),
>;
/// Optional tool-injection handler for the `nvtxNameCudaStreamW` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxNameCudaStreamW_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(stream: nvtx_cudaStream_t, name: *const wchar_t),
>;
/// Optional tool-injection handler for the `nvtxNameCudaEventA` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxNameCudaEventA_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(event: nvtx_cudaEvent_t, name: *const ::core::ffi::c_char),
>;
/// Optional tool-injection handler for the `nvtxNameCudaEventW` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxNameCudaEventW_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(event: nvtx_cudaEvent_t, name: *const wchar_t),
>;
/// Optional tool-injection handler for the [`nvtxDomainMarkEx`] annotation operation. `None` means no handler is installed.
pub type nvtxDomainMarkEx_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(
        domain: nvtxDomainHandle_t,
        eventAttrib: *const nvtxEventAttributes_t,
    ),
>;
/// Optional tool-injection handler for the [`nvtxDomainRangeStartEx`] annotation operation. `None` means no handler is installed.
pub type nvtxDomainRangeStartEx_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(
        domain: nvtxDomainHandle_t,
        eventAttrib: *const nvtxEventAttributes_t,
    ) -> nvtxRangeId_t,
>;
/// Optional tool-injection handler for the [`nvtxDomainRangeEnd`] annotation operation. `None` means no handler is installed.
pub type nvtxDomainRangeEnd_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(domain: nvtxDomainHandle_t, id: nvtxRangeId_t),
>;
/// Optional tool-injection handler for the [`nvtxDomainRangePushEx`] annotation operation. `None` means no handler is installed.
pub type nvtxDomainRangePushEx_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(
        domain: nvtxDomainHandle_t,
        eventAttrib: *const nvtxEventAttributes_t,
    ) -> ::core::ffi::c_int,
>;
/// Optional tool-injection handler for the [`nvtxDomainRangePop`] annotation operation. `None` means no handler is installed.
pub type nvtxDomainRangePop_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(domain: nvtxDomainHandle_t) -> ::core::ffi::c_int,
>;
/// Optional tool-injection handler for the [`nvtxDomainResourceCreate`] annotation operation. `None` means no handler is installed.
pub type nvtxDomainResourceCreate_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(
        domain: nvtxDomainHandle_t,
        attribs: *mut nvtxResourceAttributes_t,
    ) -> nvtxResourceHandle_t,
>;
/// Optional tool-injection handler for the [`nvtxDomainResourceDestroy`] annotation operation. `None` means no handler is installed.
pub type nvtxDomainResourceDestroy_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(resource: nvtxResourceHandle_t),
>;
/// Optional tool-injection handler for the [`nvtxDomainNameCategoryA`] annotation operation. `None` means no handler is installed.
pub type nvtxDomainNameCategoryA_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(
        domain: nvtxDomainHandle_t,
        category: u32,
        name: *const ::core::ffi::c_char,
    ),
>;
/// Optional tool-injection handler for the [`nvtxDomainNameCategoryW`] annotation operation. `None` means no handler is installed.
pub type nvtxDomainNameCategoryW_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(domain: nvtxDomainHandle_t, category: u32, name: *const wchar_t),
>;
/// Optional tool-injection handler for the [`nvtxDomainRegisterStringA`] annotation operation. `None` means no handler is installed.
pub type nvtxDomainRegisterStringA_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(
        domain: nvtxDomainHandle_t,
        string: *const ::core::ffi::c_char,
    ) -> nvtxStringHandle_t,
>;
/// Optional tool-injection handler for the [`nvtxDomainRegisterStringW`] annotation operation. `None` means no handler is installed.
pub type nvtxDomainRegisterStringW_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(
        domain: nvtxDomainHandle_t,
        string: *const wchar_t,
    ) -> nvtxStringHandle_t,
>;
/// Optional tool-injection handler for the [`nvtxDomainCreateA`] annotation operation. `None` means no handler is installed.
pub type nvtxDomainCreateA_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(message: *const ::core::ffi::c_char) -> nvtxDomainHandle_t,
>;
/// Optional tool-injection handler for the [`nvtxDomainCreateW`] annotation operation. `None` means no handler is installed.
pub type nvtxDomainCreateW_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(message: *const wchar_t) -> nvtxDomainHandle_t,
>;
/// Optional tool-injection handler for the [`nvtxDomainDestroy`] annotation operation. `None` means no handler is installed.
pub type nvtxDomainDestroy_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(domain: nvtxDomainHandle_t),
>;
/// Optional tool-injection handler for the [`nvtxInitialize`] annotation operation. `None` means no handler is installed.
pub type nvtxInitialize_impl_fntype = ::core::option::Option<
    unsafe extern "C" fn(reserved: *const ::core::ffi::c_void),
>;
/// Optional tool-injection handler for the `nvtxDomainSyncUserCreate` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxDomainSyncUserCreate_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(
        domain: nvtxDomainHandle_t,
        attribs: *const nvtx_nvtxSyncUserAttributes_t,
    ) -> nvtx_nvtxSyncUser_t,
>;
/// Optional tool-injection handler for the `nvtxDomainSyncUserDestroy` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxDomainSyncUserDestroy_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(handle: nvtx_nvtxSyncUser_t),
>;
/// Optional tool-injection handler for the `nvtxDomainSyncUserAcquireStart` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxDomainSyncUserAcquireStart_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(handle: nvtx_nvtxSyncUser_t),
>;
/// Optional tool-injection handler for the `nvtxDomainSyncUserAcquireFailed` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxDomainSyncUserAcquireFailed_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(handle: nvtx_nvtxSyncUser_t),
>;
/// Optional tool-injection handler for the `nvtxDomainSyncUserAcquireSuccess` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxDomainSyncUserAcquireSuccess_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(handle: nvtx_nvtxSyncUser_t),
>;
/// Optional tool-injection handler for the `nvtxDomainSyncUserReleasing` annotation operation. This ABI uses opaque handle representations so the injection interface does not require the corresponding platform headers. `None` means no handler is installed.
pub type nvtxDomainSyncUserReleasing_fakeimpl_fntype = ::core::option::Option<
    unsafe extern "C" fn(handle: nvtx_nvtxSyncUser_t),
>;