From b7705c91259750039d4eb78c8f04fb3ab4f13c24 Mon Sep 17 00:00:00 2001 From: Olivier Giniaux Date: Wed, 6 Nov 2024 14:32:07 +0100 Subject: [PATCH] Force its way to CI benchmark runners --- .github/workflows/bench.yml | 9 +++++++++ .github/workflows/build_test.yml | 6 ++++++ src/gxhash/platform/x86.rs | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 2aa4d49..6eddeb0 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -17,6 +17,9 @@ jobs: - name: Update rust run: rustup update + - name: Switch to nightly rust + run: rustup default nightly + - name: Benchmark run: cargo bench --bench throughput --features bench-plot @@ -32,6 +35,9 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Update rust + run: rustup update + - name: Switch to nightly rust run: rustup default nightly @@ -53,6 +59,9 @@ jobs: - name: Update rust run: rustup update + - name: Switch to nightly rust + run: rustup default nightly + - name: Benchmark run: cargo bench --bench throughput --features bench-plot diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index da4a907..768d37c 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -17,6 +17,9 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Switch to nightly rust + run: rustup default nightly + - name: Rust version run: cargo rustc -- --version @@ -52,6 +55,9 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Switch to nightly rust + run: rustup default nightly + - name: Rust version run: cargo rustc -- --version diff --git a/src/gxhash/platform/x86.rs b/src/gxhash/platform/x86.rs index 7925c3b..4b2af1b 100644 --- a/src/gxhash/platform/x86.rs +++ b/src/gxhash/platform/x86.rs @@ -40,7 +40,7 @@ pub unsafe fn get_partial_safe(data: *const State, len: usize) -> State { let indices = _mm_set_epi8(15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); let mask = _mm_cmpgt_epi8(_mm_set1_epi8(len as i8), indices); - std::intrinsics::simd::simd_masked_load(mask, data as *const i8, _mm_set1_epi8(len as i8)) + State::from(std::intrinsics::simd::simd_masked_load(core::simd::i8x16::from(mask), data as *const i8, core::simd::i8x16::from(_mm_set1_epi8(len as i8)))) } #[inline(always)]