class
SushiAI::IO::CheckpointReader
Deserializes checkpoint headers and records from an input stream.
- Declared in
include/SushiAI/io/checkpoint_format.hpp
Public member functions
explicit CheckpointReader(std::istream &in)Reads and validates the file header.
Parameters
inWhere the bytes come from; must outlive the reader.
Exceptions
ErrorIf the magic, the version or the count is wrong, or the header is truncated.
std::uint32_t count() const noexceptHow many records the file declares.
std::uint32_t read_count() const noexceptHow many records have been read so far.
TensorRecord next()Reads the next record's header, leaving its payload unread.
Returns
The record.
Exceptions
ErrorIf no records remain, a bound is exceeded, a declared extent is not positive, the dtype is not a
DType, or the header is truncated.

