Data types

Four basic data type are supported these are 32/64-bit integers and 32/64-bit reals. All these basic data types are also supported in vector form. Vector can be 2, 3, 4, 8 and 16 in length. In table below you can see list of all supported data types.

Basic Data Types
int32() int32x2() int32x3() int32x4() int32x8() int32x16()
int64() int64x2() int64x3() int64x4() int64x8()
float32() float32x2() float32x3() float32x4() float32x8() float32x16()
float64() float64x2() float64x3() float64x4() float64x8()

int32

Numberes -2,147,483,648 through 2,147,483,647 are represented in two’s complement form. In table below we see all supported operation for this type.

operation result  
int32(float64) int32 conversion from float64 to int32
int32(float32) int32 conversion from float32 to int32
int32(int64) int32 conversion from int64 to int32
int32 * int32 int32 multiplication
int32 / int32 int32 division
int32 % int32 int32 modulus
int32 + int32 int32 addition
int32 - int32 int32 subtraction
int32 & int32 int32 bitwise and
int32 ^ int32 int32 bitwise xor
int32 | int32 int32 bitwise or
int32 << int32 int32 shift left
int32 >> int32 int32 shift right
res = int32()                      # res = 0
res = int32(2)                     # res = 2
res = int32(2) + int32(3)          # res = 5
res = int32(3) << 1                # res = 6
res = int32(float64(4.5))          # res = 4

int32x2

Vector form of int32 type that has length of 2. In table below we see all supported operation for this type.

operation result  
int32x2() int32x2 construct int32x2, all components are set to zero
int32x2(int32) int32x2 construct int32x2, all components are same
int32x2(int32, int32) int32x2 construct int32x2
int32x2(float32x2) int32x2 conversion from float32x2 to int32x2
int32x2(int64x2) int32x2 conversion from int64x2 to int32x2
int32x2(float64x2) int32x2 conversion from float64x2 to int32x2
int32x2 * int32x2 int32x2 component-wise multiplication
int32x2 + int32x2 int32x2 component-wise addition
int32x2 - int32x2 int32x2 component-wise subtraction
int32x2 & int32x2 int32x2 bitwise and
int32x2 ^ int32x2 int32x2 bitwise xor
int32x2 | int32x2 int32x2 bitwise or
int32x2 == int32x2 bitmask component-wise comparison
int32x2 > int32x2 bitmask component-wise comparison
int32x2 << const int32x2 shift left
int32x2 >> const int32x2 shift right
res = int32x2()                      # res = 0, 0
res = int32x2(4)                     # res = 4, 4
res = int32x2(-5, 8)                 # res = -5, 8
res = int32x2(2, 3) << 1             # res = 4, 6
res = int32x2(float64x2(2.3, 4.5))   # res = 2, 4
bitmask = int32x2(1, 2) == int32x2(2, 2) # type of bitmask is instruction dependent (SSE, AVX, AVX-512)
# bitmask is used in select built-in function
res = select(int32x2(4), int32x2(5), bitmask) # res = 5, 4

int32x3

Vector form of int32 type that has length of 3. In table below we see all supported operation for this type.

operation result  
int32x3() int32x3 construct int32x3, all components are set to zero
int32x3(int32) int32x3 construct int32x3, all components are same
int32x3(int32, int32, int32) int32x3 construct int32x3
int32x3(float32x3) int32x3 conversion from float32x3 to int32x3
int32x3(int64x3) int32x3 conversion from int64x3 to int32x3
int32x3(float64x3) int32x3 conversion from float64x3 to int32x3
int32x3 * int32x3 int32x3 component-wise multiplication
int32x3 + int32x3 int32x3 component-wise addition
int32x3 - int32x3 int32x3 component-wise subtraction
int32x3 & int32x3 int32x3 bitwise and
int32x3 ^ int32x3 int32x3 bitwise xor
int32x3 | int32x3 int32x3 bitwise or
int32x3 == int32x3 bitmask component-wise comparison
int32x3 > int32x3 bitmask component-wise comparison
int32x3 << const int32x3 shift left
int32x3 >> const int32x3 shift right
res = int32x3()                      # res = 0, 0, 0
res = int32x3(4)                     # res = 4, 4, 4
res = int32x3(-5, 8, 4)              # res = -5, 8, 4
res = int32x3(4, 5, 6) << 1          # res = 8, 10, 12
res = int32x3(float64x3(2.3, 4.5, -2.1))   # res = 2, 4, -2
bitmask = int32x3(1, 2, -1) == int32x3(2, 2, -1)     # type of bitmask is instruction dependent (SSE, AVX, AVX-512)
# bitmask is used in select built-in function
res = select(int32x3(4), int32x3(5), bitmask)        # res = 5, 4, 4

int32x4

Vector form of int32 type that has length of 4. In table below we see all supported operation for this type.

operation result  
int32x4() int32x4 construct int32x4, all components are set to zero
int32x4(int32) int32x4 construct int32x4, all components are same
int32x4(int32, int32, int32, int32) int32x4 construct int32x4
int32x4(int32x2, int32x2) int32x4 construct int32x4
int32x4(float32x4) int32x4 conversion from float32x4 to int32x4
int32x4(int64x4) int32x4 conversion from int64x4 to int32x4
int32x4(float64x4) int32x4 conversion from float64x4 to int32x4
int32x4 * int32x4 int32x4 component-wise multiplication
int32x4 + int32x4 int32x4 component-wise addition
int32x4 - int32x4 int32x4 component-wise subtraction
int32x4 & int32x4 int32x4 bitwise and
int32x4 ^ int32x4 int32x4 bitwise xor
int32x4 | int32x4 int32x4 bitwise or
int32x4 == int32x4 bitmask component-wise comparison
int32x4 > int32x4 bitmask component-wise comparison
int32x4 << const int32x4 shift left
int32x4 >> const int32x4 shift right
res = int32x4()                      # res = 0, 0, 0, 0
res = int32x4(4)                     # res = 4, 4, 4, 4
res = int32x4(-5, 8, 4, 1)           # res = -5, 8, 4, 1
p1 = 1
p2 = -8
p3 = float64(1.4)
res = int32x4(p1, p2, int32(p3), -7) # res = 1, -8, 1, -7
res = int32x4(4, 5, 6, 7) << 1       # res = 8, 10, 12, 14
res = int32x4(float64x4(2.3, 4.5, -2.1, 3.3))   # res = 2, 4, -2, 3
bitmask = int32x4(1, 2, -1, 0) == int32x4(2, 2, -1, 4)   # type of bitmask is instruction dependent (SSE, AVX, AVX-512)
# bitmask is used in select built-in function
res = select(int32x4(4), int32x4(5), bitmask)        # res = 5, 4, 4, 5
res = int32x4(int32x2(1, 2), int32x2(-3, -4))        # res = 1, 2, -3, -4

int32x8

Vector form of int32 type that has length of 8. In table below we see all supported operation for this type.

operation result  
int32x8() int32x8 construct int32x8, all components are set to zero
int32x8(int32) int32x8 construct int32x8, all components are same
int32x8(c1, c2, c3, c4, c5, c6, c7, c8) int32x8 construct int32x8, all components are constants
int32x8(int32x4, int32x4) int32x8 construct int32x8
int32x8(float32x8) int32x8 conversion from float32x8 to int32x8
int32x8(int64x8) int32x8 conversion from int64x8 to int32x8
int32x8(float64x8) int32x8 conversion from float64x8 to int32x8
int32x8 * int32x8 int32x8 component-wise multiplication
int32x8 + int32x8 int32x8 component-wise addition
int32x8 - int32x8 int32x8 component-wise subtraction
int32x8 & int32x8 int32x8 bitwise and
int32x8 ^ int32x8 int32x8 bitwise xor
int32x8 | int32x8 int32x8 bitwise or
int32x8 == int32x8 bitmask component-wise comparison
int32x8 > int32x8 bitmask component-wise comparison
int32x8 << const int32x8 shift left
int32x8 >> const int32x8 shift right
res = int32x8()                        # res = 0, 0, 0, 0, 0, 0, 0, 0
res = int32x8(4)                       # res = 4, 4, 4, 4, 4, 4, 4, 4
# for 8 argument form it is required that all arguments are integer constants
res = int32x8(-5, 8, 4, 1, 2, 2, 1, 3) # res = -5, 8, 4, 1, 2, 2, 1, 3
res = int32x8(4, 5, 6, 7, 8, 9, 10, 12) << 1    # res = 8, 10, 12, 14, 16, 18, 20, 24
res = int32x8(float64x8(2.3, 4.5, -2.1, 3.3, 0.3, 5.2, 4, 7))   # res = 2, 4, -2, 3, 0, 5, 4, 7
bitmask = int32x8(1, 2, -1, 0, 2, 2, 1, 1) == int32x8(2, 2, -1, 4, 2, 1, 2, 1)   # type of bitmask is instruction dependent (SSE, AVX, AVX-512)
# bitmask is used in select built-in function
res = select(int32x8(4), int32x8(5), bitmask)  # res = 5, 4, 4, 5, 4, 5, 5, 4
res = int32x8(int32x4(1, 2, 0, 1), int32x4(-3, -4, 0, 0)) # res = 1, 2, 0, 1, -3, -4, 0, 0

int32x16

Vector form of int32 type that has length of 16. In table below we see all supported operation for this type.

