Tape information that can be printed in a pretty print format or a table format. More...
#include <tapeValues.hpp>
Public Types | |
enum class | LocalReductionOperation { Sum , Max } |
Public Member Functions | |
TapeValues (std::string const &tapeName) | |
Constructor. | |
Add data | |
void | addDoubleEntry (std::string const &name, double const &value, LocalReductionOperation operation=LocalReductionOperation::Sum, bool usedMem=false, bool allocatedMem=false) |
Add double entry. If it is a memory entry, it should be in bytes. | |
void | addLongEntry (std::string const &name, long const &value, LocalReductionOperation operation=LocalReductionOperation::Sum) |
Add long entry. | |
void | addSection (std::string const &name) |
Add section. All further entries are added under this section. | |
void | addUnsignedLongEntry (std::string const &name, unsigned long const &value, LocalReductionOperation operation=LocalReductionOperation::Sum) |
Add unsigned long entry. | |
Format data | |
template<typename Stream = std::ostream> | |
void | formatDefault (Stream &out=std::cout) const |
Output in a human readable format. One row per entry. | |
template<typename Stream = std::ostream> | |
void | formatHeader (Stream &out=std::cout) const |
Output the header for a table output. | |
template<typename Stream = std::ostream> | |
void | formatRow (Stream &out=std::cout) const |
Output this data in one row. One entry per column. | |
Misc. | |
void | combineData (TapeValues const &other) |
Perform entry-wise additions. | |
void | combineData () |
Perform an MPI_Allreduce with MPI_COMM_WORLD. | |
template<typename Comm > | |
void | combineDataMPI (Comm communicator) |
Perform an MPI_Allreduce with the given communicator. | |
double | getAllocatedMemorySize () |
Get the allocated memory in bytes. | |
double | getUsedMemorySize () |
Get the used memory in bytes. | |
Tape information that can be printed in a pretty print format or a table format.
This structure is generated for tapes with the ReverseTapeInterface::getTapeValues() function. The tape provides the information for all internal data structures and the user can then output this information for further analysis. To make the output as useful as possible, tapes should provide information about all DataInterface members, arrays, and IndexManagerInterface members.
|
inline |
Perform an MPI_Allreduce with MPI_COMM_WORLD.
This method is deprecated and only kept for backwards compatibility. combineDataMPI should be used instead.