Trait faster::intrin::Downcast
[−]
[src]
pub trait Downcast<T> { fn saturating_downcast(self, other: Self) -> T; }
Required Methods
fn saturating_downcast(self, other: Self) -> T
Return a vector containing elements of the same value as self
and
other
, but different type. The first half of the returned vector
contains the downcast values of self
, whereas the second half of the
returned vector contains the downcast values of other
. The returned
vector is equal in size to self
and other
. If an element exceeds
the maximum or minimum value of the downcast type, it is saturated.
Examples
extern crate faster; use faster::*; assert_eq!(i32s(2).saturating_downcast(i32s(3)), i16s::halfs(2, 3)); assert_eq!(i16s(128).saturating_downcast(i16s(-129)), i8s::halfs(127, -128));
Implementors
impl Downcast<i16x8> for i32x4
impl Downcast<i32x4> for i64x2
impl Downcast<u32x4> for u64x2
impl Downcast<f32x4> for f64x2
impl Downcast<i8x16> for i16x8
impl Downcast<u16x8> for u32x4
impl Downcast<u8x16> for u16x8
impl Downcast<i16x16> for i32x8
impl Downcast<i8x32> for i16x16
impl Downcast<u16x16> for u32x8
impl Downcast<u8x32> for u16x16
impl Downcast<i32x8> for i64x4
impl Downcast<u32x8> for u64x4
impl Downcast<f32x8> for f64x4