Skip to content

layerLogger

template<typename Layer> class layerLogger

Asynchronous logger that records layer states and inputs to CSV files.

Layer
Layer type exposing state_tuple_type and input buffers.

Functions

Name Description
layerLogger Constructs the logger with simulation and IO streams.
start Allocates buffers and opens CSV outputs.
write Schedules a logging operation for the given simulation step.
stop Flushes and closes files, ensuring pending copies finish.

Function Details

layerLogger

layerLogger(Layer& layer, cudaStream_t streamSim, cudaStream_t streamIO, const std::string& name)

Constructs the logger with simulation and IO streams.

layer
Layer to observe.
streamSim
CUDA stream used by the simulation.
streamIO
CUDA stream used for IO operations.
name
Base file name for generated CSVs.

start

void start()

Allocates buffers and opens CSV outputs.

stop

void stop()

Flushes and closes files, ensuring pending copies finish.

write

void write(int step)

Schedules a logging operation for the given simulation step.

step
Current simulation step index.