[−][src]Function safe_arch::fused_mul_neg_add_m256
#[must_use]pub fn fused_mul_neg_add_m256(a: m256, b: m256, c: m256) -> m256
This is supported with target feature
fma
only.Lanewise fused -(a * b) + c
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_neg_add_m256(a, b, c).to_array(); assert_eq!(d, [-4.0, -11.0, -20.0, -31.0, -4.0, -11.0, -20.0, -31.0]);
- Intrinsic:
_mm256_fnmadd_ps
- Assembly: one of
vfnmadd132ps ymm, ymm, ymm
vfnmadd213ps ymm, ymm, ymm
vfnmadd231ps ymm, ymm, ymm