Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::CA::Npy_Frame_Sink Class Reference

Path-pattern sink that writes one .npy file per frame. More...

#include <ca-npy.H>

Collaboration diagram for Aleph::CA::Npy_Frame_Sink:
[legend]

Public Member Functions

 Npy_Frame_Sink (std::filesystem::path path_pattern, const std::size_t zero_pad=6)
 Build an NPY frame sink.
 
template<typename Lattice >
void accept (const std::size_t step, const Lattice &frame)
 Write one NPY frame.
 
void flush ()
 NPY frames are written eagerly; this is a no-op.
 

Private Attributes

std::filesystem::path pattern_
 
std::size_t zero_pad_ = 6
 

Detailed Description

Path-pattern sink that writes one .npy file per frame.

Definition at line 183 of file ca-npy.H.

Constructor & Destructor Documentation

◆ Npy_Frame_Sink()

Aleph::CA::Npy_Frame_Sink::Npy_Frame_Sink ( std::filesystem::path  path_pattern,
const std::size_t  zero_pad = 6 
)
inlineexplicit

Build an NPY frame sink.

Parameters
[in]path_patternoutput path pattern.
[in]zero_padminimum width for {step}.

Definition at line 193 of file ca-npy.H.

Member Function Documentation

◆ accept()

template<typename Lattice >
void Aleph::CA::Npy_Frame_Sink::accept ( const std::size_t  step,
const Lattice &  frame 
)
inline

Write one NPY frame.

Template Parameters
Latticelattice type.
Parameters
[in]stepsimulation step.
[in]frameframe to write.

Definition at line 203 of file ca-npy.H.

References ah_runtime_error_if, Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::format_step_path(), out, pattern_, Aleph::CA::write_npy(), and zero_pad_.

◆ flush()

void Aleph::CA::Npy_Frame_Sink::flush ( )
inline

NPY frames are written eagerly; this is a no-op.

Definition at line 214 of file ca-npy.H.

Member Data Documentation

◆ pattern_

std::filesystem::path Aleph::CA::Npy_Frame_Sink::pattern_
private

Definition at line 185 of file ca-npy.H.

Referenced by accept().

◆ zero_pad_

std::size_t Aleph::CA::Npy_Frame_Sink::zero_pad_ = 6
private

Definition at line 186 of file ca-npy.H.

Referenced by accept().


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