Helper to log FLOP count and HitRate for AutoPas::iteratePairwise() calls with the functors in the molecular dynamics library to a csv file for easier analysis. More...
#include <FLOPLogger.h>
Public Member Functions | |
| FLOPLogger (const std::string &outputSuffix="") | |
| Constructor initializes the logger and sets the output file name. | |
| ~FLOPLogger () | |
| Destructor drops the logger from the spd registry. | |
| void | logIteration (size_t iteration, size_t numFLOPs, double hitRate) |
| Log the given arguments and the internal buffer to the csv file. | |
Helper to log FLOP count and HitRate for AutoPas::iteratePairwise() calls with the functors in the molecular dynamics library to a csv file for easier analysis.
It uses an asynchronous spd logger to write a csv file named "AutoPas_FLOPCount_<dateStamp>.csv".
By default logging the data is disabled. It can be enabled by setting the cmake variable AUTOPAS_LOG_FLOPS to ON.
When enabled and used with a functor where FLOP counting is not implemented (in which case the functor will return the default nonsensical negative FLOP count and/or Hit rate), "Not Implemented" is outputted instead.
|
explicit |
Constructor initializes the logger and sets the output file name.
| outputSuffix | Suffix for all output files produced by this class. |
| void autopas::FLOPLogger::logIteration | ( | size_t | iteration, |
| size_t | numFLOPs, | ||
| double | hitRate | ||
| ) |
Log the given arguments and the internal buffer to the csv file.
If a value is not valid, it is interpreted that the functor has not implemented the relevant function.
| iteration | |
| numFLOPs | number of FLOPs. std::numeric_limits<size_t>::max() is interpreted as invalid. |
| hitRate | percentage of distance calculations that result in force contributions. std::numeric_limits<double>::quiet_NaN() is interpreted as invalid. |