Type Definition packed_simd::msizex4

source ·
pub type msizex4 = Simd<[msize; 4]>;
Expand description

A vector mask with 4 msize lanes.

Implementations§

source§

impl msizex4

source

pub const fn new(x0: bool, x1: bool, x2: bool, x3: bool) -> Self

Creates a new instance with each vector elements initialized with the provided values.

source

pub const fn lanes() -> usize

Returns the number of vector lanes.

source

pub const fn splat(value: bool) -> Self

Constructs a new instance with each element initialized to value.

source

pub fn extract(self, index: usize) -> bool

Extracts the value at index.

Panics

If index >= Self::lanes().

source

pub unsafe fn extract_unchecked(self, index: usize) -> bool

Extracts the value at index.

Safety

If index >= Self::lanes() the behavior is undefined.

source

pub fn replace(self, index: usize, new_value: bool) -> Self

Returns a new vector where the value at index is replaced by new_value.

Panics

If index >= Self::lanes().

source

pub unsafe fn replace_unchecked(self, index: usize, new_value: bool) -> Self

Returns a new vector where the value at index is replaced by new_value.

Safety

If index >= Self::lanes() the behavior is undefined.

source§

impl msizex4

source

pub fn and(self) -> bool

Lane-wise bitwise and of the vector elements.

Note: if the vector has one lane, the first element of the vector is returned.

source

pub fn or(self) -> bool

Lane-wise bitwise or of the vector elements.

Note: if the vector has one lane, the first element of the vector is returned.

source

pub fn xor(self) -> bool

Lane-wise bitwise xor of the vector elements.

Note: if the vector has one lane, the first element of the vector is returned.

source§

impl msizex4

source

pub fn all(self) -> bool

Are all vector lanes true?

source

pub fn any(self) -> bool

Is any vector lane true?

source

pub fn none(self) -> bool

Are all vector lanes false?

source§

impl msizex4

source

pub fn eq(self, other: Self) -> msizex4

Lane-wise equality comparison.

source

pub fn ne(self, other: Self) -> msizex4

Lane-wise inequality comparison.

source

pub fn lt(self, other: Self) -> msizex4

Lane-wise less-than comparison.

source

pub fn le(self, other: Self) -> msizex4

Lane-wise less-than-or-equals comparison.

source

pub fn gt(self, other: Self) -> msizex4

Lane-wise greater-than comparison.

source

pub fn ge(self, other: Self) -> msizex4

Lane-wise greater-than-or-equals comparison.

source§

impl msizex4

source

pub fn select<T>(self, a: Simd<T>, b: Simd<T>) -> Simd<T>where T: SimdArray<NT = <[msize; 4] as SimdArray>::NT>,

Selects elements of a and b using mask.

The lanes of the result for which the mask is true contain the values of a. The remaining lanes contain the values of b.

source§

impl msizex4

source

pub fn partial_lex_ord(&self) -> LexicographicallyOrdered<msizex4>

Returns a wrapper that implements PartialOrd.

source§

impl msizex4

source

pub fn lex_ord(&self) -> LexicographicallyOrdered<msizex4>

Returns a wrapper that implements Ord.

source§

impl msizex4

source

pub fn shuffle1_dyn<I>(self, indices: I) -> Selfwhere Self: Shuffle1Dyn<Indices = I>,

Shuffle vector elements according to indices.

source§

impl msizex4

source

pub fn bitmask(self) -> u8

Creates a bitmask with the MSB of each vector lane.

If the vector has less than 8 lanes, the bits that do not correspond to any vector lanes are cleared.

Trait Implementations§

source§

impl BitAnd<Simd<[msize; 4]>> for msizex4

§

type Output = Simd<[msize; 4]>

The resulting type after applying the & operator.
source§

fn bitand(self, other: Self) -> Self

Performs the & operation. Read more
source§

impl BitAnd<bool> for msizex4

§

type Output = Simd<[msize; 4]>

The resulting type after applying the & operator.
source§

fn bitand(self, other: bool) -> Self

Performs the & operation. Read more
source§

impl BitAndAssign<Simd<[msize; 4]>> for msizex4

source§

fn bitand_assign(&mut self, other: Self)

