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.
 
static i64 GetLo (i128 value) noexcept
 Returns the lower 64 bits of the value argument.
 
static i64 GetHi (i128 value) noexcept
 Returns the upper 64 bits of the value argument.
 
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 LoadA16 (uintptr_t p) noexcept
 Wraps LoadA16(const void* p).
 
static i128 LoadA8 (uintptr_t p) noexcept
 Wraps LoadA8(const void* p).
 
static i128 LoadA4 (uintptr_t p) noexcept
 Wraps LoadA4(const void* p).
 
static i128 LoadA2 (uintptr_t p) noexcept
 Wraps LoadA2(const void* p).
 
static i128 LoadA1 (uintptr_t p) noexcept
 Wraps LoadA1(const void* p).
 
static i128 LoadA16 (intptr_t p) noexcept
 Wraps LoadA16(const void* p).
 
static i128 LoadA8 (intptr_t p) noexcept
 Wraps LoadA8(const void* p).
 
static i128 LoadA4 (intptr_t p) noexcept
 Wraps LoadA4(const void* p).
 
static i128 LoadA2 (intptr_t p) noexcept
 Wraps LoadA2(const void* p).
 
static i128 LoadA1 (intptr_t p) noexcept
 Wraps LoadA1(const void* p).
 
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 StoreA16 (uintptr_t p, i128arg value) noexcept
 Wraps StoreA16(void* p, i128arg value).
 
static void StoreA8 (uintptr_t p, i128arg value) noexcept
 Wraps StoreA8(void* p, i128arg value).
 
static void StoreA4 (uintptr_t p, i128arg value) noexcept
 Wraps StoreA4(void* p, i128arg value).
 
static void StoreA2 (uintptr_t p, i128arg value) noexcept
 Wraps StoreA2(void* p, i128arg value).
 
static void StoreA1 (uintptr_t p, i128arg value) noexcept
 Wraps StoreA1(void* p, i128arg value).
 
static void StoreA16 (intptr_t p, i128arg value) noexcept
 Wraps StoreA16(void* p, i128arg value).
 
static void StoreA8 (intptr_t p, i128arg value) noexcept
 Wraps StoreA8(void* p, i128arg value).
 
static void StoreA4 (intptr_t p, i128arg value) noexcept
 Wraps StoreA4(void* p, i128arg value).
 
static void StoreA2 (intptr_t p, i128arg value) noexcept
 Wraps StoreA2(void* p, i128arg value).
 
static void StoreA1 (intptr_t p, i128arg value) noexcept
 Wraps StoreA1(void* p, i128arg value).
 
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...
 
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 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 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 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 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 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 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 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 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...
 
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 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.
 
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 set to zero. More...
 
template<size_t N>
static i128 ByteShiftRight (i128arg value) noexcept
 Right-shifts value by an amount of N bytes. Empty lanes are set to 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 ConvertFromInt8ToInt16 (i64arg value) noexcept
 Converts eight 8-bit signed integers into eight 16-bit signed integers. More...
 
static i128 ConvertFromInt16ToInt32 (i64arg value) noexcept
 Converts four 16-bit signed integers into four 32-bit signed integers. More...
 
static i128 ConvertFromInt32ToInt64 (i64arg value) noexcept
 Converts two 32-bit signed integers into two 64-bit signed integers. More...
 
static i128 ConvertFromUint8ToUint16 (i64arg value) noexcept
 Converts eight 8-bit unsigned integers into eight 16-bit unsigned integers. More...
 
static i128 ConvertFromUint16ToUint32 (i64arg value) noexcept
 Converts four16-bit unsigned integers into four 32-bit unsigned integers. More...
 
static i128 ConvertFromUint32ToUint64 (i64arg value) noexcept
 Converts two 32-bit unsigned integers into two 64-bit unsigned integers. More...
 
Zip and Unzip
static i128 Zip8 (i64arg a, i64arg b) noexcept
 Interleaves the 8-bit integer values of the a and b arguments. More...
 
static i128 Unzip8 (i64arg a, i64arg b) noexcept
 Uninterleaves the 8-bit integer values of the a and b arguments. More...
 
static i128 Zip16 (i64arg a, i64arg b) noexcept
 Interleaves the 16-bit integer values of the a and b arguments. More...
 
static i128 Unzip16 (i64arg a, i64arg b) noexcept
 Uninterleaves the 16-bit integer values of the a and b arguments. More...
 
static i128 Zip32 (i64arg a, i64arg b) noexcept
 Interleaves the 32-bit integer values of the a and b arguments. More...
 
static i128 Unzip32 (i64arg a, i64arg b) noexcept
 Uninterleaves the 32-bit integer values of the a and b arguments. This works in the same way as the Zip32 function. More...
 
Reversing the Endianness
static i128 Reverse16 (i128arg value) noexcept
 Reverses the endianness of eight 16-bit values.
 
static i128 Reverse32 (i128arg value) noexcept
 Reverses the endianness of four 32-bit values.
 
static i128 Reverse64 (i128arg value) noexcept
 Reverses the endianness of two 64-bit values.
 
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 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
 Compounds a and b according to the value of mask. More...
 
static i128 Shuffle8 (i128arg value, i128arg shuffle) noexcept
 Sorts sixteen 8-bit values in an arbitrary order, including duplicates. 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 1564 of file SimdInt.h.

Member Function Documentation

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]
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]
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]
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]
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)
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)
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)
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)
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.
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.
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.
template<size_t N>
nn::nlib::simd::I128::ByteShiftLeft ( i128arg  value)
staticnoexcept

Left-shifts value by an amount of N bytes. Empty lanes are set to zero.

Template Parameters
NThe number of bytes to shift.
Parameters
[in]valueThe 128-bit value being shifted.
Returns
The 128-bit value after shifting.
template<size_t N>
nn::nlib::simd::I128::ByteShiftRight ( i128arg  value)
staticnoexcept

Right-shifts value by an amount of N bytes. Empty lanes are set to zero.

Template Parameters
NThe number of bytes to shift.
Parameters
[in]valueThe 128-bit value being shifted.
Returns
The 128-bit value after shifting.
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
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 : 0x0000
r32[1] = a32[1] == b32[1] ? 0xFFFFFFFF : 0x0000
.....
r32[3] = a32[3] == b32[3] ? 0xFFFFFFFF : 0x0000
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 : 0x0000
r32[1] = a32[1] < b32[1] ? 0xFFFFFFFF : 0x0000
.....
r32[3] = a32[3] < b32[3] ? 0xFFFFFFFF : 0x0000
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
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
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
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
nn::nlib::simd::I128::ConvertFromInt16ToInt32 ( i64arg  value)
staticnoexcept

Converts four 16-bit signed integers into four 32-bit signed integers.

Parameters
[in]valueFour 16-bit signed integers.
Returns
Four 32-bit values. The pseudocode returns values similar to the following.
r16[0] = value16[0]
r16[1] = value16[0] < 0 ? 0xFFFF : 0x00
....
r16[6] = value16[4]
r16[7] = value16[4] < 0 ? 0xFFFF : 0x00
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])
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])
nn::nlib::simd::I128::ConvertFromInt32ToInt64 ( i64arg  value)
staticnoexcept

Converts two 32-bit signed integers into two 64-bit signed integers.

Parameters
[in]valueTwo 32-bit signed integers.
Returns
Two 64-bit values. The pseudocode returns values like the following.
r32[0] = value32[0]
r32[1] = value32[0] < 0 ? 0xFFFFFFFF : 0x00
r32[2] = value32[1]
r32[3] = value32[1] < 0 ? 0xFFFFFFFF : 0x00
nn::nlib::simd::I128::ConvertFromInt8ToInt16 ( i64arg  value)
staticnoexcept

Converts eight 8-bit signed integers into eight 16-bit signed integers.

Parameters
[in]valueEight 8-bit signed integers.
Returns
Eight 16-bit values. The pseudocode returns values similar to the following.
r8[0] = value8[0]
r8[1] = value8[0] < 0 ? 0xFF : 0x00
....
r8[14] = value8[7]
r8[15] = value8[7] < 0 ? 0xFF : 0x00
nn::nlib::simd::I128::ConvertFromUint16ToUint32 ( i64arg  value)
staticnoexcept

Converts four16-bit unsigned integers into four 32-bit unsigned integers.

Parameters
[in]valueFour 16-bit unsigned integers.
Returns
Four 32-bit values. The pseudocode returns values similar to the following.
r16[0] = value16[0]
r16[1] = 0
....
r16[6] = value16[4]
r16[7] = 0
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])
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])
nn::nlib::simd::I128::ConvertFromUint32ToUint64 ( i64arg  value)
staticnoexcept

