Type Definition packed_simd_2::u16x16

source · []
pub type u16x16 = Simd<[u16; 16]>;
Expand description

A 256-bit vector with 16 u16 lanes.

Implementations

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

Returns the number of vector lanes.

Constructs a new instance with each element initialized to value.

Extracts the value at index.

Panics

If index >= Self::lanes().

Extracts the value at index.

Safety

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

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

Panics

If index >= Self::lanes().

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

Safety

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

Shifts the bits of each lane to the left by the specified amount in the corresponding lane of n, wrapping the truncated bits to the end of the resulting integer.

Note: this is neither the same operation as << nor equivalent to slice::rotate_left.

Shifts the bits of each lane to the right by the specified amount in the corresponding lane of n, wrapping the truncated bits to the beginning of the resulting integer.

Note: this is neither the same operation as << nor equivalent to slice::rotate_left.

Minimum of two vectors.

Returns a new vector containing the minimum value of each of the input vector lanes.

Maximum of two vectors.

Returns a new vector containing the maximum value of each of the input vector lanes.

Horizontal wrapping sum of the vector elements.

The intrinsic performs a tree-reduction of the vector elements. That is, for an 8 element vector:

((x0 + x1) + (x2 + x3)) + ((x4 + x5) + (x6 + x7))

If an operation overflows it returns the mathematical result modulo 2^n where n is the number of times it overflows.

Horizontal wrapping product of the vector elements.

The intrinsic performs a tree-reduction of the vector elements. That is, for an 8 element vector:

((x0 * x1) * (x2 * x3)) * ((x4 * x5) * (x6 * x7))

If an operation overflows it returns the mathematical result modulo 2^n where n is the number of times it overflows.

Largest vector element value.

Smallest vector element value.

Lane-wise bitwise and of the vector elements.

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

Lane-wise bitwise or of the vector elements.

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

Lane-wise bitwise xor of the vector elements.

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

Instantiates a new vector with the values of the slice.

Panics

If slice.len() < Self::lanes() or &slice[0] is not aligned to an align_of::<Self>() boundary.

Instantiates a new vector with the values of the slice.

Panics

If slice.len() < Self::lanes().

Instantiates a new vector with the values of the slice.

Safety

If slice.len() < Self::lanes() or &slice[0] is not aligned to an align_of::<Self>() boundary, the behavior is undefined.

Instantiates a new vector with the values of the slice.

Safety

If slice.len() < Self::lanes() the behavior is undefined.

Writes the values of the vector to the slice.

Panics

If slice.len() < Self::lanes() or &slice[0] is not aligned to an align_of::<Self>() boundary.

Writes the values of the vector to the slice.

Panics

If slice.len() < Self::lanes().

Writes the values of the vector to the slice.

Safety

If slice.len() < Self::lanes() or &slice[0] is not aligned to an align_of::<Self>() boundary, the behavior is undefined.

Writes the values of the vector to the slice.

Safety

If slice.len() < Self::lanes() the behavior is undefined.

Reverses the byte order of the vector.

Converts self to little endian from the target’s endianness.

On little endian this is a no-op. On big endian the bytes are swapped.

Converts self to big endian from the target’s endianness.

On big endian this is a no-op. On little endian the bytes are swapped.

Converts a vector from little endian to the target’s endianness.

On little endian this is a no-op. On big endian the bytes are swapped.

Converts a vector from big endian to the target’s endianness.

On big endian this is a no-op. On little endian the bytes are swapped.

Returns the number of ones in the binary representation of the lanes of self.

Returns the number of zeros in the binary representation of the lanes of self.

Returns the number of leading zeros in the binary representation of the lanes of self.

Returns the number of trailing zeros in the binary representation of the lanes of self.

Shuffle vector elements according to indices.

Lane-wise equality comparison.

Lane-wise inequality comparison.

Lane-wise less-than comparison.

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

Lane-wise greater-than comparison.

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

Returns a wrapper that implements PartialOrd.

Returns a wrapper that implements Ord.

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

The resulting type after applying the + operator.

Performs the + operation. Read more

The resulting type after applying the + operator.

Performs the + operation. Read more

Performs the += operation. Read more

Performs the += operation. Read more

Formats the value using the given formatter.

The resulting type after applying the & operator.

Performs the & operation. Read more

The resulting type after applying the & operator.

Performs the & operation. Read more

Performs the &= operation. Read more

Performs the &= operation. Read more

The resulting type after applying the | operator.

Performs the | operation. Read more

The resulting type after applying the | operator.

Performs the | operation. Read more

Performs the |= operation. Read more

Performs the |= operation. Read more

The resulting type after applying the ^ operator.

Performs the ^ operation. Read more

The resulting type after applying the ^ operator.

Performs the ^ operation. Read more

Performs the ^= operation. Read more

Performs the ^= operation. Read more

Formats the value using the given formatter. Read more

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

The resulting type after applying the / operator.

Performs the / operation. Read more

The resulting type after applying the / operator.

Performs the / operation. Read more

Performs the /= operation. Read more

Performs the /= operation. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Numeric cast from T to Self.

Numeric cast from T to Self.

Numeric cast from T to Self.

Numeric cast from T to Self.

Numeric cast from T to Self.

Numeric cast from T to Self.

Numeric cast from T to Self.

Numeric cast from T to Self.

Numeric cast from T to Self.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

Formats the value using the given formatter.

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

Performs the *= operation. Read more

Performs the *= operation. Read more

The resulting type after applying the ! operator.

Performs the unary ! operation. Read more

Formats the value using the given formatter.

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

This method tests for !=.

Method which takes an iterator and generates Self from the elements by multiplying the items. Read more

Method which takes an iterator and generates Self from the elements by multiplying the items. Read more

The resulting type after applying the % operator.

Performs the % operation. Read more

The resulting type after applying the % operator.

Performs the % operation. Read more

Performs the %= operation. Read more

Performs the %= operation. Read more

The resulting type after applying the << operator.

Performs the << operation. Read more

The resulting type after applying the << operator.

Performs the << operation. Read more

Performs the <<= operation. Read more

Performs the <<= operation. Read more

The resulting type after applying the >> operator.

Performs the >> operation. Read more

The resulting type after applying the >> operator.

Performs the >> operation. Read more

Performs the >>= operation. Read more

Performs the >>= operation. Read more

Element type of the SIMD vector

The number of elements in the SIMD vector.

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

The resulting type after applying the - operator.

Performs the - operation. Read more

The resulting type after applying the - operator.

Performs the - operation. Read more

Performs the -= operation. Read more

Performs the -= operation. Read more

Method which takes an iterator and generates Self from the elements by “summing up” the items. Read more

Method which takes an iterator and generates Self from the elements by “summing up” the items. Read more

Formats the value using the given formatter.