WarpX
Toggle main menu visibility
Loading...
Searching...
No Matches
Source
ablastr
utils
timer
Timer.H
Go to the documentation of this file.
1
/* Copyright 2023 Luca Fedeli
2
*
3
* This file is part of WarpX.
4
*
5
* License: BSD-3-Clause-LBNL
6
*/
7
8
#ifndef ABLASTR_TIMER_H_
9
#define ABLASTR_TIMER_H_
10
11
namespace
ablastr::utils::timer
12
{
13
19
class
Timer
20
{
21
public
:
22
26
Timer
() =
default
;
27
28
32
void
record_start_time
() noexcept;
33
34
38
void
record_stop_time
() noexcept;
39
40
47
[[nodiscard]]
double
get_duration
() const noexcept;
48
49
56
[[nodiscard]]
double
get_global_duration
() const;
57
58
private:
59
60
double
m_start_time
;
61
double
m_stop_time
;
62
};
63
64
}
65
66
#endif
//ABLASTR_TIMER_H_
ablastr::utils::timer::Timer::get_global_duration
double get_global_duration() const
This collective function returns the maximum duration recorded across all the MPI ranks (in seconds).
Definition
Timer.cpp:33
ablastr::utils::timer::Timer::record_stop_time
void record_stop_time() noexcept
This function records the stop time.
Definition
Timer.cpp:21
ablastr::utils::timer::Timer::m_stop_time
double m_stop_time
Definition
Timer.H:61
ablastr::utils::timer::Timer::m_start_time
double m_start_time
Definition
Timer.H:60
ablastr::utils::timer::Timer::get_duration
double get_duration() const noexcept
This function returns the duration, calculated as the difference between the stop time and the start ...
Definition
Timer.cpp:27
ablastr::utils::timer::Timer::record_start_time
void record_start_time() noexcept
This function records the start time.
Definition
Timer.cpp:15
ablastr::utils::timer::Timer::Timer
Timer()=default
The constructor.
ablastr::utils::timer
Definition
Timer.H:12
Generated by
1.17.0