MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ register_with_registry()

void MayaFlux::IO::SafetensorsReader::register_with_registry ( )
static

Register the format, with its writer, in the TensorFormatRegistry.

Definition at line 32 of file SafetensorsFormat.cpp.

33{
35 .name = "safetensors",
36 .extensions = { "safetensors" },
38 .make_reader = []() -> std::unique_ptr<TensorReader> { return std::make_unique<SafetensorsReader>(); },
39 .make_writer = []() -> std::unique_ptr<TensorWriter> { return std::make_unique<SafetensorsWriter>(); } });
40
42 "SafetensorsReader registered for: safetensors");
43}
#define MF_INFO(comp, ctx,...)
static bool probe(std::span< const std::byte > head, uint64_t file_size)
Whether leading bytes and file size look like a safetensors header.
static TensorFormatRegistry & instance()
The process-wide registry.
void register_format(TensorFormat format)
Add a format, replacing any earlier one with the same name.
@ Init
Engine/subsystem initialization.
@ IO
Networking, file handling, streaming.

References MayaFlux::Journal::Init, MayaFlux::IO::TensorFormatRegistry::instance(), MayaFlux::Journal::IO, MF_INFO, probe(), and MayaFlux::IO::TensorFormatRegistry::register_format().

Here is the call graph for this function: