Struct simd::bool16ix8
[−]
[src]
#[repr(simd)]pub struct bool16ix8(_, _, _, _, _, _, _, _);
A SIMD boolean vector for length-8 vectors of 16-bit integers.
Methods
impl bool16ix8
[src]
pub fn to_repr(self) -> i16x8
[src]
Convert to integer representation.
pub fn from_repr(x: i16x8) -> Self
[src]
Convert from integer representation.
pub fn new(
x0: bool,
x1: bool,
x2: bool,
x3: bool,
x4: bool,
x5: bool,
x6: bool,
x7: bool
) -> bool16ix8
[src]
x0: bool,
x1: bool,
x2: bool,
x3: bool,
x4: bool,
x5: bool,
x6: bool,
x7: bool
) -> bool16ix8
Create a new instance.
pub fn splat(x: bool) -> bool16ix8
[src]
Create a new instance where every lane has value x
.
pub fn extract(self, idx: u32) -> bool
[src]
pub fn replace(self, idx: u32, elem: bool) -> Self
[src]
Return a new vector where the idx
th lane is replaced
by elem
.
Panics
replace
will panic if idx
is out of bounds.
pub fn select<T: Simd<Bool = bool16ix8>>(self, then: T, else_: T) -> T
[src]
Select between elements of then
and else_
, based on
the corresponding element of self
.
This is equivalent to the following, but is possibly more efficient:
T::new(if self.extract(0) { then.extract(0) } else { else_.extract(0) }, if self.extract(1) { then.extract(1) } else { else_.extract(1) }, ...)
pub fn all(self) -> bool
[src]
Check if every element of self
is true.
This is equivalent to the following, but is possibly more efficient:
self.extract(0) && self.extract(1) && ...
pub fn any(self) -> bool
[src]
Check if any element of self
is true.
This is equivalent to the following, but is possibly more efficient:
self.extract(0) || self.extract(1) || ...
Trait Implementations
impl Not for bool16ix8
[src]
type Output = Self
The resulting type after applying the !
operator.
fn not(self) -> Self
[src]
Performs the unary !
operation.
impl BitAnd for bool16ix8
[src]
type Output = Self
The resulting type after applying the &
operator.
fn bitand(self, x: Self) -> Self
[src]
Performs the &
operation.
impl BitOr for bool16ix8
[src]
type Output = Self
The resulting type after applying the |
operator.
fn bitor(self, x: Self) -> Self
[src]
Performs the |
operation.
impl BitXor for bool16ix8
[src]
type Output = Self
The resulting type after applying the ^
operator.
fn bitxor(self, x: Self) -> Self
[src]
Performs the ^
operation.
impl Sse2Bool16ix8 for bool16ix8
[src]
impl Sse41Bool16ix8 for bool16ix8
[src]
impl AvxBool16ix8 for bool16ix8
[src]
impl Debug for bool16ix8
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Copy for bool16ix8
[src]
impl Simd for bool16ix8
[src]
type Bool = bool16ix8
The corresponding boolean vector type.
type Elem = bool16i
The element that this vector stores.