utility Namespace Reference#
|
Rocprofiler SDK Developer API 0.6.0
ROCm Profiling API and tools
|
rocprofiler::sdk::utility Namespace Reference
Data Structures | |
| struct | name_info |
| struct | name_info_impl |
Functions | |
| template<typename Tp > | |
| auto | as_hex (Tp val, unsigned long width=0) |
Function Documentation
◆ as_hex()
template<typename Tp >
| auto rocprofiler::sdk::utility::as_hex | ( | Tp | val, |
| unsigned long | width = 0 |
||
| ) |
Definition at line 38 of file utility.hpp.
39{
40 uintptr_t _uintp_val = 0;
41 if constexpr(std::is_pointer<Tp>::value)
42 _uintp_val = reinterpret_cast<uintptr_t>(val);
43 else
44 _uintp_val = val;
45
46 auto ss = std::stringstream{};
47 ss << "0x" << std::hex << std::setfill('0') << std::setw(width) << _uintp_val;
48 return ss.str();
49}
Referenced by cereal::save(), and cereal::save().
Here is the caller graph for this function:Generated by