From 4c658ae792614331ea4544ca2eed0b0660c58a50 Mon Sep 17 00:00:00 2001 From: Marcus Tomlinson Date: Fri, 5 Apr 2024 14:27:52 +0100 Subject: [PATCH] _ReleaseNextThread() -> _ReleaseNextBuffer() --- include/dspatch/Circuit.h | 9 ++++----- include/dspatch/Component.h | 18 +++++++++--------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/include/dspatch/Circuit.h b/include/dspatch/Circuit.h index 1c2b80be..ce1d1042 100644 --- a/include/dspatch/Circuit.h +++ b/include/dspatch/Circuit.h @@ -291,11 +291,10 @@ class Circuit final { // You might be thinking: Can't we have each thread start on a different component? - // Well no. Because bufferNo == bufferNo, in order to maintain synchronisation - // within the circuit, when a component wants to process its buffers in-order, it - // requires that every other in-order component in the system has not only - // processed its buffers in the same order, but has processed the same number of - // buffers too. + // Well no. In order to maintain synchronisation within the circuit, when a component + // wants to process its buffers in-order, it requires that every other in-order + // component in the system has not only processed its buffers in the same order, but + // has processed the same number of buffers too. // E.g. 1,2,3 and 1,2,3. Not 1,2,3 and 2,3,1,2,3. diff --git a/include/dspatch/Component.h b/include/dspatch/Component.h index 9083fcae..20616b4d 100644 --- a/include/dspatch/Component.h +++ b/include/dspatch/Component.h @@ -155,8 +155,8 @@ class Component int toInput; }; - void _WaitForRelease( int threadNo ); - void _ReleaseNextThread( int threadNo ); + void _WaitForRelease( int bufferNo ); + void _ReleaseNextBuffer( int bufferNo ); void _GetOutput( int bufferNo, int fromOutput, int toInput, DSPatch::SignalBus& toBus ); void _GetOutputParallel( int bufferNo, int fromOutput, int toInput, DSPatch::SignalBus& toBus ); @@ -382,7 +382,7 @@ inline void Component::TickSeries( int bufferNo ) Process_( inputBus, outputBus ); // signal that we're done processing - _ReleaseNextThread( bufferNo ); + _ReleaseNextBuffer( bufferNo ); } else { @@ -415,7 +415,7 @@ inline void Component::TickParallel( int bufferNo ) Process_( inputBus, outputBus ); // signal that we're done processing - _ReleaseNextThread( bufferNo ); + _ReleaseNextBuffer( bufferNo ); } else { @@ -519,20 +519,20 @@ inline void Component::SetOutputCount_( int outputCount, const std::vector