Skip to content

Add SVE2 BackgroundIncrementCount optimization#369

Merged
ermig1979 merged 1 commit into
masterfrom
cursor/sve2-background-increment-count-10f0
Jun 5, 2026
Merged

Add SVE2 BackgroundIncrementCount optimization#369
ermig1979 merged 1 commit into
masterfrom
cursor/sve2-background-increment-count-10f0

Conversation

@ermig1979
Copy link
Copy Markdown
Owner

@ermig1979 ermig1979 commented Jun 5, 2026

Summary

  • Add Simd::Sve2::BackgroundIncrementCount with predicated SVE2 byte operations.
  • Route SimdBackgroundIncrementCount to the SVE2 implementation when available.
  • Extend background auto-tests and VS2022 SVE2 project metadata for the new source file.

Testing

  • cmake ./prj/cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc -DSIMD_TOOLCHAIN="g++" -DSIMD_TARGET="" -DSIMD_AVX512VNNI=ON -DSIMD_AMXBF16=ON -DSIMD_TEST_FLAGS="-march=native" -DSIMD_SHARED=ON
  • cmake --build build --parallel$(nproc)
  • export LD_LIBRARY_PATH="/workspace/build:$LD_LIBRARY_PATH" && ./Test "-r=.." -fi=BackgroundIncrementCount -tt=1 -ts=1
  • aarch64-linux-gnu-g++ -std=c++17 -I"/workspace/src" -march=armv9-a+sve2 -msve-vector-bits=scalable -fsyntax-only "/workspace/src/Simd/SimdSve2Background.cpp"
  • aarch64-linux-gnu-g++ -std=c++17 -I"/workspace/src" -march=armv9-a+sve2 -msve-vector-bits=scalable -fsyntax-only "/workspace/src/Simd/SimdLib.cpp"
  • aarch64-linux-gnu-g++ -std=c++17 -I"/workspace/src" -march=armv9-a+sve2 -msve-vector-bits=scalable -c "/workspace/src/Simd/SimdSve2Background.cpp" -o "/tmp/SimdSve2Background.o"
Open in Web Open in Cursor 

Co-authored-by: Ihar Yermalayeu <ermig@tut.by>
@ermig1979 ermig1979 marked this pull request as ready for review June 5, 2026 13:41
Copilot AI review requested due to automatic review settings June 5, 2026 13:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds an ARM SVE2-optimized implementation of BackgroundIncrementCount and wires it into the library’s runtime dispatch, along with corresponding test and VS2022 project updates.

Changes:

  • Implement Simd::Sve2::BackgroundIncrementCount using predicated SVE2 byte ops with tail handling.
  • Route SimdBackgroundIncrementCount to the SVE2 path when Sve2::Enable is true.
  • Extend background auto-tests and add the new SVE2 source file to the VS2022 SVE2 project.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Test/TestBackground.cpp Adds an auto-test path for the SVE2 BackgroundIncrementCount implementation.
src/Simd/SimdSve2Background.cpp Introduces the SVE2 implementation of BackgroundIncrementCount with predication and tail masking.
src/Simd/SimdSve2.h Declares the new SVE2 BackgroundIncrementCount API.
src/Simd/SimdLib.cpp Updates dispatch to call the SVE2 implementation when available.
prj/vs2022/Sve2.vcxproj.filters Adds a new filter entry and places the new source file under it.
prj/vs2022/Sve2.vcxproj Includes the new SVE2 source file in the VS2022 project.

@ermig1979 ermig1979 merged commit 54f3723 into master Jun 5, 2026
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants