[][src]Function safe_arch::blend_varying_m128

#[must_use]pub fn blend_varying_m128(a: m128, b: m128, mask: m128) -> m128
This is supported with target feature sse4.1 only.

Blend the lanes according to a runtime varying mask.

The sign bit of each lane in the mask value determines if the output lane uses a (mask non-negative) or b (mask negative).

let a = m128::from_array([0.0, 1.0, 2.0, 3.0]);
let b = m128::from_array([4.0, 5.0, 6.0, 7.0]);
let mask = m128::from_array([-1.0, 0.0, -1.0, 0.0]);
let c = blend_varying_m128(a, b, mask).to_array();
assert_eq!(c, [4.0, 1.0, 6.0, 3.0]);