kokkos-utils 0.0.1
 
Loading...
Searching...
No Matches
test_SequenceOfRegionTimerListener.cpp File Reference

Go to the source code of this file.

Classes

class  Kokkos::utils::tests::callbacks::SequenceOfRegionTimerListenerTest
 

Namespaces

namespace  Kokkos
 
namespace  Kokkos::utils
 
namespace  Kokkos::utils::tests
 
namespace  Kokkos::utils::tests::callbacks
 

Macros

#define DO_A_REGION(_name_)
 
#define CHECK_TIMER(_index_, _name_)
 

Functions

 Kokkos::utils::tests::callbacks::TEST_F (SequenceOfRegionTimerListenerTest, reset)
 

Macro Definition Documentation

◆ CHECK_TIMER

#define CHECK_TIMER ( _index_,
_name_ )
Value:
{ \
auto& timer = seq->timers.at(_index_); \
const auto duration = timer.template duration<unit_t>(); \
ASSERT_GT(duration, sleep_for) << #_name_; \
ASSERT_LT(duration, Kokkos::utils::timer::seconds{region_##_name_##_elapsed}); \
}
std::chrono::duration< double, std::ratio< 1, 1 > > seconds
Similar to std::chrono::seconds, but using double instead of an integer type to represent the tick co...
Definition Duration.hpp:21

◆ DO_A_REGION

#define DO_A_REGION ( _name_)
Value:
Kokkos::Timer region_##_name_##_outer; \
region_##_name_##_outer.reset(); \
Kokkos::Profiling::pushRegion("region " #_name_); \
std::this_thread::sleep_for(sleep_for); \
Kokkos::Profiling::popRegion(); \
const auto region_##_name_##_elapsed = region_##_name_##_outer.seconds();