Singleton class for HDF5 profiler.
More...
#include "h5profiler.h"
|
| | H5Profiler (H5Profiler const &)=delete |
| |
| void | operator= (H5Profiler const &)=delete |
| |
| void const | setStep (const int &_step) |
| | Set current step of profiler. More...
|
| |
| void const | setRank (const int &_myRank) |
| | Set MPI rank. More...
|
| |
| void const | setNumProcs (const int &_numProcs) |
| | Set number of MPI processes. More...
|
| |
| void const | disableWrite () |
| | Disable write to output file. More...
|
| |
| void const | enableWrite () |
| | Enable write to output file. More...
|
| |
| template<typename T > |
| void | createValueDataSet (const std::string &path, int steps, std::size_t maxSteps=HighFive::DataSpace::UNLIMITED) |
| | Track single value (per MPI rank). More...
|
| |
| template<typename T > |
| void | value2file (const std::string &path, T value) |
| | Write value to single value data set. More...
|
| |
| template<typename T > |
| void | createVectorDataSet (const std::string &path, int steps, std::size_t size, std::size_t maxSteps=HighFive::DataSpace::UNLIMITED) |
| | Track vector values (per MPI rank). More...
|
| |
| template<typename T > |
| void | vector2file (const std::string &path, std::vector< T > data) |
| |
| template<typename T > |
| void | vector2file (const std::string &path, T *data) |
| |
Singleton class for HDF5 profiler.
Definition at line 118 of file h5profiler.h.
◆ H5Profiler() [1/2]
◆ H5Profiler() [2/2]
| H5Profiler::H5Profiler |
( |
const std::string & |
outfile | ) |
|
|
private |
◆ createValueDataSet()
template<typename T >
| void H5Profiler::createValueDataSet |
( |
const std::string & |
path, |
|
|
int |
steps, |
|
|
std::size_t |
maxSteps = HighFive::DataSpace::UNLIMITED |
|
) |
| |
|
inline |
Track single value (per MPI rank).
- Template Parameters
-
- Parameters
-
| path | HDF5 path to data/key |
| steps | |
| maxSteps | |
Definition at line 185 of file h5profiler.h.
◆ createVectorDataSet()
template<typename T >
| void H5Profiler::createVectorDataSet |
( |
const std::string & |
path, |
|
|
int |
steps, |
|
|
std::size_t |
size, |
|
|
std::size_t |
maxSteps = HighFive::DataSpace::UNLIMITED |
|
) |
| |
|
inline |
Track vector values (per MPI rank).
- Template Parameters
-
- Parameters
-
| path | HDF5 path to data/key |
| steps | |
| size | vector size |
| maxSteps | |
Definition at line 226 of file h5profiler.h.
◆ disableWrite()
| void const H5Profiler::disableWrite |
( |
| ) |
|
|
inline |
◆ enableWrite()
| void const H5Profiler::enableWrite |
( |
| ) |
|
|
inline |
◆ getInstance()
| static H5Profiler & H5Profiler::getInstance |
( |
const std::string & |
outfile = "" | ) |
|
|
inlinestatic |
Constructor/Instance getter for HDF5 profiler.
constructor is only called ONCE due to the singleton pattern, arguments have to be passed when first calling getInstance()
- Parameters
-
- Returns
- instance of HDF5 profiler
Definition at line 130 of file h5profiler.h.
◆ operator=()
◆ setNumProcs()
| void const H5Profiler::setNumProcs |
( |
const int & |
_numProcs | ) |
|
|
inline |
Set number of MPI processes.
- Parameters
-
| _numProcs | number of MPI processes |
Definition at line 156 of file h5profiler.h.
◆ setRank()
| void const H5Profiler::setRank |
( |
const int & |
_myRank | ) |
|
|
inline |
◆ setStep()
| void const H5Profiler::setStep |
( |
const int & |
_step | ) |
|
|
inline |
Set current step of profiler.
- Parameters
-
Definition at line 144 of file h5profiler.h.
◆ value2file()
template<typename T >
| void H5Profiler::value2file |
( |
const std::string & |
path, |
|
|
T |
value |
|
) |
| |
|
inline |
Write value to single value data set.
- Template Parameters
-
- Parameters
-
| path | HDF5 path to data/key |
| value | value to be written |
Definition at line 202 of file h5profiler.h.
◆ vector2file() [1/2]
template<typename T >
| void H5Profiler::vector2file |
( |
const std::string & |
path, |
|
|
std::vector< T > |
data |
|
) |
| |
|
inline |
Write value to vector value data set.
- Template Parameters
-
- Parameters
-
| path | HDF5 path to data/key |
| data | value(s)/data to be written as std::vector<T> |
Definition at line 246 of file h5profiler.h.
◆ vector2file() [2/2]
template<typename T >
| void H5Profiler::vector2file |
( |
const std::string & |
path, |
|
|
T * |
data |
|
) |
| |
|
inline |
Write value to vector value data set.
- Template Parameters
-
- Parameters
-
| path | HDF5 path to data/key |
| data | value(s)/data to be written as T* |
Definition at line 267 of file h5profiler.h.
◆ currentMaxLength
| int H5Profiler::currentMaxLength = 0 |
◆ currentSteps
| std::unordered_map<std::string, int> H5Profiler::currentSteps |
|
private |
◆ dataSets
| std::unordered_map<std::string, HighFive::DataSet> H5Profiler::dataSets |
|
private |
◆ disabled
| bool H5Profiler::disabled |
|
private |
◆ h5file
| HighFive::File H5Profiler::h5file |
|
private |
◆ myRank
◆ numProcs
◆ step
◆ timeElapsed
| std::unordered_map<std::string, double> H5Profiler::timeElapsed |
|
private |
◆ timeStart
| std::unordered_map<std::string, double> H5Profiler::timeStart |
|
private |
◆ totalSteps
| std::unordered_map<std::string, int> H5Profiler::totalSteps |
|
private |
◆ vectorSizes
| std::unordered_map<std::string, std::size_t> H5Profiler::vectorSizes |
|
private |
The documentation for this class was generated from the following files: