Struct simd::bool32fx4
[−]
[src]
#[repr(simd)]pub struct bool32fx4(_, _, _, _);
A SIMD boolean vector for length-4 vectors of 32-bit floats.
Methods
impl bool32fx4
[src]
fn to_repr(self) -> i32x4
Convert to integer representation.
fn from_repr(x: i32x4) -> Self
Convert from integer representation.
fn new(x0: bool, x1: bool, x2: bool, x3: bool) -> bool32fx4
Create a new instance.
fn splat(x: bool) -> bool32fx4
Create a new instance where every lane has value x
.
fn extract(self, idx: u32) -> bool
fn replace(self, idx: u32, elem: bool) -> Self
Return a new vector where the idx
th lane is replaced
by elem
.
Panics
replace
will panic if idx
is out of bounds.
fn select<T: Simd<Bool = bool32fx4>>(self, then: T, else_: T) -> T
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) }, ...)
fn all(self) -> bool
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) && ...
fn any(self) -> bool
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) || ...
fn to_i(self) -> bool32ix4
Convert self
to a boolean vector for interacting with integer vectors.
Trait Implementations
impl Not for bool32fx4
[src]
type Output = Self
The resulting type after applying the !
operator
fn not(self) -> Self
The method for the unary !
operator
impl BitAnd for bool32fx4
[src]
type Output = Self
The resulting type after applying the &
operator
fn bitand(self, x: Self) -> Self
The method for the &
operator
impl BitOr for bool32fx4
[src]
type Output = Self
The resulting type after applying the |
operator
fn bitor(self, x: Self) -> Self
The method for the |
operator
impl BitXor for bool32fx4
[src]
type Output = Self
The resulting type after applying the ^
operator
fn bitxor(self, x: Self) -> Self
The method for the ^
operator
impl Sse2Bool32fx4 for bool32fx4
[src]
impl Debug for bool32fx4
[src]
impl Copy for bool32fx4
[src]
impl Simd for bool32fx4
[src]
type Bool = bool32fx4
The corresponding boolean vector type.
type Elem = bool32f
The element that this vector stores.
impl Clone for bool32fx4
[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more