1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-15 21:01:45 -05:00

GLScope redesign: ScopeVis::processMemoryTrace: full vectorization

This commit is contained in:
f4exb 2021-06-07 00:26:31 +02:00
parent 6a528e1f5a
commit e1a13841cf
2 changed files with 8 additions and 6 deletions

View File

@ -303,14 +303,16 @@ void ScopeVis::processMemoryTrace()
traceMemoryIndex += GLScopeSettings::m_nbTraceMemories; traceMemoryIndex += GLScopeSettings::m_nbTraceMemories;
} }
SampleVector::const_iterator mend; std::vector<SampleVector::const_iterator> mend;
m_traceDiscreteMemory.getEndPointAt(traceMemoryIndex, mend); m_traceDiscreteMemory.getEndPointAt(traceMemoryIndex, mend);
SampleVector::const_iterator mbegin = mend - m_traceSize; std::vector<SampleVector::const_iterator> mbegin(mend.size());
SampleVector::const_iterator mbegin_tb = mbegin - m_maxTraceDelay; TraceBackDiscreteMemory::moveIt(mend, mbegin, -m_traceSize);
std::vector<SampleVector::const_iterator> mbegin_tb(mbegin.size());
TraceBackDiscreteMemory::moveIt(mbegin, mbegin_tb, -m_maxTraceDelay);
m_nbSamples = m_traceSize + m_maxTraceDelay; m_nbSamples = m_traceSize + m_maxTraceDelay;
processTraces(mbegin_tb, m_maxTraceDelay, true); // traceback processTraces(mbegin_tb[0], m_maxTraceDelay, true); // traceback
processTraces(mbegin, m_traceSize, false); processTraces(mbegin[0], m_traceSize, false);
} }
} }

View File

@ -835,7 +835,7 @@ private:
/** /**
* Move buffer iterator by a certain amount (first stream) * Move buffer iterator by a certain amount (first stream)
*/ */
static void moveIt(const SampleVector::iterator& x, SampleVector::iterator& y, int amount) { static void moveIt(const SampleVector::const_iterator& x, SampleVector::const_iterator& y, int amount) {
y = x + amount; y = x + amount;
} }