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

◆ register_with_registry()

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

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

Definition at line 11 of file NpyFormat.cpp.

12{
14 .name = "npy",
15 .extensions = { "npy" },
16 .probe = &NpyReader::probe,
17 .make_reader = []() -> std::unique_ptr<TensorReader> { return std::make_unique<NpyReader>(); },
18 .make_writer = []() -> std::unique_ptr<TensorWriter> { return std::make_unique<NpyWriter>(); } });
19
20 MF_INFO(Journal::Component::IO, Journal::Context::Init, "NpyReader registered for: npy");
21}
#define MF_INFO(comp, ctx,...)
static bool probe(std::span< const std::byte > head, uint64_t file_size)
Whether the leading bytes are the numpy magic string.
Definition NpyFormat.cpp:23
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: