Installation guide

72
Prototype: template<int a0, int a1, int a2, int a3> T permutate(const T& a);
template<int n> T permutate(const T& a);
Description: Permute four elements in a vector.
Template parameter n: each 2-bit field (from LSB) selects the content of one element location
(from low address) in the destination operand. i.e.,
r[0] := a[n(1:0)]
r[1] := a[n(3:2)]
r[2] := a[n(5:4)]
r[3] := a[n(7:6)]
Template parameter a0 ~ a3: selects the contents of one element location in the destination
operand. ie.
r[0] := a[a0]
r[1] := a[a1]
r[2] := a[a2]
r[3] := a[a3]
9.4.33 permutate16
Vector type: T = vb/ub
Prototype: T permutate(const T& a, const T& mask);
Description: Permutate 16 byte-element in a 128-bit vector.
The return value can be expressed by the following equations:
r0 = (mask0 & 0x80) ? 0 : SELECT(a, mask0 & 0x0f)
r1 = (mask1 & 0x80) ? 0 : SELECT(a, mask1 & 0x0f)