pub trait FloatOps<T: Elem>: NumOps<T> {
type Int: Simd;
// Required methods
fn div(self, x: Self::Simd, y: Self::Simd) -> Self::Simd;
fn round_ties_even(self, x: Self::Simd) -> Self::Simd;
fn to_int_trunc(self, x: Self::Simd) -> Self::Int;
fn to_int_round(self, x: Self::Simd) -> Self::Int;
// Provided methods
fn reciprocal(self, x: Self::Simd) -> Self::Simd { ... }
fn neg(self, x: Self::Simd) -> Self::Simd { ... }
fn abs(self, x: Self::Simd) -> Self::Simd { ... }
fn mul_sub_from(
self,
a: Self::Simd,
b: Self::Simd,
c: Self::Simd,
) -> Self::Simd { ... }
}Expand description
Operations available on SIMD vectors with float elements.
Required Associated Types§
Required Methods§
Sourcefn round_ties_even(self, x: Self::Simd) -> Self::Simd
fn round_ties_even(self, x: Self::Simd) -> Self::Simd
Round x to the nearest integer value, with ties to even.
This is like f32::round_ties_even.
Sourcefn to_int_trunc(self, x: Self::Simd) -> Self::Int
fn to_int_trunc(self, x: Self::Simd) -> Self::Int
Convert each lane to an integer of the same width, rounding towards zero.
Sourcefn to_int_round(self, x: Self::Simd) -> Self::Int
fn to_int_round(self, x: Self::Simd) -> Self::Int
Convert each lane to an integer of the same width, rounding to nearest with ties to even.
Provided Methods§
Sourcefn reciprocal(self, x: Self::Simd) -> Self::Simd
fn reciprocal(self, x: Self::Simd) -> Self::Simd
Compute 1. / x
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".