[][src]Macro safe_arch::shuffle_abi_f32_half_m256

macro_rules! shuffle_abi_f32_half_m256 {
    ($a:expr, $b:expr, [a:$z:expr, a:$o:expr, b:$t:expr, b:$e:expr]) => { ... };
}
This is supported with target feature avx only.

Shuffle the f32 lanes from $a and $b together using an immediate control value.

The a: and b: prefixes on the index selection values are literal tokens that you type. It helps keep clear what value comes from where. The first two output lanes come from $a, the second two output lanes come from $b.

This works like shuffle_abi_f32_all_m128, but with the low 128 bits and high 128 bits each doing a shuffle at the same time. Each index (0..=3) only refers to a lane within a given 128 bit portion of the 256 bit inputs. You cannot cross data between the two 128 bit halves.

let a = m256::from_array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0]);
let b = m256::from_array([9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0]);
//
let c = shuffle_abi_f32_half_m256!(a, b, [a:1, a:3, b:2, b:0]).to_array();
assert_eq!(c, [2.0, 4.0, 11.0, 9.0, 6.0, 8.0, 15.0, 13.0]);