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

◆ clear()

void MayaFlux::Kakshya::TensorContainer::clear ( )
overridevirtual

Become an empty tensor of the same dtype and name, and drop all region groups.

Implements MayaFlux::Kakshya::NDDataContainer< TensorData >.

Definition at line 226 of file TensorContainer.cpp.

227{
228 auto emptied = TensorData::allocate(
229 TensorSpec::contiguous(m_data.spec().dtype, { 0 }, m_data.spec().name));
230 if (emptied)
231 m_data = std::move(*emptied);
232 m_region_groups.clear();
233}
std::unordered_map< std::string, RegionGroup > m_region_groups
static std::optional< TensorData > allocate(TensorSpec spec)
Zero-filled tensor for a spec.
Definition Tensor.cpp:72
static TensorSpec contiguous(TensorDType dtype, std::vector< uint64_t > shape, std::string name={})
C-ordered spec with no offset, axes or quantization.

References MayaFlux::Kakshya::TensorData::allocate(), MayaFlux::Kakshya::TensorSpec::contiguous(), m_data, and m_region_groups.

Here is the call graph for this function: