Remove most usage of type aliases

This commit is contained in:
Caleb Zulawski 2021-08-07 19:28:27 +00:00
parent e11286a362
commit 5ed57b4c85
12 changed files with 145 additions and 152 deletions

View File

@ -1,54 +1,58 @@
use crate::{LaneCount, SupportedLaneCount};
use crate::{LaneCount, Simd, SupportedLaneCount};
use core::{
iter::{Product, Sum},
ops::{Add, Mul},
};
macro_rules! impl_traits {
{ $type:ident } => {
impl<const LANES: usize> core::iter::Sum<Self> for crate::$type<LANES>
{ $type:ty } => {
impl<const LANES: usize> Sum<Self> for Simd<$type, LANES>
where
LaneCount<LANES>: SupportedLaneCount,
{
fn sum<I: core::iter::Iterator<Item = Self>>(iter: I) -> Self {
iter.fold(Default::default(), core::ops::Add::add)
fn sum<I: Iterator<Item = Self>>(iter: I) -> Self {
iter.fold(Simd::splat(0 as $type), Add::add)
}
}
impl<const LANES: usize> core::iter::Product<Self> for crate::$type<LANES>
impl<const LANES: usize> core::iter::Product<Self> for Simd<$type, LANES>
where
LaneCount<LANES>: SupportedLaneCount,
{
fn product<I: core::iter::Iterator<Item = Self>>(iter: I) -> Self {
iter.fold(Default::default(), core::ops::Mul::mul)
fn product<I: Iterator<Item = Self>>(iter: I) -> Self {
iter.fold(Simd::splat(1 as $type), Mul::mul)
}
}
impl<'a, const LANES: usize> core::iter::Sum<&'a Self> for crate::$type<LANES>
impl<'a, const LANES: usize> Sum<&'a Self> for Simd<$type, LANES>
where
LaneCount<LANES>: SupportedLaneCount,
{
fn sum<I: core::iter::Iterator<Item = &'a Self>>(iter: I) -> Self {
iter.fold(Default::default(), core::ops::Add::add)
fn sum<I: Iterator<Item = &'a Self>>(iter: I) -> Self {
iter.fold(Simd::splat(0 as $type), Add::add)
}
}
impl<'a, const LANES: usize> core::iter::Product<&'a Self> for crate::$type<LANES>
impl<'a, const LANES: usize> Product<&'a Self> for Simd<$type, LANES>
where
LaneCount<LANES>: SupportedLaneCount,
{
fn product<I: core::iter::Iterator<Item = &'a Self>>(iter: I) -> Self {
iter.fold(Default::default(), core::ops::Mul::mul)
fn product<I: Iterator<Item = &'a Self>>(iter: I) -> Self {
iter.fold(Simd::splat(1 as $type), Mul::mul)
}
}
}
}
impl_traits! { SimdF32 }
impl_traits! { SimdF64 }
impl_traits! { SimdU8 }
impl_traits! { SimdU16 }
impl_traits! { SimdU32 }
impl_traits! { SimdU64 }
impl_traits! { SimdUsize }
impl_traits! { SimdI8 }
impl_traits! { SimdI16 }
impl_traits! { SimdI32 }
impl_traits! { SimdI64 }
impl_traits! { SimdIsize }
impl_traits! { f32 }
impl_traits! { f64 }
impl_traits! { u8 }
impl_traits! { u16 }
impl_traits! { u32 }
impl_traits! { u64 }
impl_traits! { usize }
impl_traits! { i8 }
impl_traits! { i16 }
impl_traits! { i32 }
impl_traits! { i64 }
impl_traits! { isize }

View File

@ -522,21 +522,21 @@ pub type masksizex4 = MaskSize<4>;
pub type masksizex8 = MaskSize<8>;
macro_rules! impl_from {
{ $from:ident ($from_inner:ident) => $($to:ident ($to_inner:ident)),* } => {
{ $from:ty => $($to:ty),* } => {
$(
impl<const LANES: usize> From<$from<LANES>> for $to<LANES>
impl<const LANES: usize> From<Mask<$from, LANES>> for Mask<$to, LANES>
where
crate::LaneCount<LANES>: crate::SupportedLaneCount,
LaneCount<LANES>: SupportedLaneCount,
{
fn from(value: $from<LANES>) -> Self {
fn from(value: Mask<$from, LANES>) -> Self {
Self(value.0.convert())
}
}
)*
}
}
impl_from! { Mask8 (SimdI8) => Mask16 (SimdI16), Mask32 (SimdI32), Mask64 (SimdI64), MaskSize (SimdIsize) }
impl_from! { Mask16 (SimdI16) => Mask32 (SimdI32), Mask64 (SimdI64), MaskSize (SimdIsize), Mask8 (SimdI8) }
impl_from! { Mask32 (SimdI32) => Mask64 (SimdI64), MaskSize (SimdIsize), Mask8 (SimdI8), Mask16 (SimdI16) }
impl_from! { Mask64 (SimdI64) => MaskSize (SimdIsize), Mask8 (SimdI8), Mask16 (SimdI16), Mask32 (SimdI32) }
impl_from! { MaskSize (SimdIsize) => Mask8 (SimdI8), Mask16 (SimdI16), Mask32 (SimdI32), Mask64 (SimdI64) }
impl_from! { i8 => i16, i32, i64, isize }
impl_from! { i16 => i32, i64, isize, i8 }
impl_from! { i32 => i64, isize, i8, i16 }
impl_from! { i64 => isize, i8, i16, i32 }
impl_from! { isize => i8, i16, i32, i64 }

View File

@ -158,6 +158,16 @@ where
))
}
}
#[inline]
pub fn any(self) -> bool {
unsafe { crate::intrinsics::simd_reduce_any(self.to_int()) }
}
#[inline]
pub fn all(self) -> bool {
unsafe { crate::intrinsics::simd_reduce_all(self.to_int()) }
}
}
impl<Element, const LANES: usize> core::convert::From<Mask<Element, LANES>> for Simd<Element, LANES>
@ -217,5 +227,3 @@ where
Self::splat(true) ^ self
}
}
impl_full_mask_reductions! {}

View File

@ -1,6 +1,8 @@
use crate::{LaneCount, Simd, SupportedLaneCount};
macro_rules! impl_uint_arith {
($(($name:ident, $n:ident)),+) => {
$( impl<const LANES: usize> $name<LANES> where crate::LaneCount<LANES>: crate::SupportedLaneCount {
($($ty:ty),+) => {
$( impl<const LANES: usize> Simd<$ty, LANES> where LaneCount<LANES>: SupportedLaneCount {
/// Lanewise saturating add.
///
@ -8,9 +10,9 @@ macro_rules! impl_uint_arith {
/// ```
/// # #![feature(portable_simd)]
/// # use core_simd::*;
#[doc = concat!("# use core::", stringify!($n), "::MAX;")]
#[doc = concat!("let x = ", stringify!($name), "::from_array([2, 1, 0, MAX]);")]
#[doc = concat!("let max = ", stringify!($name), "::splat(MAX);")]
#[doc = concat!("# use core::", stringify!($ty), "::MAX;")]
/// let x = Simd::from_array([2, 1, 0, MAX]);
/// let max = Simd::splat(MAX);
/// let unsat = x + max;
/// let sat = x.saturating_add(max);
/// assert_eq!(x - 1, unsat);
@ -27,13 +29,13 @@ macro_rules! impl_uint_arith {
/// ```
/// # #![feature(portable_simd)]
/// # use core_simd::*;
#[doc = concat!("# use core::", stringify!($n), "::MAX;")]
#[doc = concat!("let x = ", stringify!($name), "::from_array([2, 1, 0, MAX]);")]
#[doc = concat!("let max = ", stringify!($name), "::splat(MAX);")]
#[doc = concat!("# use core::", stringify!($ty), "::MAX;")]
/// let x = Simd::from_array([2, 1, 0, MAX]);
/// let max = Simd::splat(MAX);
/// let unsat = x - max;
/// let sat = x.saturating_sub(max);
/// assert_eq!(unsat, x + 1);
#[doc = concat!("assert_eq!(sat, ", stringify!($name), "::splat(0));")]
/// assert_eq!(sat, Simd::splat(0));
#[inline]
pub fn saturating_sub(self, second: Self) -> Self {
unsafe { crate::intrinsics::simd_saturating_sub(self, second) }
@ -43,8 +45,8 @@ macro_rules! impl_uint_arith {
}
macro_rules! impl_int_arith {
($(($name:ident, $n:ident)),+) => {
$( impl<const LANES: usize> $name<LANES> where crate::LaneCount<LANES>: crate::SupportedLaneCount {
($($ty:ty),+) => {
$( impl<const LANES: usize> Simd<$ty, LANES> where LaneCount<LANES>: SupportedLaneCount {
/// Lanewise saturating add.
///
@ -52,13 +54,13 @@ macro_rules! impl_int_arith {
/// ```
/// # #![feature(portable_simd)]
/// # use core_simd::*;
#[doc = concat!("# use core::", stringify!($n), "::{MIN, MAX};")]
#[doc = concat!("let x = ", stringify!($name), "::from_array([MIN, 0, 1, MAX]);")]
#[doc = concat!("let max = ", stringify!($name), "::splat(MAX);")]
#[doc = concat!("# use core::", stringify!($ty), "::{MIN, MAX};")]
/// let x = Simd::from_array([MIN, 0, 1, MAX]);
/// let max = Simd::splat(MAX);
/// let unsat = x + max;
/// let sat = x.saturating_add(max);
#[doc = concat!("assert_eq!(unsat, ", stringify!($name), "::from_array([-1, MAX, MIN, -2]));")]
#[doc = concat!("assert_eq!(sat, ", stringify!($name), "::from_array([-1, MAX, MAX, MAX]));")]
/// assert_eq!(unsat, Simd::from_array([-1, MAX, MIN, -2]));
/// assert_eq!(sat, Simd::from_array([-1, MAX, MAX, MAX]));
/// ```
#[inline]
pub fn saturating_add(self, second: Self) -> Self {
@ -71,13 +73,13 @@ macro_rules! impl_int_arith {
/// ```
/// # #![feature(portable_simd)]
/// # use core_simd::*;
#[doc = concat!("# use core::", stringify!($n), "::{MIN, MAX};")]
#[doc = concat!("let x = ", stringify!($name), "::from_array([MIN, -2, -1, MAX]);")]
#[doc = concat!("let max = ", stringify!($name), "::splat(MAX);")]
#[doc = concat!("# use core::", stringify!($ty), "::{MIN, MAX};")]
/// let x = Simd::from_array([MIN, -2, -1, MAX]);
/// let max = Simd::splat(MAX);
/// let unsat = x - max;
/// let sat = x.saturating_sub(max);
#[doc = concat!("assert_eq!(unsat, ", stringify!($name), "::from_array([1, MAX, MIN, 0]));")]
#[doc = concat!("assert_eq!(sat, ", stringify!($name), "::from_array([MIN, MIN, MIN, 0]));")]
/// assert_eq!(unsat, Simd::from_array([1, MAX, MIN, 0]));
/// assert_eq!(sat, Simd::from_array([MIN, MIN, MIN, 0]));
#[inline]
pub fn saturating_sub(self, second: Self) -> Self {
unsafe { crate::intrinsics::simd_saturating_sub(self, second) }
@ -90,13 +92,13 @@ macro_rules! impl_int_arith {
/// ```
/// # #![feature(portable_simd)]
/// # use core_simd::*;
#[doc = concat!("# use core::", stringify!($n), "::{MIN, MAX};")]
#[doc = concat!("let xs = ", stringify!($name), "::from_array([MIN, MIN +1, -5, 0]);")]
#[doc = concat!("assert_eq!(xs.abs(), ", stringify!($name), "::from_array([MIN, MAX, 5, 0]));")]
#[doc = concat!("# use core::", stringify!($ty), "::{MIN, MAX};")]
/// let xs = Simd::from_array([MIN, MIN +1, -5, 0]);
/// assert_eq!(xs.abs(), Simd::from_array([MIN, MAX, 5, 0]));
/// ```
#[inline]
pub fn abs(self) -> Self {
const SHR: $n = <$n>::BITS as $n - 1;
const SHR: $ty = <$ty>::BITS as $ty - 1;
let m = self >> SHR;
(self^m) - m
}
@ -108,17 +110,17 @@ macro_rules! impl_int_arith {
/// ```
/// # #![feature(portable_simd)]
/// # use core_simd::*;
#[doc = concat!("# use core::", stringify!($n), "::{MIN, MAX};")]
#[doc = concat!("let xs = ", stringify!($name), "::from_array([MIN, -2, 0, 3]);")]
#[doc = concat!("# use core::", stringify!($ty), "::{MIN, MAX};")]
/// let xs = Simd::from_array([MIN, -2, 0, 3]);
/// let unsat = xs.abs();
/// let sat = xs.saturating_abs();
#[doc = concat!("assert_eq!(unsat, ", stringify!($name), "::from_array([MIN, 2, 0, 3]));")]
#[doc = concat!("assert_eq!(sat, ", stringify!($name), "::from_array([MAX, 2, 0, 3]));")]
/// assert_eq!(unsat, Simd::from_array([MIN, 2, 0, 3]));
/// assert_eq!(sat, Simd::from_array([MAX, 2, 0, 3]));
/// ```
#[inline]
pub fn saturating_abs(self) -> Self {
// arith shift for -1 or 0 mask based on sign bit, giving 2s complement
const SHR: $n = <$n>::BITS as $n - 1;
const SHR: $ty = <$ty>::BITS as $ty - 1;
let m = self >> SHR;
(self^m).saturating_sub(m)
}
@ -130,12 +132,12 @@ macro_rules! impl_int_arith {
/// ```
/// # #![feature(portable_simd)]
/// # use core_simd::*;
#[doc = concat!("# use core::", stringify!($n), "::{MIN, MAX};")]
#[doc = concat!("let x = ", stringify!($name), "::from_array([MIN, -2, 3, MAX]);")]
#[doc = concat!("# use core::", stringify!($ty), "::{MIN, MAX};")]
/// let x = Simd::from_array([MIN, -2, 3, MAX]);
/// let unsat = -x;
/// let sat = x.saturating_neg();
#[doc = concat!("assert_eq!(unsat, ", stringify!($name), "::from_array([MIN, 2, -3, MIN + 1]));")]
#[doc = concat!("assert_eq!(sat, ", stringify!($name), "::from_array([MAX, 2, -3, MIN + 1]));")]
/// assert_eq!(unsat, Simd::from_array([MIN, 2, -3, MIN + 1]));
/// assert_eq!(sat, Simd::from_array([MAX, 2, -3, MIN + 1]));
/// ```
#[inline]
pub fn saturating_neg(self) -> Self {
@ -145,7 +147,5 @@ macro_rules! impl_int_arith {
}
}
use crate::vector::*;
impl_uint_arith! { (SimdU8, u8), (SimdU16, u16), (SimdU32, u32), (SimdU64, u64), (SimdUsize, usize) }
impl_int_arith! { (SimdI8, i8), (SimdI16, i16), (SimdI32, i32), (SimdI64, i64), (SimdIsize, isize) }
impl_uint_arith! { u8, u16, u32, u64, usize }
impl_int_arith! { i8, i16, i32, i64, isize }

View File

@ -1,8 +1,10 @@
use crate::{LaneCount, Simd, SupportedLaneCount};
macro_rules! impl_integer_reductions {
{ $name:ident, $scalar:ty } => {
impl<const LANES: usize> crate::$name<LANES>
{ $scalar:ty } => {
impl<const LANES: usize> Simd<$scalar, LANES>
where
crate::LaneCount<LANES>: crate::SupportedLaneCount,
LaneCount<LANES>: SupportedLaneCount,
{
/// Horizontal wrapping add. Returns the sum of the lanes of the vector, with wrapping addition.
#[inline]
@ -52,11 +54,22 @@ macro_rules! impl_integer_reductions {
}
}
impl_integer_reductions! { i8 }
impl_integer_reductions! { i16 }
impl_integer_reductions! { i32 }
impl_integer_reductions! { i64 }
impl_integer_reductions! { isize }
impl_integer_reductions! { u8 }
impl_integer_reductions! { u16 }
impl_integer_reductions! { u32 }
impl_integer_reductions! { u64 }
impl_integer_reductions! { usize }
macro_rules! impl_float_reductions {
{ $name:ident, $scalar:ty } => {
impl<const LANES: usize> crate::$name<LANES>
{ $scalar:ty } => {
impl<const LANES: usize> Simd<$scalar, LANES>
where
crate::LaneCount<LANES>: crate::SupportedLaneCount,
LaneCount<LANES>: SupportedLaneCount,
{
/// Horizontal add. Returns the sum of the lanes of the vector.
@ -102,22 +115,5 @@ macro_rules! impl_float_reductions {
}
}
macro_rules! impl_full_mask_reductions {
{} => {
impl<Element, const LANES: usize> Mask<Element, LANES>
where
Element: MaskElement,
LaneCount<LANES>: SupportedLaneCount,
{
#[inline]
pub fn any(self) -> bool {
unsafe { crate::intrinsics::simd_reduce_any(self.to_int()) }
}
#[inline]
pub fn all(self) -> bool {
unsafe { crate::intrinsics::simd_reduce_all(self.to_int()) }
}
}
}
}
impl_float_reductions! { f32 }
impl_float_reductions! { f64 }

View File

@ -1,11 +1,13 @@
use crate::{LaneCount, Simd, SupportedLaneCount};
macro_rules! implement {
{
$type:ident, $int_type:ident
$type:ty, $int_type:ty
} => {
#[cfg(feature = "std")]
impl<const LANES: usize> crate::$type<LANES>
impl<const LANES: usize> Simd<$type, LANES>
where
crate::LaneCount<LANES>: crate::SupportedLaneCount,
LaneCount<LANES>: SupportedLaneCount,
{
/// Returns the smallest integer greater than or equal to each lane.
#[must_use = "method returns a new vector and does not mutate the original value"]
@ -43,9 +45,9 @@ macro_rules! implement {
}
}
impl<const LANES: usize> crate::$type<LANES>
impl<const LANES: usize> Simd<$type, LANES>
where
crate::LaneCount<LANES>: crate::SupportedLaneCount,
LaneCount<LANES>: SupportedLaneCount,
{
/// Rounds toward zero and converts to the same-width integer type, assuming that
/// the value is finite and fits in that type.
@ -57,19 +59,19 @@ macro_rules! implement {
/// * Not be infinite
/// * Be representable in the return type, after truncating off its fractional part
#[inline]
pub unsafe fn to_int_unchecked(self) -> crate::$int_type<LANES> {
pub unsafe fn to_int_unchecked(self) -> Simd<$int_type, LANES> {
crate::intrinsics::simd_cast(self)
}
/// Creates a floating-point vector from an integer vector. Rounds values that are
/// not exactly representable.
#[inline]
pub fn round_from_int(value: crate::$int_type<LANES>) -> Self {
pub fn round_from_int(value: Simd<$int_type, LANES>) -> Self {
unsafe { crate::intrinsics::simd_cast(value) }
}
}
}
}
implement! { SimdF32, SimdI32 }
implement! { SimdF64, SimdI64 }
implement! { f32, i32 }
implement! { f64, i64 }

View File

@ -1,39 +1,39 @@
macro_rules! impl_to_bytes {
{ $name:ident, $size:literal } => {
impl<const LANES: usize> crate::$name<LANES>
{ $ty:ty, $size:literal } => {
impl<const LANES: usize> crate::Simd<$ty, LANES>
where
crate::LaneCount<LANES>: crate::SupportedLaneCount,
crate::LaneCount<{{ $size * LANES }}>: crate::SupportedLaneCount,
{
/// Return the memory representation of this integer as a byte array in native byte
/// order.
pub fn to_ne_bytes(self) -> crate::SimdU8<{{ $size * LANES }}> {
pub fn to_ne_bytes(self) -> crate::Simd<u8, {{ $size * LANES }}> {
unsafe { core::mem::transmute_copy(&self) }
}
/// Create a native endian integer value from its memory representation as a byte array
/// in native endianness.
pub fn from_ne_bytes(bytes: crate::SimdU8<{{ $size * LANES }}>) -> Self {
pub fn from_ne_bytes(bytes: crate::Simd<u8, {{ $size * LANES }}>) -> Self {
unsafe { core::mem::transmute_copy(&bytes) }
}
}
}
}
impl_to_bytes! { SimdU8, 1 }
impl_to_bytes! { SimdU16, 2 }
impl_to_bytes! { SimdU32, 4 }
impl_to_bytes! { SimdU64, 8 }
impl_to_bytes! { u8, 1 }
impl_to_bytes! { u16, 2 }
impl_to_bytes! { u32, 4 }
impl_to_bytes! { u64, 8 }
#[cfg(target_pointer_width = "32")]
impl_to_bytes! { SimdUsize, 4 }
impl_to_bytes! { usize, 4 }
#[cfg(target_pointer_width = "64")]
impl_to_bytes! { SimdUsize, 8 }
impl_to_bytes! { usize, 8 }
impl_to_bytes! { SimdI8, 1 }
impl_to_bytes! { SimdI16, 2 }
impl_to_bytes! { SimdI32, 4 }
impl_to_bytes! { SimdI64, 8 }
impl_to_bytes! { i8, 1 }
impl_to_bytes! { i16, 2 }
impl_to_bytes! { i32, 4 }
impl_to_bytes! { i64, 8 }
#[cfg(target_pointer_width = "32")]
impl_to_bytes! { SimdIsize, 4 }
impl_to_bytes! { isize, 4 }
#[cfg(target_pointer_width = "64")]
impl_to_bytes! { SimdIsize, 8 }
impl_to_bytes! { isize, 8 }

View File

@ -7,8 +7,6 @@ use crate::{LaneCount, SupportedLaneCount};
/// representation. Called from `define_float_vector!`.
macro_rules! impl_float_vector {
{ $name:ident, $type:ident, $bits_ty:ident, $mask_ty:ident, $mask_impl_ty:ident } => {
impl_float_reductions! { $name, $type }
impl<const LANES: usize> $name<LANES>
where
LaneCount<LANES>: SupportedLaneCount,

View File

@ -5,8 +5,6 @@ use crate::{LaneCount, SupportedLaneCount};
/// Implements additional integer traits (Eq, Ord, Hash) on the specified vector `$name`, holding multiple `$lanes` of `$type`.
macro_rules! impl_integer_vector {
{ $name:ident, $type:ty, $mask_ty:ident, $mask_impl_ty:ident } => {
impl_integer_reductions! { $name, $type }
impl<const LANES: usize> $name<LANES>
where
LaneCount<LANES>: SupportedLaneCount,

View File

@ -1,12 +1,5 @@
#![allow(non_camel_case_types)]
/// Implements additional integer traits (Eq, Ord, Hash) on the specified vector `$name`, holding multiple `$lanes` of `$type`.
macro_rules! impl_unsigned_vector {
{ $name:ident, $type:ty } => {
impl_integer_reductions! { $name, $type }
}
}
/// A SIMD vector of containing `LANES` `u8` values.
pub type SimdU8<const LANES: usize> = crate::Simd<u8, LANES>;
@ -22,12 +15,6 @@ pub type SimdU64<const LANES: usize> = crate::Simd<u64, LANES>;
/// A SIMD vector of containing `LANES` `usize` values.
pub type SimdUsize<const LANES: usize> = crate::Simd<usize, LANES>;
impl_unsigned_vector! { SimdUsize, usize }
impl_unsigned_vector! { SimdU16, u16 }
impl_unsigned_vector! { SimdU32, u32 }
impl_unsigned_vector! { SimdU64, u64 }
impl_unsigned_vector! { SimdU8, u8 }
/// Vector of two `usize` values
pub type usizex2 = SimdUsize<2>;

View File

@ -28,26 +28,26 @@ from_transmute! { unsafe u32x4 => uint32x4_t }
from_transmute! { unsafe i32x2 => int32x2_t }
from_transmute! { unsafe i32x4 => int32x4_t }
from_transmute! { unsafe SimdU64<1> => uint64x1_t }
from_transmute! { unsafe Simd<u64, 1> => uint64x1_t }
from_transmute! { unsafe u64x2 => uint64x2_t }
from_transmute! { unsafe SimdI64<1> => int64x1_t }
from_transmute! { unsafe Simd<i64, 1> => int64x1_t }
from_transmute! { unsafe i64x2 => int64x2_t }
from_transmute! { unsafe SimdU64<1> => poly64x1_t }
from_transmute! { unsafe Simd<u64, 1> => poly64x1_t }
from_transmute! { unsafe u64x2 => poly64x2_t }
#[cfg(target_arch = "arm")]
mod arm {
use super::*;
from_transmute! { unsafe SimdU8<4> => uint8x4_t }
from_transmute! { unsafe SimdI8<4> => int8x4_t }
from_transmute! { unsafe Simd<u8, 4> => uint8x4_t }
from_transmute! { unsafe Simd<i8, 4> => int8x4_t }
from_transmute! { unsafe SimdU16<2> => uint16x2_t }
from_transmute! { unsafe SimdI16<2> => int16x2_t }
from_transmute! { unsafe Simd<u16, 2> => uint16x2_t }
from_transmute! { unsafe Simd<i16, 2> => int16x2_t }
}
#[cfg(target_arch = "aarch64")]
mod aarch64 {
use super::*;
from_transmute! { unsafe SimdF64<1> => float64x1_t }
from_transmute! { unsafe Simd<f64, 1> => float64x1_t }
from_transmute! { unsafe f64x2 => float64x2_t }
}

View File

@ -45,10 +45,10 @@ mod p32 {
use super::*;
from_transmute! { unsafe usizex4 => __m128i }
from_transmute! { unsafe usizex8 => __m256i }
from_transmute! { unsafe SimdUsize<16> => __m512i }
from_transmute! { unsafe Simd<usize, 16> => __m512i }
from_transmute! { unsafe isizex4 => __m128i }
from_transmute! { unsafe isizex8 => __m256i }
from_transmute! { unsafe SimdIsize<16> => __m512i }
from_transmute! { unsafe Simd<isize, 16> => __m512i }
}
#[cfg(target_pointer_width = "64")]