name_info< EnumT, ValueT > Struct Template Reference

name_info&lt; EnumT, ValueT &gt; Struct Template Reference#

Rocprofiler SDK Developer API: rocprofiler::sdk::utility::name_info< EnumT, ValueT > Struct Template Reference
Rocprofiler SDK Developer API 0.4.0
ROCm Profiling API and tools
rocprofiler::sdk::utility::name_info< EnumT, ValueT > Struct Template Reference

#include "rocprofiler-sdk/cxx/name_info.hpp"

+ Collaboration diagram for rocprofiler::sdk::utility::name_info< EnumT, ValueT >:

Public Types

using value_type = name_info_impl< EnumT, ValueT >
 
using enum_type = EnumT
 
using support_type = typename value_type::support_type
 
using return_type = typename value_type::return_type
 
using item_type = const value_type *
 
using item_array_t = std::vector< item_type >
 

Public Member Functions

void emplace (EnumT idx, const char *name)
 
void emplace (EnumT idx, rocprofiler_tracing_operation_t opidx, const char *name)
 
return_type at (EnumT idx) const
 
return_type at (EnumT idx, rocprofiler_tracing_operation_t opidx) const
 
item_array_t items () const
 
decltype(auto) size () const
 
decltype(auto) begin ()
 
decltype(auto) begin () const
 
decltype(auto) end ()
 
decltype(auto) end () const
 
value_typeoperator[] (unsigned long idx)
 
const value_typeoperator[] (unsigned long idx) const
 

Detailed Description

template<typename EnumT, typename ValueT = std::string_view>
struct rocprofiler::sdk::utility::name_info< EnumT, ValueT >

Definition at line 65 of file name_info.hpp.

Member Typedef Documentation

◆ enum_type

template<typename EnumT , typename ValueT = std::string_view>
using rocprofiler::sdk::utility::name_info< EnumT, ValueT >::enum_type = EnumT

Definition at line 68 of file name_info.hpp.

◆ item_array_t

template<typename EnumT , typename ValueT = std::string_view>
using rocprofiler::sdk::utility::name_info< EnumT, ValueT >::item_array_t = std::vector<item_type>

Definition at line 72 of file name_info.hpp.

◆ item_type

template<typename EnumT , typename ValueT = std::string_view>
using rocprofiler::sdk::utility::name_info< EnumT, ValueT >::item_type = const value_type*

Definition at line 71 of file name_info.hpp.

◆ return_type

template<typename EnumT , typename ValueT = std::string_view>
using rocprofiler::sdk::utility::name_info< EnumT, ValueT >::return_type = typename value_type::return_type

Definition at line 70 of file name_info.hpp.

◆ support_type

template<typename EnumT , typename ValueT = std::string_view>
using rocprofiler::sdk::utility::name_info< EnumT, ValueT >::support_type = typename value_type::support_type

Definition at line 69 of file name_info.hpp.

◆ value_type

template<typename EnumT , typename ValueT = std::string_view>
using rocprofiler::sdk::utility::name_info< EnumT, ValueT >::value_type = name_info_impl<EnumT, ValueT>

Definition at line 67 of file name_info.hpp.

Member Function Documentation

◆ at() [1/2]

template<typename EnumT , typename ValueT >
name_info< EnumT, ValueT >::return_type rocprofiler::sdk::utility::name_info< EnumT, ValueT >::at ( EnumT  idx) const

Definition at line 78 of file name_info.hpp.

79{
80 return impl.at(idx).name;
81}

◆ at() [2/2]

template<typename EnumT , typename ValueT >
name_info< EnumT, ValueT >::return_type rocprofiler::sdk::utility::name_info< EnumT, ValueT >::at ( EnumT  idx,
rocprofiler_tracing_operation_t  opidx 
) const

Definition at line 85 of file name_info.hpp.

86{
87 return impl.at(idx).operations.at(opidx);
88}

◆ begin() [1/2]

template<typename EnumT , typename ValueT = std::string_view>
decltype(auto) rocprofiler::sdk::utility::name_info< EnumT, ValueT >::begin ( )
inline

Definition at line 83 of file name_info.hpp.

83{ return impl.begin(); }

◆ begin() [2/2]

template<typename EnumT , typename ValueT = std::string_view>
decltype(auto) rocprofiler::sdk::utility::name_info< EnumT, ValueT >::begin ( ) const
inline

Definition at line 84 of file name_info.hpp.

84{ return impl.begin(); }

◆ emplace() [1/2]

template<typename EnumT , typename ValueT >
void rocprofiler::sdk::utility::name_info< EnumT, ValueT >::emplace ( EnumT  idx,
const char *  name 
)
inline

Definition at line 58 of file name_info.hpp.

59{
60 impl.resize(idx + 1, value_type{});
61 impl.at(idx).value = idx;
62 impl.at(idx).name = support_type{}(name);
63}
typename value_type::support_type support_type
Definition name_info.hpp:69
name_info_impl< EnumT, ValueT > value_type
Definition name_info.hpp:67

◆ emplace() [2/2]

template<typename EnumT , typename ValueT >
void rocprofiler::sdk::utility::name_info< EnumT, ValueT >::emplace ( EnumT  idx,
rocprofiler_tracing_operation_t  opidx,
const char *  name 
)
inline

Definition at line 67 of file name_info.hpp.

70{
71 impl.resize(idx + 1, value_type{});
72 impl.at(idx).operations.resize(opidx + 1, support_type::default_value());
73 impl.at(idx).operations.at(opidx) = support_type{}(name);
74}

◆ end() [1/2]

template<typename EnumT , typename ValueT = std::string_view>
decltype(auto) rocprofiler::sdk::utility::name_info< EnumT, ValueT >::end ( )
inline

Definition at line 85 of file name_info.hpp.

85{ return impl.end(); }

◆ end() [2/2]

template<typename EnumT , typename ValueT = std::string_view>
decltype(auto) rocprofiler::sdk::utility::name_info< EnumT, ValueT >::end ( ) const
inline

Definition at line 86 of file name_info.hpp.

86{ return impl.end(); }

◆ items()

template<typename EnumT , typename ValueT >
name_info< EnumT, ValueT >::item_array_t rocprofiler::sdk::utility::name_info< EnumT, ValueT >::items ( ) const

Definition at line 92 of file name_info.hpp.

93{
94 auto ret = item_array_t{};
95 ret.reserve(impl.size());
96 for(const auto& itr : impl)
97 ret.emplace_back(&itr);
98 return ret;
99}
std::vector< item_type > item_array_t
Definition name_info.hpp:72

◆ operator[]() [1/2]

template<typename EnumT , typename ValueT = std::string_view>
value_type & rocprofiler::sdk::utility::name_info< EnumT, ValueT >::operator[] ( unsigned long  idx)
inline

Definition at line 88 of file name_info.hpp.

88{ return impl.at(idx); }

◆ operator[]() [2/2]

template<typename EnumT , typename ValueT = std::string_view>
const value_type & rocprofiler::sdk::utility::name_info< EnumT, ValueT >::operator[] ( unsigned long  idx) const
inline

Definition at line 89 of file name_info.hpp.

89{ return impl.at(idx); }

◆ size()

template<typename EnumT , typename ValueT = std::string_view>
decltype(auto) rocprofiler::sdk::utility::name_info< EnumT, ValueT >::size ( ) const
inline

Definition at line 82 of file name_info.hpp.

82{ return impl.size(); }

The documentation for this struct was generated from the following files: