Skip to main content

singe_cuda_sys/
nvtx_sys_3.rs

1/* automatically generated by rust-bindgen 0.72.1 */
2
3/// Version of the NVTX annotation interface used to generate these bindings.
4pub const NVTX_VERSION: u32 = 3;
5/// Result Codes used for the NVTX tool loader.
6pub const NVTX_SUCCESS: u32 = 0;
7/// Unspecified failure from the NVTX tool loader.
8pub const NVTX_FAIL: u32 = 1;
9/// The NVTX tool loader could not obtain its injection-library configuration.
10pub const NVTX_ERR_INIT_LOAD_PROPERTY: u32 = 2;
11/// The NVTX injection library could not be accessed.
12pub const NVTX_ERR_INIT_ACCESS_LIBRARY: u32 = 3;
13/// The NVTX injection library could not be loaded.
14pub const NVTX_ERR_INIT_LOAD_LIBRARY: u32 = 4;
15/// The injection library does not export the required NVTX initialization entry point.
16pub const NVTX_ERR_INIT_MISSING_LIBRARY_ENTRY_POINT: u32 = 5;
17/// The NVTX injection-library initialization entry point reported failure.
18pub const NVTX_ERR_INIT_FAILED_LIBRARY_ENTRY_POINT: u32 = 6;
19/// No NVTX injection library is available to the tool loader.
20pub const NVTX_ERR_NO_INJECTION_LIBRARY_AVAILABLE: u32 = 7;
21/// Resource class used by platform-independent NVTX resource identifiers.
22pub const NVTX_RESOURCE_CLASS_GENERIC: u32 = 1;
23/// Native C wide-character code unit used by wide-string entry points.
24pub type wchar_t = ::core::ffi::c_int;
25/// Correlation identifier returned when starting a process range and passed when ending that range.
26pub type nvtxRangeId_t = u64;
27/// Forward declaration of opaque domain registration structure
28#[repr(C)]
29#[derive(Debug, Copy, Clone)]
30pub struct nvtxDomainRegistration_st {
31    _unused: [u8; 0],
32}
33/// Forward declaration of opaque domain registration structure
34pub type nvtxDomainRegistration = nvtxDomainRegistration_st;
35/// Domain Handle Structure.
36///
37/// 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.
38pub type nvtxDomainHandle_t = *mut nvtxDomainRegistration;
39/// Forward declaration of opaque string registration structure
40#[repr(C)]
41#[derive(Debug, Copy, Clone)]
42pub struct nvtxStringRegistration_st {
43    _unused: [u8; 0],
44}
45/// Forward declaration of opaque string registration structure
46pub type nvtxStringRegistration = nvtxStringRegistration_st;
47/// Registered String Handle Structure.
48///
49/// 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.
50pub type nvtxStringHandle_t = *mut nvtxStringRegistration;
51impl nvtxColorType_t {
52    /// Color attribute is unused.
53    pub const NVTX_COLOR_UNKNOWN: nvtxColorType_t = nvtxColorType_t(0);
54    /// An ARGB color is provided.
55    pub const NVTX_COLOR_ARGB: nvtxColorType_t = nvtxColorType_t(1);
56}
57/// --------------------------------------------------------------------------- Color Types -------------------------------------------------------------------------
58#[repr(transparent)]
59#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
60pub struct nvtxColorType_t(pub ::core::ffi::c_uint);
61impl nvtxMessageType_t {
62    /// Message attribute is unused.
63    pub const NVTX_MESSAGE_UNKNOWN: nvtxMessageType_t = nvtxMessageType_t(0);
64    /// A character sequence is used as payload.
65    pub const NVTX_MESSAGE_TYPE_ASCII: nvtxMessageType_t = nvtxMessageType_t(1);
66    /// A wide character sequence is used as payload.
67    pub const NVTX_MESSAGE_TYPE_UNICODE: nvtxMessageType_t = nvtxMessageType_t(2);
68    /// A unique string handle that was registered with [`nvtxDomainRegisterStringA`] or nvtxDomainRegisterStringW().
69    pub const NVTX_MESSAGE_TYPE_REGISTERED: nvtxMessageType_t = nvtxMessageType_t(3);
70}
71/// --------------------------------------------------------------------------- Message Types -------------------------------------------------------------------------
72#[repr(transparent)]
73#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
74pub struct nvtxMessageType_t(pub ::core::ffi::c_uint);
75/// NVTX message representation selected by an event or resource message-type field.
76#[repr(C)]
77#[derive(Copy, Clone)]
78pub union nvtxMessageValue_t {
79    /// Pointer to a null-terminated narrow-character message.
80    pub ascii: *const ::core::ffi::c_char,
81    /// Pointer to a null-terminated wide-character message.
82    pub unicode: *const wchar_t,
83    /// NVTX_VERSION_2
84    pub registered: nvtxStringHandle_t,
85}
86impl Default for nvtxMessageValue_t {
87    fn default() -> Self {
88        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
89        unsafe {
90            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
91            s.assume_init()
92        }
93    }
94}
95singe_loader::functions! { crate::NVTX;
96    /// Force initialization (optional).
97    ///
98    /// 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.
99    ///
100    /// # Parameters
101    ///
102    /// - `reserved`: must be zero or NULL.
103    pub fn nvtxInitialize(reserved: *const ::core::ffi::c_void);
104}
105impl nvtxPayloadType_t {
106    /// Payload attribute is unused.
107    pub const NVTX_PAYLOAD_UNKNOWN: nvtxPayloadType_t = nvtxPayloadType_t(0);
108    /// A 64 bit unsigned integer value is used as payload.
109    pub const NVTX_PAYLOAD_TYPE_UNSIGNED_INT64: nvtxPayloadType_t = nvtxPayloadType_t(1);
110    /// A 64 bit signed integer value is used as payload.
111    pub const NVTX_PAYLOAD_TYPE_INT64: nvtxPayloadType_t = nvtxPayloadType_t(2);
112    /// A 64 bit floating point value is used as payload.
113    pub const NVTX_PAYLOAD_TYPE_DOUBLE: nvtxPayloadType_t = nvtxPayloadType_t(3);
114    /// A 32-bit unsigned integer value is used as payload.
115    pub const NVTX_PAYLOAD_TYPE_UNSIGNED_INT32: nvtxPayloadType_t = nvtxPayloadType_t(4);
116    /// A 32-bit signed integer value is used as payload.
117    pub const NVTX_PAYLOAD_TYPE_INT32: nvtxPayloadType_t = nvtxPayloadType_t(5);
118    /// A 32 bit floating point value is used as payload.
119    pub const NVTX_PAYLOAD_TYPE_FLOAT: nvtxPayloadType_t = nvtxPayloadType_t(6);
120}
121/// --------------------------------------------------------------------------- Payload Types -------------------------------------------------------------------------
122#[repr(transparent)]
123#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
124pub struct nvtxPayloadType_t(pub ::core::ffi::c_uint);
125/// Event Attribute Structure.
126///
127/// 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.
128///
129/// 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>
130///
131/// Zeroing the structure sets all the event attributes types and values to the default value.
132///
133/// The version and size field are used by the Tools Extension implementation to handle multiple versions of the attributes structure.
134///
135/// It is recommended that the caller use one of the following to methods to initialize the event attributes structure:
136///
137/// Initializing nvtxEventAttributes for future compatibility:
138///
139/// ```text
140///  nvtxEventAttributes_t eventAttrib = {0};
141///  eventAttrib.version = NVTX_VERSION;
142///  eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
143/// ```
144///
145/// Initializing nvtxEventAttributes for a specific version:
146///
147/// ```text
148///  nvtxEventAttributes_t eventAttrib = {0};
149///  eventAttrib.version = 1;
150///  eventAttrib.size = (uint16_t)(sizeof(nvtxEventAttributes_v1));
151/// ```
152///
153/// 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.
154///
155/// 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.
156///
157/// Populate an attributes structure:
158///
159/// ```text
160///  // Initialize
161///  nvtxEventAttributes_t eventAttrib = {0};
162///  eventAttrib.version = NVTX_VERSION;
163///  eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
164///
165///  // Configure the Attributes
166///  eventAttrib.colorType = NVTX_COLOR_ARGB;
167///  eventAttrib.color = 0xFF880000;
168///  eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
169///  eventAttrib.message.ascii = "Example";
170/// ```
171///
172/// In the example the caller does not have to set the value of `nvtxEventAttributes_v2::category`(nvtxEventAttributes_v2::category) or `nvtxEventAttributes_v2::payload`(nvtxEventAttributes_v2::payload) as these fields were set to the default value by {0}.
173///
174/// See also: nvtxDomainMarkEx nvtxDomainRangeStartEx nvtxDomainRangePushEx.
175#[repr(C)]
176#[derive(Copy, Clone)]
177pub struct nvtxEventAttributes_v2 {
178    /// Version flag of the structure.
179    ///
180    /// 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.
181    pub version: u16,
182    /// Size of the structure.
183    ///
184    /// Needs to be set to the size in bytes of the event attribute structure used to specify the event.
185    pub size: u16,
186    /// ID of the category the event is assigned to.
187    ///
188    /// 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.
189    ///
190    /// Default Value is 0.
191    pub category: u32,
192    /// Color type specified in this attribute structure.
193    ///
194    /// Defines the color format of the attribute structure's [color](https://nvidia.github.io/NVTX/doxygen/structnvtx_event_attributes__v2.html#COLOR_FIELD) field.
195    ///
196    /// Default Value is [`nvtxColorType_t::NVTX_COLOR_UNKNOWN`].
197    pub colorType: i32,
198    /// Color assigned to this event.
199    ///
200    /// The color that the tool should use to visualize the event.
201    pub color: u32,
202    /// Payload type specified in this attribute structure.
203    ///
204    /// Defines the payload format of the attribute structure's [payload](https://nvidia.github.io/NVTX/doxygen/unionnvtx_event_attributes__v2_1_1payload__t.html#PAYLOAD_FIELD) field.
205    ///
206    /// Default Value is [`nvtxPayloadType_t::NVTX_PAYLOAD_UNKNOWN`].
207    pub payloadType: i32,
208    /// Reserved native event-attribute field.
209    pub reserved0: i32,
210    /// Payload assigned to this event.
211    ///
212    /// A numerical value that can be used to annotate an event. The tool could use the payload data to reconstruct graphs and diagrams.
213    pub payload: nvtxEventAttributes_v2_payload_t,
214    /// Message type specified in this attribute structure.
215    ///
216    /// Defines the message format of the attribute structure's [message](https://nvidia.github.io/NVTX/doxygen/structnvtx_event_attributes__v2.html#MESSAGE_FIELD) field.
217    ///
218    /// Default Value is [`nvtxMessageType_t::NVTX_MESSAGE_UNKNOWN`].
219    pub messageType: i32,
220    /// Message assigned to this attribute structure.
221    ///
222    /// The text message that is attached to an event.
223    pub message: nvtxMessageValue_t,
224}
225/// Payload assigned to this event.
226///
227/// A numerical value that can be used to annotate an event. The tool could use the payload data to reconstruct graphs and diagrams.
228#[repr(C)]
229#[derive(Copy, Clone)]
230pub union nvtxEventAttributes_v2_payload_t {
231    /// Unsigned 64-bit integer payload.
232    pub ullValue: u64,
233    /// Signed 64-bit integer payload.
234    pub llValue: i64,
235    /// Double-precision floating-point payload.
236    pub dValue: f64,
237    /// NVTX_VERSION_2
238    pub uiValue: u32,
239    /// Signed 32-bit integer payload.
240    pub iValue: i32,
241    /// Single-precision floating-point payload.
242    pub fValue: f32,
243}
244impl Default for nvtxEventAttributes_v2_payload_t {
245    fn default() -> Self {
246        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
247        unsafe {
248            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
249            s.assume_init()
250        }
251    }
252}
253impl Default for nvtxEventAttributes_v2 {
254    fn default() -> Self {
255        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
256        unsafe {
257            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
258            s.assume_init()
259        }
260    }
261}
262/// Event Attribute Structure.
263///
264/// 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.
265///
266/// 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>
267///
268/// Zeroing the structure sets all the event attributes types and values to the default value.
269///
270/// The version and size field are used by the Tools Extension implementation to handle multiple versions of the attributes structure.
271///
272/// It is recommended that the caller use one of the following to methods to initialize the event attributes structure:
273///
274/// Initializing nvtxEventAttributes for future compatibility:
275///
276/// ```text
277///  nvtxEventAttributes_t eventAttrib = {0};
278///  eventAttrib.version = NVTX_VERSION;
279///  eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
280/// ```
281///
282/// Initializing nvtxEventAttributes for a specific version:
283///
284/// ```text
285///  nvtxEventAttributes_t eventAttrib = {0};
286///  eventAttrib.version = 1;
287///  eventAttrib.size = (uint16_t)(sizeof(nvtxEventAttributes_v1));
288/// ```
289///
290/// 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.
291///
292/// 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.
293///
294/// Populate an attributes structure:
295///
296/// ```text
297///  // Initialize
298///  nvtxEventAttributes_t eventAttrib = {0};
299///  eventAttrib.version = NVTX_VERSION;
300///  eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
301///
302///  // Configure the Attributes
303///  eventAttrib.colorType = NVTX_COLOR_ARGB;
304///  eventAttrib.color = 0xFF880000;
305///  eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
306///  eventAttrib.message.ascii = "Example";
307/// ```
308///
309/// In the example the caller does not have to set the value of `nvtxEventAttributes_v2::category`(nvtxEventAttributes_v2::category) or `nvtxEventAttributes_v2::payload`(nvtxEventAttributes_v2::payload) as these fields were set to the default value by {0}.
310///
311/// See also: nvtxDomainMarkEx nvtxDomainRangeStartEx nvtxDomainRangePushEx.
312pub type nvtxEventAttributes_t = nvtxEventAttributes_v2;
313singe_loader::functions! { crate::NVTX;
314    /// Marks an instantaneous event in the application.
315    ///
316    /// 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.
317    ///
318    /// nvtxDomainMarkEx(NULL, event) is equivalent to calling nvtxMarkEx(event).
319    ///
320    /// # Parameters
321    ///
322    /// - `domain`: The domain of scoping the category.
323    /// - `eventAttrib`: The event attribute structure defining the marker's attribute types and attribute values.
324    pub fn nvtxDomainMarkEx(
325        domain: nvtxDomainHandle_t,
326        eventAttrib: *const nvtxEventAttributes_t,
327    );
328}
329singe_loader::functions! { crate::NVTX;
330    /// Marks an instantaneous event in the application.
331    ///
332    /// 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.
333    ///
334    /// # Parameters
335    ///
336    /// - `eventAttrib`: The event attribute structure defining the marker's attribute types and attribute values.
337    pub fn nvtxMarkEx(eventAttrib: *const nvtxEventAttributes_t);
338}
339singe_loader::functions! { crate::NVTX;
340    /// Marks an instantaneous event in the application.
341    ///
342    /// A marker created using [`nvtxMarkA`] or nvtxMarkW contains only a text message.
343    ///
344    /// # Parameters
345    ///
346    /// - `message`: The message associated to this marker event.
347    pub fn nvtxMarkA(message: *const ::core::ffi::c_char);
348}
349singe_loader::functions! { crate::NVTX;
350    /// Marks an instantaneous event with a wide-character message.
351    ///
352    /// Wide-character form of [`nvtxMarkA`].
353    ///
354    /// # Parameters
355    ///
356    /// - `message`: Null-terminated wide-character string.
357    pub fn nvtxMarkW(message: *const wchar_t);
358}
359singe_loader::functions! { crate::NVTX;
360    /// Starts a process range in a domain.
361    ///
362    /// # Parameters
363    ///
364    /// - `domain`: The domain of scoping the category.
365    /// - `eventAttrib`: The event attribute structure defining the range's attribute types and attribute values.
366    ///
367    /// # Return value
368    ///
369    /// The unique ID used to correlate a pair of Start and End events.
370    pub fn nvtxDomainRangeStartEx(
371        domain: nvtxDomainHandle_t,
372        eventAttrib: *const nvtxEventAttributes_t,
373    ) -> nvtxRangeId_t;
374}
375singe_loader::functions! { crate::NVTX;
376    /// Starts a process range.
377    ///
378    /// # Parameters
379    ///
380    /// - `eventAttrib`: The event attribute structure defining the range's attribute types and attribute values.
381    ///
382    /// # Return value
383    ///
384    /// The unique ID used to correlate a pair of Start and End events.
385    pub fn nvtxRangeStartEx(eventAttrib: *const nvtxEventAttributes_t) -> nvtxRangeId_t;
386}
387singe_loader::functions! { crate::NVTX;
388    /// Starts a process range.
389    ///
390    /// # Parameters
391    ///
392    /// - `message`: The event message associated to this range event.
393    ///
394    /// # Return value
395    ///
396    /// The unique ID used to correlate a pair of Start and End events.
397    pub fn nvtxRangeStartA(message: *const ::core::ffi::c_char) -> nvtxRangeId_t;
398}
399singe_loader::functions! { crate::NVTX;
400    /// Starts a process range with a wide-character message and returns its range identifier.
401    ///
402    /// Wide-character form of [`nvtxRangeStartA`].
403    ///
404    /// # Parameters
405    ///
406    /// - `message`: Null-terminated wide-character string.
407    pub fn nvtxRangeStartW(message: *const wchar_t) -> nvtxRangeId_t;
408}
409singe_loader::functions! { crate::NVTX;
410    /// Ends a process range.
411    ///
412    /// # Parameters
413    ///
414    /// - `domain`: The domain.
415    /// - `id`: The correlation ID returned from a nvtxRangeStart call.
416    pub fn nvtxDomainRangeEnd(domain: nvtxDomainHandle_t, id: nvtxRangeId_t);
417}
418singe_loader::functions! { crate::NVTX;
419    /// Ends a process range.
420    ///
421    /// # Parameters
422    ///
423    /// - `id`: The correlation ID returned from an nvtxRangeStart call.
424    pub fn nvtxRangeEnd(id: nvtxRangeId_t);
425}
426singe_loader::functions! { crate::NVTX;
427    /// Starts a nested thread range.
428    ///
429    /// # Parameters
430    ///
431    /// - `domain`: The domain of scoping.
432    /// - `eventAttrib`: The event attribute structure defining the range's attribute types and attribute values.
433    ///
434    /// # Return value
435    ///
436    /// The 0 based level of range being started. This value is scoped to the domain. If an error occurs, a negative value is returned.
437    pub fn nvtxDomainRangePushEx(
438        domain: nvtxDomainHandle_t,
439        eventAttrib: *const nvtxEventAttributes_t,
440    ) -> ::core::ffi::c_int;
441}
442singe_loader::functions! { crate::NVTX;
443    /// Starts a nested thread range.
444    ///
445    /// # Parameters
446    ///
447    /// - `eventAttrib`: The event attribute structure defining the range's attribute types and attribute values.
448    ///
449    /// # Return value
450    ///
451    /// The 0 based level of range being started. This level is per domain. If an error occurs a negative value is returned.
452    pub fn nvtxRangePushEx(
453        eventAttrib: *const nvtxEventAttributes_t,
454    ) -> ::core::ffi::c_int;
455}
456singe_loader::functions! { crate::NVTX;
457    /// Starts a nested thread range.
458    ///
459    /// # Parameters
460    ///
461    /// - `message`: The event message associated to this range event.
462    ///
463    /// # Return value
464    ///
465    /// The 0 based level of range being started. If an error occurs a negative value is returned.
466    pub fn nvtxRangePushA(message: *const ::core::ffi::c_char) -> ::core::ffi::c_int;
467}
468singe_loader::functions! { crate::NVTX;
469    /// Starts a nested thread range with a wide-character message.
470    ///
471    /// Wide-character form of [`nvtxRangePushA`].
472    ///
473    /// # Parameters
474    ///
475    /// - `message`: Null-terminated wide-character string.
476    pub fn nvtxRangePushW(message: *const wchar_t) -> ::core::ffi::c_int;
477}
478singe_loader::functions! { crate::NVTX;
479    /// Ends a nested thread range.
480    ///
481    /// # Return value
482    ///
483    /// The level of the range being ended. If an error occurs a negative value is returned on the current thread.
484    pub fn nvtxDomainRangePop(domain: nvtxDomainHandle_t) -> ::core::ffi::c_int;
485}
486singe_loader::functions! { crate::NVTX;
487    /// Ends a nested thread range.
488    ///
489    /// # Return value
490    ///
491    /// The level of the range being ended. If an error occurs a negative value is returned on the current thread.
492    pub fn nvtxRangePop() -> ::core::ffi::c_int;
493}
494impl nvtxResourceGenericType_t {
495    /// No supported NVTX resource identifier type is selected.
496    pub const NVTX_RESOURCE_TYPE_UNKNOWN: nvtxResourceGenericType_t = nvtxResourceGenericType_t(
497        0,
498    );
499    /// Generic pointer assumed to have no collisions with other pointers.
500    pub const NVTX_RESOURCE_TYPE_GENERIC_POINTER: nvtxResourceGenericType_t = nvtxResourceGenericType_t(
501        65537,
502    );
503    /// Generic handle assumed to have no collisions with other handles.
504    pub const NVTX_RESOURCE_TYPE_GENERIC_HANDLE: nvtxResourceGenericType_t = nvtxResourceGenericType_t(
505        65538,
506    );
507    /// OS native thread identifier.
508    pub const NVTX_RESOURCE_TYPE_GENERIC_THREAD_NATIVE: nvtxResourceGenericType_t = nvtxResourceGenericType_t(
509        65539,
510    );
511    /// POSIX pthread identifier.
512    pub const NVTX_RESOURCE_TYPE_GENERIC_THREAD_POSIX: nvtxResourceGenericType_t = nvtxResourceGenericType_t(
513        65540,
514    );
515}
516/// Generic resource type for when a resource class is not available.
517#[repr(transparent)]
518#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
519pub struct nvtxResourceGenericType_t(pub ::core::ffi::c_uint);
520/// Resource Attribute Structure.
521///
522/// 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.
523///
524/// 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>
525///
526/// Zeroing the structure sets all the resource attributes types and values to the default value.
527///
528/// The version and size field are used by the Tools Extension implementation to handle multiple versions of the attributes structure.
529///
530/// It is recommended that the caller use one of the following to methods to initialize the event attributes structure:
531///
532/// Initializing nvtxEventAttributes for future compatibility:
533///
534/// ```text
535///  nvtxResourceAttributes_t attribs = {0};
536///  attribs.version = NVTX_VERSION;
537///  attribs.size = NVTX_RESOURCE_ATTRIB_STRUCT_SIZE;
538/// ```
539///
540/// Initializing nvtxEventAttributes for a specific version:
541///
542/// ```text
543///  nvtxResourceAttributes_v0 attribs = {0};
544///  attribs.version = 2;
545///  attribs.size = (uint16_t)(sizeof(nvtxResourceAttributes_v0));
546/// ```
547///
548/// 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.
549///
550/// 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.
551///
552/// Register a resource and populate its attributes:
553///
554/// ```text
555///  nvtxDomainHandle_t domain = nvtxDomainCreateA("example domain");
556///
557///  // Initialize
558///  nvtxResourceAttributes_t attribs = {0};
559///  attribs.version = NVTX_VERSION;
560///  attribs.size = NVTX_RESOURCE_ATTRIB_STRUCT_SIZE;
561///
562///  // Configure the Attributes
563///  attribs.identifierType = NVTX_RESOURCE_TYPE_GENERIC_POINTER;
564///  attribs.identifier.pValue = (const void*)pMutex;
565///  attribs.messageType = NVTX_MESSAGE_TYPE_ASCII;
566///  attribs.message.ascii = "Single thread access to database.";
567///
568///  nvtxResourceHandle_t handle = nvtxDomainResourceCreate(domain, &attribs);
569/// ```
570///
571/// See also: [`nvtxDomainResourceCreate`].
572#[repr(C)]
573#[derive(Copy, Clone)]
574pub struct nvtxResourceAttributes_v0 {
575    /// Version flag of the structure.
576    ///
577    /// 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.
578    pub version: u16,
579    /// Size of the structure.
580    ///
581    /// Needs to be set to the size in bytes of this attribute structure.
582    pub size: u16,
583    /// Identifier type specifies how to interpret the identifier field.
584    ///
585    /// Defines the identifier format of the attribute structure's [identifier](https://nvidia.github.io/NVTX/doxygen/unionnvtx_resource_attributes__v0_1_1identifier__t.html#RESOURCE_IDENTIFIER_FIELD) field.
586    ///
587    /// Default Value is NVTX_RESOURCE_TYPE_UNKNOWN.
588    pub identifierType: i32,
589    /// Identifier for the resource.
590    ///
591    /// 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.
592    pub identifier: nvtxResourceAttributes_v0_identifier_t,
593    /// Message type specified in this attribute structure.
594    ///
595    /// Defines the message format of the attribute structure's [message](https://nvidia.github.io/NVTX/doxygen/structnvtx_resource_attributes__v0.html#RESOURCE_MESSAGE_FIELD) field.
596    ///
597    /// Default Value is [`nvtxMessageType_t::NVTX_MESSAGE_UNKNOWN`].
598    pub messageType: i32,
599    /// Message assigned to this attribute structure.
600    ///
601    /// The text message that is attached to a resource.
602    pub message: nvtxMessageValue_t,
603}
604/// Identifier for the resource.
605///
606/// 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.
607#[repr(C)]
608#[derive(Copy, Clone)]
609pub union nvtxResourceAttributes_v0_identifier_t {
610    /// Pointer-valued resource identifier.
611    pub pValue: *const ::core::ffi::c_void,
612    /// Unsigned 64-bit resource identifier.
613    pub ullValue: u64,
614}
615impl Default for nvtxResourceAttributes_v0_identifier_t {
616    fn default() -> Self {
617        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
618        unsafe {
619            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
620            s.assume_init()
621        }
622    }
623}
624impl Default for nvtxResourceAttributes_v0 {
625    fn default() -> Self {
626        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
627        unsafe {
628            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
629            s.assume_init()
630        }
631    }
632}
633/// Resource Attribute Structure.
634///
635/// 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.
636///
637/// 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>
638///
639/// Zeroing the structure sets all the resource attributes types and values to the default value.
640///
641/// The version and size field are used by the Tools Extension implementation to handle multiple versions of the attributes structure.
642///
643/// It is recommended that the caller use one of the following to methods to initialize the event attributes structure:
644///
645/// Initializing nvtxEventAttributes for future compatibility:
646///
647/// ```text
648///  nvtxResourceAttributes_t attribs = {0};
649///  attribs.version = NVTX_VERSION;
650///  attribs.size = NVTX_RESOURCE_ATTRIB_STRUCT_SIZE;
651/// ```
652///
653/// Initializing nvtxEventAttributes for a specific version:
654///
655/// ```text
656///  nvtxResourceAttributes_v0 attribs = {0};
657///  attribs.version = 2;
658///  attribs.size = (uint16_t)(sizeof(nvtxResourceAttributes_v0));
659/// ```
660///
661/// 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.
662///
663/// 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.
664///
665/// Register a resource and populate its attributes:
666///
667/// ```text
668///  nvtxDomainHandle_t domain = nvtxDomainCreateA("example domain");
669///
670///  // Initialize
671///  nvtxResourceAttributes_t attribs = {0};
672///  attribs.version = NVTX_VERSION;
673///  attribs.size = NVTX_RESOURCE_ATTRIB_STRUCT_SIZE;
674///
675///  // Configure the Attributes
676///  attribs.identifierType = NVTX_RESOURCE_TYPE_GENERIC_POINTER;
677///  attribs.identifier.pValue = (const void*)pMutex;
678///  attribs.messageType = NVTX_MESSAGE_TYPE_ASCII;
679///  attribs.message.ascii = "Single thread access to database.";
680///
681///  nvtxResourceHandle_t handle = nvtxDomainResourceCreate(domain, &attribs);
682/// ```
683///
684/// See also: [`nvtxDomainResourceCreate`].
685pub type nvtxResourceAttributes_t = nvtxResourceAttributes_v0;
686/// Incomplete native type used by [`nvtxResourceHandle_t`] handles. The native API owns its layout.
687#[repr(C)]
688#[derive(Debug, Copy, Clone)]
689pub struct nvtxResourceHandle {
690    _unused: [u8; 0],
691}
692/// Opaque handle identifying a named resource within an NVTX domain.
693pub type nvtxResourceHandle_t = *mut nvtxResourceHandle;
694singe_loader::functions! { crate::NVTX;
695    /// Create a resource object to track and associate data with OS and middleware objects.
696    ///
697    /// Allows users to associate an API handle or pointer with a user-provided name.
698    ///
699    /// # Parameters
700    ///
701    /// - `domain`: Domain to own the resource object.
702    /// - `attribs`: Attributes to be associated with the resource.
703    ///
704    /// # Return value
705    ///
706    /// A handle that represents the newly created resource object.
707    pub fn nvtxDomainResourceCreate(
708        domain: nvtxDomainHandle_t,
709        attribs: *mut nvtxResourceAttributes_t,
710    ) -> nvtxResourceHandle_t;
711}
712singe_loader::functions! { crate::NVTX;
713    /// Destroy a resource object to track and associate data with OS and middleware objects.
714    ///
715    /// Allows users to associate an API handle or pointer with a user-provided name.
716    ///
717    /// # Parameters
718    ///
719    /// - `resource`: Handle to the resource in which to operate.
720    pub fn nvtxDomainResourceDestroy(resource: nvtxResourceHandle_t);
721}
722singe_loader::functions! { crate::NVTX;
723    /// Annotate an NVTX category used within a domain.
724    ///
725    /// 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.
726    ///
727    /// nvtxDomainNameCategory(NULL, category, name) is equivalent to calling nvtxNameCategory(category, name).
728    ///
729    /// # Parameters
730    ///
731    /// - `domain`: The domain of scoping the category.
732    /// - `category`: The category ID to name.
733    /// - `name`: The name of the category.
734    pub fn nvtxDomainNameCategoryA(
735        domain: nvtxDomainHandle_t,
736        category: u32,
737        name: *const ::core::ffi::c_char,
738    );
739}
740singe_loader::functions! { crate::NVTX;
741    /// Names a category in an NVTX domain using a wide-character string.
742    ///
743    /// Wide-character form of [`nvtxDomainNameCategoryA`].
744    ///
745    /// # Parameters
746    ///
747    /// - `name`: Null-terminated wide-character string.
748    pub fn nvtxDomainNameCategoryW(
749        domain: nvtxDomainHandle_t,
750        category: u32,
751        name: *const wchar_t,
752    );
753}
754singe_loader::functions! { crate::NVTX;
755    /// Annotate an NVTX category.
756    ///
757    /// 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.
758    ///
759    /// # Parameters
760    ///
761    /// - `category`: The category ID to name.
762    /// - `name`: The name of the category.
763    pub fn nvtxNameCategoryA(category: u32, name: *const ::core::ffi::c_char);
764}
765singe_loader::functions! { crate::NVTX;
766    /// Names a category in the default NVTX domain using a wide-character string.
767    ///
768    /// Wide-character form of [`nvtxNameCategoryA`].
769    ///
770    /// # Parameters
771    ///
772    /// - `name`: Null-terminated wide-character string.
773    pub fn nvtxNameCategoryW(category: u32, name: *const wchar_t);
774}
775singe_loader::functions! { crate::NVTX;
776    /// Annotate an OS thread.
777    ///
778    /// 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.
779    ///
780    /// 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.
781    ///
782    /// POSIX pthread_t type returned by pthread_self() may not comply with these expectations. Please use OS-specific thread ID instead of pthread_t.
783    ///
784    /// The thread name is associated to the default domain. To support domains use resource objects via [`nvtxDomainResourceCreate`].
785    ///
786    /// Windows:
787    ///
788    /// #include &lt;windows.h>
789    ///
790    /// nvtxNameOsThread(GetCurrentThreadId(), "Current thread");
791    ///
792    /// nvtxNameOsThread(GetThreadId(SomeThreadHandle), "Other thread");
793    ///
794    /// Android:
795    ///
796    /// #include &lt;unistd.h>
797    ///
798    /// [`nvtxNameOsThreadA`](gettid(), "Current thread");
799    ///
800    /// [`nvtxNameOsThreadA`](getpid(), "Main thread");
801    ///
802    /// [`nvtxNameOsThreadA`]
803    ///
804    /// NVTX_DECLSPEC void NVTX_API nvtxNameOsThreadA(uint32_t threadId, const char \*name)
805    ///
806    /// Annotate an OS thread.
807    ///
808    /// Linux:
809    ///
810    /// #include &lt;sys/syscall.h>
811    ///
812    /// [`nvtxNameOsThreadA`](syscall(SYS_gettid), "Current thread");
813    ///
814    /// #include &lt;unistd.h>
815    ///
816    /// [`nvtxNameOsThreadA`](getpid(), "Main thread");
817    ///
818    /// macOS:
819    ///
820    /// #include &lt;sys/syscall.h>
821    ///
822    /// [`nvtxNameOsThreadA`](syscall(SYS_thread_selfid), "Current thread");
823    ///
824    /// #include &lt;pthread.h>
825    ///
826    /// __uint64_t id;
827    ///
828    /// pthread_threadid_np(pthread_self(), &id);
829    ///
830    /// [`nvtxNameOsThreadA`](id, "Current thread");
831    ///
832    /// pthread_threadid_np(somePThreadId, &id);
833    ///
834    /// [`nvtxNameOsThreadA`](id, "Other thread");.
835    ///
836    /// # Parameters
837    ///
838    /// - `threadId`: The ID of the thread to name.
839    /// - `name`: The name of the thread.
840    pub fn nvtxNameOsThreadA(threadId: u32, name: *const ::core::ffi::c_char);
841}
842singe_loader::functions! { crate::NVTX;
843    /// Names an active OS thread of this process using a wide-character string.
844    ///
845    /// Wide-character form of [`nvtxNameOsThreadA`].
846    ///
847    /// # Parameters
848    ///
849    /// - `name`: Null-terminated wide-character string.
850    pub fn nvtxNameOsThreadW(threadId: u32, name: *const wchar_t);
851}
852singe_loader::functions! { crate::NVTX;
853    /// Register a string.
854    ///
855    /// 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.
856    ///
857    /// String registration is an optimization. It is recommended to use string registration if the string will be passed to an event many times.
858    ///
859    /// Strings are not unregistered, except that by unregistering the entire domain.
860    ///
861    /// # Parameters
862    ///
863    /// - `domain`: Domain handle. If NULL then the global domain is used.
864    /// - `string`: A unique pointer to a sequence of characters.
865    ///
866    /// # Return value
867    ///
868    /// A handle representing the registered string.
869    pub fn nvtxDomainRegisterStringA(
870        domain: nvtxDomainHandle_t,
871        string: *const ::core::ffi::c_char,
872    ) -> nvtxStringHandle_t;
873}
874singe_loader::functions! { crate::NVTX;
875    /// Registers an immutable wide-character string in an NVTX domain.
876    ///
877    /// Wide-character form of [`nvtxDomainRegisterStringA`].
878    ///
879    /// # Parameters
880    ///
881    /// - `string`: Null-terminated wide-character string.
882    pub fn nvtxDomainRegisterStringW(
883        domain: nvtxDomainHandle_t,
884        string: *const wchar_t,
885    ) -> nvtxStringHandle_t;
886}
887singe_loader::functions! { crate::NVTX;
888    /// Register a NVTX domain.
889    ///
890    /// 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.
891    ///
892    /// Each domain maintains its own nvtxRangePush and nvtxRangePop stack.
893    ///
894    /// # Parameters
895    ///
896    /// - `name`: A unique string representing the domain.
897    ///
898    /// # Return value
899    ///
900    /// A handle representing the domain.
901    pub fn nvtxDomainCreateA(name: *const ::core::ffi::c_char) -> nvtxDomainHandle_t;
902}
903singe_loader::functions! { crate::NVTX;
904    /// Registers a named NVTX annotation domain using a wide-character string.
905    ///
906    /// Wide-character form of [`nvtxDomainCreateA`].
907    ///
908    /// # Parameters
909    ///
910    /// - `name`: Null-terminated wide-character string.
911    pub fn nvtxDomainCreateW(name: *const wchar_t) -> nvtxDomainHandle_t;
912}
913singe_loader::functions! { crate::NVTX;
914    /// Unregister a NVTX domain.
915    ///
916    /// Unregisters the domain handle and frees all domain specific resources.
917    ///
918    /// # Parameters
919    ///
920    /// - `domain`: the domain handle.
921    pub fn nvtxDomainDestroy(domain: nvtxDomainHandle_t);
922}
923/// CUDA driver device identifier in the platform-independent NVTX injection ABI.
924pub type nvtx_CUdevice = ::core::ffi::c_int;
925/// CUDA driver context handle in the platform-independent NVTX injection ABI.
926pub type nvtx_CUcontext = *mut ::core::ffi::c_void;
927/// CUDA driver stream handle in the platform-independent NVTX injection ABI.
928pub type nvtx_CUstream = *mut ::core::ffi::c_void;
929/// CUDA driver event handle in the platform-independent NVTX injection ABI.
930pub type nvtx_CUevent = *mut ::core::ffi::c_void;
931/// CUDA runtime stream handle in the platform-independent NVTX injection ABI.
932pub type nvtx_cudaStream_t = *mut ::core::ffi::c_void;
933/// CUDA runtime event handle in the platform-independent NVTX injection ABI.
934pub type nvtx_cudaEvent_t = *mut ::core::ffi::c_void;
935/// OpenCL platform identifier in the platform-independent NVTX injection ABI.
936pub type nvtx_cl_platform_id = *mut ::core::ffi::c_void;
937/// OpenCL device identifier in the platform-independent NVTX injection ABI.
938pub type nvtx_cl_device_id = *mut ::core::ffi::c_void;
939/// OpenCL context handle in the platform-independent NVTX injection ABI.
940pub type nvtx_cl_context = *mut ::core::ffi::c_void;
941/// OpenCL command-queue handle in the platform-independent NVTX injection ABI.
942pub type nvtx_cl_command_queue = *mut ::core::ffi::c_void;
943/// OpenCL memory-object handle in the platform-independent NVTX injection ABI.
944pub type nvtx_cl_mem = *mut ::core::ffi::c_void;
945/// OpenCL program handle in the platform-independent NVTX injection ABI.
946pub type nvtx_cl_program = *mut ::core::ffi::c_void;
947/// OpenCL kernel handle in the platform-independent NVTX injection ABI.
948pub type nvtx_cl_kernel = *mut ::core::ffi::c_void;
949/// OpenCL event handle in the platform-independent NVTX injection ABI.
950pub type nvtx_cl_event = *mut ::core::ffi::c_void;
951/// OpenCL sampler handle in the platform-independent NVTX injection ABI.
952pub type nvtx_cl_sampler = *mut ::core::ffi::c_void;
953/// NVTX user-synchronization object handle in the platform-independent NVTX injection ABI.
954pub type nvtx_nvtxSyncUser_t = *mut ::core::ffi::c_void;
955/// Opaque NVTX user-synchronization attributes in the platform-independent NVTX injection ABI.
956pub type nvtx_nvtxSyncUserAttributes_t = ::core::ffi::c_void;
957/// Optional tool-injection handler for the [`nvtxMarkEx`] annotation operation. `None` means no handler is installed.
958pub type nvtxMarkEx_impl_fntype = ::core::option::Option<
959    unsafe extern "C" fn(eventAttrib: *const nvtxEventAttributes_t),
960>;
961/// Optional tool-injection handler for the [`nvtxMarkA`] annotation operation. `None` means no handler is installed.
962pub type nvtxMarkA_impl_fntype = ::core::option::Option<
963    unsafe extern "C" fn(message: *const ::core::ffi::c_char),
964>;
965/// Optional tool-injection handler for the [`nvtxMarkW`] annotation operation. `None` means no handler is installed.
966pub type nvtxMarkW_impl_fntype = ::core::option::Option<
967    unsafe extern "C" fn(message: *const wchar_t),
968>;
969/// Optional tool-injection handler for the [`nvtxRangeStartEx`] annotation operation. `None` means no handler is installed.
970pub type nvtxRangeStartEx_impl_fntype = ::core::option::Option<
971    unsafe extern "C" fn(eventAttrib: *const nvtxEventAttributes_t) -> nvtxRangeId_t,
972>;
973/// Optional tool-injection handler for the [`nvtxRangeStartA`] annotation operation. `None` means no handler is installed.
974pub type nvtxRangeStartA_impl_fntype = ::core::option::Option<
975    unsafe extern "C" fn(message: *const ::core::ffi::c_char) -> nvtxRangeId_t,
976>;
977/// Optional tool-injection handler for the [`nvtxRangeStartW`] annotation operation. `None` means no handler is installed.
978pub type nvtxRangeStartW_impl_fntype = ::core::option::Option<
979    unsafe extern "C" fn(message: *const wchar_t) -> nvtxRangeId_t,
980>;
981/// Optional tool-injection handler for the [`nvtxRangeEnd`] annotation operation. `None` means no handler is installed.
982pub type nvtxRangeEnd_impl_fntype = ::core::option::Option<
983    unsafe extern "C" fn(id: nvtxRangeId_t),
984>;
985/// Optional tool-injection handler for the [`nvtxRangePushEx`] annotation operation. `None` means no handler is installed.
986pub type nvtxRangePushEx_impl_fntype = ::core::option::Option<
987    unsafe extern "C" fn(eventAttrib: *const nvtxEventAttributes_t) -> ::core::ffi::c_int,
988>;
989/// Optional tool-injection handler for the [`nvtxRangePushA`] annotation operation. `None` means no handler is installed.
990pub type nvtxRangePushA_impl_fntype = ::core::option::Option<
991    unsafe extern "C" fn(message: *const ::core::ffi::c_char) -> ::core::ffi::c_int,
992>;
993/// Optional tool-injection handler for the [`nvtxRangePushW`] annotation operation. `None` means no handler is installed.
994pub type nvtxRangePushW_impl_fntype = ::core::option::Option<
995    unsafe extern "C" fn(message: *const wchar_t) -> ::core::ffi::c_int,
996>;
997/// Optional tool-injection handler for the [`nvtxRangePop`] annotation operation. `None` means no handler is installed.
998pub type nvtxRangePop_impl_fntype = ::core::option::Option<
999    unsafe extern "C" fn() -> ::core::ffi::c_int,
1000>;
1001/// Optional tool-injection handler for the [`nvtxNameCategoryA`] annotation operation. `None` means no handler is installed.
1002pub type nvtxNameCategoryA_impl_fntype = ::core::option::Option<
1003    unsafe extern "C" fn(category: u32, name: *const ::core::ffi::c_char),
1004>;
1005/// Optional tool-injection handler for the [`nvtxNameCategoryW`] annotation operation. `None` means no handler is installed.
1006pub type nvtxNameCategoryW_impl_fntype = ::core::option::Option<
1007    unsafe extern "C" fn(category: u32, name: *const wchar_t),
1008>;
1009/// Optional tool-injection handler for the [`nvtxNameOsThreadA`] annotation operation. `None` means no handler is installed.
1010pub type nvtxNameOsThreadA_impl_fntype = ::core::option::Option<
1011    unsafe extern "C" fn(threadId: u32, name: *const ::core::ffi::c_char),
1012>;
1013/// Optional tool-injection handler for the [`nvtxNameOsThreadW`] annotation operation. `None` means no handler is installed.
1014pub type nvtxNameOsThreadW_impl_fntype = ::core::option::Option<
1015    unsafe extern "C" fn(threadId: u32, name: *const wchar_t),
1016>;
1017/// 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.
1018pub type nvtxNameCuDeviceA_fakeimpl_fntype = ::core::option::Option<
1019    unsafe extern "C" fn(device: nvtx_CUdevice, name: *const ::core::ffi::c_char),
1020>;
1021/// 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.
1022pub type nvtxNameCuDeviceW_fakeimpl_fntype = ::core::option::Option<
1023    unsafe extern "C" fn(device: nvtx_CUdevice, name: *const wchar_t),
1024>;
1025/// 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.
1026pub type nvtxNameCuContextA_fakeimpl_fntype = ::core::option::Option<
1027    unsafe extern "C" fn(context: nvtx_CUcontext, name: *const ::core::ffi::c_char),
1028>;
1029/// 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.
1030pub type nvtxNameCuContextW_fakeimpl_fntype = ::core::option::Option<
1031    unsafe extern "C" fn(context: nvtx_CUcontext, name: *const wchar_t),
1032>;
1033/// 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.
1034pub type nvtxNameCuStreamA_fakeimpl_fntype = ::core::option::Option<
1035    unsafe extern "C" fn(stream: nvtx_CUstream, name: *const ::core::ffi::c_char),
1036>;
1037/// 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.
1038pub type nvtxNameCuStreamW_fakeimpl_fntype = ::core::option::Option<
1039    unsafe extern "C" fn(stream: nvtx_CUstream, name: *const wchar_t),
1040>;
1041/// 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.
1042pub type nvtxNameCuEventA_fakeimpl_fntype = ::core::option::Option<
1043    unsafe extern "C" fn(event: nvtx_CUevent, name: *const ::core::ffi::c_char),
1044>;
1045/// 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.
1046pub type nvtxNameCuEventW_fakeimpl_fntype = ::core::option::Option<
1047    unsafe extern "C" fn(event: nvtx_CUevent, name: *const wchar_t),
1048>;
1049/// 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.
1050pub type nvtxNameClDeviceA_fakeimpl_fntype = ::core::option::Option<
1051    unsafe extern "C" fn(device: nvtx_cl_device_id, name: *const ::core::ffi::c_char),
1052>;
1053/// 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.
1054pub type nvtxNameClDeviceW_fakeimpl_fntype = ::core::option::Option<
1055    unsafe extern "C" fn(device: nvtx_cl_device_id, name: *const wchar_t),
1056>;
1057/// 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.
1058pub type nvtxNameClContextA_fakeimpl_fntype = ::core::option::Option<
1059    unsafe extern "C" fn(context: nvtx_cl_context, name: *const ::core::ffi::c_char),
1060>;
1061/// 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.
1062pub type nvtxNameClContextW_fakeimpl_fntype = ::core::option::Option<
1063    unsafe extern "C" fn(context: nvtx_cl_context, name: *const wchar_t),
1064>;
1065/// 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.
1066pub type nvtxNameClCommandQueueA_fakeimpl_fntype = ::core::option::Option<
1067    unsafe extern "C" fn(
1068        command_queue: nvtx_cl_command_queue,
1069        name: *const ::core::ffi::c_char,
1070    ),
1071>;
1072/// 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.
1073pub type nvtxNameClCommandQueueW_fakeimpl_fntype = ::core::option::Option<
1074    unsafe extern "C" fn(command_queue: nvtx_cl_command_queue, name: *const wchar_t),
1075>;
1076/// 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.
1077pub type nvtxNameClMemObjectA_fakeimpl_fntype = ::core::option::Option<
1078    unsafe extern "C" fn(memobj: nvtx_cl_mem, name: *const ::core::ffi::c_char),
1079>;
1080/// 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.
1081pub type nvtxNameClMemObjectW_fakeimpl_fntype = ::core::option::Option<
1082    unsafe extern "C" fn(memobj: nvtx_cl_mem, name: *const wchar_t),
1083>;
1084/// 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.
1085pub type nvtxNameClSamplerA_fakeimpl_fntype = ::core::option::Option<
1086    unsafe extern "C" fn(sampler: nvtx_cl_sampler, name: *const ::core::ffi::c_char),
1087>;
1088/// 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.
1089pub type nvtxNameClSamplerW_fakeimpl_fntype = ::core::option::Option<
1090    unsafe extern "C" fn(sampler: nvtx_cl_sampler, name: *const wchar_t),
1091>;
1092/// 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.
1093pub type nvtxNameClProgramA_fakeimpl_fntype = ::core::option::Option<
1094    unsafe extern "C" fn(program: nvtx_cl_program, name: *const ::core::ffi::c_char),
1095>;
1096/// 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.
1097pub type nvtxNameClProgramW_fakeimpl_fntype = ::core::option::Option<
1098    unsafe extern "C" fn(program: nvtx_cl_program, name: *const wchar_t),
1099>;
1100/// 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.
1101pub type nvtxNameClEventA_fakeimpl_fntype = ::core::option::Option<
1102    unsafe extern "C" fn(evnt: nvtx_cl_event, name: *const ::core::ffi::c_char),
1103>;
1104/// 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.
1105pub type nvtxNameClEventW_fakeimpl_fntype = ::core::option::Option<
1106    unsafe extern "C" fn(evnt: nvtx_cl_event, name: *const wchar_t),
1107>;
1108/// 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.
1109pub type nvtxNameCudaDeviceA_fakeimpl_fntype = ::core::option::Option<
1110    unsafe extern "C" fn(device: ::core::ffi::c_int, name: *const ::core::ffi::c_char),
1111>;
1112/// 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.
1113pub type nvtxNameCudaDeviceW_fakeimpl_fntype = ::core::option::Option<
1114    unsafe extern "C" fn(device: ::core::ffi::c_int, name: *const wchar_t),
1115>;
1116/// 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.
1117pub type nvtxNameCudaStreamA_fakeimpl_fntype = ::core::option::Option<
1118    unsafe extern "C" fn(stream: nvtx_cudaStream_t, name: *const ::core::ffi::c_char),
1119>;
1120/// 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.
1121pub type nvtxNameCudaStreamW_fakeimpl_fntype = ::core::option::Option<
1122    unsafe extern "C" fn(stream: nvtx_cudaStream_t, name: *const wchar_t),
1123>;
1124/// 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.
1125pub type nvtxNameCudaEventA_fakeimpl_fntype = ::core::option::Option<
1126    unsafe extern "C" fn(event: nvtx_cudaEvent_t, name: *const ::core::ffi::c_char),
1127>;
1128/// 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.
1129pub type nvtxNameCudaEventW_fakeimpl_fntype = ::core::option::Option<
1130    unsafe extern "C" fn(event: nvtx_cudaEvent_t, name: *const wchar_t),
1131>;
1132/// Optional tool-injection handler for the [`nvtxDomainMarkEx`] annotation operation. `None` means no handler is installed.
1133pub type nvtxDomainMarkEx_impl_fntype = ::core::option::Option<
1134    unsafe extern "C" fn(
1135        domain: nvtxDomainHandle_t,
1136        eventAttrib: *const nvtxEventAttributes_t,
1137    ),
1138>;
1139/// Optional tool-injection handler for the [`nvtxDomainRangeStartEx`] annotation operation. `None` means no handler is installed.
1140pub type nvtxDomainRangeStartEx_impl_fntype = ::core::option::Option<
1141    unsafe extern "C" fn(
1142        domain: nvtxDomainHandle_t,
1143        eventAttrib: *const nvtxEventAttributes_t,
1144    ) -> nvtxRangeId_t,
1145>;
1146/// Optional tool-injection handler for the [`nvtxDomainRangeEnd`] annotation operation. `None` means no handler is installed.
1147pub type nvtxDomainRangeEnd_impl_fntype = ::core::option::Option<
1148    unsafe extern "C" fn(domain: nvtxDomainHandle_t, id: nvtxRangeId_t),
1149>;
1150/// Optional tool-injection handler for the [`nvtxDomainRangePushEx`] annotation operation. `None` means no handler is installed.
1151pub type nvtxDomainRangePushEx_impl_fntype = ::core::option::Option<
1152    unsafe extern "C" fn(
1153        domain: nvtxDomainHandle_t,
1154        eventAttrib: *const nvtxEventAttributes_t,
1155    ) -> ::core::ffi::c_int,
1156>;
1157/// Optional tool-injection handler for the [`nvtxDomainRangePop`] annotation operation. `None` means no handler is installed.
1158pub type nvtxDomainRangePop_impl_fntype = ::core::option::Option<
1159    unsafe extern "C" fn(domain: nvtxDomainHandle_t) -> ::core::ffi::c_int,
1160>;
1161/// Optional tool-injection handler for the [`nvtxDomainResourceCreate`] annotation operation. `None` means no handler is installed.
1162pub type nvtxDomainResourceCreate_impl_fntype = ::core::option::Option<
1163    unsafe extern "C" fn(
1164        domain: nvtxDomainHandle_t,
1165        attribs: *mut nvtxResourceAttributes_t,
1166    ) -> nvtxResourceHandle_t,
1167>;
1168/// Optional tool-injection handler for the [`nvtxDomainResourceDestroy`] annotation operation. `None` means no handler is installed.
1169pub type nvtxDomainResourceDestroy_impl_fntype = ::core::option::Option<
1170    unsafe extern "C" fn(resource: nvtxResourceHandle_t),
1171>;
1172/// Optional tool-injection handler for the [`nvtxDomainNameCategoryA`] annotation operation. `None` means no handler is installed.
1173pub type nvtxDomainNameCategoryA_impl_fntype = ::core::option::Option<
1174    unsafe extern "C" fn(
1175        domain: nvtxDomainHandle_t,
1176        category: u32,
1177        name: *const ::core::ffi::c_char,
1178    ),
1179>;
1180/// Optional tool-injection handler for the [`nvtxDomainNameCategoryW`] annotation operation. `None` means no handler is installed.
1181pub type nvtxDomainNameCategoryW_impl_fntype = ::core::option::Option<
1182    unsafe extern "C" fn(domain: nvtxDomainHandle_t, category: u32, name: *const wchar_t),
1183>;
1184/// Optional tool-injection handler for the [`nvtxDomainRegisterStringA`] annotation operation. `None` means no handler is installed.
1185pub type nvtxDomainRegisterStringA_impl_fntype = ::core::option::Option<
1186    unsafe extern "C" fn(
1187        domain: nvtxDomainHandle_t,
1188        string: *const ::core::ffi::c_char,
1189    ) -> nvtxStringHandle_t,
1190>;
1191/// Optional tool-injection handler for the [`nvtxDomainRegisterStringW`] annotation operation. `None` means no handler is installed.
1192pub type nvtxDomainRegisterStringW_impl_fntype = ::core::option::Option<
1193    unsafe extern "C" fn(
1194        domain: nvtxDomainHandle_t,
1195        string: *const wchar_t,
1196    ) -> nvtxStringHandle_t,
1197>;
1198/// Optional tool-injection handler for the [`nvtxDomainCreateA`] annotation operation. `None` means no handler is installed.
1199pub type nvtxDomainCreateA_impl_fntype = ::core::option::Option<
1200    unsafe extern "C" fn(message: *const ::core::ffi::c_char) -> nvtxDomainHandle_t,
1201>;
1202/// Optional tool-injection handler for the [`nvtxDomainCreateW`] annotation operation. `None` means no handler is installed.
1203pub type nvtxDomainCreateW_impl_fntype = ::core::option::Option<
1204    unsafe extern "C" fn(message: *const wchar_t) -> nvtxDomainHandle_t,
1205>;
1206/// Optional tool-injection handler for the [`nvtxDomainDestroy`] annotation operation. `None` means no handler is installed.
1207pub type nvtxDomainDestroy_impl_fntype = ::core::option::Option<
1208    unsafe extern "C" fn(domain: nvtxDomainHandle_t),
1209>;
1210/// Optional tool-injection handler for the [`nvtxInitialize`] annotation operation. `None` means no handler is installed.
1211pub type nvtxInitialize_impl_fntype = ::core::option::Option<
1212    unsafe extern "C" fn(reserved: *const ::core::ffi::c_void),
1213>;
1214/// 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.
1215pub type nvtxDomainSyncUserCreate_fakeimpl_fntype = ::core::option::Option<
1216    unsafe extern "C" fn(
1217        domain: nvtxDomainHandle_t,
1218        attribs: *const nvtx_nvtxSyncUserAttributes_t,
1219    ) -> nvtx_nvtxSyncUser_t,
1220>;
1221/// 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.
1222pub type nvtxDomainSyncUserDestroy_fakeimpl_fntype = ::core::option::Option<
1223    unsafe extern "C" fn(handle: nvtx_nvtxSyncUser_t),
1224>;
1225/// 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.
1226pub type nvtxDomainSyncUserAcquireStart_fakeimpl_fntype = ::core::option::Option<
1227    unsafe extern "C" fn(handle: nvtx_nvtxSyncUser_t),
1228>;
1229/// 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.
1230pub type nvtxDomainSyncUserAcquireFailed_fakeimpl_fntype = ::core::option::Option<
1231    unsafe extern "C" fn(handle: nvtx_nvtxSyncUser_t),
1232>;
1233/// 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.
1234pub type nvtxDomainSyncUserAcquireSuccess_fakeimpl_fntype = ::core::option::Option<
1235    unsafe extern "C" fn(handle: nvtx_nvtxSyncUser_t),
1236>;
1237/// 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.
1238pub type nvtxDomainSyncUserReleasing_fakeimpl_fntype = ::core::option::Option<
1239    unsafe extern "C" fn(handle: nvtx_nvtxSyncUser_t),
1240>;