NimbleSM
NimbleSM is a solid mechanics simulation code for dynamic systems
Loading...
Searching...
No Matches
src
nimble_kokkos_profiling.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
nimble_kokkos_defs.h
>
4
5
#include <string>
6
7
namespace
nimble_kokkos
{
8
9
class
ProfilingTimer
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
22
pop_region_and_report_time
()
const
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
nimble_kokkos::ProfilingTimer::push_region
void push_region(const std::string &profiling_region_name)
Definition
nimble_kokkos_profiling.h:15
nimble_kokkos::ProfilingTimer::ProfilingTimer
ProfilingTimer()=default
nimble_kokkos::ProfilingTimer::pop_region_and_report_time
double pop_region_and_report_time() const
Definition
nimble_kokkos_profiling.h:22
nimble_kokkos
Definition
nimble_contact_manager.h:68
nimble_kokkos_defs.h
Generated by
1.13.2