Represents a custom color that can be associated with an NVTX event via its event_attributes.
More...
#include <nvtx3.hpp>
|
| using | value_type = uint32_t |
| | Type used for the color's value.
|
| |
|
| constexpr | color (value_type hex_code) noexcept |
| | Constructs a color using the value provided by hex_code.
|
| |
| constexpr | color (argb argb_) noexcept |
| | Construct a color using the alpha, red, green, blue components in argb.
|
| |
| constexpr | color (rgb rgb_) noexcept |
| | Construct a color using the red, green, blue components in rgb.
|
| |
| constexpr value_type | get_value () const noexcept |
| | Returns the colors argb hex code.
|
| |
| constexpr nvtxColorType_t | get_type () const noexcept |
| | Return the NVTX color type of the color.
|
| |
|
| color (color const &)=default |
| |
|
color & | operator= (color const &)=default |
| |
|
| color (color &&)=default |
| |
|
color & | operator= (color &&)=default |
| |
Represents a custom color that can be associated with an NVTX event via its event_attributes.
Specifying colors for NVTX events is a convenient way to visually differentiate among different events in a visualization tool such as Nsight Systems.
Definition at line 1175 of file nvtx3.hpp.
◆ value_type
Type used for the color's value.
Definition at line 1178 of file nvtx3.hpp.
◆ color() [1/3]
| constexpr nvtx3::v1::mv1::color::color |
( |
value_type |
hex_code | ) |
|
|
inlineexplicitconstexprnoexcept |
Constructs a color using the value provided by hex_code.
hex_code is expected to be a 4 byte argb hex code.
The most significant byte indicates the value of the alpha channel (opacity) (0-255)
The next byte indicates the value of the red channel (0-255)
The next byte indicates the value of the green channel (0-255)
The least significant byte indicates the value of the blue channel (0-255)
- Parameters
-
| hex_code | The hex code used to construct the color |
Definition at line 1197 of file nvtx3.hpp.
◆ color() [2/3]
| constexpr nvtx3::v1::mv1::color::color |
( |
argb |
argb_ | ) |
|
|
inlineconstexprnoexcept |
Construct a color using the alpha, red, green, blue components in argb.
- Parameters
-
| argb_ | The alpha, red, green, blue components of the desired color |
Definition at line 1205 of file nvtx3.hpp.
◆ color() [3/3]
| constexpr nvtx3::v1::mv1::color::color |
( |
rgb |
rgb_ | ) |
|
|
inlineconstexprnoexcept |
Construct a color using the red, green, blue components in rgb.
Uses maximum value for the alpha channel (opacity) of the color.
- Parameters
-
| rgb_ | The red, green, blue components of the desired color |
Definition at line 1218 of file nvtx3.hpp.
◆ get_type()
| constexpr nvtxColorType_t nvtx3::v1::mv1::color::get_type |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Return the NVTX color type of the color.
Definition at line 1233 of file nvtx3.hpp.
◆ get_value()
| constexpr value_type nvtx3::v1::mv1::color::get_value |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Returns the colors argb hex code.
Definition at line 1227 of file nvtx3.hpp.
The documentation for this class was generated from the following file: