MaybeUninit: update to into_initialized (#679)
* MaybeUninit: update to into_initialized * fix unused import
This commit is contained in:
parent
ff129bff05
commit
386420307a
4 changed files with 9 additions and 9 deletions
|
|
@ -2959,7 +2959,7 @@ pub unsafe fn _mm256_zextpd128_pd256(a: __m128d) -> __m256d {
|
|||
#[stable(feature = "simd_x86", since = "1.27.0")]
|
||||
pub unsafe fn _mm256_undefined_ps() -> __m256 {
|
||||
// FIXME: this function should return MaybeUninit<__m256>
|
||||
mem::MaybeUninit::<__m256>::uninitialized().into_inner()
|
||||
mem::MaybeUninit::<__m256>::uninitialized().into_initialized()
|
||||
}
|
||||
|
||||
/// Return vector of type `__m256d` with undefined elements.
|
||||
|
|
@ -2971,7 +2971,7 @@ pub unsafe fn _mm256_undefined_ps() -> __m256 {
|
|||
#[stable(feature = "simd_x86", since = "1.27.0")]
|
||||
pub unsafe fn _mm256_undefined_pd() -> __m256d {
|
||||
// FIXME: this function should return MaybeUninit<__m256d>
|
||||
mem::MaybeUninit::<__m256d>::uninitialized().into_inner()
|
||||
mem::MaybeUninit::<__m256d>::uninitialized().into_initialized()
|
||||
}
|
||||
|
||||
/// Return vector of type __m256i with undefined elements.
|
||||
|
|
@ -2983,7 +2983,7 @@ pub unsafe fn _mm256_undefined_pd() -> __m256d {
|
|||
#[stable(feature = "simd_x86", since = "1.27.0")]
|
||||
pub unsafe fn _mm256_undefined_si256() -> __m256i {
|
||||
// FIXME: this function should return MaybeUninit<__m256i>
|
||||
mem::MaybeUninit::<__m256i>::uninitialized().into_inner()
|
||||
mem::MaybeUninit::<__m256i>::uninitialized().into_initialized()
|
||||
}
|
||||
|
||||
/// Set packed __m256 returned vector with the supplied values.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use core_arch::simd::*;
|
||||
use core_arch::simd_llvm::*;
|
||||
use core_arch::x86::*;
|
||||
use mem::{self, MaybeUninit};
|
||||
use mem;
|
||||
|
||||
#[cfg(test)]
|
||||
use stdsimd_test::assert_instr;
|
||||
|
|
@ -15,7 +15,7 @@ use stdsimd_test::assert_instr;
|
|||
pub unsafe fn _mm512_abs_epi32(a: __m512i) -> __m512i {
|
||||
let a = a.as_i32x16();
|
||||
// all-0 is a properly initialized i32x16
|
||||
let zero: i32x16 = MaybeUninit::zeroed().into_inner();
|
||||
let zero: i32x16 = mem::zeroed();
|
||||
let sub = simd_sub(zero, a);
|
||||
let cmp: i32x16 = simd_gt(a, zero);
|
||||
mem::transmute(simd_select(cmp, a, sub))
|
||||
|
|
@ -56,7 +56,7 @@ pub unsafe fn _mm512_maskz_abs_epi32(k: __mmask16, a: __m512i) -> __m512i {
|
|||
#[cfg_attr(test, assert_instr(vxorps))]
|
||||
pub unsafe fn _mm512_setzero_si512() -> __m512i {
|
||||
// All-0 is a properly initialized __m512i
|
||||
MaybeUninit::zeroed().into_inner()
|
||||
mem::zeroed()
|
||||
}
|
||||
|
||||
/// Set packed 32-bit integers in `dst` with the supplied values in reverse
|
||||
|
|
|
|||
|
|
@ -1886,7 +1886,7 @@ pub unsafe fn _mm_prefetch(p: *const i8, strategy: i32) {
|
|||
#[stable(feature = "simd_x86", since = "1.27.0")]
|
||||
pub unsafe fn _mm_undefined_ps() -> __m128 {
|
||||
// FIXME: this function should return MaybeUninit<__m128>
|
||||
mem::MaybeUninit::<__m128>::uninitialized().into_inner()
|
||||
mem::MaybeUninit::<__m128>::uninitialized().into_initialized()
|
||||
}
|
||||
|
||||
/// Transpose the 4x4 matrix formed by 4 rows of __m128 in place.
|
||||
|
|
|
|||
|
|
@ -2856,7 +2856,7 @@ pub unsafe fn _mm_castsi128_ps(a: __m128i) -> __m128 {
|
|||
#[stable(feature = "simd_x86", since = "1.27.0")]
|
||||
pub unsafe fn _mm_undefined_pd() -> __m128d {
|
||||
// FIXME: this function should return MaybeUninit<__m128d>
|
||||
mem::MaybeUninit::<__m128d>::uninitialized().into_inner()
|
||||
mem::MaybeUninit::<__m128d>::uninitialized().into_initialized()
|
||||
}
|
||||
|
||||
/// Return vector of type __m128i with undefined elements.
|
||||
|
|
@ -2867,7 +2867,7 @@ pub unsafe fn _mm_undefined_pd() -> __m128d {
|
|||
#[stable(feature = "simd_x86", since = "1.27.0")]
|
||||
pub unsafe fn _mm_undefined_si128() -> __m128i {
|
||||
// FIXME: this function should return MaybeUninit<__m128i>
|
||||
mem::MaybeUninit::<__m128i>::uninitialized().into_inner()
|
||||
mem::MaybeUninit::<__m128i>::uninitialized().into_initialized()
|
||||
}
|
||||
|
||||
/// The resulting `__m128d` element is composed by the low-order values of
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue