Struct TypedArray#

Nested Relationships#

Nested Types#

Struct Documentation#

struct TypedArray#

Public Functions

inline bool empty() const#
inline size_t size() const#
template<typename T>
inline Eigen::Map<Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>> as_matrix()#

View the buffer as a row-major Eigen matrix of type T.

This is a zero-copy view over the underlying memory map. The dtype must match the requested T or an exception is thrown.

template<typename T>
inline Eigen::Map<const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>> as_matrix() const#

View the buffer as a const row-major Eigen matrix of type T.

This is a zero-copy view over the underlying memory map. The dtype must match the requested T or an exception is thrown.

inline ByteView to_bytes() const#

Return a read-only byte view of the underlying buffer.

The size is computed from dtype * rows * cols. This is useful for interop, hashing, or serialization without exposing raw pointers.

inline MutableByteView to_bytes_mutable()#

Return a mutable byte view of the underlying buffer.

The size is computed from dtype * rows * cols. Use with care: mutating the bytes will mutate the mapped file contents.

inline void materialize_to_owned()#

Public Members

std::string dtype#
int rows = 0#
int cols = 0#
mio::shared_mmap_sink mmap#
std::vector<std::uint8_t> owned#
struct ByteView#

Public Members

const std::uint8_t *data = nullptr#
size_t size = 0#
struct MutableByteView#

Public Members

std::uint8_t *data = nullptr#
size_t size = 0#