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

◆ safetensors_name()

std::optional< std::string_view > MayaFlux::IO::Detail::safetensors_name ( Kakshya::TensorDType dtype)
nodiscardnoexcept

Safetensors dtype name for an element type, when the format has one.

Definition at line 77 of file TensorCodec.cpp.

78{
79 if (dtype.lanes != 1)
80 return std::nullopt;
81 for (const auto& entry : k_safetensors) {
82 if (entry.kind == dtype.kind && entry.bits == dtype.bits)
83 return entry.name;
84 }
85 return std::nullopt;
86}

Referenced by MayaFlux::IO::SafetensorsWriter::write().

Here is the caller graph for this function: