[−][src]Function safe_arch::add_m256
#[must_use]pub fn add_m256(a: m256, b: m256) -> m256
This is supported with target feature
avx
only.Lanewise a + b
with f32
lanes.
let a = m256::from_array([1.0, 2.0, 3.0, 4.0, 20.0, 30.0, 40.0, 50.0]); let b = m256::from_array([5.0, 6.0, 7.0, 8.5, 90.0, 100.0, 110.0, 51.0]); let c = add_m256(a, b).to_array(); assert_eq!(c, [6.0, 8.0, 10.0, 12.5, 110.0, 130.0, 150.0, 101.0]);