MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
TensorCodec.hpp File Reference
Include dependency graph for TensorCodec.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  MayaFlux::IO::Detail::FileHead
 First bytes of a file together with its total size. More...
struct  MayaFlux::IO::Detail::NpyTypestr
 Element type and byte order read from a numpy type string. More...

Namespaces

namespace  MayaFlux
 Main namespace for the Maya Flux audio engine.
namespace  MayaFlux::IO
namespace  MayaFlux::IO::Detail

Functions

size_t MayaFlux::IO::Detail::component_bytes (Kakshya::TensorDType dtype) noexcept
 Bytes of one independently ordered component of an element.
std::optional< std::span< const std::byte > > MayaFlux::IO::Detail::dense_bytes (const Kakshya::TensorData &tensor, std::optional< Kakshya::TensorData > &dense)
 Elements of a tensor as dense C-order bytes.
bool MayaFlux::IO::Detail::host_is_little_endian () noexcept
 Whether this machine stores multi-byte values least significant byte first.
std::string MayaFlux::IO::Detail::lower_extension (const std::string &path)
 Lowercase extension of a path without its dot.
std::optional< NpyTypestr > MayaFlux::IO::Detail::npy_dtype (std::string_view typestr, std::string &why)
 Parse a numpy type string such as <f4, >i8 or |b1.
std::optional< std::string > MayaFlux::IO::Detail::npy_typestr (Kakshya::TensorDType dtype)
 Little-endian numpy type string for an element type, when numpy has one.
std::optional< FileHead > MayaFlux::IO::Detail::read_file_head (const std::string &path, size_t limit)
 Read up to limit leading bytes of a file, or std::nullopt if it cannot be opened.
std::optional< Kakshya::TensorDType > MayaFlux::IO::Detail::safetensors_dtype (std::string_view name) noexcept
 Element type for a safetensors dtype name such as F32 or BF16.
std::optional< std::string_view > MayaFlux::IO::Detail::safetensors_name (Kakshya::TensorDType dtype) noexcept
 Safetensors dtype name for an element type, when the format has one.
void MayaFlux::IO::Detail::swap_components (std::span< std::byte > data, size_t component_bytes) noexcept
 Reverse the byte order of every component in place.