operation result  
int32x16() int32x16 construct int32x16, all components are set to zero
int32x16(int32) int32x16 construct int32x16, all components are same
int32x16(c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16) int32x16 construct int32x16, all components are constants
int32x16(int32x8, int32x8) int32x16 construct int32x16
int32x16(float32x16) int32x16 conversion from float32x16 to int32x16
int32x16 * int32x16 int32x16 component-wise multiplication
int32x16 + int32x16 int32x16 component-wise addition
int32x16 - int32x16 int32x16 component-wise subtraction
int32x16 & int32x16 int32x16 bitwise and
int32x16 ^ int32x16 int32x16 bitwise xor
int32x16 | int32x16 int32x16 bitwise or
int32x16 == int32x16 bitmask component-wise comparison
int32x16 > int32x16 bitmask component-wise comparison
int32x16 << const int32x16 shift left
int32x16 >> const int32x16 shift right
res = int32x16()                        # res = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
res = int32x16(4)                       # res = 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
# for 16 argument form it is required that all arguments are integer constants
res = int32x16(-5, 8, 4, 1, 2, 2, 1, 3, 1, 1, 1, 1, 2, 2, 2, 2) # res = -5, 8, 4, 1, 2, 2, 1, 3, 1, 1, 1, 1, 2, 2, 2, 2
res = int32x16(float32x16(2.3, 4.5, -2.1, 3.3, 0.3, 5.2, 4, 7, 2, 2, 2, 2, 3, 3, 3, 3))   # res = 2, 4, -2, 3, 0, 5, 4, 7, 2, 2, 2, 2, 3, 3, 3, 3
res = int32x16(int32x8(1, 2, 0, 1, 3, 3, 3, 3), int32x8(-3, -4, 0, 0, 1, 2, 1, 2)) # res = 1, 2, 0, 1, 3, 3, 3, 3, -3, -4, 0, 0, 1, 2, 1, 2

int64

Numberes -2,147,483,648 through 2,147,483,647 are represented in two’s complement form. In table below we see all supported operation for this type.

operation result  
int64(float64) int64 conversion from float64 to int64
int64(float32) int64 conversion from float32 to int64
int64(int32) int64 conversion from int32 to int64
int64 * int64 int64 multiplication
int64 / int64 int64 division
int64 % int64 int64 modulus
int64 + int64 int64 addition
int64 - int64 int64 subtraction
int64 & int64 int64 bitwise and
int64 ^ int64 int64 bitwise xor
int64 | int64 int64 bitwise or
int64 << int64 int64 shift left
int64 >> int64 int64 shift right
res = int64()                      # res = 0
res = int64(2)                     # res = 2
res = int64(2) + int64(3)          # res = 5
res = int64(3) << 1                # res = 6
res = int64(float64(4.5))          # res = 4

int64x2

Vector form of int64 type that has length of 2. In table below we see all supported operation for this type.

operation result  
int64x2() int64x2 construct int64x2, all components are set to zero
int64x2(int64) int64x2 construct int64x2, all components are same
int64x2(int64, int64) int64x2 construct int64x2
int64x2(int32x2) int64x2 conversion from int32x2 to int64x2
int64x2 + int64x2 int64x2 component-wise addition
int64x2 - int64x2 int64x2 component-wise subtraction
int64x2 & int64x2 int64x2 bitwise and
int64x2 ^ int64x2 int64x2 bitwise xor
int64x2 | int64x2 int64x2 bitwise or
int64x2 == int64x2 bitmask component-wise comparison
int64x2 > int64x2 bitmask component-wise comparison
int64x2 << const int64x2 shift left
res = int64x2()                      # res = 0, 0
res = int64x2(int64(4))              # res = 4, 4
res = int64x2(-5, 8)                 # res = -5, 8
res = int64x2(2, 3) << 1             # res = 4, 6
res = int64x2(2, 1) + int64x2(1, 1)  # res = 3, 2
bitmask = int64x2(1, 2) == int64x2(2, 2) # type of bitmask is instruction dependent (SSE, AVX, AVX-512)
# bitmask is used in select built-in function
res = select(int64x2(4), int64x2(5), bitmask) # res = 5, 4

int64x3

Vector form of int64 type that has length of 3. In table below we see all supported operation for this type.

