Skip to main content

FmaSupport

Trait FmaSupport 

Source
pub trait FmaSupport {
    // Required method
    fn has_fma() -> bool;
}
Expand description

Trait for querying runtime FMA (Fused Multiply-Add) support.

FMA (vfmadd* family) is available on Intel Haswell+ and AMD Piledriver+. It performs a * b + c in a single instruction with one rounding for floating-point kernels that select an FMA-capable implementation.

Required Methods§

Source

fn has_fma() -> bool

Returns true if the current CPU supports FMA3 instructions.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl FmaSupport for f32

Source§

impl FmaSupport for f64

Implementors§