Class LoggingConfig

Nested Relationships

Inheritance Relationships

Derived Type

Class Documentation

class flamegpu::LoggingConfig

Interface to the data structure for controlling how model data is logged

Subclassed by flamegpu::StepLoggingConfig

Public Types

enum Reduction

Enum representing the available reduction types for agent variables

Values:

enumerator Mean
enumerator StandardDev
enumerator Min
enumerator Max
enumerator Sum
util::Any() ReductionFn (HostAgentAPI &ai, const std::string &variable_name)

ReductionFn is a prototype for reduction functions Typedef’ing function prototypes like this allows for cleaner function pointers

Note

- this leads to a swig warning 504 which is suppressed.

Public Functions

explicit LoggingConfig(const ModelDescription &model)

Constructor

Parameters

model – The ModelDescription hierarchy to produce a logging config for

explicit LoggingConfig(const ModelData &model)

Constructor

Parameters

model – The ModelDescription hierarchy to produce a logging config for

explicit LoggingConfig(const LoggingConfig &other)

Copy Constructor

AgentLoggingConfig agent(const std::string &agent_name, const std::string &agent_state = ModelData::DEFAULT_STATE)

Returns an interface to the logging config for the named agent state

void logEnvironment(const std::string &property_name)

Mark a named environment property to be logged

Parameters

property_name – Name of the environment property to be logged

Throws

InvalidEnvironment

Public Static Functions

static inline constexpr const char *toString(const Reduction &r)

Converts a Reduction enum to a string representation

struct NameReductionFn

A user configured reduction to be logged

Public Functions

inline bool operator<(const NameReductionFn &other) const

Generic ordering function, to allow instances of this type to be stored in ordered collections The defined order is not important

Parameters

other – The other instance to compare vs

Returns

Returns whether this instance should come before other

Public Members

std::string name

Variable name to reduce over

Reduction reduction

The type of reduction

ReductionFn *function

Pointer to instantiated reduction function (Reduction functions are templated so much be instantiated)