|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
| bool MayaFlux::Kakshya::TensorInsertion::resize | ( | std::vector< uint64_t > | shape | ) |
Replace the shape and reallocate.
Existing elements are kept where positions overlap in flat order and the rest are zero. The tensor becomes dense with no byte offset.
Definition at line 112 of file TensorInsertion.cpp.
References MayaFlux::Kakshya::TensorData::allocate(), MayaFlux::Kakshya::TensorSpec::axes, MayaFlux::Kakshya::TensorSpec::byte_offset, MayaFlux::Kakshya::TensorData::copy_of(), m_tensor, MayaFlux::Kakshya::TensorSpec::quantization, MayaFlux::Kakshya::TensorSpec::shape, and MayaFlux::Kakshya::TensorSpec::strides.