[−][src]Macro safe_arch::shuffle_abi_f64_all_m128d
Shuffle the f64
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
.
You can pass the same value as both arguments, but if you want to swizzle
within only a single register and you have avx
available consider using
shuffle_ai_f64_all_m128d
instead. You'll get much better performance.
let a = m128d::from_array([1.0, 2.0]); let b = m128d::from_array([3.0, 4.0]); // let c = shuffle_abi_f64_all_m128d!(a, b, [a:0, b:0]).to_array(); assert_eq!(c, [1.0, 3.0]); // let c = shuffle_abi_f64_all_m128d!(a, b, [a:0, b:1]).to_array(); assert_eq!(c, [1.0, 4.0]);