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

◆ append()

size_t MayaFlux::Kakshya::CompositeArray::append ( )

Append one zero-initialized element with no fields present.

Returns
Index of the new element.
Exceptions
std::length_errorIf the packed storage cannot grow.

Definition at line 115 of file Composite.cpp.

116{
117 auto& rows = std::get<std::vector<uint8_t>>(m_rows);
118 const size_t index = size();
119
120 if (m_layout.stride_bytes() > rows.max_size() - rows.size()) {
121 Journal::error<std::length_error>(
124 std::source_location::current(),
125 "CompositeArray exceeds addressable size at element {}", index);
126 }
127
128 rows.resize(rows.size() + m_layout.stride_bytes(), 0);
129 return index;
130}
uint32_t rows
uint32_t index
Definition VKDevice.cpp:122
size_t size() const noexcept
Number of packed elements.
size_t stride_bytes() const noexcept
Bytes per packed element after finalization.
Definition Composite.hpp:86
@ Runtime
General runtime operations (default fallback)
@ Kakshya
Containers[Signalsource, Stream, File], Regions, DataProcessors.

References index, MayaFlux::Journal::Kakshya, m_layout, m_rows, rows, MayaFlux::Journal::Runtime, size(), and MayaFlux::Kakshya::CompositeLayout::stride_bytes().

Referenced by MayaFlux::Kakshya::CompositeInsertion::append().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: