14#ifndef OPENMP_TOOLS_OMPTEST_INCLUDE_INTERNALEVENTCOMMON_H
15#define OPENMP_TOOLS_OMPTEST_INCLUDE_INTERNALEVENTCOMMON_H
74 assert(
false &&
"Base class implementation");
79 std::string
S{
"InternalEvent: Type="};
80 S.append(std::to_string((uint32_t)
Type));
93#define event_type_trait(EvTy) \
94 template <> struct EventTypeOf<EvTy> { \
95 static constexpr EventTy Value = EventTy::EvTy; \
113 if (
const auto Other =
dynamic_cast<const Derived *
>(o))
114 return operator==(*
static_cast<const Derived *
>(
this), *Other);
120 std::string
S{
"EventBase: Type="};
121 S.append(std::to_string((uint32_t)
Type));
CRTP (Curiously Recurring Template Pattern) intermediate class Adding a new event type can be achieve...
virtual std::string toString() const override
Basic toString method, which may be overridden with own implementations.
virtual bool equals(const InternalEvent *o) const override
Equals method to cast and dispatch to the specific class operator==.
virtual ~EventBase()=default
static constexpr EventTy EventType
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle __itt_metadata_type size_t void ITT_FORMAT p const __itt_domain __itt_id __itt_string_handle const wchar_t size_t ITT_FORMAT lu const __itt_domain __itt_id __itt_relation __itt_id ITT_FORMAT p const wchar_t int ITT_FORMAT __itt_group_mark S
bool operator==(const ParallelBegin &, const ParallelBegin &)
EventTy
Enum values are used for comparison of observed and asserted events List is based on OpenMP 5....
Specialize EventType member for each derived internal event type.
Base event class Offers default CTOR, DTOR and CTOR which assigns the actual event type.
EventTy Type
Identifying event type.
virtual bool equals(const InternalEvent *o) const
virtual ~InternalEvent()=default
virtual std::string toString() const