Fixes for newer rust versions
This commit is contained in:
parent
41172e3adb
commit
1905b1694c
|
@ -4,11 +4,11 @@
|
|||
#![feature(const_maybe_uninit_uninit_array)]
|
||||
#![feature(const_trait_impl)]
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(effects)]
|
||||
#![feature(maybe_uninit_array_assume_init)]
|
||||
#![feature(maybe_uninit_uninit_array)]
|
||||
#![feature(portable_simd)]
|
||||
#![feature(ptr_metadata)]
|
||||
#![feature(stdsimd)]
|
||||
|
||||
pub mod simd;
|
||||
pub mod util;
|
||||
|
|
18
src/simd.rs
18
src/simd.rs
|
@ -308,11 +308,11 @@ macro_rules! impl_ops {
|
|||
W_512 if all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "avx512f") => unsafe { cast(arch::$set1_512(self as i8)) },
|
||||
_ => {
|
||||
#[inline(always)]
|
||||
const fn compiletime<const LANES: usize>(_: $ty) -> Simd<$ty, LANES>
|
||||
const fn compiletime<const LANES: usize>(v: $ty) -> Simd<$ty, LANES>
|
||||
where
|
||||
LaneCount<LANES>: SupportedLaneCount,
|
||||
{
|
||||
panic!("unsupported compile-time splat");
|
||||
Simd::from_array([v; LANES])
|
||||
}
|
||||
#[inline(always)]
|
||||
fn runtime<const LANES: usize>(v: $ty) -> Simd<$ty, LANES>
|
||||
|
@ -321,7 +321,7 @@ macro_rules! impl_ops {
|
|||
{
|
||||
Simd::splat(v)
|
||||
}
|
||||
unsafe { const_eval_select((self,), compiletime, runtime) }
|
||||
const_eval_select((self,), compiletime, runtime)
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -332,7 +332,7 @@ macro_rules! impl_ops {
|
|||
where
|
||||
LaneCount<LANES>: SupportedLaneCount,
|
||||
{
|
||||
<$ty>::splat(0)
|
||||
Simd::from_array([0; LANES])
|
||||
}
|
||||
#[inline(always)]
|
||||
fn runtime<const LANES: usize>() -> Simd<$ty, LANES>
|
||||
|
@ -341,7 +341,7 @@ macro_rules! impl_ops {
|
|||
{
|
||||
unsafe { cast(arch::_mm_setzero_si128()) }
|
||||
}
|
||||
unsafe { const_eval_select((), compiletime, runtime) }
|
||||
const_eval_select((), compiletime, runtime)
|
||||
},
|
||||
W_256 if all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "avx") => {
|
||||
#[inline(always)]
|
||||
|
@ -349,7 +349,7 @@ macro_rules! impl_ops {
|
|||
where
|
||||
LaneCount<LANES>: SupportedLaneCount,
|
||||
{
|
||||
<$ty>::splat(0)
|
||||
Simd::from_array([0; LANES])
|
||||
}
|
||||
#[inline(always)]
|
||||
fn runtime<const LANES: usize>() -> Simd<$ty, LANES>
|
||||
|
@ -358,7 +358,7 @@ macro_rules! impl_ops {
|
|||
{
|
||||
unsafe { cast(arch::_mm256_setzero_si256()) }
|
||||
}
|
||||
unsafe { const_eval_select((), compiletime, runtime) }
|
||||
const_eval_select((), compiletime, runtime)
|
||||
},
|
||||
W_512 if all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "avx512f") => {
|
||||
#[inline(always)]
|
||||
|
@ -366,7 +366,7 @@ macro_rules! impl_ops {
|
|||
where
|
||||
LaneCount<LANES>: SupportedLaneCount,
|
||||
{
|
||||
<$ty>::splat(0)
|
||||
Simd::from_array([0; LANES])
|
||||
}
|
||||
#[inline(always)]
|
||||
fn runtime<const LANES: usize>() -> Simd<$ty, LANES>
|
||||
|
@ -375,7 +375,7 @@ macro_rules! impl_ops {
|
|||
{
|
||||
unsafe { cast(arch::_mm512_setzero_si512()) }
|
||||
}
|
||||
unsafe { const_eval_select((), compiletime, runtime) }
|
||||
const_eval_select((), compiletime, runtime)
|
||||
},
|
||||
_ => Self::splat(0),
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue