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

◆ register_format()

void MayaFlux::IO::TensorFormatRegistry::register_format ( TensorFormat format)

Add a format, replacing any earlier one with the same name.

Definition at line 13 of file TensorFormat.cpp.

14{
15 for (auto& existing : m_formats) {
16 if (existing.name == format.name) {
17 existing = std::move(format);
18 return;
19 }
20 }
21 m_formats.push_back(std::move(format));
22}
std::vector< TensorFormat > m_formats

References m_formats, and MayaFlux::IO::TensorFormat::name.

Referenced by MayaFlux::IO::NpyReader::register_with_registry(), MayaFlux::IO::NpzReader::register_with_registry(), and MayaFlux::IO::SafetensorsReader::register_with_registry().

Here is the caller graph for this function: