AutoPas  3.0.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
autopas::FLOPLogger Class Reference

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ FLOPLogger()

autopas::FLOPLogger::FLOPLogger ( const std::string &  outputSuffix = "")
explicit

Constructor initializes the logger and sets the output file name.

Parameters
outputSuffixSuffix for all output files produced by this class.

Member Function Documentation

◆ logIteration()

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.

Parameters
iteration
numFLOPsnumber of FLOPs. std::numeric_limits<size_t>::max() is interpreted as invalid.
hitRatepercentage of distance calculations that result in force contributions. std::numeric_limits<double>::quiet_NaN() is interpreted as invalid.

The documentation for this class was generated from the following files: