[−][src]Function safe_arch::add_horizontal_m128
#[must_use]pub fn add_horizontal_m128(a: m128, b: m128) -> m128
This is supported with target feature
sse3
only.Add each lane horizontally, pack the outputs as a
then b
.
let a = m128::from_array([10.0, 20.0, 30.0, 40.0]); let b = m128::from_array([100.0, 200.0, 300.0, 400.0]); let c = add_horizontal_m128(a, b).to_array(); assert_eq!(c, [30.0, 70.0, 300.0, 700.0]);