Struct simd::bool8ix16 [−][src]
#[repr(simd)]pub struct bool8ix16(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _);
A SIMD boolean vector for length-16 vectors of 8-bit integers.
Methods
impl bool8ix16
[src]
impl bool8ix16
pub fn to_repr(self) -> i8x16
[src]
pub fn to_repr(self) -> i8x16
Convert to integer representation.
pub fn from_repr(x: i8x16) -> Self
[src]
pub fn from_repr(x: i8x16) -> Self
Convert from integer representation.
pub fn new(
x0: bool,
x1: bool,
x2: bool,
x3: bool,
x4: bool,
x5: bool,
x6: bool,
x7: bool,
x8: bool,
x9: bool,
x10: bool,
x11: bool,
x12: bool,
x13: bool,
x14: bool,
x15: bool
) -> bool8ix16
[src]
pub fn new(
x0: bool,
x1: bool,
x2: bool,
x3: bool,
x4: bool,
x5: bool,
x6: bool,
x7: bool,
x8: bool,
x9: bool,
x10: bool,
x11: bool,
x12: bool,
x13: bool,
x14: bool,
x15: bool
) -> bool8ix16
Create a new instance.
pub fn splat(x: bool) -> bool8ix16
[src]
pub fn splat(x: bool) -> bool8ix16
Create a new instance where every lane has value x
.
pub fn extract(self, idx: u32) -> bool
[src]
pub fn extract(self, idx: u32) -> bool
pub fn replace(self, idx: u32, elem: bool) -> Self
[src]
pub 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.
pub fn select<T: Simd<Bool = bool8ix16>>(self, then: T, else_: T) -> T
[src]
pub fn select<T: Simd<Bool = bool8ix16>>(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) }, ...)
pub fn all(self) -> bool
[src]
pub 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) && ...
pub fn any(self) -> bool
[src]
pub 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) || ...
Trait Implementations
impl Not for bool8ix16
[src]
impl Not for bool8ix16
type Output = Self
The resulting type after applying the !
operator.
fn not(self) -> Self
[src]
fn not(self) -> Self
Performs the unary !
operation.
impl BitAnd for bool8ix16
[src]
impl BitAnd for bool8ix16
type Output = Self
The resulting type after applying the &
operator.
fn bitand(self, x: Self) -> Self
[src]
fn bitand(self, x: Self) -> Self
Performs the &
operation.
impl BitOr for bool8ix16
[src]
impl BitOr for bool8ix16
type Output = Self
The resulting type after applying the |
operator.
fn bitor(self, x: Self) -> Self
[src]
fn bitor(self, x: Self) -> Self
Performs the |
operation.
impl BitXor for bool8ix16
[src]
impl BitXor for bool8ix16
type Output = Self
The resulting type after applying the ^
operator.
fn bitxor(self, x: Self) -> Self
[src]
fn bitxor(self, x: Self) -> Self
Performs the ^
operation.
impl Sse2Bool8ix16 for bool8ix16
[src]
impl Sse2Bool8ix16 for bool8ix16
impl Sse41Bool8ix16 for bool8ix16
[src]
impl Sse41Bool8ix16 for bool8ix16
impl AvxBool8ix16 for bool8ix16
[src]
impl AvxBool8ix16 for bool8ix16
impl Debug for bool8ix16
[src]
impl Debug for bool8ix16
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Copy for bool8ix16
[src]
impl Copy for bool8ix16
impl Simd for bool8ix16
[src]
impl Simd for bool8ix16
type Bool = bool8ix16
The corresponding boolean vector type.
type Elem = bool8i
The element that this vector stores.
impl Clone for bool8ix16
[src]
impl Clone for bool8ix16