23#ifndef STOPWATCH_IMPL_H
24#define STOPWATCH_IMPL_H
34template < StopwatchGranularity detailed_timer, StopwatchParallelism threaded_timer >
61template < StopwatchGranularity detailed_timer, StopwatchParallelism threaded_timer >
84template < StopwatchGranularity detailed_timer, StopwatchParallelism threaded_timer >
108template < StopwatchGranularity detailed_timer, StopwatchParallelism threaded_timer >
132template < StopwatchGranularity detailed_timer, StopwatchParallelism threaded_timer >
136 std::ostream& os )
const
155template < StopwatchGranularity detailed_timer, StopwatchParallelism threaded_timer >
158 const std::string& walltime_name,
159 const std::string& cputime_name )
const
171 d[ walltime_name ] = wall_times;
178 d[ cputime_name ] = cpu_times;
188template < StopwatchGranularity detailed_timer, StopwatchParallelism threaded_timer >
200 for (
size_t i = 0; i < num_threads; ++i )
Dictionary class for interface to Python and C++ API.
Definition dictionary.h:213
void reset()
Definition stopwatch_impl.h:190
double elapsed(timers::timeunit_t timeunit=timers::timeunit_t::SECONDS) const
Definition stopwatch_impl.h:110
StopwatchTimerType< CLOCK_THREAD_CPUTIME_ID > cputime_timer_
Definition stopwatch.h:336
static constexpr bool enable_timer
Definition stopwatch.h:303
StopwatchTimerType< CLOCK_MONOTONIC > walltime_timer_
Definition stopwatch.h:335
void stop()
Definition stopwatch_impl.h:63
void print(const std::string &msg="", timers::timeunit_t timeunit=timers::timeunit_t::SECONDS, std::ostream &os=std::cout) const
Definition stopwatch_impl.h:134
void get_status(Dictionary &d, const std::string &walltime_name, const std::string &cputime_name) const
Definition stopwatch_impl.h:157
static constexpr bool use_timer_array
Definition stopwatch.h:304
bool is_running_() const
Definition stopwatch_impl.h:86
void start()
Definition stopwatch_impl.h:36
void assert_thread_parallel() const
Fails if NEST is not in thread-parallel section.
Definition vp_manager.h:200
void assert_single_threaded() const
Fails if NEST is in thread-parallel section.
Definition vp_manager.h:192
size_t get_num_threads() const
Get number of threads.
Definition vp_manager.h:186
size_t get_thread_id() const
Gets ID of local thread.
Definition vp_manager.h:176
This class represents a single timer which measures the execution time of a single thread for a given...
Definition stopwatch.h:114
VPManager vp_manager
Definition kernel_manager.h:234
timeunit_t
Definition stopwatch.h:99
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33
KernelManager & kernel()
Definition kernel_manager.h:311