26#include <rocprofiler-sdk/fwd.h>
27#include <rocprofiler-sdk/cxx/details/mpl.hpp>
40template <
typename EnumT,
typename ValueT = std::
string_view>
43 using support_type = mpl::string_support<ValueT>;
44 using enum_type = EnumT;
45 using value_type = ValueT;
46 using return_type =
typename support_type::return_type;
47 using item_type = std::pair<rocprofiler_tracing_operation_t, const value_type*>;
48 using item_array_t = std::vector<item_type>;
50 static_assert(support_type::value,
51 "value_type must be supported by rocprofiler::sdk::mpl::string_support");
53 return_type operator()()
const {
return name; }
54 return_type operator()(
size_t idx)
const {
return operations.at(idx); }
55 return_type operator[](
size_t idx)
const {
return operations.at(idx); }
57 item_array_t items()
const;
59 EnumT value =
static_cast<EnumT
>(0);
61 std::vector<value_type> operations = {};
64template <
typename EnumT,
typename ValueT = std::
string_view>
67 using value_type = name_info_impl<EnumT, ValueT>;
68 using enum_type = EnumT;
69 using support_type =
typename value_type::support_type;
70 using return_type =
typename value_type::return_type;
71 using item_type =
const value_type*;
72 using item_array_t = std::vector<item_type>;
74 void emplace(EnumT idx,
const char* name);
77 return_type at(EnumT idx)
const;
80 item_array_t items()
const;
82 decltype(
auto) size()
const {
return impl.size(); }
83 decltype(
auto) begin() {
return impl.begin(); }
84 decltype(
auto) begin()
const {
return impl.begin(); }
85 decltype(
auto) end() {
return impl.end(); }
86 decltype(
auto) end()
const {
return impl.end(); }
88 value_type& operator[](
size_t idx) {
return impl.at(idx); }
89 const value_type& operator[](
size_t idx)
const {
return impl.at(idx); }
92 std::vector<value_type> impl = {};
96template <
typename Tp = std::
string_view>
97using callback_name_info_t = utility::name_info<rocprofiler_callback_tracing_kind_t, Tp>;
99template <
typename Tp = std::
string_view>
100using buffer_name_info_t = utility::name_info<rocprofiler_buffer_tracing_kind_t, Tp>;
102using callback_name_info = callback_name_info_t<std::string_view>;
103using buffer_name_info = buffer_name_info_t<std::string_view>;
105template <
typename Tp = std::
string_view>
106callback_name_info_t<Tp>
107get_callback_tracing_names();
109template <
typename Tp = std::
string_view>
110buffer_name_info_t<Tp>
111get_buffer_tracing_names();
115#define ROCPROFILER_SDK_CXX_NAME_INFO_HPP_ 1
116#include <rocprofiler-sdk/cxx/details/name_info.hpp>
int32_t rocprofiler_tracing_operation_t
Tracing Operation ID. Depending on the kind, operations can be determined. If the value is equal to z...