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

◆ as_float()

std::span< const float > MayaFlux::Kakshya::TextureContainer::as_float ( uint32_t  layer = 0) const

Typed view over the float variant.

Returns an empty span if the layer's variant is not float.

Definition at line 545 of file TextureContainer.cpp.

546{
547 if (layer >= m_data.size())
548 return {};
549 ensure_cpu(layer);
550 const auto* v = std::get_if<std::vector<float>>(&m_data[layer]);
551 return v ? std::span<const float>(v->data(), v->size()) : std::span<const float> {};
552}
void ensure_cpu(uint32_t layer) const
Download a GPU-held layer into m_data before a CPU read.

References ensure_cpu(), and m_data.

+ Here is the call graph for this function: