From a291e1549e0d4503e53403dbb7e157e746c79554 Mon Sep 17 00:00:00 2001 From: Marcus Tomlinson Date: Mon, 18 Nov 2024 16:35:06 +0000 Subject: [PATCH] Update CI to macos-13 --- .github/workflows/build_and_test.yml | 6 +++--- include/dspatch/Component.h | 11 +++++++++++ tests/main.cpp | 5 +++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index f0b70050..4f119728 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-12, ubuntu-20.04, windows-2019] + os: [macos-13, ubuntu-20.04, windows-2019] steps: - if: matrix.os == 'windows-2019' @@ -26,10 +26,10 @@ jobs: name: Configure MSVC (Windows) uses: ilammy/msvc-dev-cmd@v1 - - if: matrix.os == 'macos-12' + - if: matrix.os == 'macos-13' name: Configure Xcode (MacOS) run: | - sudo xcode-select -s /Applications/Xcode_13.1.app/Contents/Developer + sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer - name: Configure Python uses: actions/setup-python@v4 diff --git a/include/dspatch/Component.h b/include/dspatch/Component.h index afeae038..7b0c3665 100644 --- a/include/dspatch/Component.h +++ b/include/dspatch/Component.h @@ -591,6 +591,17 @@ 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 ) + { + ref.readyFlag.Set(); + } + else + { + ref.count = 0; + } + } return; } diff --git a/tests/main.cpp b/tests/main.cpp index a6d9517d..ba69aea2 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -909,6 +909,8 @@ TEST_CASE( "TenThousandComponents" ) int iterationCount = 1000; + double total_ms = 0.0; + for ( unsigned int i = 0; i <= std::thread::hardware_concurrency(); ++i ) { circuit->SetBufferCount( i ); @@ -928,11 +930,14 @@ TEST_CASE( "TenThousandComponents" ) end = std::chrono::high_resolution_clock::now(); diff_ms = std::chrono::duration_cast( end - begin ).count() / 1000.0; + total_ms += diff_ms / iterationCount; std::cout << i << "x Buffers, " << j << "x Threads, 10000x Components: " << diff_ms / iterationCount << "ms\n"; } } + std::cout << "Average: " << total_ms / pow( (double)std::thread::hardware_concurrency() + 1.0, 2.0 ) << "ms\n"; + begin = std::chrono::high_resolution_clock::now(); circuit.reset();