nlib
nn::nlib::simd::I128 Class Reference

The class for integer SIMD computations using128-bit registers (MM0-XMM15 for SSE, and Q0-Q15 for NEON). More...

#include "nn/nlib/simd/SimdInt.h"

Static Public Member Functions

static i128 SetZero () noexcept
 Sets all bits to 0.
 
static i128 SetFull (i128arg dummy) noexcept
 Sets all bits to 1.
 
Loading the Same Value to All Lanes
static i128 SetValue (int8_t v, each_int8_tag) noexcept
 Sets a signed 8-bit integer to sixteen 8-bit lanes.
 
static i128 SetValue (int16_t v, each_int16_tag) noexcept
 Sets a signed 8-bit integer to sixteen 6-bit lanes.
 
static i128 SetValue (int32_t v, each_int32_tag) noexcept
 Sets a signed 32-bit integer to four 32-bit lanes.
 
static i128 SetValue (int64_t v, each_int64_tag) noexcept
 Sets a signed 64-bit integer to two 64-bit lanes.
 
static i128 SetValue (uint8_t v, each_uint8_tag) noexcept
 Sets an unsigned 8-bit integer to sixteen 8-bit lanes.
 
static i128 SetValue (uint16_t v, each_uint16_tag) noexcept
 Sets an unsigned 8-bit integer to sixteen 16-bit lanes.
 
static i128 SetValue (uint32_t v, each_uint32_tag) noexcept
 Sets an unsigned 32-bit integer to four 32-bit lanes.
 
static i128 SetValue (uint64_t v, each_uint64_tag) noexcept
 Sets an unsigned 64-bit integer to two 64-bit lanes.
 
Loading the Value of One Lane to All Lanes
template<size_t N>
static i128 SetValue (i128 value, each_select32_tag) noexcept
 Sets all lanes to the 32-bit value in lane N of the value argument. More...
 
template<size_t N>
static i128 SetValue (i128 value, each_select16_tag) noexcept
 Sets all lanes to the 16-bit value in lane N of the value argument. More...
 
template<size_t N>
static i128 SetValue (i128 value, each_select8_tag) noexcept
 Sets all lanes to the 8-bit value in lane N of the value argument. More...
 
Loading From Memory
static i128 LoadA16 (const void *p) noexcept
 Loads 16 bytes of data from the 16-byte-aligned address p and sets the value. The argument type is either uintptr_t or intptr_t.
 
static i128 LoadA8 (const void *p) noexcept
 Loads 8 bytes of data from the 16-byte-aligned address p and sets the value. The argument type is either uintptr_t or intptr_t.
 
static i128 LoadA4 (const void *p) noexcept
 Loads 4 bytes of data from the 16-byte-aligned address p and sets the value. The argument type is either uintptr_t or intptr_t.
 
static i128 LoadA2 (const void *p) noexcept
 Loads 2 bytes of data from the 16-byte-aligned address p and sets the value. The argument type is either uintptr_t or intptr_t.
 
static i128 LoadA1 (const void *p) noexcept
 Loads 16 bytes of data from the unaligned address p and sets the value. The argument type is either uintptr_t or intptr_t.
 
static i128 LoadLoA8 (const void *p) noexcept
 Loads 8 bytes of data from the 8-byte-aligned address p and sets the data value to the lower 64 bits and 0 to the upper 64 bits. The argument type can be either uintptr_t or intptr_t.
 
static i128 LoadLoA4 (const void *p) noexcept
 Loads 8 bytes of data from the 4-byte-aligned address p and sets the data value to the lower 64 bits and 0 to the upper 64 bits. The argument type can be either uintptr_t or intptr_t.
 
static i128 LoadLoA2 (const void *p) noexcept
 Loads 8 bytes of data from the 2-byte-aligned address p and sets the data value to the lower 64 bits and 0 to the upper 64 bits. The argument type can be either uintptr_t or intptr_t.
 
static i128 LoadLoA1 (const void *p) noexcept
 Loads 8 bytes of data from the unaligned address p and sets the data value to the lower 64 bits and 0 to the upper 64 bits. The argument type can be either uintptr_t or intptr_t.
 
static i128 LoadHiA8 (const void *p) noexcept
 Loads 8 bytes of data from the 8-byte-aligned address p and sets the data value to the upper 64 bits and 0 to the lower 64 bits. The argument type can be either uintptr_t or intptr_t.
 
static i128 LoadHiA4 (const void *p) noexcept
 Loads 8 bytes of data from the 4-byte-aligned address p and sets the data value to the upper 64 bits and 0 to the lower 64 bits. The argument type can be either uintptr_t or intptr_t.
 
static i128 LoadHiA2 (const void *p) noexcept
 Loads 8 bytes of data from the 2-byte-aligned address p and sets the data value to the upper 64 bits and 0 to the lower 64 bits. The argument type can be either uintptr_t or intptr_t.
 
static i128 LoadHiA1 (const void *p) noexcept
 Loads 8 bytes of data from the unaligned address p and sets the data value to the upper 64 bits and 0 to the lower 64 bits. The argument type can be either uintptr_t or intptr_t.
 
Storing to Memory
static void StoreA16 (void *p, i128arg value) noexcept
 Writes the 16 bytes of data of value to the 16-byte-aligned address specified in the p parameter. The argument type is either uintptr_t or intptr_t.
 
static void StoreA8 (void *p, i128arg value) noexcept
 Writes the 8 bytes of data of value to the 16-byte-aligned address specified in the p parameter. The argument type is either uintptr_t or intptr_t.
 
static void StoreA4 (void *p, i128arg value) noexcept
 Writes the 4 bytes of data of value to the 16-byte-aligned address specified in the p parameter. The argument type is either uintptr_t or intptr_t.
 
static void StoreA2 (void *p, i128arg value) noexcept
 Writes the 2 bytes of data of value to the 16-byte-aligned address specified in the p parameter. The argument type is either uintptr_t or intptr_t.
 
static void StoreA1 (void *p, i128arg value) noexcept
 Writes the 16 bytes of data of value to the unaligned address in the p parameter. The argument type is either uintptr_t or intptr_t.
 
static void StoreLoA8 (void *p, i128arg value) noexcept
 Writes the lower 64 bits of value to the 8-byte-aligned address specified in the p parameter. The argument type can be either uintptr_t or intptr_t.
 
static void StoreLoA4 (void *p, i128arg value) noexcept
 Writes the lower 64 bits of value to the 4-byte-aligned address specified in the p parameter. The argument type can be either uintptr_t or intptr_t.
 
static void StoreLoA2 (void *p, i128arg value) noexcept
 Writes the lower 64 bits of value to the 2-byte-aligned address specified in the p parameter. The argument type can be either uintptr_t or intptr_t.
 
static void StoreLoA1 (void *p, i128arg value) noexcept
 Writes the lower 64 bits of value to the unaligned address specified in the p parameter. The argument type can be either uintptr_t or intptr_t.
 
static void StoreHiA8 (void *p, i128arg value) noexcept
 Writes the upper 64 bits of value to the 8-byte-aligned address specified in the p parameter. The argument type can be either uintptr_t or intptr_t.
 
static void StoreHiA4 (void *p, i128arg value) noexcept
 Writes the upper 64 bits of value to the 4-byte-aligned address specified in the p parameter. The argument type can be either uintptr_t or intptr_t.
 
static void StoreHiA2 (void *p, i128arg value) noexcept
 Writes the upper 64 bits of value to the 2-byte-aligned address specified in the p parameter. The argument type can be either uintptr_t or intptr_t.
 
static void StoreHiA1 (void *p, i128arg value) noexcept
 Writes the upper 64 bits of value to the unaligned address specified in the p parameter. The argument type can be either uintptr_t or intptr_t.
 
Getting and Setting Values of Specific Lanes
template<size_t N>
static uint8_t GetUint8FromLane (i128arg value) noexcept
 Gets a 8-bit unsigned integer from lane N of value. More...
 
template<size_t N>
static uint16_t GetUint16FromLane (i128arg value) noexcept
 Gets a 16-bit unsigned integer from lane N of value. More...
 
template<size_t N>
static uint32_t GetUint32FromLane (i128arg value) noexcept
 Gets a 32-bit unsigned integer from lane N of value. More...
 
template<size_t N>
static uint64_t GetUint64FromLane (i128arg value) noexcept
 Gets a 64-bit unsigned integer from lane N of value. More...
 
template<size_t N>
static i128 SetUint8ToLane (i128arg value, uint8_t v) noexcept
 Sets v to the unsigned 8-bit integer from lane N of the value argument. More...
 
template<size_t N>
static i128 SetUint16ToLane (i128arg value, uint16_t v) noexcept
 Sets v to the unsigned 16-bit integer from lane N of the value argument. More...
 
template<size_t N>
static i128 SetUint32ToLane (i128arg value, uint32_t v) noexcept
 Sets v to the unsigned 32-bit integer from lane N of the value argument. More...
 
template<size_t N>
static i128 SetUint64ToLane (i128arg value, uint64_t v) noexcept
 Sets v to the unsigned 64-bit integer from lane N of the value argument. More...
 
Arithmetic Operations
static i128 Add8 (i128arg a, i128arg b) noexcept
 Adds the 8-bit integer values of each lane in the a and b arguments. More...
 
static i128 Add16 (i128arg a, i128arg b) noexcept
 Adds the 16-bit integer values of each lane in the a and b arguments. More...
 
static i128 Add32 (i128arg a, i128arg b) noexcept
 Adds the 32-bit integer values of each lane in the a and b arguments. More...
 
static i128 Add64 (i128arg a, i128arg b) noexcept
 Adds the 64-bit integer values of each lane in the a and b arguments. More...
 
static i128 AddInt8Saturated (i128arg a, i128arg b) noexcept
 Saturated addition of the signed 8-bit integers of each lane in the a and b arguments. More...
 
static i128 AddInt16Saturated (i128arg a, i128arg b) noexcept
 Saturated addition of the signed 16-bit integers of each lane in the a and b arguments. More...
 
static i128 AddUint8Saturated (i128arg a, i128arg b) noexcept
 Saturated addition of the unsigned 8-bit integers of each lane in the a and b arguments. More...
 
static i128 AddUint16Saturated (i128arg a, i128arg b) noexcept
 Saturated addition of the unsigned 16-bit integers of each lane in the a and b arguments. More...
 
static i128 Sub8 (i128arg a, i128arg b) noexcept
 Subtracts the 8-bit integer values in each lane of the b argument from each lane of the a argument. More...
 
static i128 Sub16 (i128arg a, i128arg b) noexcept
 Subtracts the 16-bit integer values in each lane of the b argument from each lane of the a argument. More...
 
static i128 Sub32 (i128arg a, i128arg b) noexcept
 Subtracts the 32-bit integer values in each lane of the b argument from each lane of the a argument. More...
 
static i128 Sub64 (i128arg a, i128arg b) noexcept
 Subtracts the 64-bit integer values in each lane of the b argument from each lane of the a argument. More...
 
static i128 SubInt8Saturated (i128arg a, i128arg b) noexcept
 Saturated subtraction of the signed 8-bit integer value in each lane of the b argument from each lane of the a argument. More...
 
static i128 SubInt16Saturated (i128arg a, i128arg b) noexcept
 Saturated subtraction of the signed 16-bit integer value in each lane of the b argument from each lane of the a argument. More...
 
static i128 SubUint8Saturated (i128arg a, i128arg b) noexcept
 Saturated subtraction of the unsigned 8-bit integer value in each lane of the b argument from each lane of the a argument. More...
 
static i128 SubUint16Saturated (i128arg a, i128arg b) noexcept
 Saturated subtraction of the unsigned 16-bit integer value in each lane of the b argument from each lane of the a argument. More...
 
static i128 PairwiseAdd8 (i128arg a, i128arg b) noexcept
 Horizontal addition of the 8-bit integer value in each lane of the a and b arguments. More...
 
static i128 PairwiseAdd16 (i128arg a, i128arg b) noexcept
 Horizontal addition of the 16-bit integer value in each lane of the a and b arguments. More...
 
static i128 PairwiseAdd32 (i128arg a, i128arg b) noexcept
 Horizontal addition of the 32-bit integer value in each lane of the a and b arguments. More...
 
static i128 Mult16 (i128arg a, i128arg b) noexcept
 Multiplies the 16-bit integer value in each lane of the a and b arguments. More...
 
static i128 MultAdd16 (i128arg a, i128arg b, i128arg c) noexcept
 Multiplies the 16-bit integer value in each lane of the a and b arguments, and adds the 16-bit integer value in each lane of c to the result. More...
 
static i128 MultSub16 (i128arg a, i128arg b, i128arg c) noexcept
 Multiplies the 16-bit integer value in each lane of the a and b arguments, and subtracts the 16-bit integer value in each lane of c from the result. More...
 
static i128 Mult32 (i128arg a, i128arg b) noexcept
 Multiplies the 32-bit integer value in each lane of the a and b arguments. More...
 
static i128 MultAdd32 (i128arg a, i128arg b, i128arg c) noexcept
 Multiplies the 32-bit integer value in each lane of the a and b arguments, and adds the 32-bit integer value in each lane of c to the result. More...
 
static i128 MultSub32 (i128arg a, i128arg b, i128arg c) noexcept
 Multiplies the 32-bit integer value in each lane of the a and b arguments, and subtracts the 32-bit integer value in each lane of c from the result. More...
 
static i128 NegateInt8 (i128arg value) noexcept
 Calculates the negation of the signed 8-bit integer value in each lane of the value argument.
 
static i128 NegateInt16 (i128arg value) noexcept
 Calculates the negation of the signed 16-bit integer value in each lane of the value argument.
 
static i128 NegateInt32 (i128arg value) noexcept
 Calculates the negation of the signed 32-bit integer value in each lane of the value argument.
 
Maximums and Minimums
static i128 MaxInt8 (i128arg a, i128arg b) noexcept
 Sets the larger signed 8-bit integer value of each lane in the a and b arguments. More...
 
static i128 MaxInt16 (i128arg a, i128arg b) noexcept
 Sets the larger signed 16-bit integer value of each lane in the a and b arguments. More...
 
static i128 MaxInt32 (i128arg a, i128arg b) noexcept
 Sets the larger signed 32-bit integer value of each lane in the a and b arguments. More...
 
static i128 MaxUint8 (i128arg a, i128arg b) noexcept
 Sets the larger unsigned 8-bit integer value of each lane in the a and b arguments. More...
 
static i128 MaxUint16 (i128arg a, i128arg b) noexcept
 Sets the larger unsigned 16-bit integer value of each lane in the a and b arguments. More...
 
static i128 MaxUint32 (i128arg a, i128arg b) noexcept
 Sets the larger unsigned 32-bit integer value of each lane in the a and b arguments. More...
 
static i128 MinInt8 (i128arg a, i128arg b) noexcept
 Sets the smaller signed 8-bit integer value of each lane in the a and b arguments. More...
 
static i128 MinInt16 (i128arg a, i128arg b) noexcept
 Sets the smaller signed 16-bit integer value of each lane in the a and b arguments. More...
 
static i128 MinInt32 (i128arg a, i128arg b) noexcept
 Sets the smaller signed 32-bit integer value of each lane in the a and b arguments. More...
 
static i128 MinUint8 (i128arg a, i128arg b) noexcept
 Sets the smaller unsigned 8-bit integer value of each lane in the a and b arguments. More...
 
static i128 MinUint16 (i128arg a, i128arg b) noexcept
 Sets the smaller unsigned 16-bit integer value of each lane in the a and b arguments. More...
 
static i128 MinUint32 (i128arg a, i128arg b) noexcept
 Sets the smaller unsigned 32-bit integer value of each lane in the a and b arguments. More...
 
Absolute Values
static i128 AbsInt8 (i128arg value) noexcept
 Calculates the absolute values for the signed 8-bit integers from each lane of the value argument.
 
static i128 AbsInt16 (i128arg value) noexcept
 Calculates the absolute values for the signed 16-bit integers from each lane of the value argument.
 
static i128 AbsInt32 (i128arg value) noexcept
 Calculates the absolute values for the signed 32-bit integers from each lane of the value argument.
 
static i128 AbsDiffInt8 (i128arg a, i128arg b) noexcept
 Calculates the absolute value of the difference of the signed 8-bit integer values in each lane of the a and b arguments.
 
static i128 AbsDiffInt16 (i128arg a, i128arg b) noexcept
 Calculates the absolute value of the difference of the signed 16-bit integer values in each lane of the a and b arguments.
 
static i128 AbsDiffInt32 (i128arg a, i128arg b) noexcept
 Calculates the absolute value of the difference of the signed 32-bit integer values in each lane of the a and b arguments.
 
Logical Operations
static i128 And (i128arg a, i128arg b) noexcept
 Calculates the bitwise AND of the a and b arguments.
 
static i128 Or (i128arg a, i128arg b) noexcept
 Calculates the bitwise OR of the a and b arguments.
 
static i128 Xor (i128arg a, i128arg b) noexcept
 Calculates the bitwise XOR of the a and b arguments.
 
static i128 Not (i128arg a) noexcept
 Calculates the bitwise NOT of the a argument.
 
static i128 AndNot (i128arg a, i128arg b) noexcept
 Calculates the bitwise NOT of the a argument, and the bitwise AND of the b argument. More...
 
static i128 OrNot (i128arg a, i128arg b) noexcept
 Calculates the bitwise NOT of the a argument, and the bitwise OR of the b argument. More...
 
static i128 Test8 (i128arg a, i128arg b) noexcept
 The same meaning as I128::Not(I128::CmpEqZero8(I128::And(a, b))).
 
static i128 Test16 (i128arg a, i128arg b) noexcept
 The same meaning as I128::Not(I128::CmpEqZero16(I128::And(a, b))).
 
static i128 Test32 (i128arg a, i128arg b) noexcept
 The same meaning as I128::Not(I128::CmpEqZero32(I128::And(a, b))).
 
Comparisons
static i128 CmpEq8 (i128arg a, i128arg b) noexcept
 Compares a and b in units of 8-bit lanes. More...
 
static i128 CmpEq16 (i128arg a, i128arg b) noexcept
 Compares a and b in units of 16-bit lanes. More...
 
static i128 CmpEq32 (i128arg a, i128arg b) noexcept
 Compares a and b in units of 32-bit lanes. More...
 
static i128 CmpEq64 (i128arg a, i128arg b) noexcept
 Compares a and b on a 64-bit lane basis. More...
 
static i128 CmpLtInt8 (i128arg a, i128arg b) noexcept
 Compares a and b as 8-bit signed integers. More...
 
static i128 CmpLtInt16 (i128arg a, i128arg b) noexcept
 Compares a and b as 16-bit signed integers. More...
 
static i128 CmpLtInt32 (i128arg a, i128arg b) noexcept
 Compares a and b as 32-bit signed integers. More...
 
static i128 CmpLtInt64 (i128arg a, i128arg b) noexcept
 Compares a and b as 64-bit signed integers. More...
 
static i128 CmpGtInt8 (i128arg a, i128arg b) noexcept
 Compares a and b as 8-bit signed integers. More...
 
static i128 CmpGtInt16 (i128arg a, i128arg b) noexcept
 Compares a and b as 16-bit signed integers. More...
 
static i128 CmpGtInt32 (i128arg a, i128arg b) noexcept
 Compares a and b as 32-bit signed integers. More...
 
static i128 CmpGtInt64 (i128arg a, i128arg b) noexcept
 Compares a and b as 64-bit signed integers. More...
 
static i128 CmpLtUint8 (i128arg a, i128arg b) noexcept
 Compares a and b as 8-bit unsigned integers. More...
 
static i128 CmpLtUint16 (i128arg a, i128arg b) noexcept
 Compares a and b as 16-bit unsigned integers. More...
 
static i128 CmpLtUint32 (i128arg a, i128arg b) noexcept
 Compares a and b as 32-bit unsigned integers. More...
 
static i128 CmpLtUint64 (i128arg a, i128arg b) noexcept
 Compares a and b as 64-bit unsigned integers. More...
 
static i128 CmpGtUint8 (i128arg a, i128arg b) noexcept
 Compares a and b as 8-bit unsigned integers. More...
 
static i128 CmpGtUint16 (i128arg a, i128arg b) noexcept
 Compares a and b as 16-bit unsigned integers. More...
 
static i128 CmpGtUint32 (i128arg a, i128arg b) noexcept
 Compares a and b as 32-bit unsigned integers. More...
 
static i128 CmpGtUint64 (i128arg a, i128arg b) noexcept
 Compares a and b as 64-bit unsigned integers. More...
 
static i128 CmpLeInt8 (i128arg a, i128arg b) noexcept
 Compares a and b as 8-bit signed integers. More...
 
static i128 CmpLeInt16 (i128arg a, i128arg b) noexcept
 Compares a and b as 16-bit signed integers. More...
 
static i128 CmpLeInt32 (i128arg a, i128arg b) noexcept
 Compares a and b as 32-bit signed integers. More...
 
static i128 CmpLeInt64 (i128arg a, i128arg b) noexcept
 Compares a and b as 64-bit signed integers. More...
 
static i128 CmpGeInt8 (i128arg a, i128arg b) noexcept
 Compares a and b as 8-bit signed integers. More...
 
static i128 CmpGeInt16 (i128arg a, i128arg b) noexcept
 Compares a and b as 16-bit signed integers. More...
 
static i128 CmpGeInt32 (i128arg a, i128arg b) noexcept
 Compares a and b as 32-bit signed integers. More...
 
static i128 CmpGeInt64 (i128arg a, i128arg b) noexcept
 Compares a and b as 64-bit signed integers. More...
 
static i128 CmpLeUint8 (i128arg a, i128arg b) noexcept
 Compares a and b as 8-bit unsigned integers. More...
 
static i128 CmpLeUint16 (i128arg a, i128arg b) noexcept
 Compares a and b as 16-bit unsigned integers. More...
 
static i128 CmpLeUint32 (i128arg a, i128arg b) noexcept
 Compares a and b as 32-bit unsigned integers. More...
 
static i128 CmpLeUint64 (i128arg a, i128arg b) noexcept
 Compares a and b as 64-bit unsigned integers. More...
 
static i128 CmpGeUint8 (i128arg a, i128arg b) noexcept
 Compares a and b as 8-bit unsigned integers. More...
 
static i128 CmpGeUint16 (i128arg a, i128arg b) noexcept
 Compares a and b as 16-bit unsigned integers. More...
 
static i128 CmpGeUint32 (i128arg a, i128arg b) noexcept
 Compares a and b as 32-bit unsigned integers. More...
 
static i128 CmpGeUint64 (i128arg a, i128arg b) noexcept
 Compares a and b as 64-bit unsigned integers. More...
 
static i128 CmpEqZero8 (i128arg value) noexcept
 The same meaning as I128::CmpEq8(value, I128::SetZero()).
 
static i128 CmpEqZero16 (i128arg value) noexcept
 The same meaning as I128::CmpEq16(value, I128::SetZero()).
 
static i128 CmpEqZero32 (i128arg value) noexcept
 The same meaning as I128::CmpEq32(value, I128::SetZero()).
 
static i128 CmpEqZero64 (i128arg value) noexcept
 The same meaning as I128::CmpEq64(value, I128::SetZero()).
 
Bit Shifting on All Lanes
static i128 ShiftLeftLogical8 (i128arg value, int count) noexcept
 Left shifts each 8-bit lane by count digits.
 
static i128 ShiftRightLogical8 (i128arg value, int count) noexcept
 Conducts a right logical shift of each 8-bit lane by count digits.
 
static i128 ShiftRightArithmetic8 (i128arg value, int count) noexcept
 Conducts a right arithmetic shift of each 8-bit lane by count digits.
 
static i128 ShiftLeftLogical16 (i128arg value, int count) noexcept
 Left shifts each 16-bit lane by count digits.
 
static i128 ShiftRightLogical16 (i128arg value, int count) noexcept
 Conducts a right logical shift of each 16-bit lane by count digits.
 
static i128 ShiftRightArithmetic16 (i128arg value, int count) noexcept
 Conducts a right arithmetic shift of each 16-bit lane by count digits.
 
static i128 ShiftLeftLogical32 (i128arg value, int count) noexcept
 Left shifts each 32-bit lane by count digits.
 
static i128 ShiftRightLogical32 (i128arg value, int count) noexcept
 Conducts a right logical shift of each 32-bit lane by count digits.
 
static i128 ShiftRightArithmetic32 (i128arg value, int count) noexcept
 Conducts a right arithmetic shift of each 32-bit lane by count digits.
 
static i128 ShiftLeftLogical64 (i128arg value, int count) noexcept
 Left shifts each 64-bit lane by count digits.
 
static i128 ShiftRightLogical64 (i128arg value, int count) noexcept
 Conducts a right logical shift of each 64-bit lane by count digits.
 
Bit Shifting on All Lanes (Constant Shift)
template<size_t N>
static i128 ShiftLeftLogical8 (i128arg value) noexcept
 Each 8-bit lane is shifted to the left by N bits. More...
 
template<size_t N>
static i128 ShiftRightLogical8 (i128arg value) noexcept
 Each 8-bit lane is shifted to the right by N bits. More...
 
template<size_t N>
static i128 ShiftRightArithmetic8 (i128arg value) noexcept
 Each 8-bit lane is arithmetically shifted to the right by N bits. More...
 
template<size_t N>
static i128 ShiftLeftLogical16 (i128arg value) noexcept
 Each 16-bit lane is shifted to the left by N bits. More...
 
template<size_t N>
static i128 ShiftRightLogical16 (i128arg value) noexcept
 Each 16-bit lane is shifted to the right by N bits. More...
 
template<size_t N>
static i128 ShiftRightArithmetic16 (i128arg value) noexcept
 Each 16-bit lane is arithmetically shifted to the right by N bits. More...
 
template<size_t N>
static i128 ShiftLeftLogical32 (i128arg value) noexcept
 Each 32-bit lane is shifted to the left by N bits. More...
 
template<size_t N>
static i128 ShiftRightLogical32 (i128arg value) noexcept
 Each 32-bit lane is shifted to the right by N bits. More...
 
template<size_t N>
static i128 ShiftRightArithmetic32 (i128arg value) noexcept
 Each 32-bit lane is arithmetically shifted to the right by N bits. More...
 
template<size_t N>
static i128 ShiftLeftLogical64 (i128arg value) noexcept
 Each 64-bit lane is shifted to the left by N bits. More...
 
template<size_t N>
static i128 ShiftRightLogical64 (i128arg value) noexcept
 Each 64-bit lane is shifted to the right by N bits. More...
 
128-bit Wide Shifting and Rotating
template<size_t N>
static i128 ByteShiftLeft (i128arg value) noexcept
 Left-shifts value by an amount of N bytes. Empty lanes are populated with zero. More...
 
template<size_t N>
static i128 ByteShiftRight (i128arg value) noexcept
 Right-shifts value by an amount of N bytes. Empty lanes are populated with zero. More...
 
template<size_t N>
static i128 ByteRotateRight (i128arg value) noexcept
 Rotates value to the right by an amount of N bytes. More...
 
template<size_t N>
static i128 AlignR (i128arg a, i128arg b) noexcept
 Returns the lower 128-bit value after a and b have been right-shifted N bytes to resemble a 256-bit value. More...
 
Changing the Lane Width
static i128 NarrowFrom16To8 (i128arg lo, i128arg hi) noexcept
 Cuts the upper 8 bits off of 16-bit-wide lanes and returns sixteen values as a single 128-bit value. More...
 
static i128 NarrowFrom32To16 (i128arg lo, i128arg hi) noexcept
 Cuts the upper 16 bits off of 32-bit-wide lanes and returns eight values as a single 128-bit value. More...
 
static i128 NarrowFrom64To32 (i128arg lo, i128arg hi) noexcept
 Cuts the upper 32 bits off of 64-bit-wide lanes and returns four values as a single 128-bit value. More...
 
static i128 ConvertFromUint16ToUint8Saturated (i128arg lo, i128arg hi) noexcept
 Converts sixteen 16-bit unsigned integers into sixteen 8-bit unsigned integers. Out of range values are clamped. More...
 
static i128 ConvertFromInt16ToInt8Saturated (i128arg lo, i128arg hi) noexcept
 Converts sixteen 16-bit signed integers into sixteen 8-bit signed integers. Out of range values are clamped. More...
 
static i128 ConvertFromUint32ToUint16Saturated (i128arg lo, i128arg hi) noexcept
 Converts eight 32-bit unsigned integers into eight 16-bit unsigned integers. Out of range values are clamped. More...
 
static i128 ConvertFromInt32ToInt16Saturated (i128arg lo, i128arg hi) noexcept
 Converts eight 32-bit signed integers into eight 16-bit signed integers. Out of range values are clamped. More...
 
static i128 ConvertFromInt8ToInt16Lo (i128arg value) noexcept
 Sign-extends eight 8-bit signed integers from the lower 64 bits of the argument to eight 16-bit signed integers. More...
 
static i128 ConvertFromInt8ToInt16Hi (i128arg value) noexcept
 Sign-extends eight 8-bit signed integers from the upper 64 bits of the argument to eight 16-bit signed integers. More...
 
static i128 ConvertFromInt16ToInt32Lo (i128arg value) noexcept
 Sign-extends four 16-bit signed integers from the lower 64 bits of the argument to four 32-bit signed integers. More...
 
static i128 ConvertFromInt16ToInt32Hi (i128arg value) noexcept
 Sign-extends four 16-bit signed integers from the upper 64 bits of the argument to four 32-bit signed integers. More...
 
static i128 ConvertFromInt32ToInt64Lo (i128arg value) noexcept
 Sign-extends two 32-bit signed integers from the lower 64 bits of the argument to two 64-bit signed integers. More...
 
static i128 ConvertFromInt32ToInt64Hi (i128arg value) noexcept
 Sign-extends two 32-bit signed integers from the upper 64 bits of the argument to two 64-bit signed integers. More...
 
static i128 ConvertFromUint8ToUint16Lo (i128arg value) noexcept
 Extends eight 8-bit unsigned integers from the lower 64 bits of the argument to eight 16-bit unsigned integers. More...
 
static i128 ConvertFromUint8ToUint16Hi (i128arg value) noexcept
 Extends eight 8-bit unsigned integers from the upper 64 bits of the argument to eight 16-bit unsigned integers. More...
 
static i128 ConvertFromUint16ToUint32Lo (i128arg value) noexcept
 Converts four 16-bit unsigned integers from the lower 64 bits of the argument to four 32-bit unsigned integers. More...
 
static i128 ConvertFromUint16ToUint32Hi (i128arg value) noexcept
 Converts four 16-bit unsigned integers from the upper 64 bits of the argument to four 32-bit unsigned integers. More...
 
static i128 ConvertFromUint32ToUint64Lo (i128arg value) noexcept
 Converts two 32-bit unsigned integers from the lower 64 bits of the argument to two 64-bit unsigned integers. More...
 
static i128 ConvertFromUint32ToUint64Hi (i128arg value) noexcept
 Converts two 32-bit unsigned integers from the upper 64 bits of the argument to two 64-bit unsigned integers. More...
 
Zip and Unzip
static i128 Zip8Lo (i128arg a, i128arg b) noexcept
 Returns the same result as I128::Permute8<0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23>(a, b).
 
static i128 Zip8Hi (i128arg a, i128arg b) noexcept
 Returns the same result as I128::Permute8<8, 24, 9, 25, 10, 26, 11, 27, 12, 28, 13, 29, 14, 30, 15, 31>(a, b).
 
static i128 Unzip8Lo (i128arg a, i128arg b) noexcept
 Returns the same result as I128::Permute8<0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30>(a, b).
 
static i128 Unzip8Hi (i128arg a, i128arg b) noexcept
 Returns the same result as I128::Permute8<1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31>(a, b).
 
static i128 Zip16Lo (i128arg a, i128arg b) noexcept
 Returns the same result as I128::Permute16<0, 8, 1, 9, 2, 10, 3, 11>(a, b).
 
static i128 Zip16Hi (i128arg a, i128arg b) noexcept
 Returns the same result as I128::Permute16<4, 12, 5, 13, 6, 14, 7, 15>(a, b).
 
static i128 Unzip16Lo (i128arg a, i128arg b) noexcept
 Returns the same result as I128::Permute16<0, 2, 4, 6, 8, 10, 12, 14>(a, b).
 
static i128 Unzip16Hi (i128arg a, i128arg b) noexcept
 Returns the same result as I128::Permute16<1, 3, 5, 7, 9, 11, 13, 15>(a, b).
 
static i128 Zip32Lo (i128arg a, i128arg b) noexcept
 Returns the same result as I128::Permute32<0, 4, 1, 5>(a, b).
 
static i128 Zip32Hi (i128arg a, i128arg b) noexcept
 Returns the same result as I128::Permute32<2, 6, 3, 7>(a, b).
 
static i128 Unzip32Lo (i128arg a, i128arg b) noexcept
 Returns the same result as I128::Permute32<0, 2, 4, 6>(a, b).
 
static i128 Unzip32Hi (i128arg a, i128arg b) noexcept
 Returns the same result as I128::Permute32<1, 3, 5, 7>(a, b).
 
template<int V0, int V1, int V2, int V3, int V4, int V5, int V6, int V7, int V8, int V9, int V10, int V11, int V12, int V13, int V14, int V15>
static i128 Permute8 (i128arg a, i128arg b) noexcept
 Generates a new 128-bit value by arranging 32 8-bit values. You can specify -1 if arbitrary values generated do not matter. More...
 
template<int V0, int V1, int V2, int V3, int V4, int V5, int V6, int V7>
static i128 Permute16 (i128arg a, i128arg b) noexcept
 Generates a new 128-bit value by arranging 16 16-bit values. You can specify -1 if arbitrary values generated do not matter. More...
 
template<int V0, int V1, int V2, int V3>
static i128 Permute32 (i128arg a, i128arg b) noexcept
 Generates a new 128-bit value by arranging 8 32-bit values. You can specify -1 if arbitrary values generated do not matter. More...
 
Reversing the Endianness
static i128 Reverse16 (i128arg value) noexcept
 Reverses the endianness of eight 16-bit values. More...
 
static i128 Reverse32 (i128arg value) noexcept
 Reverses the endianness of four 32-bit values. More...
 
static i128 Reverse64 (i128arg value) noexcept
 Reverses the endianness of two 64-bit values. More...
 
Others
static int MoveMask8 (i128arg value) noexcept
 Consolidates the various 8-bit lanes into a 1-bit value and returns it as an integer. More...
 
static int MoveMask16 (i128arg value) noexcept
 Consolidates the various 16-bit lanes into a 1-bit value and returns it as an integer. More...
 
static int MoveMask32 (i128arg value) noexcept
 Consolidates the various 32-bit lanes into a 1-bit value and returns it as an integer. More...
 
static i128 SetMask8 (int mask) noexcept
 Performs the reversed calculation of I128::MoveMask8().
 
static i128 SetMask16 (int mask) noexcept
 Performs the reversed calculation of I128::MoveMask16().
 
static i128 SetMask32 (int mask) noexcept
 Performs the reversed calculation of I128::MoveMask32().
 
static bool IsZero (i128arg value) noexcept
 Examines whether all bits are 0. More...
 
static bool IsFull (i128arg value) noexcept
 Examines whether all bits are 1. More...
 
static i128 Select (i128arg mask, i128arg a, i128arg b) noexcept
 Selects and sets either of the values a and b for each lane according to the mask value. More...
 
static i128 Shuffle8 (i128arg value, i128arg shuffle) noexcept
 Sorts sixteen 8-bit values in an arbitrary order, including duplicates. More...
 
static int PopCntMask8 (i128arg value) noexcept
 Returns the number of masks with the value 0xFF among from 16 8-bit wide masks. More...
 
static int ClzMask8 (i128arg value) noexcept
 Returns the number of bytes, from the MSB (the byte at the end), consisting of consecutive zeros, among from 16 8-bit wide masks. More...
 
static int CtzMask8 (i128arg value) noexcept
 Returns the number of bytes, from the LSB (the byte at the beginning), consisting of consecutive zeros, among from 16 8-bit wide masks. More...
 

Detailed Description

The class for integer SIMD computations using128-bit registers (MM0-XMM15 for SSE, and Q0-Q15 for NEON).

Description
All members of this class are static functions. The class cannot be instantiated.

Definition at line 71 of file SimdInt.h.

Member Function Documentation

§ Add16()

nn::nlib::simd::I128::Add16 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Adds the 16-bit integer values of each lane in the a and b arguments.

Parameters
[in]aEight 16-bit values.
[in]bEight 16-bit values.
Returns
Returns the computational results represented by the following pseudocode.
r16[0] = a16[0] + b16[0]
r16[1] = a16[1] + b16[0]
....
r16[7] = a16[7] + b16[7]

§ Add32()

nn::nlib::simd::I128::Add32 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Adds the 32-bit integer values of each lane in the a and b arguments.

Parameters
[in]aFour 32-bit values.
[in]bFour 32-bit values.
Returns
Returns the computational results represented by the following pseudocode.
r32[0] = a32[0] + b32[0]
r32[1] = a32[1] + b32[0]
....
r32[3] = a32[3] + b32[3]

§ Add64()

nn::nlib::simd::I128::Add64 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Adds the 64-bit integer values of each lane in the a and b arguments.

Parameters
[in]aTwo 64-bit values.
[in]bTwo 64-bit values.
Returns
Returns the computational results represented by the following pseudocode.
r64[0] = a64[0] + b64[0]
r64[1] = a64[1] + b64[0]

§ Add8()

nn::nlib::simd::I128::Add8 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Adds the 8-bit integer values of each lane in the a and b arguments.

Parameters
[in]aSixteen 8-bit values.
[in]bSixteen 8-bit values.
Returns
Returns the computational results represented by the following pseudocode.
r8[0] = a8[0] + b8[0]
r8[1] = a8[1] + b8[0]
....
r8[15] = a8[15] + b8[15]

§ AddInt16Saturated()

nn::nlib::simd::I128::AddInt16Saturated ( i128arg  a,
i128arg  b 
)
staticnoexcept

Saturated addition of the signed 16-bit integers of each lane in the a and b arguments.

Parameters
[in]aEight 16-bit signed integers.
[in]bEight 16-bit signed integers.
Returns
Returns the computational results represented by the following pseudocode.
r16[0] = clamp(a16[0] + b16[0], INT16_MIN, INT16_MAX)
r16[1] = clamp(a16[1] + b16[1], INT16_MIN, INT16_MAX)
....
r16[7] = clamp(a16[7] + b16[7], INT16_MIN, INT16_MAX)

§ AddInt8Saturated()

nn::nlib::simd::I128::AddInt8Saturated ( i128arg  a,
i128arg  b 
)
staticnoexcept

Saturated addition of the signed 8-bit integers of each lane in the a and b arguments.

Parameters
[in]aSixteen 8-bit signed integers.
[in]bSixteen 8-bit signed integers.
Returns
Returns the computational results represented by the following pseudocode.
r8[0] = clamp(a8[0] + b8[0], INT8_MIN, INT8_MAX)
r8[1] = clamp(a8[1] + b8[1], INT8_MIN, INT8_MAX)
....
r8[15] = clamp(a8[15] + b8[15], INT8_MIN, INT8_MAX)

§ AddUint16Saturated()

nn::nlib::simd::I128::AddUint16Saturated ( i128arg  a,
i128arg  b 
)
staticnoexcept

Saturated addition of the unsigned 16-bit integers of each lane in the a and b arguments.

Parameters
[in]aEight 16-bit unsigned integers.
[in]bEight 16-bit unsigned integers.
Returns
Returns the computational results represented by the following pseudocode.
r16[0] = clamp(a16[0] + b16[0], UINT16_MAX)
r16[1] = clamp(a16[1] + b16[1], UINT16_MAX)
....
r16[7] = clamp(a16[7] + b16[7], UINT16_MAX)

§ AddUint8Saturated()

nn::nlib::simd::I128::AddUint8Saturated ( i128arg  a,
i128arg  b 
)
staticnoexcept

Saturated addition of the unsigned 8-bit integers of each lane in the a and b arguments.

Parameters
[in]aSixteen 8-bit unsigned integers.
[in]bSixteen 8-bit unsigned integers.
Returns
Returns the computational results represented by the following pseudocode.
r8[0] = clamp(a8[0] + b8[0], UINT8_MAX)
r8[1] = clamp(a8[1] + b8[1], UINT8_MAX)
....
r8[15] = clamp(a8[15] + b8[15], UINT8_MAX)

§ AlignR()

template<size_t N>
nn::nlib::simd::I128::AlignR ( i128arg  a,
i128arg  b 
)
staticnoexcept

Returns the lower 128-bit value after a and b have been right-shifted N bytes to resemble a 256-bit value.

Template Parameters
NThe number of bytes to shift to the right.
Parameters
[in]aThe value for the upper 128 bits of the 256-bit value being shifted to the right.
[in]bThe value for the lower 128 bits of the 256-bit value being shifted to the right.
Returns
The value for the right-shifted lower 128 bits.
Description
The following figure illustrates the behavior when N = 4.
dot_inline_dotgraph_22.png

§ AndNot()

nn::nlib::simd::I128::AndNot ( i128arg  a,
i128arg  b 
)
staticnoexcept

Calculates the bitwise NOT of the a argument, and the bitwise AND of the b argument.

Parameters
[in]aA 128-bit value.
[in]bA 128-bit value.
Returns
Returns ~a & b.

§ ByteRotateRight()

template<size_t N>
nn::nlib::simd::I128::ByteRotateRight ( i128arg  value)
staticnoexcept

Rotates value to the right by an amount of N bytes.

Template Parameters
NThe number of bytes to rotate.
Parameters
[in]valueThe 128-bit value being rotated.
Returns
The 128-bit value after rotating.
Description
The following figure illustrates the behavior when N = 4.
dot_inline_dotgraph_23.png

§ ByteShiftLeft()

template<size_t N>
nn::nlib::simd::I128::ByteShiftLeft ( i128arg  value)
staticnoexcept

Left-shifts value by an amount of N bytes. Empty lanes are populated with zero.

Template Parameters
NThe number of bytes to shift.
Parameters
[in]valueThe 128-bit value to be shifted.
Returns
The 128-bit value after shifted.
Description
The following figure illustrates the behavior when N = 4.
dot_inline_dotgraph_24.png

§ ByteShiftRight()

template<size_t N>
nn::nlib::simd::I128::ByteShiftRight ( i128arg  value)
staticnoexcept

Right-shifts value by an amount of N bytes. Empty lanes are populated with zero.

Template Parameters
NThe number of bytes to shift.
Parameters
[in]valueThe 128-bit value to be shifted.
Returns
The 128-bit value after shifted.
Description
The following figure illustrates the behavior when N = 4.
dot_inline_dotgraph_25.png

§ ClzMask8()

nn::nlib::simd::I128::ClzMask8 ( i128arg  value)
staticnoexcept

Returns the number of bytes, from the MSB (the byte at the end), consisting of consecutive zeros, among from 16 8-bit wide masks.

Parameters
[in]value16 8-bit wide masks.
Returns
The number of bytes, from the MSB (the byte at the end), consisting of consecutive zeros.
Description
The result is the same as nlib_clz(I128::MoveMask8(value)) - 16.

§ CmpEq16()

nn::nlib::simd::I128::CmpEq16 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b in units of 16-bit lanes.

Parameters
[in]aEight 16-bit values.
[in]bEight 16-bit values.
Returns
Eight 16-bit values (a mask). The pseudocode returns values similar to the following.
r16[0] = a16[0] == b16[0] ? 0xFFFF : 0x0000
r16[1] = a16[1] == b16[1] ? 0xFFFF : 0x0000
.....
r16[7] = a16[7] == b16[7] ? 0xFFFF : 0x0000

§ CmpEq32()

nn::nlib::simd::I128::CmpEq32 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b in units of 32-bit lanes.

Parameters
[in]aFour 32-bit values.
[in]bFour 32-bit values.
Returns
Four 32-bit values (a mask). The pseudocode returns values similar to the following.
r32[0] = a32[0] == b32[0] ? 0xFFFFFFFF : 0x00000000
r32[1] = a32[1] == b32[1] ? 0xFFFFFFFF : 0x00000000
.....
r32[3] = a32[3] == b32[3] ? 0xFFFFFFFF : 0x00000000

§ CmpEq64()

nn::nlib::simd::I128::CmpEq64 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b on a 64-bit lane basis.

Parameters
[in]aTwo 64-bit values.
[in]bTwo 64-bit values.
Returns
Two 64-bit values (a mask). The pseudocode returns values similar to the following.
r64[0] = a64[0] == b64[0] ? 0xFFFFFFFFFFFFFFFF : 0x0000000000000000
r64[1] = a64[1] == b64[1] ? 0xFFFFFFFFFFFFFFFF : 0x0000000000000000

§ CmpEq8()

nn::nlib::simd::I128::CmpEq8 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b in units of 8-bit lanes.

Parameters
[in]aSixteen 8-bit values.
[in]bSixteen 8-bit values.
Returns
Sixteen 8-bit values (a mask). The pseudocode returns values similar to the following.
r8[0] = a8[0] == b8[0] ? 0xFF : 0x00
r8[1] = a8[1] == b8[1] ? 0xFF : 0x00
.....
r8[15] = a8[15] == b8[15] ? 0xFF : 0x00

§ CmpGeInt16()

nn::nlib::simd::I128::CmpGeInt16 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 16-bit signed integers.

Parameters
[in]aEight 16-bit signed integers.
[in]bEight 16-bit signed integers.
Returns
Eight 16-bit values (a mask). The pseudocode returns values similar to the following.
r16[0] = a16[0] >= b16[0] ? 0xFFFF :0x0000
r16[1] = a16[1] >= b16[1] ?0xFFFF :0x0000
.....
r16[7] = a16[7] >= b16[7] ?0xFFFF : 0x0000

§ CmpGeInt32()

nn::nlib::simd::I128::CmpGeInt32 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 32-bit signed integers.

Parameters
[in]aFour 32-bit signed integers.
[in]bFour 32-bit signed integers.
Returns
Four 32-bit values (a mask). The pseudocode returns values similar to the following.
r32[0] = a32[0] >= b32[0] ? 0xFFFFFFFF :0x0000
r32[1] = a32[1] >= b32[1] ?0xFFFFFFFF :0x0000
.....
r32[3] = a32[3] >= b32[3] ?0xFFFFFFFF : 0x0000

§ CmpGeInt64()

nn::nlib::simd::I128::CmpGeInt64 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 64-bit signed integers.

Parameters
[in]aTwo 64-bit signed integers.
[in]bTwo 64-bit signed integers.
Returns
Two 64-bit values (a mask). The pseudocode returns values similar to the following.
r64[0] = a64[0] >= b64[0] ? 0xFFFFFFFFFFFFFFFF : 0x0000000000000000
r64[1] = a64[1] >= b64[1] ? 0xFFFFFFFFFFFFFFFF : 0x0000000000000000

§ CmpGeInt8()

nn::nlib::simd::I128::CmpGeInt8 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 8-bit signed integers.

Parameters
[in]aSixteen 8-bit signed integers.
[in]bSixteen 8-bit signed integers.
Returns
Sixteen 8-bit values (a mask). The pseudocode returns values similar to the following.
r8[0] = a8[0] >= b8[0] ? 0xFF :0x00
r8[1] = a8[1] >= b8[1] ?0xFF :0x00
.....
r8[15] = a8[15] >= b8[15] ?0xFF : 0x00

§ CmpGeUint16()

nn::nlib::simd::I128::CmpGeUint16 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 16-bit unsigned integers.

Parameters
[in]aEight 16-bit unsigned integers.
[in]bEight 16-bit unsigned integers.
Returns
Eight 16-bit values (a mask). The pseudocode returns values similar to the following.
r16[0] = a16[0] >= b16[0] ? 0xFFFF :0x0000
r16[1] = a16[1] >= b16[1] ?0xFFFF :0x0000
.....
r16[7] = a16[7] >= b16[7] ?0xFFFF : 0x0000

§ CmpGeUint32()

nn::nlib::simd::I128::CmpGeUint32 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 32-bit unsigned integers.

Parameters
[in]aFour 32-bit unsigned integers.
[in]bFour 32-bit unsigned integers.
Returns
Four 32-bit values (a mask). The pseudocode returns values similar to the following.
r32[0] = a32[0] >= b32[0] ? 0xFFFFFFFF :0x0000
r32[1] = a32[1] >= b32[1] ?0xFFFFFFFF :0x0000
.....
r32[3] = a32[3] >= b32[3] ?0xFFFFFFFF : 0x0000

§ CmpGeUint64()

nn::nlib::simd::I128::CmpGeUint64 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 64-bit unsigned integers.

Parameters
[in]aTwo 64-bit unsigned integers.
[in]bTwo 64-bit unsigned integers.
Returns
Two 64-bit values (a mask). The pseudocode returns values similar to the following.
r64[0] = a64[0] >= b64[0] ? 0xFFFFFFFFFFFFFFFF : 0x0000000000000000
r64[1] = a64[1] >= b64[1] ? 0xFFFFFFFFFFFFFFFF : 0x0000000000000000

§ CmpGeUint8()

nn::nlib::simd::I128::CmpGeUint8 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 8-bit unsigned integers.

Parameters
[in]aSixteen 8-bit unsigned integers.
[in]bSixteen 8-bit unsigned integers.
Returns
Sixteen 8-bit values (a mask). The pseudocode returns values similar to the following.
r8[0] = a8[0] >= b8[0] ? 0xFF :0x00
r8[1] = a8[1] >= b8[1] ?0xFF :0x00
.....
r8[15] = a8[15] >= b8[15] ?0xFF : 0x00

§ CmpGtInt16()

nn::nlib::simd::I128::CmpGtInt16 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 16-bit signed integers.

Parameters
[in]aEight 16-bit signed integers.
[in]bEight 16-bit signed integers.
Returns
Eight 16-bit values (a mask). The pseudocode returns values similar to the following.
r16[0] = a16[0] > b16[0] ? 0xFFFF :0x0000
r16[1] = a16[1] > b16[1] ?0xFFFF :0x0000
.....
r16[7] = a16[7] > b16[7] ?0xFFFF : 0x0000

§ CmpGtInt32()

nn::nlib::simd::I128::CmpGtInt32 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 32-bit signed integers.

Parameters
[in]aFour 32-bit signed integers.
[in]bFour 32-bit signed integers.
Returns
Four 32-bit values (a mask). The pseudocode returns values similar to the following.
r32[0] = a32[0] > b32[0] ? 0xFFFFFFFF :0x0000
r32[1] = a32[1] > b32[1] ?0xFFFFFFFF :0x0000
.....
r32[3] = a32[3] > b32[3] ?0xFFFFFFFF : 0x0000

§ CmpGtInt64()

nn::nlib::simd::I128::CmpGtInt64 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 64-bit signed integers.

Parameters
[in]aTwo 64-bit signed integers.
[in]bTwo 64-bit signed integers.
Returns
Two 64-bit values (a mask). The pseudocode returns values similar to the following.
r64[0] = a64[0] > b64[0] ? 0xFFFFFFFFFFFFFFFF : 0x0000000000000000
r64[1] = a64[1] > b64[1] ? 0xFFFFFFFFFFFFFFFF : 0x0000000000000000

§ CmpGtInt8()

nn::nlib::simd::I128::CmpGtInt8 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 8-bit signed integers.

Parameters
[in]aSixteen 8-bit signed integers.
[in]bSixteen 8-bit signed integers.
Returns
Sixteen 8-bit values (a mask). The pseudocode returns values similar to the following.
r8[0] = a8[0] > b8[0] ? 0xFF :0x00
r8[1] = a8[1] > b8[1] ?0xFF :0x00
.....
r8[15] = a8[15] > b8[15] ?0xFF : 0x00

§ CmpGtUint16()

nn::nlib::simd::I128::CmpGtUint16 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 16-bit unsigned integers.

Parameters
[in]aEight 16-bit unsigned integers.
[in]bEight 16-bit unsigned integers.
Returns
Eight 16-bit values (a mask). The pseudocode returns values similar to the following.
r16[0] = a16[0] > b16[0] ? 0xFFFF :0x0000
r16[1] = a16[1] > b16[1] ?0xFFFF :0x0000
.....
r16[7] = a16[7] > b16[7] ?0xFFFF : 0x0000

§ CmpGtUint32()

nn::nlib::simd::I128::CmpGtUint32 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 32-bit unsigned integers.

Parameters
[in]aFour 32-bit unsigned integers.
[in]bFour 32-bit unsigned integers.
Returns
Four 32-bit values (a mask). The pseudocode returns values similar to the following.
r32[0] = a32[0] > b32[0] ? 0xFFFFFFFF :0x0000
r32[1] = a32[1] > b32[1] ?0xFFFFFFFF :0x0000
.....
r32[3] = a32[3] > b32[3] ?0xFFFFFFFF : 0x0000

§ CmpGtUint64()

nn::nlib::simd::I128::CmpGtUint64 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 64-bit unsigned integers.

Parameters
[in]aTwo 64-bit unsigned integers.
[in]bTwo 64-bit unsigned integers.
Returns
Two 64-bit values (a mask). The pseudocode returns values similar to the following.
r64[0] = a64[0] > b64[0] ? 0xFFFFFFFFFFFFFFFF : 0x0000000000000000
r64[1] = a64[1] > b64[1] ? 0xFFFFFFFFFFFFFFFF : 0x0000000000000000

§ CmpGtUint8()

nn::nlib::simd::I128::CmpGtUint8 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 8-bit unsigned integers.

Parameters
[in]aSixteen 8-bit unsigned integers.
[in]bSixteen 8-bit unsigned integers.
Returns
Sixteen 8-bit values (a mask). The pseudocode returns values similar to the following.
r8[0] = a8[0] > b8[0] ? 0xFF :0x00
r8[1] = a8[1] > b8[1] ?0xFF :0x00
.....
r8[15] = a8[15] > b8[15] ?0xFF : 0x00

§ CmpLeInt16()

nn::nlib::simd::I128::CmpLeInt16 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 16-bit signed integers.

Parameters
[in]aEight 16-bit signed integers.
[in]bEight 16-bit signed integers.
Returns
Eight 16-bit values (a mask). The pseudocode returns values similar to the following.
r16[0] = a16[0] <= b16[0] ? 0xFFFF :0x0000
r16[1] = a16[1] <= b16[1] ?0xFFFF :0x0000
.....
r16[7] = a16[7] <= b16[7] ?0xFFFF : 0x0000

§ CmpLeInt32()

nn::nlib::simd::I128::CmpLeInt32 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 32-bit signed integers.

Parameters
[in]aFour 32-bit signed integers.
[in]bFour 32-bit signed integers.
Returns
Four 32-bit values (a mask). The pseudocode returns values similar to the following.
r32[0] = a32[0] <= b32[0] ? 0xFFFFFFFF :0x0000
r32[1] = a32[1] <= b32[1] ?0xFFFFFFFF :0x0000
.....
r32[3] = a32[3] <= b32[3] ?0xFFFFFFFF : 0x0000

§ CmpLeInt64()

nn::nlib::simd::I128::CmpLeInt64 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 64-bit signed integers.

Parameters
[in]aTwo 64-bit signed integers.
[in]bTwo 64-bit signed integers.
Returns
Two 64-bit values (a mask). The pseudocode returns values similar to the following.
r64[0] = a64[0] <= b64[0] ? 0xFFFFFFFFFFFFFFFF : 0x0000000000000000
r64[1] = a64[1] <= b64[1] ? 0xFFFFFFFFFFFFFFFF : 0x0000000000000000

§ CmpLeInt8()

nn::nlib::simd::I128::CmpLeInt8 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 8-bit signed integers.

Parameters
[in]aSixteen 8-bit signed integers.
[in]bSixteen 8-bit signed integers.
Returns
Sixteen 8-bit values (a mask). The pseudocode returns values similar to the following.
r8[0] = a8[0] <= b8[0] ? 0xFF :0x00
r8[1] = a8[1] <= b8[1] ?0xFF :0x00
.....
r8[15] = a8[15] <= b8[15] ?0xFF : 0x00

