DFT-EFE
 
Loading...
Searching...
No Matches
LinearAlgebraProfiler.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (c) 2021. *
3 * The Regents of the University of Michigan and DFT-EFE developers. *
4 * *
5 * This file is part of the DFT-EFE code. *
6 * *
7 * DFT-EFE is free software: you can redistribute it and/or modify *
8 * it under the terms of the Lesser GNU General Public License as *
9 * published by the Free Software Foundation, either version 3 of *
10 * the License, or (at your option) any later version. *
11 * *
12 * DFT-EFE is distributed in the hope that it will be useful, but *
13 * WITHOUT ANY WARRANTY; without even the implied warranty *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
15 * See the Lesser GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU Lesser General Public *
18 * License at the top level of DFT-EFE distribution. If not, see *
19 * <https://www.gnu.org/licenses/>. *
20 ******************************************************************************/
21
22/*
23 * @author Bikash Kanungo
24 */
25
26#ifndef dftefeLinearAlgebraProfiler_h
27#define dftefeLinearAlgebraProfiler_h
28
29#include <utils/TypeConfig.h>
30#include <utils/MPITypes.h>
33#include <iostream>
34#include <string>
35#include <vector>
36#include <time.h>
37namespace dftefe
38{
39 namespace linearAlgebra
40 {
42 {
43 public:
44 using Time = time_t;
45
46 public:
48 std::ostream & stream = std::cout,
51 const ParallelPrintType printType =
53 const bool printFinal = PrintControlDefaults::PRINT_FINAL,
54 const bool printTotalWallTime =
57 const std::string delimiter = PrintControlDefaults::DELIMITER);
58
59 void
60 registerStart(const utils::mpi::MPIComm &mpiComm);
61 void
62 registerEnd(const std::string &s);
63 void
64 registerIterStart(const size_type iter);
65 void
66 registerIterEnd(const std::string &s);
67
69 getPrintFrequency() const;
74 bool
75 getPrintFinal() const;
76 bool
79 getPrecision() const;
80 std::string
81 getDelimiter() const;
82
83 private:
84 std::ostream & d_stream;
95 std::string d_delimiter;
101 }; // end of class LinearAlgebraProfiler
102 } // end of namespace linearAlgebra
103} // end of namespace dftefe
104#endif // dftefeLinearAlgebraProfiler_h
Definition: LinearAlgebraProfiler.h:42
std::string d_myRankStringPrefix
Definition: LinearAlgebraProfiler.h:100
bool getPrintFinal() const
Definition: LinearAlgebraProfiler.cpp:204
Time d_tIterStart
Definition: LinearAlgebraProfiler.h:92
ParallelPrintType d_printType
Definition: LinearAlgebraProfiler.h:87
bool d_printFinal
Definition: LinearAlgebraProfiler.h:88
void registerIterStart(const size_type iter)
Definition: LinearAlgebraProfiler.cpp:144
std::string getDelimiter() const
Definition: LinearAlgebraProfiler.cpp:222
int d_myRank
Definition: LinearAlgebraProfiler.h:97
Time d_tIterEnd
Definition: LinearAlgebraProfiler.h:93
bool d_printTotalWallTime
Definition: LinearAlgebraProfiler.h:89
Time d_tEnd
Definition: LinearAlgebraProfiler.h:91
ParallelPrintType getParallelPrintType() const
Definition: LinearAlgebraProfiler.cpp:198
Time d_tStart
Definition: LinearAlgebraProfiler.h:90
bool getPrintTotalWallTime() const
Definition: LinearAlgebraProfiler.cpp:210
size_type getPrecision() const
Definition: LinearAlgebraProfiler.cpp:216
size_type d_iter
Definition: LinearAlgebraProfiler.h:98
size_type getPrintFrequency() const
Definition: LinearAlgebraProfiler.cpp:186
size_type d_wallTimeFreq
Definition: LinearAlgebraProfiler.h:86
size_type getWallTimeFrequency() const
Definition: LinearAlgebraProfiler.cpp:192
void registerEnd(const std::string &s)
Definition: LinearAlgebraProfiler.cpp:120
void registerIterEnd(const std::string &s)
Definition: LinearAlgebraProfiler.cpp:158
std::ostream & d_stream
Definition: LinearAlgebraProfiler.h:84
size_type d_precision
Definition: LinearAlgebraProfiler.h:94
void registerStart(const utils::mpi::MPIComm &mpiComm)
Definition: LinearAlgebraProfiler.cpp:91
utils::mpi::MPIComm d_mpiComm
Definition: LinearAlgebraProfiler.h:96
size_type d_printFreq
Definition: LinearAlgebraProfiler.h:85
bool d_myRankPrintFlag
Definition: LinearAlgebraProfiler.h:99
time_t Time
Definition: LinearAlgebraProfiler.h:44
std::string d_delimiter
Definition: LinearAlgebraProfiler.h:95
static const std::string DELIMITER
Definition: Defaults.h:76
static const ParallelPrintType PARALLEL_PRINT_TYPE
Definition: Defaults.h:66
static const size_type WALL_TIME_FREQ
Setting all the PrintControlDefaults.
Definition: Defaults.h:44
static const size_type PRINT_FREQ
Definition: Defaults.h:49
static const size_type PRECISION
Definition: Defaults.h:71
static const bool PRINT_TOTAL_WALL_TIME
Definition: Defaults.h:60
static const bool PRINT_FINAL
Definition: Defaults.h:55
ParallelPrintType
Definition: LinearAlgebraTypes.h:53
int MPIComm
Definition: MPITypes.h:83
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8