Arithmetic
On this Page
Arithmetic¶
ADD¶
Represents ADD built-ins.
The default values for the vector ADD 64 built-ins in C++ are as follows:
switches = 0
income = {}
predicate = 1
polarity = 0.
Intrinsics Prototype and Arguments
long s_i64_add(long a, long b, int switches, long income, bool predicate, bool polarity) |
ulong s_u64_add(ulong a, ulong b, int switches, ulong income, bool predicate, bool polarity) |
ull32 v_u64_add_b(ull32 a, ull32 b, int switches, ull32 income, bool predicate, bool polarity) |
ull32 v_u64_add_vb(ull32 a, ull32 b, int switches, ull32 income, bool32 predicate, bool polarity) |
a |
The first SRC operand to ADD (SRC1). |
b |
The second SRC operand to ADD (SRC2). |
switches |
Switches of ADD built-in. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the built-in. |
polarity |
True if the polarity of the predicate is inverted. |
Sum of operands a and b.
SUB¶
Represents SUB built-ins.
The default values of vector SUB 64 built-ins for C++ versions are as follows:
switches = 0
income = {}
predicate = 1
polarity = 0.
Intrinsics Prototype and Arguments
long s_i64_sub(long a, long b, int switches, long income, bool predicate, bool polarity) |
ulong s_u64_sub(ulong a, ulong b, int switches, ulong income, bool predicate, bool polarity) |
ull32 v_u64_sub_b(ull32 a, ull32 b, int switches, ull32 income, bool predicate, bool polarity) |
ull32 v_u64_sub_vb(ull32 a, ull32 b, int switches, ull32 income, bool32 predicate, bool polarity) |
a |
The first SRC operand to SUB (SRC1). |
b |
The second SRC operand to SUB (SRC2). |
switches |
Switches of SUB built-ins. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the built-ins. |
polarity |
True if the polarity of the predicate is inverted. |
Sub of operands a and b.
MUL¶
Represents MUL Builtins.
The default values of vector MUL 64 built-ins for C++ versions are as follows:
switches = 0
income = {}
predicate = 1
polarity = 0.
Intrinsics Prototype and Arguments
long s_i64_mul(long a, long b, int switches, long income, bool predicate, bool polarity) |
ulong s_u64_mul(ulong a, ulong b, int switches, ulong income, bool predicate, bool polarity) |
ll32 v_i64_mul_b(ll32 a, ll32 b, int switches, ll32 income, bool predicate, bool polarity) |
ull32 v_u64_mul_b(ull32 a, ull32 b, int switches, ull32 income, bool predicate, bool polarity) |
a |
The first SRC operand to MUL (SRC1). |
b |
The second SRC operand to MUL (SRC2). |
switches |
Switches of MUL built-ins. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the built-ins. |
polarity |
True if the polarity of the predicate is inverted. |
MUL with DOUBLE_AND_ROUND Switch for int64 as Built-in¶
Implements MUL with DOUBLE_AND_ROUND switch for int64 as built-in.
Intrinsics Prototype and Arguments
ll32 v_i64_mul_round_b(ll32 a, ll32 b, int switches, ll32 income, bool predicate, bool polarity) |
ull32 v_u64_mul_round_b(ull32 a, ull32 b, int switches, ull32 income, bool predicate, bool polarity) |
a |
Vector of int64 values -> a : [low][high] |
b |
Vector of int64 values -> b : [low][high] |
switches |
Switches of mul built-in. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the built-in. |
polarity |
True if the polarity of the predicate is inverted. |
MIN¶
Represents MIN Built-ins.
The default values of vector MIN 64 built-ins for C++ versions are as follows:
switches = 0
income = {}
predicate = 1
polarity = 0.
Intrinsics Prototype and Arguments
long s_i64_min(long a, long b, int switches, long income, bool predicate, bool polarity) |
ulong s_u64_min(ulong a, ulong b, int switches, ulong income, bool predicate, bool polarity) |
ull32 v_u64_min_b(ull32 a, ull32 b, int switches, ull32 income, bool predicate, bool polarity) |
a |
The first SRC operand to MIN (SRC1). |
b |
The second SRC operand to MIN (SRC2). |
switches |
Switches of MIN built-ins. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the built-ins. |
polarity |
True if the polarity of the predicate is inverted. |
MAX¶
Represents MAX built-ins.
The default values of vector MAX 64 built-ins for C++ versions are as follows:
switches = 0
income = {}
predicate = 1
polarity = 0.
Intrinsics Prototype and Arguments
long s_i64_max(long a, long b, int switches, long income, bool predicate, bool polarity) |
ulong s_u64_max(ulong a, ulong b, int switches, ulong income, bool predicate, bool polarity) |
ull32 v_u64_max_b(ull32 a, ull32 b, int switches, ull32 income, bool predicate, bool polarity) |
a |
The first SRC operand to MAX (SRC1). |
b |
The second SRC operand to MAX (SRC2). |
switches |
Switches of MAX built-ins. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the built-in. |
polarity |
True if the polarity of the predicate is inverted. |
ABS¶
Represents ABS built-ins - Calculates the absolute value.
The default values of ABS 64 built-ins for C++ versions are as follows:
switches = 0
income = {}
predicate = 1
polarity = 0.
Intrinsics Prototype and Arguments
long s_i64_abs(long a, int switches, long income, bool predicate, bool polarity) |
ull32 v_u64_abs_b(ull32 a, int switches, ull32 income, bool predicate, bool polarity) |
a |
The argument (SRC1). |
switches |
Switches of ABS built-ins. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the built-ins. |
polarity |
True if the polarity of the predicate is inverted. |
Absolute value of operand a.
SHIFT LEFT¶
Represents SHL built-ins.
The default values of vector SHL 64 built-ins for C++ versions are as follows:
switches = 0
income = {}
predicate = 1
polarity = 0.
Intrinsics Prototype and Arguments
ull32 v_u64_shl_b(ull32 a, unsigned int amount) |
ull32 v_u64_shl_vb(ull32 a, ull32 amount) |
a |
The value to shift (SRC1). |
amount |
The number of bits to shift left (SRC2). |
SHIFT RIGHT¶
Represents SHR built-ins.
The default values of vector SHR 64 built-ins for C++ versions are as follows:
switches = 0
income = {}
predicate = 1
polarity = 0.
Intrinsics Prototype and Arguments
ull32 v_u64_shr_b(ull32 a, unsigned int amount) |
ull32 v_u64_shr_vb(ull32 a, ull32 amount) |
a |
The value to shift (SRC1). |
amount |
The number of bits to shift right (SRC2). |
NEG¶
Represents NEG built-ins.
The default values of vector NEG 64 built-ins for C++ versions are as follows:
switches = 0
income = {}
predicate = 1
polarity = 0.
Intrinsics Prototype and Arguments
ll32 v_i64_neg_b(ll32 a, int switches, ll32 income, bool predicate, bool polarity) |
a |
The first SRC operand to NEG (SRC1). |
switches |
Switches of NEG built-ins. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the built-ins. |
polarity |
True if the polarity of the predicate is inverted. |
Compare Equal¶
Represents CMP_EQ built-ins.
Intrinsics Prototype and Arguments
bool s_i64_cmp_eq(long a, long b, int switches, bool income, bool predicate, bool polarity) |
bool s_u64_cmp_eq(ulong a, ulong b, int switches, bool income, bool predicate, bool polarity) |
a |
The first SRC operand (SRC1). |
b |
The second SRC operand (SRC2). |
switches |
Switches of the built-in. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the built-in. |
polarity |
True if polarity of the predicate is inverted. |
Boolean result of comparison - a==b (scalar or vector).
Compare Less Equal¶
Represents CMP_LEQ built-in.
Intrinsics Prototype and Arguments
bool s_i64_cmp_leq(long a, long b, int switches, bool income, bool predicate, bool polarity) |
bool s_u64_cmp_leq(ulong a, ulong b, int switches, bool income, bool predicate, bool polarity) |
a |
The first SRC operand (SRC1). |
b |
The second SRC operand (SRC2). |
switches |
Switches of the built-ins. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the built-in. |
polarity |
True if the polarity of the predicate is inverted. |
Boolean result of comparison - a<=b (scalar or vector).
Compare Greater Equal¶
Represents CMP_GEQ built-ins.
Intrinsics Prototype and Arguments
bool s_u64_cmp_geq(ulong a, ulong b, int switches, bool income, bool predicate, bool polarity) |
bool s_i64_cmp_geq(long a, long b, int switches, bool income, bool predicate, bool polarity) |
a |
The first SRC operand (SRC1). |
b |
The second SRC operand (SRC2). |
switches |
Switches of the built-ins. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the built-in. |
polarity |
True if the polarity of the predicate is inverted. |
Boolean result of comparison - a>=b (scalar or vector).
Compare Greater¶
Represents CMP_GRT built-ins.
Intrinsics Prototype and Arguments
bool s_i64_cmp_grt(long a, long b, int switches, bool income, bool predicate, bool polarity) |
bool s_u64_cmp_grt(ulong a, ulong b, int switches, bool income, bool predicate, bool polarity) |
a |
The first SRC operand (SRC1). |
b |
The second SRC operand (SRC2). |
switches |
Switches of the built-ins. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the built-in. |
polarity |
True if the polarity of the predicate is inverted. |
Boolean result of comparison - a>b (scalar or vector).
mul with DOUBLE_AND_ROUND switch for int64 as built -in¶
Represents CMP_LESS built-in.
Intrinsics Prototype and Arguments
bool s_u64_cmp_less(ulong a, ulong b, int switches, bool income, bool predicate, bool polarity) |
bool s_i64_cmp_less(long a, long b, int switches, bool income, bool predicate, bool polarity) |
a |
The first SRC operand (SRC1). |
b |
The second SRC operand (SRC2). |
switches |
Switches of the built-ins. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the built-in. |
polarity |
True if the polarity of the predicate is inverted. |
Boolean result of comparison - a<b (scalar or vector).
Compare Not Equal¶
Represents CMP_NEQ built-in.
Intrinsics Prototype and Arguments
bool s_i64_cmp_neq(long a, long b, int switches, bool income, bool predicate, bool polarity) |
bool s_u64_cmp_neq(ulong a, ulong b, int switches, bool income, bool predicate, bool polarity) |
a |
The first SRC operand (SRC1). |
b |
The second SRC operand (SRC2). |
switches |
Switches of the built-ins. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the built-in. |
polarity |
True if the polarity of the predicate is inverted. |
Boolean result of comparison - a!=b (scalar or vector).
XOR¶
Represents XOR built-in.
The default values of XOR 64 built-ins for C++ versions are as follows:
switches = 0
income = {}
predicate = 1
polarity = 0.
Intrinsics Prototype and Arguments
long s_i64_xor(long a, long b, int switches, long income, bool predicate, bool polarity) |
a |
The first SRC operand to XOR (SRC1). |
b |
The second SRC operand to XOR (SRC2). |
switches |
Switches of XOR built-ins. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the built-in. |
polarity |
True if the polarity of the predicate is inverted. |
OR¶
Represents OR built-in.
The default values of OR 64 built-ins for C++ versions are as follows:
switches = 0
income = {}
predicate = 1
polarity = 0.
Intrinsics Prototype and Arguments
long s_i64_or(long a, long b, int switches, long income, bool predicate, bool polarity) |
a |
The first SRC operand to OR (SRC1). |
b |
The second SRC operand to OR (SRC2). |
switches |
Switches of OR built-ins. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the built-in. |
polarity |
True if the polarity of the predicate is inverted. |
AND¶
Represents AND built-in - Performs bitwise AND.
The default values of AND 64 built-ins for C++ versions are as follows:
switches = 0
income = {}
predicate = 1
polarity = 0.
Intrinsics Prototype and Arguments
long s_i64_and(long a, long b, int switches, long income, bool predicate, bool polarity) |
a |
The first SRC operand to AND (SRC1). |
b |
The second SRC operand to AND (SRC2). |
switches |
Switches of AND built-ins. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the built-in. |
polarity |
True if the polarity of the predicate is inverted. |
The result of AND operation between a and b.
NOT¶
Represents NOT built-in.
Default values of ‘not’ 64 built-ins for C++ versions are as follows:
switches = 0
income = {}
predicate = 1
polarity = 0.
Intrinsics Prototype and Arguments
long s_i64_not(long a, int switches, long income, bool predicate, bool polarity) |
a |
The argument (SRC1). |
switches |
Switches of NOT built-ins. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the built-in. |
polarity |
True if the polarity of the predicate is inverted. |
GRT¶
Represents GRT built-in.
The default values of vector GRT 64 built-ins for C++ versions are as follows:
switches = 0
income = {}
predicate = 1
polarity = 0.
Intrinsics Prototype and Arguments
bool32 v_u64_grt_b(ull32 a, ull32 b, int switches, bool32 income, bool predicate, bool polarity) |
a |
The first SRC operand to comp (SRC1). |
b |
The second SRC operand to comp (SRC2). |
switches |
Switches of grt built-in. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the built-in. |
polarity |
True if the polarity of the predicate is inverted. |
Boolean result of great operations of operands a and b.
LESS¶
Represents LESS built-in.
The default values of vector LESS 64 built-ins for C++ versions are as follows:
switches = 0
income = {}
predicate = 1
polarity = 0.
Intrinsics Prototype and Arguments
bool32 v_u64_less_b(ull32 a, ull32 b, int switches, bool32 income, bool predicate, bool polarity) |
a |
The first SRC operand to comp (SRC1). |
b |
The second SRC operand to comp (SRC2). |
switches |
Switches of less built-in. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the built-in. |
polarity |
True if the polarity of the predicate is inverted. |
Boolean result of less operations of operands a and b.
LEQ¶
Represents LEQ built-in.
The default values of vector LEQ 64 built-ins for C++ versions are as follows:
switches = 0
income = {}
predicate = 1
polarity = 0.
Intrinsics Prototype and Arguments
bool32 v_u64_leq_b(ull32 a, ull32 b, int switches, bool32 income, bool predicate, bool polarity) |
a |
The first SRC operand to comp (SRC1). |
b |
The second SRC operand to comp (SRC2). |
switches |
Switches of leq built-in. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the built-in. |
polarity |
True if the polarity of the predicate is inverted. |
Boolean result of leq operations of operands a and b.
GEQ¶
Represents GEQ built-in.
The default values of vector GEQ 64 built-ins for C++ versions are as follows:
switches = 0
income = {}
predicate = 1
polarity = 0.
Intrinsics Prototype and Arguments
bool32 v_u64_geq_b(ull32 a, ull32 b, int switches, bool32 income, bool predicate, bool polarity) |
a |
The first SRC operand to comp (SRC1). |
b |
The second SRC operand to comp (SRC2). |
switches |
Switches of geq built-in. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the built-in. |
polarity |
True if the polarity of the predicate is inverted. |
Boolean result of geq operations of operands a and b.
EQ¶
Represents GRT built-in.
The default values of vector EQ 64 built-ins for C++ versions are as follows:
switches = 0
income = {}
predicate = 1
polarity = 0.
Intrinsics Prototype and Arguments
bool32 v_u64_eq_b(ull32 a, ull32 b, int switches, bool32 income, bool predicate, bool polarity) |
a |
The first SRC operand to comp (SRC1). |
b |
The second SRC operand to comp (SRC2). |
switches |
Switches of eq built-in. |
income |
This value is returned if the predicate is false. |
predicate |
Predicate value for the built-in. |
polarity |
True if the polarity of the predicate is inverted. |
Boolean result of eq operations of operands a and b.
CONSTANT¶
Represents CONST built-in.
Intrinsics Prototype and Arguments
ull32 v_u64_const_b(ull32 a, unsigned int high, unsigned int low) |
a |
The first SRC operand to const. |
high |
The second SRC operand to const. |
low |
The second SRC operand to const. |