§ CmpLeUint16()

nn::nlib::simd::I128::CmpLeUint16 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 16-bit unsigned integers.

Parameters
[in]aEight 16-bit unsigned integers.
[in]bEight 16-bit unsigned integers.
Returns
Eight 16-bit values (a mask). The pseudocode returns values similar to the following.
r16[0] = a16[0] <= b16[0] ? 0xFFFF :0x0000
r16[1] = a16[1] <= b16[1] ?0xFFFF :0x0000
.....
r16[7] = a16[7] <= b16[7] ?0xFFFF : 0x0000

§ CmpLeUint32()

nn::nlib::simd::I128::CmpLeUint32 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 32-bit unsigned integers.

Parameters
[in]aFour 32-bit unsigned integers.
[in]bFour 32-bit unsigned integers.
Returns
Four 32-bit values (a mask). The pseudocode returns values similar to the following.
r32[0] = a32[0] <= b32[0] ? 0xFFFFFFFF :0x0000
r32[1] = a32[1] <= b32[1] ?0xFFFFFFFF :0x0000
.....
r32[3] = a32[3] <= b32[3] ?0xFFFFFFFF : 0x0000

§ CmpLeUint64()

nn::nlib::simd::I128::CmpLeUint64 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 64-bit unsigned integers.

Parameters
[in]aTwo 64-bit unsigned integers.
[in]bTwo 64-bit unsigned integers.
Returns
Two 64-bit values (a mask). The pseudocode returns values similar to the following.
r64[0] = a64[0] <= b64[0] ? 0xFFFFFFFFFFFFFFFF : 0x0000000000000000
r64[1] = a64[1] <= b64[1] ? 0xFFFFFFFFFFFFFFFF : 0x0000000000000000

§ CmpLeUint8()

nn::nlib::simd::I128::CmpLeUint8 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 8-bit unsigned integers.

Parameters
[in]aSixteen 8-bit unsigned integers.
[in]bSixteen 8-bit unsigned integers.
Returns
Sixteen 8-bit values (a mask). The pseudocode returns values similar to the following.
r8[0] = a8[0] <= b8[0] ? 0xFF :0x00
r8[1] = a8[1] <= b8[1] ?0xFF :0x00
.....
r8[15] = a8[15] <= b8[15] ?0xFF : 0x00

§ CmpLtInt16()

nn::nlib::simd::I128::CmpLtInt16 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 16-bit signed integers.

Parameters
[in]aEight 16-bit signed integers.
[in]bEight 16-bit signed integers.
Returns
Eight 16-bit values (a mask). The pseudocode returns values similar to the following.
r16[0] = a16[0] < b16[0] ? 0xFFFF :0x0000
r16[1] = a16[1] < b16[1] ?0xFFFF :0x0000
.....
r16[7] = a16[7] < b16[7] ?0xFFFF : 0x0000

§ CmpLtInt32()

nn::nlib::simd::I128::CmpLtInt32 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 32-bit signed integers.

Parameters
[in]aFour 32-bit signed integers.
[in]bFour 32-bit signed integers.
Returns
Four 32-bit values (a mask). The pseudocode returns values similar to the following.
r32[0] = a32[0] < b32[0] ?0xFFFFFFFF : 0x00000000
r32[1] = a32[1] < b32[1] ?0xFFFFFFFF : 0x00000000
.....
r32[3] = a32[3] < b32[3] ?0xFFFFFFFF : 0x00000000

§ CmpLtInt64()

nn::nlib::simd::I128::CmpLtInt64 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 64-bit signed integers.

Parameters
[in]aTwo 64-bit signed integers.
[in]bTwo 64-bit signed integers.
Returns
Two 64-bit values (a mask). The pseudocode returns values similar to the following.
r64[0] = a64[0] < b64[0] ? 0xFFFFFFFFFFFFFFFF : 0x0000000000000000
r64[1] = a64[1] < b64[1] ? 0xFFFFFFFFFFFFFFFF : 0x0000000000000000

§ CmpLtInt8()

nn::nlib::simd::I128::CmpLtInt8 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 8-bit signed integers.

Parameters
[in]aSixteen 8-bit signed integers.
[in]bSixteen 8-bit signed integers.
Returns
Sixteen 8-bit values (a mask). The pseudocode returns values similar to the following.
r8[0] = a8[0] < b8[0] ? 0xFF :0x00
r8[1] = a8[1] < b8[1] ?0xFF :0x00
.....
r8[15] = a8[15] < b8[15] ?0xFF : 0x00

§ CmpLtUint16()

nn::nlib::simd::I128::CmpLtUint16 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 16-bit unsigned integers.

Parameters
[in]aEight 16-bit unsigned integers.
[in]bEight 16-bit unsigned integers.
Returns
Eight 16-bit values (a mask). The pseudocode returns values similar to the following.
r16[0] = a16[0] < b16[0] ? 0xFFFF :0x0000
r16[1] = a16[1] < b16[1] ?0xFFFF :0x0000
.....
r16[7] = a16[7] < b16[7] ?0xFFFF : 0x0000

§ CmpLtUint32()

nn::nlib::simd::I128::CmpLtUint32 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 32-bit unsigned integers.

Parameters
[in]aFour 32-bit unsigned integers.
[in]bFour 32-bit unsigned integers.
Returns
Four 32-bit values (a mask). The pseudocode returns values similar to the following.
r32[0] = a32[0] < b32[0] ? 0xFFFFFFFF :0x0000
r32[1] = a32[1] < b32[1] ?0xFFFFFFFF :0x0000
.....
r32[3] = a32[3] < b32[3] ?0xFFFFFFFF : 0x0000

§ CmpLtUint64()

nn::nlib::simd::I128::CmpLtUint64 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 64-bit unsigned integers.

Parameters
[in]aTwo 64-bit unsigned integers.
[in]bTwo 64-bit unsigned integers.
Returns
Two 64-bit values (a mask). The pseudocode returns values similar to the following.
r64[0] = a64[0] < b64[0] ? 0xFFFFFFFFFFFFFFFF : 0x0000000000000000
r64[1] = a64[1] < b64[1] ? 0xFFFFFFFFFFFFFFFF : 0x0000000000000000

§ CmpLtUint8()

nn::nlib::simd::I128::CmpLtUint8 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Compares a and b as 8-bit unsigned integers.

Parameters
[in]aSixteen 8-bit unsigned integers.
[in]bSixteen 8-bit unsigned integers.
Returns
Sixteen 8-bit values (a mask). The pseudocode returns values similar to the following.
r8[0] = a8[0] < b8[0] ? 0xFF :0x00
r8[1] = a8[1] < b8[1] ?0xFF :0x00
.....
r8[15] = a8[15] < b8[15] ?0xFF : 0x00

§ ConvertFromInt16ToInt32Hi()

nn::nlib::simd::I128::ConvertFromInt16ToInt32Hi ( i128arg  value)
staticnoexcept

Sign-extends four 16-bit signed integers from the upper 64 bits of the argument to four 32-bit signed integers.

Parameters
[in]valueEight 16-bit signed integers.
Returns
Four 32-bit signed integers.
Description
The following pseudocode represents the behavior of this function:
r16[0] = value16[4]
r16[1] = value16[4] < 0 ?0xFFFF :0x00
....
r16[6] = value16[7]
r16[7] = value16[7] < 0 ?0xFFFF :0x00

§ ConvertFromInt16ToInt32Lo()

nn::nlib::simd::I128::ConvertFromInt16ToInt32Lo ( i128arg  value)
staticnoexcept

Sign-extends four 16-bit signed integers from the lower 64 bits of the argument to four 32-bit signed integers.

Parameters
[in]valueEight 16-bit signed integers.
Returns
Four 32-bit signed integers.
Description
The following pseudocode represents the behavior of this function:
r16[0] = value16[0]
r16[1] = value16[0] < 0 ?0xFFFF :0x00
....
r16[6] = value16[3]
r16[7] = value16[3] < 0 ?0xFFFF :0x00

§ ConvertFromInt16ToInt8Saturated()

nn::nlib::simd::I128::ConvertFromInt16ToInt8Saturated ( i128arg  lo,
i128arg  hi 
)
staticnoexcept

Converts sixteen 16-bit signed integers into sixteen 8-bit signed integers. Out of range values are clamped.

Parameters
[in]loEight 16-bit signed integers.
[in]hiEight 16-bit signed integers.
Returns
Sixteen 8-bit values. The pseudocode returns values like similar to following.
r8[0] = clamp(lo16[0])
r8[1] = clamp(lo16[1])
....
r8[7] = clamp(lo16[7])
r8[8] = clamp(hi16[0])
....
r8[15] = clamp(hi16[7])

§ ConvertFromInt32ToInt16Saturated()

nn::nlib::simd::I128::ConvertFromInt32ToInt16Saturated ( i128arg  lo,
i128arg  hi 
)
staticnoexcept

Converts eight 32-bit signed integers into eight 16-bit signed integers. Out of range values are clamped.

Parameters
[in]loFour 32-bit signed integers.
[in]hiFour 32-bit signed integers.
Returns
Eight 16-bit values. The pseudocode returns values similar to the following.
r16[0] = clamp(lo32[0])
r16[1] = clamp(lo32[1])
....
r16[3] = clamp(lo32[3])
r16[4] = clamp(hi32[0])
....
r16[7] = clamp(hi32[3])

§ ConvertFromInt32ToInt64Hi()

nn::nlib::simd::I128::ConvertFromInt32ToInt64Hi ( i128arg  value)
staticnoexcept

Sign-extends two 32-bit signed integers from the upper 64 bits of the argument to two 64-bit signed integers.

Parameters
[in]valueFour 32-bit signed integers.
Returns
Two 64-bit signed integers.
Description
The following pseudocode represents the behavior of this function:
r32[0] = value32[2]
r32[1] = value32[2] < 0 ?0xFFFFFFFF :0x00
r32[2] = value32[3]
r32[3] = value32[3] < 0 ?0xFFFFFFFF :0x00

§ ConvertFromInt32ToInt64Lo()

nn::nlib::simd::I128::ConvertFromInt32ToInt64Lo ( i128arg  value)
staticnoexcept

Sign-extends two 32-bit signed integers from the lower 64 bits of the argument to two 64-bit signed integers.

Parameters
[in]valueFour 32-bit signed integers.
Returns
Two 64-bit signed integers.
Description
The following pseudocode represents the behavior of this function:
r32[0] = value32[0]
r32[1] = value32[0] < 0 ?0xFFFFFFFF :0x00
r32[2] = value32[1]
r32[3] = value32[1] < 0 ?0xFFFFFFFF :0x00

§ ConvertFromInt8ToInt16Hi()

nn::nlib::simd::I128::ConvertFromInt8ToInt16Hi ( i128arg  value)
staticnoexcept

Sign-extends eight 8-bit signed integers from the upper 64 bits of the argument to eight 16-bit signed integers.

Parameters
[in]value16 8-bit signed integers.
Returns
Eight 16-bit signed integers.
Description
The following pseudocode represents the behavior of this function:
r8[0] = value8[8]
r8[1] = value8[8] < 0 ?0xFF :0x00
....
r8[14] = value8[15]
r8[15] = value8[15] < 0 ?0xFF :0x00

§ ConvertFromInt8ToInt16Lo()

nn::nlib::simd::I128::ConvertFromInt8ToInt16Lo ( i128arg  value)
staticnoexcept

Sign-extends eight 8-bit signed integers from the lower 64 bits of the argument to eight 16-bit signed integers.

Parameters
[in]value16 8-bit signed integers.
Returns
Eight 16-bit signed integers.
Description
The following pseudocode represents the behavior of this function:
r8[0] = value8[0]
r8[1] = value8[0] < 0 ?0xFF :0x00
....
r8[14] = value8[7]
r8[15] = value8[7] < 0 ?0xFF :0x00

§ ConvertFromUint16ToUint32Hi()

nn::nlib::simd::I128::ConvertFromUint16ToUint32Hi ( i128arg  value)
staticnoexcept

Converts four 16-bit unsigned integers from the upper 64 bits of the argument to four 32-bit unsigned integers.

Parameters
[in]valueEight 16-bit unsigned integers.
Returns
Four 32-bit unsigned integers.
Description
The following pseudocode represents the behavior of this function:
r16[0] = value16[4]
r16[1] = 0
....
r16[6] = value16[7]
r16[7] = 0

§ ConvertFromUint16ToUint32Lo()

nn::nlib::simd::I128::ConvertFromUint16ToUint32Lo ( i128arg  value)
staticnoexcept

Converts four 16-bit unsigned integers from the lower 64 bits of the argument to four 32-bit unsigned integers.

Parameters
[in]valueEight 16-bit unsigned integers.
Returns
Four 32-bit unsigned integers.
Description
The following pseudocode represents the behavior of this function:
r16[0] = value16[0]
r16[1] = 0
....
r16[6] = value16[3]
r16[7] = 0

§ ConvertFromUint16ToUint8Saturated()

nn::nlib::simd::I128::ConvertFromUint16ToUint8Saturated ( i128arg  lo,
i128arg  hi 
)
staticnoexcept

Converts sixteen 16-bit unsigned integers into sixteen 8-bit unsigned integers. Out of range values are clamped.

Parameters
[in]loEight 16-bit unsigned integers.
[in]hiEight 16-bit unsigned integers.
Returns
Sixteen 8-bit values. The pseudocode returns values like similar to following.
r8[0] = clamp(lo16[0])
r8[1] = clamp(lo16[1])
....
r8[7] = clamp(lo16[7])
r8[8] = clamp(hi16[0])
....
r8[15] = clamp(hi16[7])

§ ConvertFromUint32ToUint16Saturated()

nn::nlib::simd::I128::ConvertFromUint32ToUint16Saturated ( i128arg  lo,
i128arg  hi 
)
staticnoexcept

Converts eight 32-bit unsigned integers into eight 16-bit unsigned integers. Out of range values are clamped.

Parameters
[in]loFour 32-bit unsigned integers.
[in]hiFour 32-bit unsigned integers.
Returns
Eight 16-bit values. The pseudocode returns values similar to the following.
r16[0] = clamp(lo32[0])
r16[1] = clamp(lo32[1])
....
r16[3] = clamp(lo32[3])
r16[4] = clamp(hi32[0])
....
r16[7] = clamp(hi32[3])