Converts two 32-bit unsigned integers into two 64-bit unsigned integers.

Parameters
[in]valueTwo 32-bit unsigned integers.
Returns
Two 64-bit values. The pseudocode returns values like the following.
r32[0] = value32[0]
r32[1] = 0
r32[2] = value32[1]
r32[3] = 0
nn::nlib::simd::I128::ConvertFromUint8ToUint16 ( i64arg  value)
staticnoexcept

Converts eight 8-bit unsigned integers into eight 16-bit unsigned integers.

Parameters
[in]valueEight 8-bit unsigned integers.
Returns
Eight 16-bit values. The pseudocode returns values similar to the following.
r8[0] = value8[0]
r8[1] = 0
....
r8[14] = value8[7]
r8[15] = 0
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.
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.
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.
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.
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.
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."
....
}
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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.
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.
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.
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]
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]
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]
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]
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]
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]
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]
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]
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]
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.
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]
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]
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]
nn::nlib::simd::I128::Select ( i128arg  mask,
i128arg  a,
i128arg  b 
)
staticnoexcept

Compounds a and b according to the value of mask.

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.
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.
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.
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.
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.
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.
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.
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.
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.
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]
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]
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]
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]
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)
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)
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)
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)
nn::nlib::simd::I128::Unzip16 ( i64arg  a,
i64arg  b 
)
staticnoexcept

Uninterleaves the 16-bit integer values of the a and b arguments.

Parameters
[in]aFour 16-bit values.
[in]bFour 16-bit values.
Returns
Eight 16-bit values. The pseudocode returns values similar to the following.
r16[0] = a16[0]
r16[1] = a16[2]
....
r16[3] = b16[2]
r16[4] = a16[1]
....
r16[6] = b16[1]
r16[7] = b16[3]
nn::nlib::simd::I128::Unzip32 ( i64arg  a,
i64arg  b 
)
staticnoexcept

Uninterleaves the 32-bit integer values of the a and b arguments. This works in the same way as the Zip32 function.

Parameters
[in]aTwo 32-bit values.
[in]bTwo 32-bit values.
Returns
Four 32-bit values. The pseudocode returns values similar to the following.
r32[0] = a32[0]
r32[1] = b32[0]
r32[2] = a32[1]
r32[3] = b32[1]
nn::nlib::simd::I128::Unzip8 ( i64arg  a,
i64arg  b 
)
staticnoexcept

Uninterleaves the 8-bit integer values of the a and b arguments.

Parameters
[in]aEight 8-bit values.
[in]bEight 8-bit values.
Returns
Sixteen 8-bit values. The pseudocode returns values like similar to following.
r8[0] = a8[0]
r8[1] = a8[2]
r8[2] = a8[4]
r8[3] = a8[6]
....
r8[7] = b8[6]
r8[8] = a8[1]
....
r8[14] = b8[5]
r8[15] = b8[7]
nn::nlib::simd::I128::Zip16 ( i64arg  a,
i64arg  b 
)
staticnoexcept

Interleaves the 16-bit integer values of the a and b arguments.

Parameters
[in]aFour 16-bit values.
[in]bFour 16-bit values.
Returns
Eight 16-bit values. The pseudocode returns values similar to the following.
r16[0] = a16[0]
r16[1] = b16[0]
r16[2] = a16[1]
r16[3] = b16[1]
....
r16[6] = a16[3]
r16[7] = b16[3]
nn::nlib::simd::I128::Zip32 ( i64arg  a,
i64arg  b 
)
staticnoexcept

Interleaves the 32-bit integer values of the a and b arguments.

Parameters
[in]aTwo 32-bit values.
[in]bTwo 32-bit values.
Returns
Four 32-bit values. The pseudocode returns values similar to the following.
r32[0] = a32[0]
r32[1] = b32[0]
r32[2] = a32[1]
r32[3] = b32[1]
nn::nlib::simd::I128::Zip8 ( i64arg  a,
i64arg  b 
)
staticnoexcept

Interleaves the 8-bit integer values of the a and b arguments.

Parameters
[in]aEight 8-bit values.
[in]bEight 8-bit values.
Returns
Sixteen 8-bit values. The pseudocode returns values like similar to following.
r8[0] = a8[0]
r8[1] = b8[0]
r8[2] = a8[1]
r8[3] = b8[1]
....
r8[14] = a8[7]
r8[15] = b8[7]

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