Skip to main content

HAS_FMA

Constant HAS_FMA 

Source
pub const HAS_FMA: bool = false;
Expand description

True when two_product uses a fused multiply-add on this target.

That is the case on x86_64 when compiled with the fma target feature (for example with -C target-feature=+fma or -C target-cpu=native on a CPU that has it), and on aarch64 with the neon target feature, which every aarch64 target enables by default except the soft-float ones.

ยงExamples

use implicit_predicates_core::eft::HAS_FMA;

if HAS_FMA {
    // `two_product` and `two_square` use `two_product_fma`.
}