Skip to content

Commit

Permalink
Clean up comments in _GetOutputParallel()
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusTomlinson committed Nov 19, 2024
1 parent a291e15 commit 568f0a8
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions include/dspatch/Component.h
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ inline void Component::_GetOutput( int bufferNo, int fromOutput, int toInput, DS

if ( ref.total == 1 )
{
// there's only one reference, move the signal immediately
// there's only one reference, move the signal
toBus.MoveSignal( toInput, signal );
}
else if ( ++ref.count != ref.total )
Expand All @@ -591,31 +591,30 @@ inline void Component::_GetOutputParallel( int bufferNo, int fromOutput, int toI
if ( !signal.has_value() )
{
toBus.ClearValue( toInput );

if ( ref.total != 1 )
{
if ( ++ref.count != ref.total )
{
// this is not the final reference, wake next WaitAndClear()
ref.readyFlag.Set();
}
else
{
// this is the final reference, reset the counter
ref.count = 0;
}
}
return;
}

if ( ref.total == 1 )
else if ( ref.total == 1 )
{
// there's only one reference, move the signal immediately and return
// there's only one reference, move the signal
toBus.MoveSignal( toInput, signal );
}
else if ( ++ref.count != ref.total )
{
// this is not the final reference, copy the signal
// this is not the final reference, copy the signal, wake next WaitAndClear()
toBus.SetSignal( toInput, signal );

// wake next WaitAndClear()
ref.readyFlag.Set();
}
else
Expand Down

0 comments on commit 568f0a8

Please sign in to comment.