Skip to main content

SimdFloatingElement

Trait SimdFloatingElement 

Source
pub unsafe trait SimdFloatingElement: SimdNumElement + Float {
    // Required methods
    unsafe fn sqrt(x: Self::Vector) -> Self::Vector;
    unsafe fn exp(x: Self::Vector) -> Self::Vector;
    unsafe fn tanh(x: Self::Vector) -> Self::Vector;
}
Expand description

A trait for types that may be used as floating point SIMD vector elements.

Required Methods§

Source

unsafe fn sqrt(x: Self::Vector) -> Self::Vector

Returns sqrt of x.

§Safety

Make sure Self::is_available() returns true.

Source

unsafe fn exp(x: Self::Vector) -> Self::Vector

Returns exp(x).

§Safety

Make sure Self::is_available() returns true.

Source

unsafe fn tanh(x: Self::Vector) -> Self::Vector

Returns tanh of x.

§Safety

Make sure Self::is_available() returns true.

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.

Implementors§