/* 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: <ul> <li>Zero the structure <li>Set the version field <li>Set the size field </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: <ul> <li>Zero the structure <li>Set the version field <li>Set the size field </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: <ul> <li>Zero the structure <li>Set the version field <li>Set the size field </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: <ul> <li>Zero the structure <li>Set the version field <li>Set the size field </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 <windows.h>
///
/// nvtxNameOsThread(GetCurrentThreadId(), "Current thread");
///
/// nvtxNameOsThread(GetThreadId(SomeThreadHandle), "Other thread");
///
/// Android:
///
/// #include <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 <sys/syscall.h>
///
/// [`nvtxNameOsThreadA`](syscall(SYS_gettid), "Current thread");
///
/// #include <unistd.h>
///
/// [`nvtxNameOsThreadA`](getpid(), "Main thread");
///
/// macOS:
///
/// #include <sys/syscall.h>
///
/// [`nvtxNameOsThreadA`](syscall(SYS_thread_selfid), "Current thread");
///
/// #include <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),
>;