44#ifndef NIMBLESM_NIMBLE_PROFILING_TIMER_H
45#define NIMBLESM_NIMBLE_PROFILING_TIMER_H
53#ifdef NIMBLE_HAVE_KOKKOS
54#include "Kokkos_Timer.hpp"
64#ifndef NIMBLE_HAVE_KOKKOS
65 n_timer_ = std::unique_ptr<nimble::Timer>(
new nimble::Timer());
74 current_region_.push(profiling_region_name);
75#ifdef NIMBLE_HAVE_KOKKOS
76 Kokkos::Profiling::pushRegion(
"NimbleSM: " + profiling_region_name);
79 n_timer_->Start(profiling_region_name);
87#ifdef NIMBLE_HAVE_KOKKOS
88 t = k_timer_.seconds();
89 Kokkos::Profiling::popRegion();
91 t = n_timer_->StopReport(current_region_.top());
93 current_region_.pop();
98 std::stack<std::string> current_region_;
100 std::unique_ptr<nimble::Timer> n_timer_ =
nullptr;
101#ifdef NIMBLE_HAVE_KOKKOS
102 Kokkos::Timer k_timer_;
void push_region(const std::string &profiling_region_name)
Definition nimble_profiling_timer.h:72
double pop_region_and_report_time()
Definition nimble_profiling_timer.h:84
ProfilingTimer()
Definition nimble_profiling_timer.h:62
~ProfilingTimer()=default
Definition nimble_timer.h:97
Definition kokkos_contact_manager.h:49