1#include "gtest/gtest.h"
3#include "Kokkos_Core.hpp"
25using namespace Kokkos::utils::callbacks;
41 static_assert(std::movable<EventRegexMatcher>);
43 static_assert( ! Matcher<EventRegexMatcher, BeginDeepCopyEvent>);
45 static_assert( ! Matcher<EventRegexMatcher, Kokkos::Impl::type_list<>>);
56 ASSERT_TRUE( matcher(
AllocateDataEvent{.alloc = {.name =
"buried-allocation-to-time"}}));
57 ASSERT_FALSE(matcher(
AllocateDataEvent{.alloc = {.name =
"not-this-other-allocation"}}));
63 static_assert(Matcher<EventInProfileSectionRegexMatcher, EventTypeList>);
64 static_assert(std::movable<EventInProfileSectionRegexMatcher>);
70 constexpr uint32_t section_id = 2;
76 ASSERT_FALSE(matcher(
AllocateDataEvent{})) <<
"Expecting not to record the event before starting the region.";
80 ASSERT_TRUE(matcher(
AllocateDataEvent{})) <<
"Expecting to record the event inside the region.";
84 ASSERT_FALSE(matcher(
AllocateDataEvent{})) <<
"Expecting to record the event after stopping the region.";
92 static_assert(Matcher<AnyEventMatcher, EventTypeList>);
93 static_assert(std::movable<AnyEventMatcher>);
102 static_assert(matcher(EventType{}));
constexpr void for_each(Callable callable)
Calls the instantiation of the call operator of a callable object for each type in a Kokkos::Impl::ty...
TEST(EventTest, BeginEvent)
Allocate-data event associated with Kokkos::Tools::Experimental::EventSet::allocate_data.
Matcher that returns true for any event.
Begin-fence event associated with Kokkos::Tools::Experimental::EventSet::begin_fence.
Begin-parallel-reduce event associated with Kokkos::Tools::Experimental::EventSet::begin_parallel_red...
Begin-parallel-scan event associated with Kokkos::Tools::Experimental::EventSet::begin_parallel_scan.
Create-profile-section event associated with Kokkos::Tools::Experimental::EventSet::create_profile_se...
Deallocate-data event associated with Kokkos::Tools::Experimental::EventSet::deallocate_data.
Destroy-profile-section event associated with Kokkos::Tools::Experimental::EventSet::destroy_profile_...
Matcher to select events that occur within a profile section.
Matcher to select events whose name matches a regular expression.
Profile event associated with Kokkos::Tools::Experimental::EventSet::profile_event.
Push-region event associated with Kokkos::Tools::Experimental::EventSet::push_region.
Start-profile-section event associated with Kokkos::Tools::Experimental::EventSet::start_profile_sect...
Stop-profile-section event associated with Kokkos::Tools::Experimental::EventSet::stop_profile_sectio...
Kokkos::DefaultExecutionSpace execution_space