Zoltan2
Toggle main menu visibility
Loading...
Searching...
No Matches
Zoltan2_TimerManager.hpp
Go to the documentation of this file.
1
// @HEADER
2
// *****************************************************************************
3
// Zoltan2: A package of combinatorial algorithms for scientific computing
4
//
5
// Copyright 2012 NTESS and the Zoltan2 contributors.
6
// SPDX-License-Identifier: BSD-3-Clause
7
// *****************************************************************************
8
// @HEADER
9
13
14
#ifndef ZOLTAN2_TIMERMANAGER_HPP
15
#define ZOLTAN2_TIMERMANAGER_HPP
16
17
#include <
Zoltan2_Standards.hpp
>
18
#include <
Zoltan2_Parameters.hpp
>
19
#include <Teuchos_TimeMonitor.hpp>
20
21
#include <map>
22
#include <iostream>
23
#include <fstream>
24
#include <bitset>
25
26
namespace
Zoltan2
{
27
28
class
TimerManager
{
29
30
private
:
31
RCP<const Comm<int> > comm_;
32
std::ostream *myOS_;
33
std::ofstream *fileOS_;
34
TimerType
ttype_;
35
std::bitset<NUM_TIMING_OPTIONS> typeSelector_;
36
37
Array<RCP<Teuchos::Time> > timers_;
38
std::map<std::string, int> timerMap_;
39
int
stopHint_;
40
41
public
:
42
45
TimerManager
(
const
RCP<
const
Comm<int> > & comm, std::ofstream *of,
46
TimerType
tt);
47
50
TimerManager
(
const
RCP<
const
Comm<int> > & comm, std::ostream *os,
51
TimerType
tt);
52
55
~TimerManager
();
56
59
void
start
(
TimerType
tt,
const
std::string &name);
60
63
void
stop
(
TimerType
tt,
const
std::string &name);
64
67
void
printAndResetToZero
();
68
71
void
print
()
const
;
72
};
73
74
}
// namespace Zoltan2
75
76
#endif
Zoltan2_Parameters.hpp
Defines Parameter related enumerators, declares functions.
Zoltan2_Standards.hpp
Gathering definitions used in software development.
TimerManager::TimerManager
TimerManager(const RCP< const Comm< int > > &comm, std::ofstream *of, TimerType tt)
Constructor for output to a file.
Definition
Zoltan2_TimerManager.cpp:18
Zoltan2::TimerManager::stop
void stop(TimerType tt, const std::string &name)
Stop the named timer.
Definition
Zoltan2_TimerManager.cpp:60
Zoltan2::TimerManager::print
void print() const
Print out global summary, do not reset timers.
Definition
Zoltan2_TimerManager.cpp:107
Zoltan2::TimerManager::start
void start(TimerType tt, const std::string &name)
Start the named timer.
Definition
Zoltan2_TimerManager.cpp:85
Zoltan2::TimerManager::printAndResetToZero
void printAndResetToZero()
Print out global summary of timers and reset timers to zero.
Definition
Zoltan2_TimerManager.cpp:115
Zoltan2::TimerManager::TimerManager
TimerManager(const RCP< const Comm< int > > &comm, std::ofstream *of, TimerType tt)
Constructor for output to a file.
Definition
Zoltan2_TimerManager.cpp:18
Zoltan2::TimerManager::~TimerManager
~TimerManager()
Destructor.
Definition
Zoltan2_TimerManager.cpp:52
Zoltan2
Created by mbenlioglu on Aug 31, 2020.
Definition
Zoltan2_AlgHybrid2GL.hpp:47
Zoltan2::TimerType
TimerType
The type of timers which should be active.
Definition
Zoltan2_Parameters.hpp:88
core
src
environment
Zoltan2_TimerManager.hpp
Generated by
1.17.0