Skip to main content

SimdBool

Struct SimdBool 

Source
#[repr(transparent)]
pub struct SimdBool(pub f32x4);
Expand description

An SIMD boolean structure associated to wide::f32x4 that implements all the relevant traits from simba.

This is needed to overcome the orphan rules.

Tuple Fields§

§0: f32x4

Implementations§

Source§

impl WideBoolF32x4

Source

pub fn from_arr(arr: [f32; 4]) -> WideBoolF32x4

Source

pub fn into_arr(self) -> [f32; 4]

Trait Implementations§

Source§

impl BitAnd for WideBoolF32x4

Source§

type Output = WideBoolF32x4

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: WideBoolF32x4) -> WideBoolF32x4

Performs the & operation. Read more
Source§

impl BitOr for WideBoolF32x4

Source§

type Output = WideBoolF32x4

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: WideBoolF32x4) -> WideBoolF32x4

Performs the | operation. Read more
Source§

impl BitXor for WideBoolF32x4

Source§

type Output = WideBoolF32x4

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: WideBoolF32x4) -> WideBoolF32x4

Performs the ^ operation. Read more
Source§

impl Clone for WideBoolF32x4

Source§

fn clone(&self) -> WideBoolF32x4

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for WideBoolF32x4

Source§

impl Debug for WideBoolF32x4

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for WideBoolF32x4

Source§

fn default() -> WideBoolF32x4

Returns the “default value” for a type. Read more
Source§

impl From<[bool; 4]> for WideBoolF32x4

Source§

fn from(vals: [bool; 4]) -> WideBoolF32x4

Converts to this type from the input type.
Source§

impl Not for WideBoolF32x4

Source§

type Output = WideBoolF32x4

The resulting type after applying the ! operator.
Source§

fn not(self) -> WideBoolF32x4

Performs the unary ! operation. Read more
Source§

impl PartialEq for WideBoolF32x4

Source§

fn eq(&self, rhs: &WideBoolF32x4) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PrimitiveSimdValue for WideBoolF32x4

Source§

impl SimdBool for WideBoolF32x4

Source§

fn bitmask(self) -> u64

A bit mask representing the boolean state of each lanes of self. Read more
Source§

fn and(self) -> bool

Lane-wise bitwise and of the vector elements.
Source§

fn or(self) -> bool

Lane-wise bitwise or of the vector elements.
Source§

fn xor(self) -> bool

Lane-wise bitwise xor of the vector elements.
Source§

fn all(self) -> bool

Are all vector lanes true?
Source§

fn any(self) -> bool

Is any vector lane true?
Source§

fn none(self) -> bool

Are all vector lanes false?
Source§

fn if_else<Res>( self, if_value: impl FnOnce() -> Res, else_value: impl FnOnce() -> Res, ) -> Res
where Res: SimdValue<SimdBool = WideBoolF32x4>,

Merges the value of if_value() and else_value() depending on the lanes of self. Read more
Source§

fn if_else2<Res>( self, if_value: impl FnOnce() -> Res, else_if: (impl FnOnce() -> WideBoolF32x4, impl FnOnce() -> Res), else_value: impl FnOnce() -> Res, ) -> Res
where Res: SimdValue<SimdBool = WideBoolF32x4>,

Merges the value of if_value() and else_if.1() and else_value() depending on the lanes of self and else_if.0(). Read more
Source§

fn if_else3<Res>( self, if_value: impl FnOnce() -> Res, else_if: (impl FnOnce() -> WideBoolF32x4, impl FnOnce() -> Res), else_else_if: (impl FnOnce() -> WideBoolF32x4, impl FnOnce() -> Res), else_value: impl FnOnce() -> Res, ) -> Res
where Res: SimdValue<SimdBool = WideBoolF32x4>,

Merges the value of if_value() and else_if.1() and else_else_if.1() and else_value() depending on the lanes of self and else_if.0() and else_else_if.0(). Read more
Source§

impl SimdValue for WideBoolF32x4

Source§

const LANES: usize = 4

The number of lanes of this SIMD value.
Source§

type Element = bool

The type of the elements of each lane of this SIMD value.
Source§

type SimdBool = WideBoolF32x4

Type of the result of comparing two SIMD values like self.
Source§

fn splat(val: bool) -> WideBoolF32x4

Initializes an SIMD value with each lanes set to val.
Source§

fn extract(&self, i: usize) -> <WideBoolF32x4 as SimdValue>::Element

Extracts the i-th lane of self. Read more
Source§

unsafe fn extract_unchecked( &self, i: usize, ) -> <WideBoolF32x4 as SimdValue>::Element

Extracts the i-th lane of self without bound-checking. Read more
Source§

fn replace(&mut self, i: usize, val: <WideBoolF32x4 as SimdValue>::Element)

Replaces the i-th lane of self by val. Read more
Source§

unsafe fn replace_unchecked( &mut self, i: usize, val: <WideBoolF32x4 as SimdValue>::Element, )

Replaces the i-th lane of self by val without bound-checking. Read more
Source§

fn select( self, cond: <WideBoolF32x4 as SimdValue>::SimdBool, other: WideBoolF32x4, ) -> WideBoolF32x4

Merges self and other depending on the lanes of cond. Read more
Source§

fn map_lanes(self, f: impl Fn(Self::Element) -> Self::Element) -> Self
where Self: Clone,

Applies a function to each lane of self. Read more
Source§

fn zip_map_lanes( self, b: Self, f: impl Fn(Self::Element, Self::Element) -> Self::Element, ) -> Self
where Self: Clone,

Applies a function to each lane of self paired with the corresponding lane of b. Read more
Source§

impl SubsetOf<WideBoolF32x4> for WideBoolF32x4

Source§

fn to_superset(&self) -> WideBoolF32x4

The inclusion map: converts self to the equivalent element of its superset.
Source§

fn from_superset(element: &WideBoolF32x4) -> Option<WideBoolF32x4>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn from_superset_unchecked(element: &WideBoolF32x4) -> WideBoolF32x4

Use with care! Same as self.to_superset but without any property checks. Always succeeds.
Source§

fn is_in_subset(_: &WideBoolF32x4) -> bool

Checks if element is actually part of the subset Self (and can be converted to it).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSend for T
where T: Any + Send,

Source§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_sync(self: Box<T>) -> Box<dyn Any + Send + Sync>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.