OPAL (Object Oriented Parallel Accelerator Library)
2024.1
OPAL
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
ippl
src
Utility
Timer.h
Go to the documentation of this file.
1
//
2
// Class Timer
3
// This class is used in IpplTimings.
4
// https://www.boost.org/doc/libs/1_70_0/libs/timer/doc/cpu_timers.html
5
//
6
// Copyright (c) 2019, Matthias Frey, Paul Scherrer Institut, Villigen PSI, Switzerland
7
// All rights reserved
8
//
9
// Implemented as part of the PhD thesis
10
// "Precise Simulations of Multibunches in High Intensity Cyclotrons"
11
//
12
// This file is part of OPAL.
13
//
14
// OPAL is free software: you can redistribute it and/or modify
15
// it under the terms of the GNU General Public License as published by
16
// the Free Software Foundation, either version 3 of the License, or
17
// (at your option) any later version.
18
//
19
// You should have received a copy of the GNU General Public License
20
// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
21
//
22
#ifndef TIMER_H
23
#define TIMER_H
24
25
#include <boost/timer/timer.hpp>
26
27
class
Timer
28
{
29
public
:
30
31
Timer
();
32
33
void
clear
();
// Set all accumulated times to 0
34
void
start
();
// Start timer
35
void
stop
();
// Stop timer
36
37
double
clock_time
();
// Report clock time accumulated in seconds
38
double
user_time
();
// Report user time accumlated in seconds
39
double
system_time
();
// Report system time accumulated in seconds
40
double
cpu_time
();
// Report total cpu_time which is just user_time + system_time
41
42
private
:
43
double
wall_m
;
44
double
user_m
;
45
double
sys_m
;
46
boost::timer::cpu_timer
timer_m
;
47
};
48
49
#endif
Timer::system_time
double system_time()
Definition:
Timer.cpp:60
Timer::start
void start()
Definition:
Timer.cpp:34
Timer::Timer
Timer()
Definition:
Timer.cpp:24
Timer::timer_m
boost::timer::cpu_timer timer_m
Definition:
Timer.h:46
Timer::user_time
double user_time()
Definition:
Timer.cpp:55
Timer::clock_time
double clock_time()
Definition:
Timer.cpp:50
Timer::cpu_time
double cpu_time()
Definition:
Timer.cpp:65
Timer::wall_m
double wall_m
Definition:
Timer.h:43
Timer::stop
void stop()
Definition:
Timer.cpp:39
Timer::user_m
double user_m
Definition:
Timer.h:44
Timer::sys_m
double sys_m
Definition:
Timer.h:45
Timer::clear
void clear()
Definition:
Timer.cpp:29
Timer
Definition:
Timer.h:27
Generated on Tue Jul 2 2024 15:05:27 for OPAL (Object Oriented Parallel Accelerator Library) by
1.8.5