[−][src]Function safe_arch::addsub_m256
#[must_use]pub fn addsub_m256(a: m256, b: m256) -> m256
This is supported with target feature
avx
only.Alternately, from the top, add f32
then sub f32
.
let a = m256::from_array([10.0, 20.0, 30.0, 40.0, 1.0, 2.0, 3.0, 4.0]); let b = m256::from_array([1.0, 20.0, 3.0, 40.0, 11.0, 12.0, 13.0, 14.0]); let c = addsub_m256(a, b).to_array(); assert_eq!(c, [9.0, 40.0, 27.0, 80.0, -10.0, 14.0, -10.0, 18.0]);