From 1a577bd78e84e357e29c5336ff8beb432873046b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20F=C3=A4rnstrand?= Date: Sat, 4 Apr 2020 17:43:58 +0200 Subject: [PATCH] Replace all std::::MIN/MAX with just ::MIN/MAX --- crates/core_arch/src/x86/avx2.rs | 20 ++++++------- crates/core_arch/src/x86/avx512f.rs | 44 ++++++++++++++--------------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/crates/core_arch/src/x86/avx2.rs b/crates/core_arch/src/x86/avx2.rs index 193e1ca3ae..49c1c32bf1 100644 --- a/crates/core_arch/src/x86/avx2.rs +++ b/crates/core_arch/src/x86/avx2.rs @@ -4046,14 +4046,14 @@ mod tests { unsafe fn test_mm256_abs_epi32() { #[rustfmt::skip] let a = _mm256_setr_epi32( - 0, 1, -1, std::i32::MAX, - std::i32::MIN, 100, -100, -32, + 0, 1, -1, i32::MAX, + i32::MIN, 100, -100, -32, ); let r = _mm256_abs_epi32(a); #[rustfmt::skip] let e = _mm256_setr_epi32( - 0, 1, 1, std::i32::MAX, - std::i32::MAX.wrapping_add(1), 100, 100, 32, + 0, 1, 1, i32::MAX, + i32::MAX.wrapping_add(1), 100, 100, 32, ); assert_eq_m256i(r, e); } @@ -4063,13 +4063,13 @@ mod tests { #[rustfmt::skip] let a = _mm256_setr_epi16( 0, 1, -1, 2, -2, 3, -3, 4, - -4, 5, -5, std::i16::MAX, std::i16::MIN, 100, -100, -32, + -4, 5, -5, i16::MAX, i16::MIN, 100, -100, -32, ); let r = _mm256_abs_epi16(a); #[rustfmt::skip] let e = _mm256_setr_epi16( 0, 1, 1, 2, 2, 3, 3, 4, - 4, 5, 5, std::i16::MAX, std::i16::MAX.wrapping_add(1), 100, 100, 32, + 4, 5, 5, i16::MAX, i16::MAX.wrapping_add(1), 100, 100, 32, ); assert_eq_m256i(r, e); } @@ -4079,17 +4079,17 @@ mod tests { #[rustfmt::skip] let a = _mm256_setr_epi8( 0, 1, -1, 2, -2, 3, -3, 4, - -4, 5, -5, std::i8::MAX, std::i8::MIN, 100, -100, -32, + -4, 5, -5, i8::MAX, i8::MIN, 100, -100, -32, 0, 1, -1, 2, -2, 3, -3, 4, - -4, 5, -5, std::i8::MAX, std::i8::MIN, 100, -100, -32, + -4, 5, -5, i8::MAX, i8::MIN, 100, -100, -32, ); let r = _mm256_abs_epi8(a); #[rustfmt::skip] let e = _mm256_setr_epi8( 0, 1, 1, 2, 2, 3, 3, 4, - 4, 5, 5, std::i8::MAX, std::i8::MAX.wrapping_add(1), 100, 100, 32, + 4, 5, 5, i8::MAX, i8::MAX.wrapping_add(1), 100, 100, 32, 0, 1, 1, 2, 2, 3, 3, 4, - 4, 5, 5, std::i8::MAX, std::i8::MAX.wrapping_add(1), 100, 100, 32, + 4, 5, 5, i8::MAX, i8::MAX.wrapping_add(1), 100, 100, 32, ); assert_eq_m256i(r, e); } diff --git a/crates/core_arch/src/x86/avx512f.rs b/crates/core_arch/src/x86/avx512f.rs index f38583102b..9515b7f728 100644 --- a/crates/core_arch/src/x86/avx512f.rs +++ b/crates/core_arch/src/x86/avx512f.rs @@ -105,26 +105,26 @@ mod tests { unsafe fn test_mm512_abs_epi32() { #[rustfmt::skip] let a = _mm512_setr_epi32( - 0, 1, -1, std::i32::MAX, - std::i32::MIN, 100, -100, -32, - 0, 1, -1, std::i32::MAX, - std::i32::MIN, 100, -100, -32, + 0, 1, -1, i32::MAX, + i32::MIN, 100, -100, -32, + 0, 1, -1, i32::MAX, + i32::MIN, 100, -100, -32, ); let r = _mm512_abs_epi32(a); let e = _mm512_setr_epi32( 0, 1, 1, - std::i32::MAX, - std::i32::MAX.wrapping_add(1), + i32::MAX, + i32::MAX.wrapping_add(1), 100, 100, 32, 0, 1, 1, - std::i32::MAX, - std::i32::MAX.wrapping_add(1), + i32::MAX, + i32::MAX.wrapping_add(1), 100, 100, 32, @@ -136,10 +136,10 @@ mod tests { unsafe fn test_mm512_mask_abs_epi32() { #[rustfmt::skip] let a = _mm512_setr_epi32( - 0, 1, -1, std::i32::MAX, - std::i32::MIN, 100, -100, -32, - 0, 1, -1, std::i32::MAX, - std::i32::MIN, 100, -100, -32, + 0, 1, -1, i32::MAX, + i32::MIN, 100, -100, -32, + 0, 1, -1, i32::MAX, + i32::MIN, 100, -100, -32, ); let r = _mm512_mask_abs_epi32(a, 0, a); assert_eq_m512i(r, a); @@ -148,16 +148,16 @@ mod tests { 0, 1, 1, - std::i32::MAX, - std::i32::MAX.wrapping_add(1), + i32::MAX, + i32::MAX.wrapping_add(1), 100, 100, 32, 0, 1, -1, - std::i32::MAX, - std::i32::MIN, + i32::MAX, + i32::MIN, 100, -100, -32, @@ -169,10 +169,10 @@ mod tests { unsafe fn test_mm512_maskz_abs_epi32() { #[rustfmt::skip] let a = _mm512_setr_epi32( - 0, 1, -1, std::i32::MAX, - std::i32::MIN, 100, -100, -32, - 0, 1, -1, std::i32::MAX, - std::i32::MIN, 100, -100, -32, + 0, 1, -1, i32::MAX, + i32::MIN, 100, -100, -32, + 0, 1, -1, i32::MAX, + i32::MIN, 100, -100, -32, ); let r = _mm512_maskz_abs_epi32(0, a); assert_eq_m512i(r, _mm512_setzero_si512()); @@ -181,8 +181,8 @@ mod tests { 0, 1, 1, - std::i32::MAX, - std::i32::MAX.wrapping_add(1), + i32::MAX, + i32::MAX.wrapping_add(1), 100, 100, 32,