operation result  
int64x3() int64x3 construct int64x3, all components are set to zero
int64x3(int64) int64x3 construct int64x3, all components are same
int64x3(int64, int64, int64) int64x3 construct int64x3
int64x3(int32x3) int64x3 conversion from int32x3 to int64x3
int64x3 + int64x3 int64x3 component-wise addition
int64x3 - int64x3 int64x3 component-wise subtraction
int64x3 & int64x3 int64x3 bitwise and
int64x3 ^ int64x3 int64x3 bitwise xor
int64x3 | int64x3 int64x3 bitwise or
int64x3 == int64x3 bitmask component-wise comparison
int64x3 > int64x3 bitmask component-wise comparison
int64x3 << const int64x3 shift left
res = int64x3()                      # res = 0, 0, 0
res = int64x3(int64(4))              # res = 4, 4, 4
res = int64x3(-5, 8, 2)              # res = -5, 8, 2
res = int64x3(2, 3, 4) << 1          # res = 4, 6, 8
res = int64x3(2, 1, 5) + int64x3(1, 1, 5)  # res = 3, 2, 10
bitmask = int64x3(1, 2, 3) == int64x3(2, 2, 4) # type of bitmask is instruction dependent (SSE, AVX, AVX-512)
# bitmask is used in select built-in function
res = select(int64x3(4), int64x3(5), bitmask) # res = 5, 4, 5

int64x4

Vector form of int64 type that has length of 4. In table below we see all supported operation for this type.

operation result  
int64x4() int64x4 construct int64x3, all components are set to zero
int64x4(int64) int64x4 construct int64x3, all components are same
int64x4(int64, int64, int64, int64) int64x4 construct int64x4
int64x4(int64x2, int64x2) int64x4 construct int64x4
int64x4(int32x4) int64x4 conversion from int32x4 to int64x4
int64x4 + int64x4 int64x4 component-wise addition
int64x4 - int64x4 int64x4 component-wise subtraction
int64x4 & int64x4 int64x4 bitwise and
int64x4 ^ int64x4 int64x4 bitwise xor
int64x4 | int64x4 int64x4 bitwise or
int64x4 == int64x4 bitmask component-wise comparison
int64x4 > int64x4 bitmask component-wise comparison
int64x4 << const int64x4 shift left
res = int64x4()                      # res = 0, 0, 0, 0
res = int64x4(int64(4))              # res = 4, 4, 4, 4
res = int64x4(-5, 8, 2, 1)           # res = -5, 8, 2, 1
res = int64x4(2, 3, 4, 2) << 1       # res = 4, 6, 8, 4
res = int64x4(2, 1, 5, -2) + int64x4(1, 1, 5, 3)  # res = 3, 2, 10, 1
bitmask = int64x4(1, 2, 3, 3) == int64x4(2, 2, 4, 3) # type of bitmask is instruction dependent (SSE, AVX, AVX-512)
# bitmask is used in select built-in function
res = select(int64x4(4), int64x4(5), bitmask) # res = 5, 4, 5, 4

int64x8

Vector form of int64 type that has length of 8. In table below we see all supported operation for this type.

operation result  
int64x8() int64x8 construct int64x8, all components are set to zero
int64x8(int64) int64x8 construct int64x8, all components are same
int64x8(c1, c2, c3, c4, c5, c6, c7, c8) int64x8 construct int64x8, all components are constants
int64x8(int64x4, int64x4) int64x8 construct int64x8
int64x8(int32x8) int64x8 conversion from int32x8 to int64x8
int64x8 + int64x8 int64x8 component-wise addition
int64x8 - int64x8 int64x8 component-wise subtraction
int64x8 & int64x8 int64x8 bitwise and
int64x8 ^ int64x8 int64x8 bitwise xor
int64x8 | int64x8 int64x8 bitwise or
int64x8 == int64x8 bitmask component-wise comparison
int64x8 > int64x8 bitmask component-wise comparison
int64x8 << const int64x8 shift left
res = int64x8()                             # res = 0, 0, 0, 0, 0, 0, 0, 0
res = int64x8(int64(4))                     # res = 4, 4, 4, 4, 4, 4, 4, 4
res = int64x8(-5, 8, 2, 1, 2, 3, 4, 5)      # res = -5, 8, 2, 1, 2, 3, 4, 5
res = int64x8(2, 3, 4, 2, 2, 3, 4, 5) << 1  # res = 4, 6, 8, 4, 4, 6, 8, 10
res = int64x8(2, 1, 5, -2, 1, 2, 3, 4) + int64x8(1, 1, 5, 3, 1, 2, 3, 4)     # res = 3, 2, 10, 1, 2, 4, 6, 8
bitmask = int64x8(1, 2, 3, 3, 1, 1, 2, 2) == int64x8(2, 2, 4, 3, 1, 2, 1, 2) # type of bitmask is instruction dependent (SSE, AVX, AVX-512)
# bitmask is used in select built-in function
res = select(int64x8(4), int64x8(5), bitmask) # res = 5, 4, 5, 4, 4, 5, 4, 5

float32

operation result  
float32 * float32 float32 multiplication
float32 + float32 float32 addition