Pack/Unpack
On this Page
Pack/Unpack¶
Pack¶
Represents PACK instruction.
Intrinsics Prototype and Arguments
bfloat128 v_bf16_pack_b(bfloat128 a, int switches, bfloat128 income, bool predicate=1, bool polarity=0) |
bfloat128 v_bf16_pack_vb(bfloat128 a, int switches, bfloat128 income, bool128 predicate, bool polarity=0) |
short128 v_i16_pack_b(short128 a, int switches, short128 income, bool predicate=1, bool polarity=0) |
short128 v_i16_pack_vb(short128 a, int switches, short128 income, bool128 predicate, bool polarity=0) |
ushort128 v_u16_pack_b(ushort128 a, int switches, ushort128 income, bool predicate=1, bool polarity=0) |
ushort128 v_u16_pack_vb(ushort128 a, int switches, ushort128 income, bool128 predicate, bool polarity=0) |
char256 v_i8_pack_b(char256 a, int switches, char256 income, bool predicate=1, bool polarity=0) |
char256 v_i8_pack_vb(char256 a, int switches, char256 income, bool256 predicate, bool polarity=0) |
uchar256 v_u8_pack_b(uchar256 a, int switches, uchar256 income, bool predicate=1, bool polarity=0) |
uchar256 v_u8_pack_vb(uchar256 a, int switches, uchar256 income, bool256 predicate, bool polarity=0) |
a |
Value in which population is counted (SRC1). |
switches |
Switches of the instructions. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Allowed switches are:
[GROUP_SOURCE] - Indicates which of the groups in the dual group is to be used as a source.
SW_GROUP_0
SW_GROUP_1
[ELEMENT_STRIDE]
SW_STRIDE_2 - Every second element is valid.
SW_STRIDE_4 - Every forth element is valid.
Packed value.
Unpack¶
Represents UNPACK instruction.
Intrinsics Prototype and Arguments
bfloat128 v_bf16_unpack_b(bfloat128 a, int switches, bfloat128 income, bool predicate=1, bool polarity=0) |
bfloat128 v_bf16_unpack_vb(bfloat128 a, int switches, bfloat128 income, bool128 predicate, bool polarity=0) |
short128 v_i16_unpack_b(short128 a, int switches, short128 income, bool predicate=1, bool polarity=0) |
short128 v_i16_unpack_vb(short128 a, int switches, short128 income, bool128 predicate, bool polarity=0) |
ushort128 v_u16_unpack_b(ushort128 a, int switches, ushort128 income, bool predicate=1, bool polarity=0) |
ushort128 v_u16_unpack_vb(ushort128 a, int switches, ushort128 income, bool128 predicate, bool polarity=0) |
char256 v_i8_unpack_b(char256 a, int switches, char256 income, bool predicate=1, bool polarity=0) |
char256 v_i8_unpack_vb(char256 a, int switches, char256 income, bool256 predicate, bool polarity=0) |
uchar256 v_u8_unpack_b(uchar256 a, int switches, uchar256 income, bool predicate=1, bool polarity=0) |
uchar256 v_u8_unpack_vb(uchar256 a, int switches, uchar256 income, bool256 predicate, bool polarity=0) |
a |
Value to be transformed (SRC1). |
switches |
Switches of the instruction. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Allowed switches are:
[GROUP_SOURCE]
SW_GROUP_0
SW_GROUP_1
[ELEMENT_STRIDE]
SW_STRIDE_2 - Every second element is valid.
SW_STRIDE_4 - Every forth element is valid.
[GROUP_HALF]
SW_GROUP_HALF_0 - The lower half of the input group is taken.
SW_GROUP_HALF_1 - The upper half of the input group is taken.
Unpacked value.