Skip to content

Commit 69189c2

Browse files
committed
Formatting
1 parent fb5b397 commit 69189c2

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

testable-simd-models/src/core_arch/x86/models/avx2.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -916,8 +916,6 @@ pub fn _mm256_and_si256(a: __m256i, b: __m256i) -> __m256i {
916916
simd_and(BitVec::to_i64x4(a), BitVec::to_i64x4(b)).into()
917917
}
918918

919-
920-
921919
/// Computes the bitwise NOT of 256 bits (representing integer data)
922920
/// in `a` and then AND with `b`.
923921
///
@@ -2137,8 +2135,6 @@ pub fn _mm256_srli_si256<const IMM8: i32>(a: __m256i) -> __m256i {
21372135
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_bsrli_epi128)
21382136
21392137
pub fn _mm256_bsrli_epi128<const IMM8: i32>(a: __m256i) -> __m256i {
2140-
2141-
21422138
const fn mask(shift: i32, i: u32) -> u64 {
21432139
let shift = shift as u32 & 0xff;
21442140
if shift > 15 || (15 - (i % 16)) < shift {
@@ -2147,7 +2143,7 @@ pub fn _mm256_bsrli_epi128<const IMM8: i32>(a: __m256i) -> __m256i {
21472143
(32 + (i + shift)) as u64
21482144
}
21492145
}
2150-
2146+
21512147
let a = BitVec::to_i8x32(a);
21522148
let r: i8x32 = simd_shuffle(
21532149
i8x32::from_fn(|_| 0),
@@ -2187,7 +2183,7 @@ pub fn _mm256_bsrli_epi128<const IMM8: i32>(a: __m256i) -> __m256i {
21872183
mask(IMM8, 31),
21882184
],
21892185
);
2190-
2186+
21912187
r.into()
21922188
}
21932189

testable-simd-models/src/core_arch/x86/specs/avx2.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ pub fn _mm256_bsrli_epi128<const IMM8: i32>(a: __m256i) -> __m256i {
1212
let a = BitVec::to_i128x2(a);
1313
let a = i128x2::from_fn(|i| {
1414
let tmp = IMM8 % 256;
15-
if tmp > 15 {0} else {
15+
if tmp > 15 {
16+
0
17+
} else {
1618
((a[i] as u128) >> (tmp * 8)) as i128
17-
}
19+
}
1820
});
1921
BitVec::from_i128x2(a)
2022
}

testable-simd-models/src/core_arch/x86/tests/avx.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,14 @@ fn _mm256_testz_si256() {
5454

5555
for _ in 0..n {
5656
let a: BitVec<256> = BitVec::random();
57-
let b: BitVec<256> = BitVec::random();
57+
let b: BitVec<256> = BitVec::random();
5858
assert_eq!(
5959
super::super::models::avx::_mm256_testz_si256(a.into(), b.into()),
6060
unsafe { upstream::_mm256_testz_si256(a.into(), b.into()) }
6161
);
6262
}
6363
}
6464

65-
6665
mk!(_mm256_setzero_ps());
6766
mk!(_mm256_setzero_si256());
6867
mk!(_mm256_set_epi8(

0 commit comments

Comments
 (0)