18#ifndef SERIALIZATION_HPP
19#define SERIALIZATION_HPP
26constexpr uint32_t
MAGIC = 0x43495245;
62 .offset =
static_cast<size_t>(tensor.
offset()),
A multidimensional, strided tensor data structure.
Definition: tensor.hpp:99
rank_type rank() const
Returns the number of dimensions (rank) of the tensor.
Definition: tensor.hpp:179
std::size_t nbytes() const
Returns the total number of bytes occupied by the tensor's elements.
Definition: tensor.hpp:204
std::ptrdiff_t offset() const
Returns the offset of the tensor in the current buffer.
Definition: tensor.hpp:199
type dtype() const
Returns the tensor's data type.
Definition: tensor.hpp:174
Definition: buffer.hpp:41
constexpr uint8_t dcodeof(type type)
Returns the numeric code used for serialization of a data type.
Definition: types.hpp:182
Metadata< Tensor > metadataof(Tensor const &tensor)
Definition: serialization.hpp:59
Header headerof(Tensor const &tensor)
Definition: serialization.hpp:50
constexpr uint32_t MAGIC
Definition: serialization.hpp:26