rand::distributions::utils

Trait FloatAsSIMD

Source
pub(crate) trait FloatAsSIMD: Sized {
    // Provided methods
    fn lanes() -> usize { ... }
    fn splat(scalar: Self) -> Self { ... }
    fn extract(self, index: usize) -> Self { ... }
    fn replace(self, index: usize, new_value: Self) -> Self { ... }
}
Expand description

Implement functions on f32/f64 to give them APIs similar to SIMD types

Provided Methods§

Source

fn lanes() -> usize

Source

fn splat(scalar: Self) -> Self

Source

fn extract(self, index: usize) -> Self

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl FloatAsSIMD for f32

Source§

impl FloatAsSIMD for f64

Implementors§