Contains some helpers to write and read the tuning log entries.
More...
|
std::string | writeEvidence (long time, size_t iteration, const Configuration &config) |
| Writes evidence to a string.
|
|
std::tuple< long, size_t, Configuration > | readEvidence (std::stringstream &str) |
| Reads the arguments of an evidence entry in the log file from a stringstream.
|
|
std::string | writeTune () |
| Writes a tune entry for the log file into a string.
|
|
bool | readTune (std::stringstream &str) |
| Reads the arguments of a tune entry from the stringstream.
|
|
std::string | writeReset (size_t iteration) |
| Writes a reset entry in the log file to a string.
|
|
std::string | writeLiveInfo (const LiveInfo &liveInfo) |
| Writes a liveInfo entry in the log file to a string.
|
|
autopas::LiveInfo | readLiveInfo (std::stringstream &str) |
| Reads the arguments of a live info entry in the log file from a stringstream.
|
|
template<class T > |
void | toStringHelper (std::ostream &in, const T &val) |
| Writes the given argument into the given ostream with following white space.
|
|
template<class... Payload> |
auto | toString (const Payload &...payload) |
| Writes multiple arguments into a string using their << operator.
|
|
template<class... Payload> |
std::tuple< Payload... > | fromString (std::stringstream &stream) |
| Reads multiple values from a stringstream using their >> operator.
|
|
size_t | readReset (std::stringstream &str) |
| Reads the arguments of a reset entry in the log file from a string.
|
|
Contains some helpers to write and read the tuning log entries.
This namespace defines functions to both read and write tuning log entries.
They are declared and documented in src/autopas/tuning/tuningStrategy/TuningLogEntry.h. TODO(tobias): Move definition there.
◆ fromString()
template<class... Payload>
std::tuple< Payload... > autopas::tuningLogEntry::fromString |
( |
std::stringstream & |
stream | ) |
|
Reads multiple values from a stringstream using their >> operator.
- Template Parameters
-
Payload | The types of the valuaes to read. |
- Parameters
-
stream | The stringstream to read from. |
- Returns
- The read values as a tuple.
◆ readEvidence()
std::tuple< long, size_t, Configuration > autopas::tuningLogEntry::readEvidence |
( |
std::stringstream & |
str | ) |
|
Reads the arguments of an evidence entry in the log file from a stringstream.
- Parameters
-
str | The stream to read from. |
- Returns
- The evidence as a tuple.
◆ readLiveInfo()
LiveInfo autopas::tuningLogEntry::readLiveInfo |
( |
std::stringstream & |
str | ) |
|
Reads the arguments of a live info entry in the log file from a stringstream.
- Parameters
-
str | The stringstream to read from. |
- Returns
- The LiveInfo read from the stream.
◆ readReset()
size_t autopas::tuningLogEntry::readReset |
( |
std::stringstream & |
str | ) |
|
Reads the arguments of a reset entry in the log file from a string.
- Parameters
-
str | The stringstream to read from. |
- Returns
- The iteration the reset happened in.
◆ readTune()
bool autopas::tuningLogEntry::readTune |
( |
std::stringstream & |
str | ) |
|
Reads the arguments of a tune entry from the stringstream.
- Parameters
-
- Returns
- The currentInvalid bool.
◆ toString()
template<class... Payload>
auto autopas::tuningLogEntry::toString |
( |
const Payload &... |
payload | ) |
|
Writes multiple arguments into a string using their << operator.
- Template Parameters
-
Payload | The types of the arguments. |
- Parameters
-
payload | The arguments to write. |
- Returns
- The string representation of the arguments, with whitespaces between.
◆ toStringHelper()
template<class T >
void autopas::tuningLogEntry::toStringHelper |
( |
std::ostream & |
in, |
|
|
const T & |
val |
|
) |
| |
Writes the given argument into the given ostream with following white space.
- Template Parameters
-
- Parameters
-
in | The ostream. |
val | The argument to write. |
◆ writeEvidence()
std::string autopas::tuningLogEntry::writeEvidence |
( |
long |
time, |
|
|
size_t |
iteration, |
|
|
const autopas::Configuration & |
config |
|
) |
| |
Writes evidence to a string.
- Parameters
-
time | The measured time. |
iteration | The iteration in was measured in. |
config | The configuation used. |
- Returns
- The string with the evidence.
◆ writeLiveInfo()
std::string autopas::tuningLogEntry::writeLiveInfo |
( |
const autopas::LiveInfo & |
liveInfo | ) |
|
Writes a liveInfo entry in the log file to a string.
- Parameters
-
liveInfo | The live info to write. |
- Returns
- The string with the live info.
◆ writeReset()
std::string autopas::tuningLogEntry::writeReset |
( |
size_t |
iteration | ) |
|
Writes a reset entry in the log file to a string.
- Parameters
-
iteration | The iteration it was performed on. |
- Returns
- The string with the reset entry.
◆ writeTune()
std::string autopas::tuningLogEntry::writeTune |
( |
| ) |
|
Writes a tune entry for the log file into a string.
- Returns
- The string with the tune entry.