NVTX C++ API Reference 1.0
C++ convenience wrappers for NVTX v3 C API
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
nvtx3::v1::category Class Reference

Object for intra-domain grouping of NVTX events. More...

#include <nvtx3.hpp>

Inheritance diagram for nvtx3::v1::category:
Inheritance graph
[legend]

Public Types

using id_type = uint32_t
 Type used for categorys integer id. More...
 

Public Member Functions

constexpr category (id_type id) noexcept
 Construct a category with the specified id. More...
 
constexpr id_type get_id () const noexcept
 Returns the id of the category. More...
 
 category (category const &)=default
 
categoryoperator= (category const &)=default
 
 category (category &&)=default
 
categoryoperator= (category &&)=default
 

Detailed Description

Object for intra-domain grouping of NVTX events.

A category is simply an integer id that allows for fine-grain grouping of NVTX events. For example, one might use separate categories for IO, memory allocation, compute, etc.

Example:

// Range `r1` belongs to the category identified by the value `1`.
// Range `r2` belongs to the same category as `r1`
nvtx3::scoped_range r2{nvtx3::category{1}};
Object for intra-domain grouping of NVTX events.
Definition: nvtx3.hpp:1125
scoped_range_in< domain::global > scoped_range
Alias for a scoped_range_in in the global NVTX domain.
Definition: nvtx3.hpp:2146

To associate a name string with a category id, see named_category.

Definition at line 1125 of file nvtx3.hpp.

Member Typedef Documentation

◆ id_type

using nvtx3::v1::category::id_type = uint32_t

Type used for categorys integer id.

Definition at line 1128 of file nvtx3.hpp.

Constructor & Destructor Documentation

◆ category()

constexpr nvtx3::v1::category::category ( id_type  id)
inlineexplicitconstexprnoexcept

Construct a category with the specified id.

The category will be unnamed and identified only by its id value.

All categorys in a domain sharing the same id are equivalent.

Parameters
[in]idThe category's identifying value

Definition at line 1139 of file nvtx3.hpp.

Member Function Documentation

◆ get_id()

constexpr id_type nvtx3::v1::category::get_id ( ) const
inlineconstexprnoexcept

Returns the id of the category.

Definition at line 1145 of file nvtx3.hpp.


The documentation for this class was generated from the following file: