Skip to content

Commit d6810cc

Browse files
clarfontheyAmanieu
authored andcommitted
Use simd_extract! macro instead of calling simd_extract directly
1 parent 3357c0e commit d6810cc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

crates/core_arch/src/x86/avx512f.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33248,7 +33248,7 @@ pub fn _mm512_reduce_add_ps(a: __m512) -> f32 {
3324833248
);
3324933249
let a = _mm_add_ps(_mm256_extractf128_ps::<0>(a), _mm256_extractf128_ps::<1>(a));
3325033250
let a = _mm_add_ps(a, simd_shuffle!(a, a, [2, 3, 0, 1]));
33251-
simd_extract::<_, f32>(a, 0) + simd_extract::<_, f32>(a, 1)
33251+
simd_extract!(a, 0, f32) + simd_extract!(a, 1, f32)
3325233252
}
3325333253
}
3325433254

@@ -33275,7 +33275,7 @@ pub fn _mm512_reduce_add_pd(a: __m512d) -> f64 {
3327533275
_mm512_extractf64x4_pd::<1>(a),
3327633276
);
3327733277
let a = _mm_add_pd(_mm256_extractf128_pd::<0>(a), _mm256_extractf128_pd::<1>(a));
33278-
simd_extract::<_, f64>(a, 0) + simd_extract::<_, f64>(a, 1)
33278+
simd_extract!(a, 0, f64) + simd_extract!(a, 1, f64)
3327933279
}
3328033280
}
3328133281

@@ -33356,7 +33356,7 @@ pub fn _mm512_reduce_mul_ps(a: __m512) -> f32 {
3335633356
);
3335733357
let a = _mm_mul_ps(_mm256_extractf128_ps::<0>(a), _mm256_extractf128_ps::<1>(a));
3335833358
let a = _mm_mul_ps(a, simd_shuffle!(a, a, [2, 3, 0, 1]));
33359-
simd_extract::<_, f32>(a, 0) * simd_extract::<_, f32>(a, 1)
33359+
simd_extract!(a, 0, f32) * simd_extract!(a, 1, f32)
3336033360
}
3336133361
}
3336233362

@@ -33383,7 +33383,7 @@ pub fn _mm512_reduce_mul_pd(a: __m512d) -> f64 {
3338333383
_mm512_extractf64x4_pd::<1>(a),
3338433384
);
3338533385
let a = _mm_mul_pd(_mm256_extractf128_pd::<0>(a), _mm256_extractf128_pd::<1>(a));
33386-
simd_extract::<_, f64>(a, 0) * simd_extract::<_, f64>(a, 1)
33386+
simd_extract!(a, 0, f64) * simd_extract!(a, 1, f64)
3338733387
}
3338833388
}
3338933389

crates/core_arch/src/x86/avx512fp16.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11032,7 +11032,7 @@ pub fn _mm_reduce_add_ph(a: __m128h) -> f16 {
1103211032
let a = _mm_add_ph(a, b);
1103311033
let b = simd_shuffle!(a, a, [2, 3, 0, 1, 4, 5, 6, 7]);
1103411034
let a = _mm_add_ph(a, b);
11035-
simd_extract::<_, f16>(a, 0) + simd_extract::<_, f16>(a, 1)
11035+
simd_extract!(a, 0, f16) + simd_extract!(a, 1, f16)
1103611036
}
1103711037
}
1103811038

@@ -11085,7 +11085,7 @@ pub fn _mm_reduce_mul_ph(a: __m128h) -> f16 {
1108511085
let a = _mm_mul_ph(a, b);
1108611086
let b = simd_shuffle!(a, a, [2, 3, 0, 1, 4, 5, 6, 7]);
1108711087
let a = _mm_mul_ph(a, b);
11088-
simd_extract::<_, f16>(a, 0) * simd_extract::<_, f16>(a, 1)
11088+
simd_extract!(a, 0, f16) * simd_extract!(a, 1, f16)
1108911089
}
1109011090
}
1109111091

0 commit comments

Comments
 (0)