#[repr(simd)]
pub struct f32x4(_, _, _, _);
pub const fn new(x0: f32, x1: f32, x2: f32, x3: f32) -> f32x4 | [src] |
Create a new instance where every lane has value x
.
Extract the value of the idx
th lane of self
.
extract
will panic if idx
is out of bounds.
Return a new vector where the idx
th lane is replaced
by elem
.
replace
will panic if idx
is out of bounds.
pub fn load(array: &[f32], idx: usize) -> Self | [src] |
Load a new value from the idx
th position of array
.
This is equivalent to the following, but is possibly
more efficient:
Self::new(array[idx], array[idx + 1], ...)
load
will panic if idx
is out of bounds in
array
, or if array[idx..]
is too short.
pub fn store(self, array: &mut [f32], idx: usize) | [src] |
Store the elements of self
to array
, starting at
the idx
th position.
This is equivalent to the following, but is possibly
more efficient:
array[i] = self.extract(0);
array[i + 1] = self.extract(1);
store
will panic if idx
is out of bounds in
array
, or if array[idx...]
is too short.
Compute the square root of each lane.
Compute an approximation to the reciprocal of the square root
of self
, that is, f32::splat(1.0) / self.sqrt()
.
The accuracy of this approximation is platform dependent.
Compute an approximation to the reciprocal of self
, that is,
f32::splat(1.0) / self
.
The accuracy of this approximation is platform dependent.
pub fn max(self, other: Self) -> Self | [src] |
Compute the lane-wise maximum of self
and other
.
This is equivalent to the following, but is possibly more
efficient:
f32x4::new(self.extract(0).max(other.extract(0)),
self.extract(1).max(other.extract(1)),
...)
pub fn min(self, other: Self) -> Self | [src] |
Compute the lane-wise minimum of self
and other
.
This is equivalent to the following, but is possibly more
efficient:
f32x4::new(self.extract(0).min(other.extract(0)),
self.extract(1).min(other.extract(1)),
...)
Convert each lane to a signed integer.
Convert each lane to an unsigned integer.
The corresponding boolean vector type.
type Elem = f32
The element that this vector stores.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
The resulting type after applying the -
operator.
Performs the -
operation.
The resulting type after applying the +
operator.
Performs the +
operation.
The resulting type after applying the *
operator.
Performs the *
operation.
The resulting type after applying the /
operator.
Performs the /
operation.
The resulting type after applying the -
operator.
Performs the unary -
operation.
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static