§ ConvertFromUint32ToUint64Hi()

nn::nlib::simd::I128::ConvertFromUint32ToUint64Hi ( i128arg  value)
staticnoexcept

Converts two 32-bit unsigned integers from the upper 64 bits of the argument to two 64-bit unsigned integers.

Parameters
[in]valueFour 32-bit unsigned integers.
Returns
Two 64-bit unsigned integers.
Description
The following pseudocode represents the behavior of this function:
r32[0] = value32[2]
r32[1] = 0
r32[2] = value32[3]
r32[3] = 0

§ ConvertFromUint32ToUint64Lo()

nn::nlib::simd::I128::ConvertFromUint32ToUint64Lo ( i128arg  value)
staticnoexcept

Converts two 32-bit unsigned integers from the lower 64 bits of the argument to two 64-bit unsigned integers.

Parameters
[in]valueFour 32-bit unsigned integers.
Returns
Two 64-bit unsigned integers.
Description
The following pseudocode represents the behavior of this function:
r32[0] = value32[0]
r32[1] = 0
r32[2] = value32[1]
r32[3] = 0

§ ConvertFromUint8ToUint16Hi()

nn::nlib::simd::I128::ConvertFromUint8ToUint16Hi ( i128arg  value)
staticnoexcept

Extends eight 8-bit unsigned integers from the upper 64 bits of the argument to eight 16-bit unsigned integers.

Parameters
[in]value16 8-bit unsigned integers.
Returns
Eight 16-bit unsigned integers.
Description
The following pseudocode represents the behavior of this function:
r8[0] = value8[8]
r8[1] = 0
....
r8[14] = value8[15]
r8[15] = 0

§ ConvertFromUint8ToUint16Lo()

nn::nlib::simd::I128::ConvertFromUint8ToUint16Lo ( i128arg  value)
staticnoexcept

Extends eight 8-bit unsigned integers from the lower 64 bits of the argument to eight 16-bit unsigned integers.

Parameters
[in]value16 8-bit unsigned integers.
Returns
Eight 16-bit unsigned integers.
Description
The following pseudocode represents the behavior of this function:
r8[0] = value8[0]
r8[1] = 0
....
r8[14] = value8[7]
r8[15] = 0

§ CtzMask8()

nn::nlib::simd::I128::CtzMask8 ( i128arg  value)
staticnoexcept

Returns the number of bytes, from the LSB (the byte at the beginning), consisting of consecutive zeros, among from 16 8-bit wide masks.

Parameters
[in]value16 8-bit wide masks.
Returns
The number of bytes, from the LSB (the byte at the beginning), consisting of consecutive zeros.
Description
The result is the same as nlib_ctz(I128::MoveMask8(value)).

§ GetUint16FromLane()

template<size_t N>
nn::nlib::simd::I128::GetUint16FromLane ( i128arg  value)
staticnoexcept

Gets a 16-bit unsigned integer from lane N of value.

Template Parameters
TThe lane value. Specify an integer between 0 and 7.
Parameters
[in]valueEight unsigned 16-bit integers.
Returns
A 16-bit unsigned integer.

§ GetUint32FromLane()

template<size_t N>
nn::nlib::simd::I128::GetUint32FromLane ( i128arg  value)
staticnoexcept

Gets a 32-bit unsigned integer from lane N of value.

Template Parameters
TThe lane value. Specify an integer between 0 and 3.
Parameters
[in]valueFour unsigned 32-bit integers.
Returns
A 32-bit unsigned integer.

§ GetUint64FromLane()

template<size_t N>
nn::nlib::simd::I128::GetUint64FromLane ( i128arg  value)
staticnoexcept

Gets a 64-bit unsigned integer from lane N of value.

Template Parameters
TThe lane value. Specify an integer between 0 and 1.
Parameters
[in]valueTwo unsigned 64-bit integers
Returns
A 64-bit unsigned integer.

§ GetUint8FromLane()

template<size_t N>
nn::nlib::simd::I128::GetUint8FromLane ( i128arg  value)
staticnoexcept

Gets a 8-bit unsigned integer from lane N of value.

Template Parameters
TThe lane value. Specify an integer between 0 and 15.
Parameters
[in]valueSixteen unsigned 8-bit integers.
Returns
A 8-bit unsigned integer.

§ IsFull()

nn::nlib::simd::I128::IsFull ( i128arg  value)
staticnoexcept

Examines whether all bits are 1.

Parameters
[in]valueA128-bit value.
Returns
Returns true if all bits are 1, and false otherwise.

§ IsZero()

nn::nlib::simd::I128::IsZero ( i128arg  value)
staticnoexcept

Examines whether all bits are 0.

Parameters
[in]valueA128-bit value.
Returns
Returns true if all bits are 0, and false otherwise.
Description
Because this function is relatively light compared to MoveMask8, you can use it to examine the mask ahead of time, as shown below.
if (!I128::IsZero(value)) {
int mask = I128::MoveMask8(value);
// Processing on masks like "count trailing zero."
....
}

§ MaxInt16()

nn::nlib::simd::I128::MaxInt16 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Sets the larger signed 16-bit integer value of each lane in the a and b arguments.

Parameters
[in]aEight 16-bit signed integer values.
[in]bEight 16-bit signed integer values.
Returns
Returns the computational results represented by the following pseudocode.
r16[0] = a16[0] > b16[0] ? a16[0] :b16[0]
r16[1] = a16[1] > a16[1] ?a16[1] :b16[1]
....
r16[7] = a16[7] > b16[7] ?a16[7] : b16[7]

§ MaxInt32()

nn::nlib::simd::I128::MaxInt32 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Sets the larger signed 32-bit integer value of each lane in the a and b arguments.

Parameters
[in]aFour 32-bit signed integer values.
[in]bFour 32-bit signed integer values.
Returns
Returns the computational results represented by the following pseudocode.
r32[0] = a32[0] > b32[0] ? a32[0] :b32[0]
r32[1] = a32[1] > a32[1] ?a32[1] :b32[1]
....
r32[3] = a32[3] > b32[3] ?a32[3] : b32[7]

§ MaxInt8()

nn::nlib::simd::I128::MaxInt8 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Sets the larger signed 8-bit integer value of each lane in the a and b arguments.

Parameters
[in]aSixteen 8-bit signed integer values.
[in]bSixteen 8-bit signed integer values.
Returns
Returns the computational results represented by the following pseudocode.
r8[0] = a8[0] > b8[0] ? a8[0] :b8[0]
r8[1] = a8[1] > a8[1] ?a8[1] :b8[1]
....
r8[15] = a8[15] > b8[15] ?a8[15] : b8[15]

§ MaxUint16()

nn::nlib::simd::I128::MaxUint16 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Sets the larger unsigned 16-bit integer value of each lane in the a and b arguments.

Parameters
[in]aEight 16-bit unsigned integer values.
[in]bEight 16-bit unsigned integer values.
Returns
Returns the computational results represented by the following pseudocode.
r16[0] = a16[0] > b16[0] ? a16[0] :b16[0]
r16[1] = a16[1] > a16[1] ?a16[1] :b16[1]
....
r16[7] = a16[7] > b16[7] ?a16[7] : b16[7]

§ MaxUint32()

nn::nlib::simd::I128::MaxUint32 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Sets the larger unsigned 32-bit integer value of each lane in the a and b arguments.

Parameters
[in]aFour 32-bit unsigned integer values.
[in]bFour 32-bit unsigned integer values.
Returns
Returns the computational results represented by the following pseudocode.
r32[0] = a32[0] > b32[0] ? a32[0] :b32[0]
r32[1] = a32[1] > a32[1] ?a32[1] :b32[1]
....
r32[3] = a32[3] > b32[3] ?a32[3] : b32[3]

§ MaxUint8()

nn::nlib::simd::I128::MaxUint8 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Sets the larger unsigned 8-bit integer value of each lane in the a and b arguments.

Parameters
[in]aSixteen 8-bit unsigned integer values.
[in]bSixteen 8-bit unsigned integer values.
Returns
Returns the computational results represented by the following pseudocode.
r8[0] = a8[0] > b8[0] ? a8[0] :b8[0]
r8[1] = a8[1] > a8[1] ?a8[1] :b8[1]
....
r8[15] = a8[15] > b8[15] ?a8[15] : b8[15]

§ MinInt16()

nn::nlib::simd::I128::MinInt16 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Sets the smaller signed 16-bit integer value of each lane in the a and b arguments.

Parameters
[in]aEight 16-bit signed integer values.
[in]bEight 16-bit signed integer values.
Returns
Returns the computational results represented by the following pseudocode.
r16[0] = a16[0] < b16[0] ? a16[0] :b16[0]
r16[1] = a16[1] < a16[1] ?a16[1] :b16[1]
....
r16[7] = a16[7] < b16[7] ?a16[7] : b16[7]

§ MinInt32()

nn::nlib::simd::I128::MinInt32 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Sets the smaller signed 32-bit integer value of each lane in the a and b arguments.

Parameters
[in]aFour 32-bit signed integer values.
[in]bFour 32-bit signed integer values.
Returns
Returns the computational results represented by the following pseudocode.
r32[0] = a32[0] < b32[0] ? a32[0] :b32[0]
r32[1] = a32[1] < a32[1] ?a32[1] :b32[1]
....
r32[3] = a32[3] < b32[3] ?a32[3] : b32[3]

§ MinInt8()

nn::nlib::simd::I128::MinInt8 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Sets the smaller signed 8-bit integer value of each lane in the a and b arguments.

Parameters
[in]aSixteen 8-bit signed integer values.
[in]bSixteen 8-bit signed integer values.
Returns
Returns the computational results represented by the following pseudocode.
r8[0] = a8[0] < b8[0] ? a8[0] :b8[0]
r8[1] = a8[1] < a8[1] ?a8[1] :b8[1]
....
r8[15] = a8[15] < b8[15] ?a8[15] : b8[15]

§ MinUint16()

nn::nlib::simd::I128::MinUint16 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Sets the smaller unsigned 16-bit integer value of each lane in the a and b arguments.

Parameters
[in]aEight 16-bit unsigned integer values.
[in]bEight 16-bit unsigned integer values.
Returns
Returns the computational results represented by the following pseudocode.
r16[0] = a16[0] < b16[0] ? a16[0] :b16[0]
r16[1] = a16[1] < a16[1] ?a16[1] :b16[1]
....
r16[7] = a16[7] < b16[7] ?a16[7] : b16[7]

§ MinUint32()

nn::nlib::simd::I128::MinUint32 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Sets the smaller unsigned 32-bit integer value of each lane in the a and b arguments.

Parameters
[in]aFour 32-bit unsigned integer values.
[in]bFour 32-bit unsigned integer values.
Returns
Returns the computational results represented by the following pseudocode.
r32[0] = a32[0] < b32[0] ? a32[0] :b32[0]
r32[1] = a32[1] < a32[1] ?a32[1] :b32[1]
....
r32[3] = a32[3] < b32[3] ?a32[3] : b32[3]

§ MinUint8()

nn::nlib::simd::I128::MinUint8 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Sets the smaller unsigned 8-bit integer value of each lane in the a and b arguments.

Parameters
[in]aSixteen 8-bit unsigned integer values.
[in]bSixteen 8-bit unsigned integer values.
Returns
Returns the computational results represented by the following pseudocode.
r8[0] = a8[0] < b8[0] ? a8[0] :b8[0]
r8[1] = a8[1] < a8[1] ?a8[1] :b8[1]
....
r8[15] = a8[15] < b8[15] ?a8[15] : b8[15]

§ MoveMask16()

nn::nlib::simd::I128::MoveMask16 ( i128arg  value)
staticnoexcept

Consolidates the various 16-bit lanes into a 1-bit value and returns it as an integer.

Parameters
[in]valueEight 16-bit masks.
Returns
The pseudocode returns values similar to the following.
int rval = 0
rval |= value16[0] == 0xFFFFU ? 0x01: 0x00
rval |= value16[1] == 0xFFFFU ? 0x02: 0x00
.....
rval |= value16[7] == 0xFFFFU ? 0x80: 0x00
return rval
Description
The bits reflected in the result vary depending on the architecture.
  • For SSE 4.1 (_mm_movemask_epi8, PMOVMSKB), the result reflects the value of the most significant bit.
  • For NEON, the result reflects the sampling of different bits in different lanes.
In either case, the process works as intended if the result of a comparison operation is used as the input.

§ MoveMask32()

nn::nlib::simd::I128::MoveMask32 ( i128arg  value)
staticnoexcept

Consolidates the various 32-bit lanes into a 1-bit value and returns it as an integer.

Parameters
[in]valueFour 32-bit masks.
Returns
The pseudocode returns values similar to the following.
int rval = 0
rval |= value32[0] == 0xFFFFFFFFU ? 0x01: 0x00
rval |= value32[1] == 0xFFFFFFFFU ? 0x02: 0x00
.....
rval |= value32[3] == 0xFFFFFFFFU ? 0x08: 0x00
return rval
Description
The bits reflected in the result vary depending on the architecture.
  • For SSE 4.1 (_mm_movemask_epi8, PMOVMSKB), the result reflects the value of the most significant bit.
  • For NEON, the result reflects the sampling of different bits in different lanes.
In either case, the process works as intended if the result of a comparison operation is used as the input.

§ MoveMask8()

nn::nlib::simd::I128::MoveMask8 ( i128arg  value)
staticnoexcept

Consolidates the various 8-bit lanes into a 1-bit value and returns it as an integer.

Parameters
[in]valueSixteen 8-bit masks.
Returns
The pseudocode returns values similar to the following.
int rval = 0
rval |= value8[0] == 0xFFU ? 0x0001 : 0x0000
rval |= value8[1] == 0xFFU ? 0x0002 : 0x0000
.....
rval |= value8[15] == 0xFFU ? 0x8000 : 0x0000
return rval
Description
The bits reflected in the result vary depending on the architecture.
  • For SSE 4.1 (_mm_movemask_epi8, PMOVMSKB), the result reflects the value of the most significant bit.
  • For NEON, the result reflects the sampling of different bits in different lanes.
In either case, the process works as intended if the result of a comparison operation is used as the input. This function can be typically applied as shown below:
  • Use nlib_ctz() to obtain the index of the first lane that meet some conditions.
  • Use nlib_popcnt16() to obtain the number of lanes that satisfy some conditions.

§ Mult16()

nn::nlib::simd::I128::Mult16 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Multiplies the 16-bit integer value in each lane of the a and b arguments.

Parameters
[in]aEight 16-bit integers.
[in]bEight 16-bit integers.
Returns
Returns the computational results represented by the following pseudocode.
r16[0] = a16[0] * b16[0]
r16[1] = a16[1] * a16[1]
....
r16[7] = a16[7] + b16[7]

§ Mult32()

nn::nlib::simd::I128::Mult32 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Multiplies the 32-bit integer value in each lane of the a and b arguments.

Parameters
[in]aFour 32-bit integers.
[in]bFour 32-bit integers.
Returns
Returns the computational results represented by the following pseudocode.
r32[0] = a32[0] * b32[0]
r32[1] = a32[1] * a32[1]
....
r32[3] = a32[3] + b32[3]

§ MultAdd16()

nn::nlib::simd::I128::MultAdd16 ( i128arg  a,
i128arg  b,
i128arg  c 
)
staticnoexcept

Multiplies the 16-bit integer value in each lane of the a and b arguments, and adds the 16-bit integer value in each lane of c to the result.

Parameters
[in]aEight 16-bit integers.
[in]bEight 16-bit integers.
[in]cEight 16-bit integers.
Returns
Returns the computational results represented by the following pseudocode.
r16[0] = c16[0] + a16[0] * b16[0]
r16[1] = c16[1] + a16[1] * a16[1]
....
r16[7] = c16[7] + a16[7] * b16[7]

§ MultAdd32()

nn::nlib::simd::I128::MultAdd32 ( i128arg  a,
i128arg  b,
i128arg  c 
)
staticnoexcept

Multiplies the 32-bit integer value in each lane of the a and b arguments, and adds the 32-bit integer value in each lane of c to the result.

Parameters
[in]aFour 32-bit integers.
[in]bFour 32-bit integers.
[in]cFour 32-bit integers.
Returns
Returns the computational results represented by the following pseudocode.
r32[0] = c32[0] + a32[0] * b32[0]
r32[1] = c32[1] + a32[1] * a32[1]
....
r32[3] = c32[3] + a32[3] * b32[3]

§ MultSub16()

nn::nlib::simd::I128::MultSub16 ( i128arg  a,
i128arg  b,
i128arg  c 
)
staticnoexcept

Multiplies the 16-bit integer value in each lane of the a and b arguments, and subtracts the 16-bit integer value in each lane of c from the result.

Parameters
[in]aEight 16-bit integers.
[in]bEight 16-bit integers.
[in]cEight 16-bit integers.
Returns
Returns the computational results represented by the following pseudocode.
r16[0] = c16[0] - a16[0] * b16[0]
r16[1] = c16[1] - a16[1] * a16[1]
....
r16[7] = c16[7] - a16[7] * b16[7]

§ MultSub32()

nn::nlib::simd::I128::MultSub32 ( i128arg  a,
i128arg  b,
i128arg  c 
)
staticnoexcept

Multiplies the 32-bit integer value in each lane of the a and b arguments, and subtracts the 32-bit integer value in each lane of c from the result.

Parameters
[in]aFour 32-bit integers.
[in]bFour 32-bit integers.
[in]cFour 32-bit integers.
Returns
Returns the computational results represented by the following pseudocode.
r32[0] = c32[0] - a32[0] * b32[0]
r32[1] = c32[1] - a32[1] * a32[1]
....
r32[3] = c32[3] - a32[3] * b32[3]

§ NarrowFrom16To8()

nn::nlib::simd::I128::NarrowFrom16To8 ( i128arg  lo,
i128arg  hi 
)
staticnoexcept

Cuts the upper 8 bits off of 16-bit-wide lanes and returns sixteen values as a single 128-bit value.

Parameters
[in]loEight 16-bit lanes.
[in]hiEight 16-bit lanes.
Returns
Sixteen 8-bit values. The pseudocode returns values like similar to following.
r8[0] = lo8[0]
r8[1] = lo8[2]
r8[2] = lo8[4]
....
r8[7] = lo8[14]
r8[8] = hi8[0]
....
r8[15] = hi8[14]
Description
The behavior of this function can be illustrated as shown in the following figure.
dot_inline_dotgraph_26.png

§ NarrowFrom32To16()

nn::nlib::simd::I128::NarrowFrom32To16 ( i128arg  lo,
i128arg  hi 
)
staticnoexcept

Cuts the upper 16 bits off of 32-bit-wide lanes and returns eight values as a single 128-bit value.

Parameters
[in]loFour 32-bit lanes.
[in]hiFour 32-bit lanes.
Returns
Eight 16-bit values. The pseudocode returns values similar to the following.
r16[0] = lo16[0]
r16[1] = lo16[2]
....
r16[3] = lo16[3]
r16[4] = hi16[0]
....
r16[7] = hi16[3]
Description
The behavior of this function can be illustrated as shown in the following figure.
dot_inline_dotgraph_27.png

§ NarrowFrom64To32()

nn::nlib::simd::I128::NarrowFrom64To32 ( i128arg  lo,
i128arg  hi 
)
staticnoexcept

Cuts the upper 32 bits off of 64-bit-wide lanes and returns four values as a single 128-bit value.

Parameters
[in]loTwo 64-bit lanes.
[in]hiTwo 64-bit lanes.
Returns
Four 32-bit values. The pseudocode returns values similar to the following.
r32[0] = lo32[0]
r32[1] = lo32[2]
r32[2] = hi32[0]
r32[3] = hi32[2]
Description
The behavior of this function can be illustrated as shown in the following figure.
dot_inline_dotgraph_28.png

§ OrNot()

nn::nlib::simd::I128::OrNot ( i128arg  a,
i128arg  b 
)
staticnoexcept

Calculates the bitwise NOT of the a argument, and the bitwise OR of the b argument.

Parameters
[in]aA 128-bit value.
[in]bA 128-bit value.
Returns
Returns ~a | b.

§ PairwiseAdd16()

nn::nlib::simd::I128::PairwiseAdd16 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Horizontal addition of the 16-bit integer value in each lane of the a and b arguments.

Parameters
[in]aEight 16-bit integers.
[in]bEight 16-bit integers.
Returns
Returns the computational results represented by the following pseudocode.
r16[0] = a16[0] + a16[1]
r16[1] = a16[2] + a16[3]
....
r16[4] = b16[0] + b16[1]
r16[5] = b16[2] + b16[3]
....
r16[7] = b16[6] + b16[7]

§ PairwiseAdd32()

nn::nlib::simd::I128::PairwiseAdd32 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Horizontal addition of the 32-bit integer value in each lane of the a and b arguments.

Parameters
[in]aFour 32-bit integers.
[in]bFour 32-bit integers.
Returns
Returns the computational results represented by the following pseudocode.
r32[0] = a32[0] + a32[1]
r32[1] = a32[2] + a32[3]
r32[2] = b32[0] + b32[1]
r32[3] = b32[2] + b32[3]

§ PairwiseAdd8()

nn::nlib::simd::I128::PairwiseAdd8 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Horizontal addition of the 8-bit integer value in each lane of the a and b arguments.

Parameters
[in]aSixteen 8-bit integers.
[in]bSixteen 8-bit integers.
Returns
Returns the computational results represented by the following pseudocode.
r8[0] = a8[0] + a8[1]
r8[1] = a8[2] + a8[3]
r8[2] = a8[4] + a8[5]
r8[3] = a8[6] + a8[7]
....
r8[8] = b8[0] + b8[1]
r8[9] = b8[2] + b8[3]
....
r8[15] = b8[14] + b8[15]

§ Permute16()

template<int V0, int V1, int V2, int V3, int V4, int V5, int V6, int V7>
nn::nlib::simd::I128::Permute16 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Generates a new 128-bit value by arranging 16 16-bit values. You can specify -1 if arbitrary values generated do not matter.

Template Parameters
V0Either the lane number (0-15) or the value of -1 to copy to the lane 0 for the new 128-bit value.
V1Either the lane number (0-15) or the value of -1 to copy to the lane 1 for the new 128-bit value.
V2Either the lane number (0-15) or the value of -1 to copy to the lane 2 for the new 128-bit value.
V3Either the lane number (0-15) or the value of -1 to copy to the lane 3 for the new 128-bit value.
V4Either the lane number (0-15) or the value of -1 to copy to the lane 4 for the new 128-bit value.
V5Either the lane number (0-15) or the value of -1 to copy to the lane 5 for the new 128-bit value.
V6Either the lane number (0-15) or the value of -1 to copy to the lane 6 for the new 128-bit value.
V7Either the lane number (0-15) or the value of -1 to copy to the lane 7 for the new 128-bit value.
Parameters
[in]aEight 16-bit values.
[in]bEight 16-bit values.
Returns
Eight 16-bit values.
Description
Specify a lane number 0-7 to copy from a, or a lane number 8-15 to copy from b.
Returns computed results represented by the following pseudocode:
# a[-1] and b[-1] have undefined values.
r[0] = V0 < 8 ? a[V0] : b[V0 - 8];
r[1] = V1 < 8 ? a[V1] : b[V1 - 8];
.....
r[7] = V7 < 8 ? a[V7] : b[V7 - 8];

§ Permute32()

template<int V0, int V1, int V2, int V3>
nn::nlib::simd::I128::Permute32 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Generates a new 128-bit value by arranging 8 32-bit values. You can specify -1 if arbitrary values generated do not matter.

Template Parameters
V0Either the lane number (0-7) or the value of -1 to copy to the lane 0 for the new 128-bit value.
V1Either the lane number (0-7) or the value of -1 to copy to the lane 1 for the new 128-bit value.
V2Either the lane number (0-7) or the value of -1 to copy to the lane 2 for the new 128-bit value.
V3Either the lane number (0-7) or the value of -1 to copy to the lane 3 for the new 128-bit value.
Parameters
[in]aFour 32-bit values.
[in]bFour 32-bit values.
Returns
Four 32-bit values.
Description
Specify a lane number 0-3 to copy from a, or a lane number 4-7 to copy from b.
Returns computed results represented by the following pseudocode:
# a[-1] and b[-1] have undefined values.
r[0] = V0 < 4 ? a[V0] : b[V0 - 4];
r[1] = V1 < 4 ? a[V1] : b[V1 - 4];
.....
r[3] = V3 < 4 ? a[V3] : b[V3 - 4];

§ Permute8()

template<int V0, int V1, int V2, int V3, int V4, int V5, int V6, int V7, int V8, int V9, int V10, int V11, int V12, int V13, int V14, int V15>
nn::nlib::simd::I128::Permute8 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Generates a new 128-bit value by arranging 32 8-bit values. You can specify -1 if arbitrary values generated do not matter.

Template Parameters
V0Either the lane number (0-31) or the value of -1 to copy to the lane 0 for the new 128-bit value.
V1Either the lane number (0-31) or the value of -1 to copy to the lane 1 for the new 128-bit value.
V2Either the lane number (0-31) or the value of -1 to copy to the lane 2 for the new 128-bit value.
V3Either the lane number (0-31) or the value of -1 to copy to the lane 3 for the new 128-bit value.
V4Either the lane number (0-31) or the value of -1 to copy to the lane 4 for the new 128-bit value.
V5Either the lane number (0-31) or the value of -1 to copy to the lane 5 for the new 128-bit value.
V6Either the lane number (0-31) or the value of -1 to copy to the lane 6 for the new 128-bit value.
V7Either the lane number (0-31) or the value of -1 to copy to the lane 7 for the new 128-bit value.
V8Either the lane number (0-31) or the value of -1 to copy to the lane 8 for the new 128-bit value.
V9Either the lane number (0-31) or the value of -1 to copy to the lane 9 for the new 128-bit value.
V10Either the lane number (0-31) or the value of -1 to copy to the lane 10 for the new 128-bit value.
V11Either the lane number (0-31) or the value of -1 to copy to the lane 11 for the new 128-bit value.
V12Either the lane number (0-31) or the value of -1 to copy to the lane 12 for the new 128-bit value.
V13Either the lane number (0-31) or the value of -1 to copy to the lane 13 for the new 128-bit value.
V14Either the lane number (0-31) or the value of -1 to copy to the lane 14 for the new 128-bit value.
V15Either the lane number (0-31) or the value of -1 to copy to the lane 15 for the new 128-bit value.
Parameters
[in]a16 8-bit values.
[in]b16 8-bit values.
Returns
16 8-bit values.
Description
Specify a lane number 0-15 to copy from a, or a lane number 16-31 to copy from b.
Returns computed results represented by the following pseudocode:
# a[-1] and b[-1] have undefined values.
r[0] = V0 < 16 ? a[V0] : b[V0 - 16];
r[1] = V1 < 16 ? a[V1] : b[V1 - 16];
.....
r[15] = V15 < 16 ? a[V15] : b[V15 - 16];

§ PopCntMask8()

nn::nlib::simd::I128::PopCntMask8 ( i128arg  value)
staticnoexcept

Returns the number of masks with the value 0xFF among from 16 8-bit wide masks.

Parameters
[in]value16 8-bit wide masks.
Returns
The number of masked bytes.
Description
The result is the same as nlib_popcnt16(I128::MoveMask8(value)).

§ Reverse16()

nn::nlib::simd::I128::Reverse16 ( i128arg  value)
staticnoexcept

Reverses the endianness of eight 16-bit values.

Parameters
[in]valueEight 16-bit integers.
Returns
Eight 16-bit integers with reversed endianness.
Description
The behavior of this function can be illustrated as shown in the following figure.
dot_inline_dotgraph_29.png

§ Reverse32()

nn::nlib::simd::I128::Reverse32 ( i128arg  value)
staticnoexcept

Reverses the endianness of four 32-bit values.

Parameters
[in]valueFour 32-bit integers.
Returns
Four 32-bit integers with reversed endianness.
Description
The behavior of this function can be illustrated as shown in the following figure.
dot_inline_dotgraph_30.png

