Skip to content

Commit ac2183e

Browse files
committed
chore: remove SIMD LaneCount, SupportedLaneCount with upstream changes
1 parent a96d4df commit ac2183e

1 file changed

Lines changed: 3 additions & 15 deletions

File tree

  • roaring/src/bitmap/store/array_store

roaring/src/bitmap/store/array_store/vector.rs

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212

1313
use super::scalar;
1414
use core::simd::cmp::{SimdPartialEq, SimdPartialOrd};
15-
use core::simd::{
16-
mask16x8, u16x8, u8x16, LaneCount, Mask, Simd, SimdElement, SupportedLaneCount, ToBytes,
17-
};
15+
use core::simd::{mask16x8, u16x8, u8x16, Mask, Select as _, Simd, SimdElement, ToBytes};
1816

1917
// a one-pass SSE union algorithm
2018
pub fn or(lhs: &[u16], rhs: &[u16], visitor: &mut impl BinaryOperationVisitor) {
@@ -360,10 +358,7 @@ pub fn sub(lhs: &[u16], rhs: &[u16], visitor: &mut impl BinaryOperationVisitor)
360358
fn lanes_min_u16<const LANES: usize>(
361359
lhs: Simd<u16, LANES>,
362360
rhs: Simd<u16, LANES>,
363-
) -> Simd<u16, LANES>
364-
where
365-
LaneCount<LANES>: SupportedLaneCount,
366-
{
361+
) -> Simd<u16, LANES> {
367362
lhs.simd_le(rhs).select(lhs, rhs)
368363
}
369364

@@ -372,18 +367,14 @@ where
372367
fn lanes_max_u16<const LANES: usize>(
373368
lhs: Simd<u16, LANES>,
374369
rhs: Simd<u16, LANES>,
375-
) -> Simd<u16, LANES>
376-
where
377-
LaneCount<LANES>: SupportedLaneCount,
378-
{
370+
) -> Simd<u16, LANES> {
379371
lhs.simd_gt(rhs).select(lhs, rhs)
380372
}
381373

382374
#[inline]
383375
pub fn load<U, const LANES: usize>(src: &[U]) -> Simd<U, LANES>
384376
where
385377
U: SimdElement + PartialOrd,
386-
LaneCount<LANES>: SupportedLaneCount,
387378
{
388379
debug_assert!(src.len() >= LANES);
389380
unsafe { load_unchecked(src) }
@@ -397,7 +388,6 @@ where
397388
pub unsafe fn load_unchecked<U, const LANES: usize>(src: &[U]) -> Simd<U, LANES>
398389
where
399390
U: SimdElement + PartialOrd,
400-
LaneCount<LANES>: SupportedLaneCount,
401391
{
402392
unsafe { core::ptr::read_unaligned(src as *const _ as *const Simd<U, LANES>) }
403393
}
@@ -407,7 +397,6 @@ where
407397
pub fn store<U, const LANES: usize>(v: Simd<U, LANES>, out: &mut [U])
408398
where
409399
U: SimdElement + PartialOrd,
410-
LaneCount<LANES>: SupportedLaneCount,
411400
{
412401
debug_assert!(out.len() >= LANES);
413402
unsafe {
@@ -423,7 +412,6 @@ where
423412
unsafe fn store_unchecked<U, const LANES: usize>(v: Simd<U, LANES>, out: &mut [U])
424413
where
425414
U: SimdElement + PartialOrd,
426-
LaneCount<LANES>: SupportedLaneCount,
427415
{
428416
unsafe { core::ptr::write_unaligned(out as *mut _ as *mut Simd<U, LANES>, v) }
429417
}

0 commit comments

Comments
 (0)