Performs the &= operation. Read more
source§

impl BitAndAssign<bool> for msizex4

source§

fn bitand_assign(&mut self, other: bool)

Performs the &= operation. Read more
source§

impl BitOr<Simd<[msize; 4]>> for msizex4

§

type Output = Simd<[msize; 4]>

The resulting type after applying the | operator.
source§

fn bitor(self, other: Self) -> Self

Performs the | operation. Read more
source§

impl BitOr<bool> for msizex4

§

type Output = Simd<[msize; 4]>

The resulting type after applying the | operator.
source§

fn bitor(self, other: bool) -> Self

Performs the | operation. Read more
source§

impl BitOrAssign<Simd<[msize; 4]>> for msizex4

source§

fn bitor_assign(&mut self, other: Self)

Performs the |= operation. Read more
source§

impl BitOrAssign<bool> for msizex4

source§

fn bitor_assign(&mut self, other: bool)

Performs the |= operation. Read more
source§

impl BitXor<Simd<[msize; 4]>> for msizex4

§

type Output = Simd<[msize; 4]>

The resulting type after applying the ^ operator.
source§

fn bitxor(self, other: Self) -> Self

Performs the ^ operation. Read more
source§

impl BitXor<bool> for msizex4

§

type Output = Simd<[msize; 4]>

The resulting type after applying the ^ operator.
source§

fn bitxor(self, other: bool) -> Self

Performs the ^ operation. Read more
source§

impl BitXorAssign<Simd<[msize; 4]>> for msizex4

source§

fn bitxor_assign(&mut self, other: Self)

Performs the ^= operation. Read more
source§

impl BitXorAssign<bool> for msizex4

source§

fn bitxor_assign(&mut self, other: bool)

Performs the ^= operation. Read more
source§

impl Debug for msizex4

source§

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

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

impl Default for msizex4

source§

fn default() -> Self

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

impl From<[msize; 4]> for msizex4

source§

fn from(array: [msize; 4]) -> Self

Converts to this type from the input type.
source§

impl FromCast<Simd<[f32; 4]>> for msizex4

source§

fn from_cast(x: f32x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[f64; 4]>> for msizex4

source§

fn from_cast(x: f64x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[i128; 4]>> for msizex4

source§

fn from_cast(x: i128x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[i16; 4]>> for msizex4

source§

fn from_cast(x: i16x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[i32; 4]>> for msizex4

source§

fn from_cast(x: i32x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[i64; 4]>> for msizex4

source§

fn from_cast(x: i64x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[i8; 4]>> for msizex4

source§

fn from_cast(x: i8x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[isize; 4]>> for msizex4

source§

fn from_cast(x: isizex4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[m128; 4]>> for msizex4

source§

fn from_cast(x: m128x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[m16; 4]>> for msizex4

source§

fn from_cast(x: m16x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[m32; 4]>> for msizex4

source§

fn from_cast(x: m32x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[m64; 4]>> for msizex4

source§

fn from_cast(x: m64x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[m8; 4]>> for msizex4

source§

fn from_cast(x: m8x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[u128; 4]>> for msizex4

source§

fn from_cast(x: u128x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[u16; 4]>> for msizex4

source§

fn from_cast(x: u16x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[u32; 4]>> for msizex4

source§

fn from_cast(x: u32x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[u64; 4]>> for msizex4

source§

fn from_cast(x: u64x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[u8; 4]>> for msizex4

source§

fn from_cast(x: u8x4) -> Self

Numeric cast from T to Self.
source§

impl FromCast<Simd<[usize; 4]>> for msizex4

source§

fn from_cast(x: usizex4) -> Self

Numeric cast from T to Self.
source§

impl Not for msizex4

§

type Output = Simd<[msize; 4]>

The resulting type after applying the ! operator.
source§

fn not(self) -> Self

Performs the unary ! operation. Read more
source§

impl PartialEq<Simd<[msize; 4]>> for msizex4

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Simd for msizex4

§

type Element = msize

Element type of the SIMD vector
source§

const LANES: usize = 4usize

The number of elements in the SIMD vector.
§

type LanesType = [u32; 4]

The type: [u32; Self::N].
source§

impl Eq for msizex4