class Gambit::Printers::HDF5BufferBase

Base class for buffers.

#include <hdf5printer_v2.hpp>

Inherited by Gambit::Printers::HDF5Buffer< T >

Public Functions

Name
HDF5BufferBase(const std::string & name, const bool sync)
Constructor.
std::stringdset_name() const
Report name of dataset for which we are the buffer.
boolis_synchronised() const
Report whether this buffer is synchronised.
std::set< PPIDpair >get_points_set() const
Report all the points in this buffer.
virtual~HDF5BufferBase()
Destructor.
virtual boolexists_on_disk() const =0
Report whether the dataset for which we are the buffer is known to exist on disk yet.
virtual voidupdate(const PPIDpair & ppid) =0
Make sure buffer includes the input point (data will be set as ‘invalid’ unless given elsewhere)
virtual voidblock_flush(const hid_t loc_id, const std::vector< PPIDpair > & order, const std::size_t target_pos) =0
Empty buffer to disk as a block.
virtual voidrandom_flush(const hid_t loc_id, const std::map< PPIDpair, std::size_t > & position_map) =0
Empty buffer to disk as arbitrarily positioned data.
virtual std::pair< std::vector< double >, std::vector< int > >flush_to_vector_dbl(const std::vector< PPIDpair > & order) =0
virtual std::pair< std::vector< long >, std::vector< int > >flush_to_vector_int(const std::vector< PPIDpair > & order) =0
virtual voidensure_dataset_exists(const hid_t loc_id, const std::size_t length) =0
Make sure datasets exist on disk with the correct name and size.
virtual voidreset(hid_t loc_id) =0
Clear all data in memory and on disk for this buffer.
virtual std::size_tN_items_in_buffer() =0
virtual intget_type_id() const =0
Retrieve the integer type ID for this dataset.

Protected Attributes

Name
std::set< PPIDpair >buffer_set
Set detailing what points are in the buffer.
std::map< PPIDpair, int >buffer_valid
Buffer specifying whether the data in the primary buffer is “valid”.

Public Functions Documentation

function HDF5BufferBase

HDF5BufferBase(
    const std::string & name,
    const bool sync
)

Constructor.

HDF5BufferBase member functions.

Constructor

function dset_name

std::string dset_name() const

Report name of dataset for which we are the buffer.

function is_synchronised

bool is_synchronised() const

Report whether this buffer is synchronised.

function get_points_set

std::set< PPIDpair > get_points_set() const

Report all the points in this buffer.

function ~HDF5BufferBase

inline virtual ~HDF5BufferBase()

Destructor.

function exists_on_disk

virtual bool exists_on_disk() const =0

Report whether the dataset for which we are the buffer is known to exist on disk yet.

Reimplemented by: Gambit::Printers::HDF5Buffer::exists_on_disk

function update

virtual void update(
    const PPIDpair & ppid
) =0

Make sure buffer includes the input point (data will be set as ‘invalid’ unless given elsewhere)

Reimplemented by: Gambit::Printers::HDF5Buffer::update

function block_flush

virtual void block_flush(
    const hid_t loc_id,
    const std::vector< PPIDpair > & order,
    const std::size_t target_pos
) =0

Empty buffer to disk as a block.

Reimplemented by: Gambit::Printers::HDF5Buffer::block_flush

function random_flush

virtual void random_flush(
    const hid_t loc_id,
    const std::map< PPIDpair, std::size_t > & position_map
) =0

Empty buffer to disk as arbitrarily positioned data.

Reimplemented by: Gambit::Printers::HDF5Buffer::random_flush

function flush_to_vector_dbl

virtual std::pair< std::vector< double >, std::vector< int > > flush_to_vector_dbl(
    const std::vector< PPIDpair > & order
) =0

Reimplemented by: Gambit::Printers::HDF5Buffer::flush_to_vector_dbl

function flush_to_vector_int

virtual std::pair< std::vector< long >, std::vector< int > > flush_to_vector_int(
    const std::vector< PPIDpair > & order
) =0

Reimplemented by: Gambit::Printers::HDF5Buffer::flush_to_vector_int

function ensure_dataset_exists

virtual void ensure_dataset_exists(
    const hid_t loc_id,
    const std::size_t length
) =0

Make sure datasets exist on disk with the correct name and size.

Reimplemented by: Gambit::Printers::HDF5Buffer::ensure_dataset_exists

function reset

virtual void reset(
    hid_t loc_id
) =0

Clear all data in memory and on disk for this buffer.

Reimplemented by: Gambit::Printers::HDF5Buffer::reset

function N_items_in_buffer

virtual std::size_t N_items_in_buffer() =0

Reimplemented by: Gambit::Printers::HDF5Buffer::N_items_in_buffer

function get_type_id

virtual int get_type_id() const =0

Retrieve the integer type ID for this dataset.

Reimplemented by: Gambit::Printers::HDF5Buffer::get_type_id

Protected Attributes Documentation

variable buffer_set

std::set< PPIDpair > buffer_set;

Set detailing what points are in the buffer.

variable buffer_valid

std::map< PPIDpair, int > buffer_valid;

Buffer specifying whether the data in the primary buffer is “valid”.


Updated on 2023-06-26 at 21:36:52 +0000