IRF
On this Page
IRF¶
Absolute¶
Represents ABS instruction for int5 operands.
Intrinsics Prototype and Arguments
int5 i_i32_abs(int5 a, const int dimmask, const int switches, int5 income, bool predicate=1, bool polarity=0) |
a |
The argument (SRC1). |
dimmask |
Selects IRF lanes participated in the operation. |
switches |
Switches of ABS instructions. |
income |
This value is returned if the predicate is false or when dimmask does not apply. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
IRF of absolute values of argument a.
Add¶
Represents scalar ADD instruction for integer operands in index registers.
Intrinsics Prototype and Arguments
int5 i_i32_add(int5 a, int5 b, const int dimmask, int switches, int5 income, bool predicate=1, bool polarity=0) |
a |
The first SRC operand to ADD (SRC1). |
b |
The second SRC operand to ADD (SRC2). |
dimmask |
Selects IRF lanes participated in the operation. |
switches |
Switches of ADD instructions. |
income |
This value is returned if the predicate is false or when dimmask does not apply. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Result of ADD operation between a and b.
And¶
Represents AND instruction for int5, performs bitwise and.
Intrinsics Prototype and Arguments
int5 i_i32_and(int5 a, int5 b, const int dimmask, int switches, int5 income, bool predicate=1, bool polarity=0) |
a |
The first SRC operand to AND (SRC1). |
b |
The second SRC operand to AND (SRC2). |
dimmask |
Selects IRF lanes participated in the operation. |
switches |
Switches of AND instructions. |
income |
This value is returned if the predicate is false or when dimmask does not apply. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Result of AND operation between a and b.
Max¶
Represents scalar MAX instruction for integer operands in index registers.
Intrinsics Prototype and Arguments
int5 i_i32_max(int5 a, int5 b, const int dimmask, int switches, int5 income, bool predicate=1, bool polarity=0) |
a |
The first SRC operand to MAX (SRC1). |
b |
The second SRC operand to MAX (SRC2). |
dimmask |
Selects IRF lanes participated in the operation. |
switches |
Switches of MAX instructions. |
income |
This value is returned if the predicate is false or when dimmask does not apply. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Result of operation.
Min¶
Represents scalar MIN instruction for integer operands in index registers.
Intrinsics Prototype and Arguments
int5 i_i32_min(int5 a, int5 b, const int dimmask, int switches, int5 income, bool predicate=1, bool polarity=0) |
a |
The first SRC operand to MIN (SRC1). |
b |
The second SRC operand to MIN (SRC2). |
dimmask |
Selects IRF lanes participated in the operation. |
switches |
Switches of MIN instructions. |
income |
TThis value is returned if the predicate is false or when dimmask does not apply. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Result of operation.
Mov¶
Represents MOV instruction for int5 type.
Intrinsics Prototype and Arguments
int5 i_i32_mov(int5 a, int dimmask, int switches, int5 income, bool predicate=1, bool polarity=0) |
a |
Source (SRC1). |
dimmask |
Selects IRF lanes participated in the operation. |
switches |
Instruction switches. |
income |
This value is returned if the predicate is false or when dimmask does not apply. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Result of operation - move a to DEST.
Move IRF dim¶
Represents MOV_IRF_DIM instruction.
Intrinsics Prototype and Arguments
int32_t mov_irf_dim(int5 src, const int8_t dim, int switches, int32_t income={}, bool predicate=1, bool polarity=0) |
src |
The index vector (SRC1). |
dim |
The number of extracted dimension. |
switches |
Instruction switches. |
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. |
Result of operation - move src to DEST.
Mul¶
Represents scalar MUL instruction for integer operands in index registers.
Intrinsics Prototype and Arguments
int5 i_i32_mul(int5 a, int5 b, const int dimmask, int switches, int5 income, bool predicate=1, bool polarity=0) |
a |
The first SRC operand to MUL (SRC1). |
b |
The second SRC operand to MUL (SRC2). |
dimmask |
Selects IRF lanes participated in the operation. |
switches |
Switches of MUL instructions. |
income |
This value is returned if the predicate is false or when dimmask does not apply. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Result of operation.
Not¶
Represents NOT instruction for int5 operands.
Intrinsics Prototype and Arguments
int5 i_i32_not(int5 a, int dimmask, const int switches, int5 income, bool predicate=1, bool polarity=0) |
a |
The argument (SRC1). |
dimmask |
Selects IRF lanes participated in the operation. |
switches |
Switches of NOT instructions. |
income |
This value is returned if the predicate is false or when dimmask does not apply. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Result of operation.
Or¶
Represents OR instruction for int5.
Intrinsics Prototype and Arguments
int5 i_i32_or(int5 a, int5 b, const int dimmask, int switches, int5 income, bool predicate=1, bool polarity=0) |
a |
The first SRC operand to OR (SRC1). |
b |
The second SRC operand to OR (SRC2). |
dimmask |
Selects IRF lanes participated in the operation. |
switches |
Switches of OR instructions. |
income |
This value is returned if the predicate is false or when dimmask does not apply. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Result of operation.
Permute index¶
Represents PRMT_INDX instruction.
Intrinsics Prototype and Arguments
int5 prmt_indx(int5 ndx, int prmt_type, int switches, int5 income={}, bool predicate=1, bool polarity=0) |
ndx |
Source tensor coordinates (SRC1). |
prmt_type |
Permutation type - each 3 bits (X5) represent a src dimension in ndx (SRC2). |
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. |
Tensor coordinates after permutation.
Set index¶
Represents SET_INDX instruction. Assigns a scalar to IRF register lanes.
Intrinsics Prototype and Arguments
int5 set_indx(int value, int5 ndx, const int dimmask, int switches, bool predicate=1, bool polarity=0) |
value |
Value assigned to selected dimensions (SRC1). |
ndx |
This value is returned if the predicate is false. |
dimmask |
Mask of IRF lanes participated in the operation. |
switches |
Switches of the instruction. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Tensor coordinates after assignment.
Shift Right¶
Represents SHR instruction for int5 operands.
Intrinsics Prototype and Arguments
int5 i_i32_shr(int5 a, int5 b, int dimmask, const int switches, int5 income, bool predicate=1, bool polarity=0) |
a |
The value to shift (SRC1). |
b |
The number of bits to shift right (SRC2). |
dimmask |
Selects IRF lanes participated in the operation. |
switches |
Switches of SHR instructions. |
income |
This value is returned if the predicate is false or when dimmask does not apply. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Result of operation.
Subtract¶
Represents SUB instruction for int5.
Intrinsics Prototype and Arguments
int5 i_i32_sub(int5 a, int5 b, const int dimmask, int switches, int5 income, bool predicate=1, bool polarity=0) |
a |
The first SRC operand to SUB (SRC1). |
b |
The second SRC operand to SUB (SRC2). |
dimmask |
Selects IRF lanes participated in the operation. |
switches |
Switches of SUB instructions. |
income |
This value is returned if the predicate is false or when dimmask does not apply. |
predicate |
Predicate value for the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Result of the operation.
Xor¶
Represents scalar XOR instruction for int5.
Intrinsics Prototype and Arguments
int5 i_i32_xor(int5 a, int5 b, const int dimmask, int switches, int5 income, bool predicate=1, bool polarity=0) |
a |
The first SRC operand to XOR (SRC1). |
b |
The second SRC operand to XOR (SRC2). |
dimmask |
Selects IRF lanes participated in the operation. |
switches |
Switches of XOR instructions. |
income |
This value is returned if the predicate is false or when dimmask does not apply. |
predicate |
Predicate value fxor the instruction. |
polarity |
True if polarity of the predicate is inverted. |
Result of operation.