Fix unecessary unsafe in Clippy 1.87 (#6540)

* Fix unecessary unsafe in Clippy 1.87

* bump Rust version for intrinsics safe API

* ignore until we can bump the MSRV with cargo-chef

* remove unecessary change

* mark clearly as TODO
This commit is contained in:
Arnaud Gourlay
2025-05-15 21:41:30 +02:00
committed by GitHub
parent db31bd2e93
commit 5ae56b3777
2 changed files with 2 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ use crate::data_types::vectors::{DenseVector, VectorElementType};
#[target_feature(enable = "avx")]
#[target_feature(enable = "fma")]
#[allow(clippy::missing_safety_doc)]
#[allow(unused_unsafe)] // TODO remove once we can bump the MSRV to 1.87 (cargo-chef)
pub unsafe fn hsum256_ps_avx(x: __m256) -> f32 {
unsafe {
let x128: __m128 = _mm_add_ps(_mm256_extractf128_ps(x, 1), _mm256_castps256_ps128(x));

View File

@@ -10,6 +10,7 @@ use crate::data_types::vectors::{DenseVector, VectorElementType};
#[target_feature(enable = "sse")]
#[allow(clippy::missing_safety_doc)]
#[allow(unused_unsafe)] // TODO remove once we can bump the MSRV to 1.87 (cargo-chef)
pub unsafe fn hsum128_ps_sse(x: __m128) -> f32 {
unsafe {
let x64: __m128 = _mm_add_ps(x, _mm_movehl_ps(x, x));