[][src]Macro safe_arch::insert_f32_imm_m128

macro_rules! insert_f32_imm_m128 {
    ($a:expr, $b:expr, from $b_lane_src:expr, to $a_lane_dest:expr, mask $clear_lanes:expr) => { ... };
    ($a:expr, $b:expr, from $b_lane_src:expr, to $a_lane_dest:expr) => { ... };
}

Inserts a lane from $b into $a, optionally at a new position.

Also, you can zero out any lanes you like for free as part of the same operation. If you don't specify the mask argument then no lanes are zeroed.

let a = m128::from_array([1.0, 2.0, 3.0, 4.0]);
let b = m128::from_array([5.0, 6.0, 7.0, 8.0]);
//
let c = insert_f32_imm_m128!(a, b, from 0, to 3).to_array();
assert_eq!(c, [1.0, 2.0, 3.0, 5.0]);
//
let c = insert_f32_imm_m128!(a, b, from 0, to 3, mask 0b0110).to_array();
assert_eq!(c, [1.0, 0.0, 0.0, 5.0]);