§ Reverse64()

nn::nlib::simd::I128::Reverse64 ( i128arg  value)
staticnoexcept

Reverses the endianness of two 64-bit values.

Parameters
[in]valueTwo 64-bit integers.
Returns
Two 64-bit integers with reversed endianness.
Description
The behavior of this function can be illustrated as shown in the following figure.
dot_inline_dotgraph_31.png

§ Select()

nn::nlib::simd::I128::Select ( i128arg  mask,
i128arg  a,
i128arg  b 
)
staticnoexcept

Selects and sets either of the values a and b for each lane according to the mask value.

Parameters
[in]maskSixteen 8 bit wide masks.
[in]aSixteen 8-bit values.
[in]bSixteen 8-bit values.
Returns
The compounded value of the a and b arguments. The pseudocode returns values similar to the following.
r8[0] = mask8[0] == 0xFFU ? a[0] : b[0]
r8[1] = mask8[1] == 0xFFU ? a[1] : b[1]
....
r8[15] = mask8[15] == 0xFFU ? a[15] : b[15]
Description
The results are undefined if the masks are not 0xFF or 0. Used in place of the of if statement in SIMD code. For example, if you want to set a lane with a value less than 0 set to 0, you can avoid conditional branching by writing the following code:
// result[i] = a[i] < 0 ?0 :0 : a[i];
zero = I128::SetZero();
mask = I128::CmpLtInt8(a, zero);
result = I128::Select(mask, zero, a);
// same to I128::MaxInt8(a, zero);

§ SetUint16ToLane()

template<size_t N>
nn::nlib::simd::I128::SetUint16ToLane ( i128arg  value,
uint16_t  v 
)
staticnoexcept

Sets v to the unsigned 16-bit integer from lane N of the value argument.

Template Parameters
TThe lane value. Specify an integer between 0 and 7.
Parameters
[in]valueEight unsigned 16-bit integers.
[in]vAn unsigned 16-bit integer.
Returns
The changed 128-bit value.

§ SetUint32ToLane()

template<size_t N>
nn::nlib::simd::I128::SetUint32ToLane ( i128arg  value,
uint32_t  v 
)
staticnoexcept

Sets v to the unsigned 32-bit integer from lane N of the value argument.

Template Parameters
TThe lane value. Specify an integer between 0 and 3.
Parameters
[in]valueFour unsigned 32-bit integers.
[in]vAn unsigned 32-bit integer.
Returns
The changed 128-bit value.

§ SetUint64ToLane()

template<size_t N>
nn::nlib::simd::I128::SetUint64ToLane ( i128arg  value,
uint64_t  v 
)
staticnoexcept

Sets v to the unsigned 64-bit integer from lane N of the value argument.

Template Parameters
TThe lane value. Specify an integer between 0 and 1.
Parameters
[in]valueTwo unsigned 64-bit integers
[in]vAn unsigned 64-bit integer.
Returns
The changed 128-bit value.

§ SetUint8ToLane()

template<size_t N>
nn::nlib::simd::I128::SetUint8ToLane ( i128arg  value,
uint8_t  v 
)
staticnoexcept

Sets v to the unsigned 8-bit integer from lane N of the value argument.

Template Parameters
TThe lane value. Specify an integer between 0 and 15.
Parameters
[in]valueSixteen unsigned 8-bit integers.
[in]vAn unsigned 8-bit integer.
Returns
The changed 128-bit value.

§ SetValue() [1/3]

template<size_t N>
nn::nlib::simd::I128::SetValue ( i128  value,
each_select32_tag   
)
staticnoexcept

Sets all lanes to the 32-bit value in lane N of the value argument.

Template Parameters
NThe lane.
Parameters
[in]valueThe 128-bit value.
Returns
The 128-bit value that was set.

§ SetValue() [2/3]

template<size_t N>
nn::nlib::simd::I128::SetValue ( i128  value,
each_select16_tag   
)
staticnoexcept

Sets all lanes to the 16-bit value in lane N of the value argument.

Template Parameters
NThe lane.
Parameters
[in]valueThe 128-bit value.
Returns
The 128-bit value that was set.

§ SetValue() [3/3]

template<size_t N>
nn::nlib::simd::I128::SetValue ( i128  value,
each_select8_tag   
)
staticnoexcept

Sets all lanes to the 8-bit value in lane N of the value argument.

Template Parameters
NThe lane.
Parameters
[in]valueThe 128-bit value.
Returns
The 128-bit value that was set.

§ ShiftLeftLogical16()

template<size_t N>
nn::nlib::simd::I128::ShiftLeftLogical16 ( i128arg  value)
staticnoexcept

Each 16-bit lane is shifted to the left by N bits.

Template Parameters
NThe number of bits to be shifted to the left ( \(0 \leq N \leq 16\))
Parameters
[in]valueEight 16-bit unsigned integers.
Returns
Eight 16-bit unsigned integers.

§ ShiftLeftLogical32()

template<size_t N>
nn::nlib::simd::I128::ShiftLeftLogical32 ( i128arg  value)
staticnoexcept

Each 32-bit lane is shifted to the left by N bits.

Template Parameters
NThe number of bits to be shifted to the left ( \(0 \leq N \leq 32\))
Parameters
[in]valueFour 32-bit unsigned integers.
Returns
Four 32-bit unsigned integers.

§ ShiftLeftLogical64()

template<size_t N>
nn::nlib::simd::I128::ShiftLeftLogical64 ( i128arg  value)
staticnoexcept

Each 64-bit lane is shifted to the left by N bits.

Template Parameters
NThe number of bits to be shifted to the left ( \(0 \leq N \leq 64\))
Parameters
[in]valueTwo 64-bit unsigned integers.
Returns
Two 64-bit unsigned integers.

§ ShiftLeftLogical8()

template<size_t N>
nn::nlib::simd::I128::ShiftLeftLogical8 ( i128arg  value)
staticnoexcept

Each 8-bit lane is shifted to the left by N bits.

Template Parameters
NThe number of bits to be shifted to the left ( \(0 \leq N \leq 8\))
Parameters
[in]value16 8-bit unsigned integers.
Returns
16 8-bit unsigned integers.

§ ShiftRightArithmetic16()

template<size_t N>
nn::nlib::simd::I128::ShiftRightArithmetic16 ( i128arg  value)
staticnoexcept

Each 16-bit lane is arithmetically shifted to the right by N bits.

Template Parameters
NThe number of bits to be shifted to the right ( \(0 \leq N \leq 16\))
Parameters
[in]valueEight 16-bit signed integers.
Returns
Eight 16-bit signed integers.

§ ShiftRightArithmetic32()

template<size_t N>
nn::nlib::simd::I128::ShiftRightArithmetic32 ( i128arg  value)
staticnoexcept

Each 32-bit lane is arithmetically shifted to the right by N bits.

Template Parameters
NThe number of bits to be shifted to the right ( \(0 \leq N \leq 32\))
Parameters
[in]valueFour 32-bit signed integers.
Returns
Four 32-bit signed integers.

§ ShiftRightArithmetic8()

template<size_t N>
nn::nlib::simd::I128::ShiftRightArithmetic8 ( i128arg  value)
staticnoexcept

Each 8-bit lane is arithmetically shifted to the right by N bits.

Template Parameters
NThe number of bits to be shifted to the right ( \(0 \leq N \leq 8\))
Parameters
[in]value16 8-bit signed integers.
Returns
16 8-bit signed integers.

§ ShiftRightLogical16()

template<size_t N>
nn::nlib::simd::I128::ShiftRightLogical16 ( i128arg  value)
staticnoexcept

Each 16-bit lane is shifted to the right by N bits.

Template Parameters
NThe number of bits to be shifted to the right ( \(0 \leq N \leq 16\))
Parameters
[in]valueEight 16-bit unsigned integers.
Returns
Eight 16-bit unsigned integers.

§ ShiftRightLogical32()

template<size_t N>
nn::nlib::simd::I128::ShiftRightLogical32 ( i128arg  value)
staticnoexcept

Each 32-bit lane is shifted to the right by N bits.

Template Parameters
NThe number of bits to be shifted to the right ( \(0 \leq N \leq 32\))
Parameters
[in]valueFour 32-bit unsigned integers.
Returns
Four 32-bit unsigned integers.

§ ShiftRightLogical64()

template<size_t N>
nn::nlib::simd::I128::ShiftRightLogical64 ( i128arg  value)
staticnoexcept

Each 64-bit lane is shifted to the right by N bits.

Template Parameters
NThe number of bits to be shifted to the right ( \(0 \leq N \leq 64\))
Parameters
[in]valueTwo 64-bit unsigned integers.
Returns
Two 64-bit unsigned integers.

§ ShiftRightLogical8()

template<size_t N>
nn::nlib::simd::I128::ShiftRightLogical8 ( i128arg  value)
staticnoexcept

Each 8-bit lane is shifted to the right by N bits.

Template Parameters
NThe number of bits to be shifted to the right ( \(0 \leq N \leq 8\))
Parameters
[in]value16 8-bit unsigned integers.
Returns
16 8-bit unsigned integers.

§ Shuffle8()

nn::nlib::simd::I128::Shuffle8 ( i128arg  value,
i128arg  shuffle 
)
staticnoexcept

Sorts sixteen 8-bit values in an arbitrary order, including duplicates.

Parameters
[in]valueSixteen sortable 8-bit values.
[in]shuffleSixteen 8-bit indices. (The values are between 0 and 15, or 0x80.)
Returns
The pseudocode returns values similar to the following.
r8[0] = shuffle8[0] == 0x80 ?0 : value8[shuffle8[0]]
....
r8[15] = shuffle8[15] == 0x80 ?0 : value8[shuffle8[15]]
Description
Behavior is undefined if the 8-bit values in shuffle are neither between 0 and 15 nor 0x80.

§ Sub16()

nn::nlib::simd::I128::Sub16 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Subtracts the 16-bit integer values in each lane of the b argument from each lane of the a argument.

Parameters
[in]aEight 16-bit values.
[in]bEight 16-bit values.
Returns
Returns the computational results represented by the following pseudocode.
r16[0] = a16[0] - b16[0]
r16[1] = a16[1] - b16[0]
....
r16[7] = a16[7] - b16[7]

§ Sub32()

nn::nlib::simd::I128::Sub32 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Subtracts the 32-bit integer values in each lane of the b argument from each lane of the a argument.

Parameters
[in]aFour 32-bit values.
[in]bFour 32-bit values.
Returns
Returns the computational results represented by the following pseudocode.
r32[0] = a32[0] - b32[0]
r32[1] = a32[1] - b32[0]
...
r32[3] = a32[3] - b32[3]

§ Sub64()

nn::nlib::simd::I128::Sub64 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Subtracts the 64-bit integer values in each lane of the b argument from each lane of the a argument.

Parameters
[in]aTwo 64-bit values.
[in]bTwo 64-bit values.
Returns
Returns the computational results represented by the following pseudocode.
r64[0] = a64[0] - b64[0]
r64[1] = a64[1] - b64[0]

§ Sub8()

nn::nlib::simd::I128::Sub8 ( i128arg  a,
i128arg  b 
)
staticnoexcept

Subtracts the 8-bit integer values in each lane of the b argument from each lane of the a argument.

Parameters
[in]aSixteen 8-bit values.
[in]bSixteen 8-bit values.
Returns
Returns the computational results represented by the following pseudocode.
r8[0] = a8[0] - b8[0]
r8[1] = a8[1] - b8[0]
....
r8[15] = a8[15] - b8[15]

§ SubInt16Saturated()

nn::nlib::simd::I128::SubInt16Saturated ( i128arg  a,
i128arg  b 
)
staticnoexcept

Saturated subtraction of the signed 16-bit integer value in each lane of the b argument from each lane of the a argument.

Parameters
[in]aEight 16-bit signed integers.
[in]bEight 16-bit signed integers.
Returns
Returns the computational results represented by the following pseudocode.
r16[0] = clamp(a16[0] - b16[0], INT16_MIN, INT16_MAX)
r16[1] = clamp(a16[1] - b16[1], INT16_MIN, INT16_MAX)
....
r16[7] = clamp(a16[7] - b16[7], INT16_MIN, INT16_MAX)

§ SubInt8Saturated()

nn::nlib::simd::I128::SubInt8Saturated ( i128arg  a,
i128arg  b 
)
staticnoexcept

Saturated subtraction of the signed 8-bit integer value in each lane of the b argument from each lane of the a argument.

Parameters
[in]aSixteen 8-bit signed integers.
[in]bSixteen 8-bit signed integers.
Returns
Returns the computational results represented by the following pseudocode.
r8[0] = clamp(a8[0] - b8[0], INT8_MIN, INT8_MAX)
r8[1] = clamp(a8[1] - b8[1], INT8_MIN, INT8_MAX)
....
r8[15] = clamp(a8[15] - b8[15], INT8_MIN, INT8_MAX)

§ SubUint16Saturated()

nn::nlib::simd::I128::SubUint16Saturated ( i128arg  a,
i128arg  b 
)
staticnoexcept

Saturated subtraction of the unsigned 16-bit integer value in each lane of the b argument from each lane of the a argument.

Parameters
[in]aEight 16-bit unsigned integers.
[in]bEight 16-bit unsigned integers.
Returns
Returns the computational results represented by the following pseudocode.
r16[0] = clamp(a16[0] - b16[0], 0)
r16[1] = clamp(a16[1] - b16[1], 0)
....
r16[7] = clamp(a16[7] - b16[7], 0)

§ SubUint8Saturated()

nn::nlib::simd::I128::SubUint8Saturated ( i128arg  a,
i128arg  b 
)
staticnoexcept

Saturated subtraction of the unsigned 8-bit integer value in each lane of the b argument from each lane of the a argument.

Parameters
[in]aSixteen 8-bit unsigned integers.
[in]bSixteen 8-bit unsigned integers.
Returns
Returns the computational results represented by the following pseudocode.
r8[0] = clamp(a8[0] - b8[0], 0)
r8[1] = clamp(a8[1] - b8[1], 0)
....
r8[15] = clamp(a8[15] - b8[15], 0)

The documentation for this class was generated from the following files: