[−][src]Function safe_arch::blend_varying_m256d
#[must_use]pub fn blend_varying_m256d(a: m256d, b: m256d, mask: m256d) -> m256d
This is supported with target feature
avx
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 = m256d::from_array([0.0, 1.0, 20.0, 30.0]); let b = m256d::from_array([2.0, 3.0, 70.0, 80.0]); let mask = m256d::from_array([-1.0, 0.0, 0.0, -1.0]); let c = blend_varying_m256d(a, b, mask).to_array(); assert_eq!(c, [2.0, 1.0, 20.0, 80.0]);