rand::distributions::utils

Trait FloatSIMDUtils

Source
pub(crate) trait FloatSIMDUtils {
    type Mask;
    type UInt;

    // Required methods
    fn all_lt(self, other: Self) -> bool;
    fn all_le(self, other: Self) -> bool;
    fn all_finite(self) -> bool;
    fn finite_mask(self) -> Self::Mask;
    fn gt_mask(self, other: Self) -> Self::Mask;
    fn ge_mask(self, other: Self) -> Self::Mask;
    fn decrease_masked(self, mask: Self::Mask) -> Self;
    fn cast_from_int(i: Self::UInt) -> Self;
}
Expand description

Helper trait when dealing with scalar and SIMD floating point types.

Required Associated Types§

Required Methods§

Source

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

Source

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

Source

fn all_finite(self) -> bool

Source

fn finite_mask(self) -> Self::Mask

Source

fn gt_mask(self, other: Self) -> Self::Mask

Source

fn ge_mask(self, other: Self) -> Self::Mask

Source

fn decrease_masked(self, mask: Self::Mask) -> Self

Source

fn cast_from_int(i: Self::UInt) -> 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 FloatSIMDUtils for f32

Source§

type Mask = bool

Source§

type UInt = u32

Source§

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

Source§

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

Source§

fn all_finite(self) -> bool

Source§

fn finite_mask(self) -> Self::Mask

Source§

fn gt_mask(self, other: Self) -> Self::Mask

Source§

fn ge_mask(self, other: Self) -> Self::Mask

Source§

fn decrease_masked(self, mask: Self::Mask) -> Self

Source§

fn cast_from_int(i: Self::UInt) -> Self

Source§

impl FloatSIMDUtils for f64

Source§

type Mask = bool

Source§

type UInt = u64

Source§

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

Source§

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

Source§

fn all_finite(self) -> bool

Source§

fn finite_mask(self) -> Self::Mask

Source§

fn gt_mask(self, other: Self) -> Self::Mask

Source§

fn ge_mask(self, other: Self) -> Self::Mask

Source§

fn decrease_masked(self, mask: Self::Mask) -> Self

Source§

fn cast_from_int(i: Self::UInt) -> Self

Implementors§