[][src]Function safe_arch::fused_mul_addsub_m256

#[must_use]pub fn fused_mul_addsub_m256(a: m256, b: m256, c: m256) -> m256
This is supported with target feature fma only.

Lanewise fused (a * b) addsub c (adds odd lanes and subtracts even lanes)

let a = m256::from_array([1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0]);
let b = m256::from_array([5.0, 6.0, 7.0, 8.0, 5.0, 6.0, 7.0, 8.0]);
let c = m256::from_array([1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]);
let d = fused_mul_addsub_m256(a, b, c).to_array();
assert_eq!(d, [4.0, 13.0, 20.0, 33.0, 4.0, 13.0, 20.0, 33.0]);
  • Intrinsic: _mm256_fmaddsub_ps
  • Assembly: one of
    • vfmaddsub132ps ymm, ymm, ymm
    • vfmaddsub213ps ymm, ymm, ymm
    • vfmaddsub231ps ymm, ymm, ymm