MayaFlux 0.2.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 586 of file RingBuffer.hpp.

587 {
588 std::ranges::fill(m_data, T {});
589
590 size_t count = std::min(state.size(), m_capacity);
591 for (size_t i = 0; i < count; ++i) {
592 m_data[i] = state[i];
593 }
594
595 m_head = 0;
597 }
Eigen::Index 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: