rocprofiler-sdk/cxx/details/mpl.hpp File Reference

rocprofiler-sdk/cxx/details/mpl.hpp File Reference#

Rocprofiler SDK Developer API: rocprofiler-sdk/cxx/details/mpl.hpp File Reference
Rocprofiler SDK Developer API 0.5.0
ROCm Profiling API and tools
mpl.hpp File Reference
#include <cstddef>
#include <cstdint>
#include <optional>
#include <string>
#include <string_view>
#include <type_traits>
#include <utility>
+ Include dependency graph for mpl.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  rocprofiler::sdk::mpl::unqualified_identity< Tp >
 
struct  rocprofiler::sdk::mpl::is_same_unqualified_identity< Tp, Up >
 
struct  rocprofiler::sdk::mpl::string_support< Tp >
 
struct  rocprofiler::sdk::mpl::string_support< const char * >
 
struct  rocprofiler::sdk::mpl::impl::is_string_type< Tp >
 
struct  rocprofiler::sdk::mpl::impl::is_string_type< char * >
 
struct  rocprofiler::sdk::mpl::impl::is_string_type< const char * >
 
struct  rocprofiler::sdk::mpl::is_string_type< Tp >
 
struct  rocprofiler::sdk::mpl::has_empty_member_function< Tp >
 
struct  rocprofiler::sdk::mpl::can_stringify< Tp >
 
struct  rocprofiler::sdk::mpl::is_iterable< Tp >
 

Namespaces

namespace  rocprofiler
 
namespace  rocprofiler::sdk
 
namespace  rocprofiler::sdk::mpl
 
namespace  rocprofiler::sdk::mpl::impl
 

Macros

#define ROCPROFILER_IMPL_HAS_CONCEPT(NAME, TRAIT)
 
#define ROCPROFILER_IMPL_SFINAE_CONCEPT(NAME, ...)
 

Typedefs

template<typename Tp >
using rocprofiler::sdk::mpl::unqualified_identity_t = typename unqualified_identity< Tp >::type
 
template<typename Tp >
using rocprofiler::sdk::mpl::supports_ostream = can_stringify< Tp >
 

Functions

template<typename Tp , typename = typename Tp:: traits_type>
constexpr bool rocprofiler::sdk::mpl::has_traits (int)
 
template<typename Tp >
constexpr bool rocprofiler::sdk::mpl::has_traits (long)
 
template<typename Tp , typename = typename Tp:: value_type>
constexpr bool rocprofiler::sdk::mpl::has_value_type (int)
 
template<typename Tp >
constexpr bool rocprofiler::sdk::mpl::has_value_type (long)
 
template<typename Tp , typename = typename Tp:: key_type>
constexpr bool rocprofiler::sdk::mpl::has_key_type (int)
 
template<typename Tp >
constexpr bool rocprofiler::sdk::mpl::has_key_type (long)
 
template<typename Tp , typename = typename Tp:: mapped_type>
constexpr bool rocprofiler::sdk::mpl::has_mapped_type (int)
 
template<typename Tp >
constexpr bool rocprofiler::sdk::mpl::has_mapped_type (long)
 
template<typename ArgT >
bool rocprofiler::sdk::mpl::is_empty (ArgT &&_v)
 
template<typename ContainerT , typename... Args>
auto rocprofiler::sdk::mpl::impl::emplace (ContainerT &_c, int, Args &&... _args) -> decltype(_c.emplace_back(std::forward< Args >(_args)...))
 
template<typename ContainerT , typename... Args>
auto rocprofiler::sdk::mpl::impl::emplace (ContainerT &_c, long, Args &&... _args) -> decltype(_c.emplace(std::forward< Args >(_args)...))
 
template<typename ContainerT , typename ArgT >
auto rocprofiler::sdk::mpl::impl::reserve (ContainerT &_c, int, ArgT _arg) -> decltype(_c.reserve(_arg), bool())
 
template<typename ContainerT , typename ArgT >
auto rocprofiler::sdk::mpl::impl::reserve (ContainerT &, long, ArgT)
 
template<typename ContainerT , typename... Args>
auto rocprofiler::sdk::mpl::emplace (ContainerT &_c, Args &&... _args)
 
template<typename ContainerT , typename ArgT >
auto rocprofiler::sdk::mpl::reserve (ContainerT &_c, ArgT _arg)
 

Data Structure Documentation

◆ rocprofiler::sdk::mpl::unqualified_identity

struct rocprofiler::sdk::mpl::unqualified_identity
template<typename Tp>
struct rocprofiler::sdk::mpl::unqualified_identity< Tp >

Definition at line 68 of file mpl.hpp.

+ Collaboration diagram for rocprofiler::sdk::mpl::unqualified_identity< Tp >:
Data Fields
typedef remove_cv_t< remove_reference_t< decay_t< Tp > > > type

Macro Definition Documentation

◆ ROCPROFILER_IMPL_HAS_CONCEPT

#define ROCPROFILER_IMPL_HAS_CONCEPT (   NAME,
  TRAIT 
)
Value:
template <typename Tp, typename = typename Tp::TRAIT> \
inline constexpr bool NAME(int) \
{ \
return true; \
} \
\
template <typename Tp> \
inline constexpr bool NAME(long) \
{ \
return false; \
}

Definition at line 34 of file mpl.hpp.

37 { \
38 return true; \
39 } \
40 \
41 template <typename Tp> \
42 inline constexpr bool NAME(long) \
43 { \
44 return false; \
45 }

◆ ROCPROFILER_IMPL_SFINAE_CONCEPT

#define ROCPROFILER_IMPL_SFINAE_CONCEPT (   NAME,
  ... 
)
Value:
template <typename Tp> \
struct NAME \
{ \
private: \
static constexpr auto sfinae(int) -> decltype(__VA_ARGS__, bool()) { return true; } \
\
static constexpr auto sfinae(long) { return false; } \
\
public: \
static constexpr bool value = sfinae(0); \
constexpr auto operator()() const { return sfinae(0); } \
};

Definition at line 47 of file mpl.hpp.

50 { \
51 private: \
52 static constexpr auto sfinae(int) -> decltype(__VA_ARGS__, bool()) { return true; } \
53 \
54 static constexpr auto sfinae(long) { return false; } \
55 \
56 public: \
57 static constexpr bool value = sfinae(0); \
58 constexpr auto operator()() const { return sfinae(0); } \
59 };