Function safe_arch::fused_mul_add_m128_s
source ยท pub fn fused_mul_add_m128_s(a: m128, b: m128, c: m128) -> m128
Available with target feature
fma
only.Expand description
Low lane fused (a * b) + c
, other lanes unchanged
let a = m128::from_array([2.0, 3.0, 4.0, 5.0]);
let b = m128::from_array([4.0, 5.0, 6.0, 7.0]);
let c = m128::from_array([1.0, 1.0, 1.0, 1.0]);
let d = fused_mul_add_m128_s(a, b, c).to_array();
assert_eq!(d, [9.0, 3.0, 4.0, 5.0]);
- Intrinsic:
_mm_fmadd_ss
- Assembly: one of
vfmadd132ss xmm, xmm, xmm
vfmadd213ss xmm, xmm, xmm
vfmadd231ss xmm, xmm, xmm