NimbleSM
NimbleSM is a solid mechanics simulation code for dynamic systems
Loading...
Searching...
No Matches
nimble_kokkos_profiling.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <string>
6
7namespace nimble_kokkos {
8
10{
11 public:
12 inline ProfilingTimer() = default;
13
14 inline void
15 push_region(const std::string& profiling_region_name)
16 {
17 Kokkos::Profiling::pushRegion("NimbleSM: " + profiling_region_name);
18 timer.reset();
19 }
20
21 inline double
23 {
24 double t = timer.seconds();
25 Kokkos::Profiling::popRegion();
26 return t;
27 }
28
29 private:
30 Kokkos::Timer timer;
31};
32
33} // namespace nimble_kokkos
void push_region(const std::string &profiling_region_name)
Definition nimble_kokkos_profiling.h:15
double pop_region_and_report_time() const
Definition nimble_kokkos_profiling.h:22
Definition nimble_contact_manager.h:68