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

◆ restore_state()

template<typename T >
void MayaFlux::Memory::HistoryBuffer< T >::restore_state ( const std::vector< T > &  state)
inline

Restore previously saved state.

Parameters
stateState vector from save_state()

Definition at line 668 of file RingBuffer.hpp.

669 {
670 std::ranges::fill(m_data, T {});
671
672 size_t count = std::min(state.size(), m_capacity);
673 for (size_t i = 0; i < count; ++i) {
674 m_data[i] = state[i];
675 }
676
677 m_head = 0;
679 }
size_t count

References count, MayaFlux::Memory::HistoryBuffer< T >::m_capacity, MayaFlux::Memory::HistoryBuffer< T >::m_count, MayaFlux::Memory::HistoryBuffer< T >::m_data, and MayaFlux::Memory::HistoryBuffer< T >::m_head.

Referenced by MayaFlux::Nodes::Generator::Polynomial::restore_state().

+ Here is the caller graph for this function: