[−][src]Macro wide::shuffle128
Shuffles around some f32
lanes into a new m128
This is a macro and not a function because the shuffle pattern must be a compile time constant. The macro takes some requested indexes and then makes the correct shuffle pattern constant for you.
$a
and$b
are anym128
expressions.$i0a
,$i1a
,$i2b
, and$i3b
must each be0
,1
,2
, or3
. Technically anyu32
literal will work, but only the lowest two bits are used so stick to0
,1
,2
, or3
.- Each lane in the output uses one of the lanes from an input. Like the
names hint, indexes 0 and 1 will come from somewhere in
$a
, and indexes 2 and 3 will come from somewhere in$b
.
shuffle128!(a, b, [0, 2, 1, 3])
Would give an output of: a[0], a[2], b[1], b[3]