Defines bitwise operations. More...

Functions | |
| template<typename T0 , typename T1 , int SZ, typename U , class Sat = xetla_saturation_off_tag> | |
| __XETLA_API xetla_vector< T0, SZ > | gpu::xetla::xetla_shl (xetla_vector< T1, SZ > src0, U src1, Sat sat={}) |
| Shift left operation (vector version) | |
| template<typename T0 , typename T1 , typename T2 , class Sat = xetla_saturation_off_tag> | |
| std::remove_const< T0 >::type | gpu::xetla::xetla_shl (T1 src0, T2 src1, Sat sat={}) |
| Shift left operation (scalar version) | |
| template<typename T0 , typename T1 , int SZ, typename U , class Sat = xetla_saturation_off_tag> | |
| __XETLA_API xetla_vector< T0, SZ > | gpu::xetla::xetla_shr (xetla_vector< T1, SZ > src0, U src1, Sat sat={}) |
| Shift right operation (vector version) | |
| template<typename T0 , typename T1 , typename T2 , class Sat = xetla_saturation_off_tag> | |
| __XETLA_API std::remove_const< T0 >::type | gpu::xetla::xetla_shr (T1 src0, T2 src1, Sat sat={}) |
| Shift right operation (scalar version) | |
| template<typename T0 , typename T1 , int SZ> | |
| __XETLA_API xetla_vector< T0, SZ > | gpu::xetla::xetla_rol (xetla_vector< T1, SZ > src0, xetla_vector< T1, SZ > src1) |
| Rotate left operation with two vector inputs. | |
| template<typename T0 , typename T1 , int SZ, typename U > | |
| __XETLA_API std::enable_if_t< std::is_integral< T0 >::value &&std::is_integral< T1 >::value &&std::is_integral< U >::value &&is_xetla_scalar< U >::value, xetla_vector< T0, SZ > > | gpu::xetla::xetla_rol (xetla_vector< T1, SZ > src0, U src1) |
| Rotate left operation with a vector and a scalar inputs. | |
| template<typename T0 , typename T1 , typename T2 > | |
| __XETLA_API std::enable_if_t< std::is_integral< T0 >::value &&std::is_integral< T1 >::value &&std::is_integral< T2 >::value, remove_const_t< T0 > > | gpu::xetla::xetla_rol (T1 src0, T2 src1) |
| Rotate left operation with two scalar inputs. | |
| template<typename T0 , typename T1 , int SZ> | |
| __XETLA_API xetla_vector< T0, SZ > | gpu::xetla::xetla_ror (xetla_vector< T1, SZ > src0, xetla_vector< T1, SZ > src1) |
| Rotate right operation with two vector inputs. | |
| template<typename T0 , typename T1 , int SZ, typename U > | |
| __XETLA_API std::enable_if_t< std::is_integral< T0 >::value &&std::is_integral< T1 >::value &&std::is_integral< U >::value &&is_xetla_scalar< U >::value, xetla_vector< T0, SZ > > | gpu::xetla::xetla_ror (xetla_vector< T1, SZ > src0, U src1) |
| Rotate right operation with a vector and a scalar inputs. | |
| template<typename T0 , typename T1 , typename T2 > | |
| __XETLA_API std::enable_if_t< std::is_integral< T0 >::value &&std::is_integral< T1 >::value &&std::is_integral< T2 >::value, remove_const_t< T0 > > | gpu::xetla::xetla_ror (T1 src0, T2 src1) |
| Rotate right operation with two scalar inputs. | |
| template<typename T0 , typename T1 , int SZ, typename U , class Sat = xetla_saturation_off_tag> | |
| __XETLA_API xetla_vector< T0, SZ > | gpu::xetla::xetla_lsr (xetla_vector< T1, SZ > src0, U src1, Sat sat={}) |
| Logical Shift Right (vector version) | |
| template<typename T0 , typename T1 , typename T2 , class Sat = xetla_saturation_off_tag> | |
| __XETLA_API std::remove_const< T0 >::type | gpu::xetla::xetla_lsr (T1 src0, T2 src1, Sat sat={}) |
| Logical Shift Right (scalar version) | |
| template<typename T0 , typename T1 , int SZ, typename U , class Sat = xetla_saturation_off_tag> | |
| __XETLA_API xetla_vector< T0, SZ > | gpu::xetla::xetla_asr (xetla_vector< T1, SZ > src0, U src1, Sat sat={}) |
| Arithmetical Shift Right (vector version) | |
| template<typename T0 , typename T1 , typename T2 , class Sat = xetla_saturation_off_tag> | |
| __XETLA_API std::remove_const< T0 >::type | gpu::xetla::xetla_asr (T1 src0, T2 src1, Sat sat={}) |
| Arithmetical Shift Right (scalar version) | |
| template<int N> | |
| __XETLA_API uint32_t | gpu::xetla::xetla_pack_mask (xetla_mask< N > src0) |
| Pack a xetla_mask into a single unsigned 32-bit integer value. | |
| template<int N> | |
| __XETLA_API xetla_mask< N > | gpu::xetla::xetla_unpack_mask (uint32_t src0) |
| Unpack an unsigned 32-bit integer value into a xetla_mask. | |
Defines bitwise operations.
| __XETLA_API std::remove_const< T0 >::type gpu::xetla::xetla_asr | ( | T1 | src0, |
| T2 | src1, | ||
| Sat | sat = {} |
||
| ) |
Arithmetical Shift Right (scalar version)
| T0 | element type of the returned value. Must be any integer type. |
| T1 | element type of the input value src0. Must be any integer type. |
| T2 | type of scalar operand src1. Must be any integer type. |
| src0 | the input value. |
| src1 | the number of bit positions the input vector shall be shifted. |
| sat | enables/disables the saturation (off by default). Possible values: saturation_on/saturation_off. |
| __XETLA_API xetla_vector< T0, SZ > gpu::xetla::xetla_asr | ( | xetla_vector< T1, SZ > | src0, |
| U | src1, | ||
| Sat | sat = {} |
||
| ) |
Arithmetical Shift Right (vector version)
| T0 | element type of the returned vector. Must be any integer type. |
| T1 | element type of the input vector. Must be any integer type. |
| SZ | size of the input and returned vectors. |
| U | type of scalar operand src1. Must be any integer type. |
| src0 | the input vector. |
| src1 | the number of bit positions the input vector shall be shifted. |
| sat | enables/disables the saturation (off by default). Possible values: saturation_on/saturation_off. |
| __XETLA_API std::remove_const< T0 >::type gpu::xetla::xetla_lsr | ( | T1 | src0, |
| T2 | src1, | ||
| Sat | sat = {} |
||
| ) |
Logical Shift Right (scalar version)
| T0 | element type of the returned value. Must be any integer type. |
| T1 | element type of the input value src0. Must be any integer type. |
| T2 | type of scalar operand src1. Must be any integer type. |
| src0 | the input value. |
| src1 | the number of bit positions the input vector shall be shifted. |
| sat | enables/disables the saturation (off by default). Possible values: saturation_on/saturation_off. |
| __XETLA_API xetla_vector< T0, SZ > gpu::xetla::xetla_lsr | ( | xetla_vector< T1, SZ > | src0, |
| U | src1, | ||
| Sat | sat = {} |
||
| ) |
Logical Shift Right (vector version)
| T0 | element type of the returned vector. Must be any integer type. |
| T1 | element type of the input vector. Must be any integer type. |
| SZ | size of the input and returned vectors. |
| U | type of scalar operand src1. Must be any integer type. |
| src0 | the input vector. |
| src1 | the number of bit positions the input vector shall be shifted. |
| sat | enables/disables the saturation (off by default). Possible values: saturation_on/saturation_off. |
| __XETLA_API uint32_t gpu::xetla::xetla_pack_mask | ( | xetla_mask< N > | src0 | ) |
Pack a xetla_mask into a single unsigned 32-bit integer value.
i'th bit in the returned value is set to the result of comparison of the i'th element of the input argument to zero. "equals to zero" gives 0, "not equal to zero" gives 1. Remaining (if any) bits if the result are filled with 0.
| N | Size of the input mask. |
| src0 | The input mask. |
unsigned int 32-bit value. | __XETLA_API std::enable_if_t< std::is_integral< T0 >::value &&std::is_integral< T1 >::value &&std::is_integral< T2 >::value, remove_const_t< T0 > > gpu::xetla::xetla_rol | ( | T1 | src0, |
| T2 | src1 | ||
| ) |
Rotate left operation with two scalar inputs.
| T0 | element type of the returned value. Must be any integer type. |
| T1 | element type of the input value. Must be any integer type. |
| T2 | type of scalar operand src1. Must be any integer type. |
| src0 | the input value. |
| src1 | the number of bit positions the input vector shall be rotated. |
| __XETLA_API std::enable_if_t< std::is_integral< T0 >::value &&std::is_integral< T1 >::value &&std::is_integral< U >::value &&is_xetla_scalar< U >::value, xetla_vector< T0, SZ > > gpu::xetla::xetla_rol | ( | xetla_vector< T1, SZ > | src0, |
| U | src1 | ||
| ) |
Rotate left operation with a vector and a scalar inputs.
| T0 | element type of the returned vector. Must be any integer type. |
| T1 | element type of the input vector. Must be any integer type. |
| SZ | size of the input and returned vectors. |
| U | type of scalar operand src1. Must be any integer type. |
| src0 | the input vector. |
| src1 | the number of bit positions the input vector shall be rotated. |
| __XETLA_API xetla_vector< T0, SZ > gpu::xetla::xetla_rol | ( | xetla_vector< T1, SZ > | src0, |
| xetla_vector< T1, SZ > | src1 | ||
| ) |
Rotate left operation with two vector inputs.
| T0 | element type of the returned vector. Must be any integer type. |
| T1 | element type of the input vector. Must be any integer type. |
| SZ | size of the input and returned vectors. |
| src0 | the input vector. |
| src1 | the vector with number of bit positions by which the elements of the input vector src0 shall be rotated. |
| __XETLA_API std::enable_if_t< std::is_integral< T0 >::value &&std::is_integral< T1 >::value &&std::is_integral< T2 >::value, remove_const_t< T0 > > gpu::xetla::xetla_ror | ( | T1 | src0, |
| T2 | src1 | ||
| ) |
Rotate right operation with two scalar inputs.
| T0 | element type of the returned value. Must be any integer type. |
| T1 | element type of the input value. Must be any integer type. |
| T2 | type of scalar operand src1. Must be any integer type. |
| src0 | the input value. |
| src1 | the number of bit positions the input vector shall be rotated. |
| __XETLA_API std::enable_if_t< std::is_integral< T0 >::value &&std::is_integral< T1 >::value &&std::is_integral< U >::value &&is_xetla_scalar< U >::value, xetla_vector< T0, SZ > > gpu::xetla::xetla_ror | ( | xetla_vector< T1, SZ > | src0, |
| U | src1 | ||
| ) |
Rotate right operation with a vector and a scalar inputs.
| T0 | element type of the returned vector. Must be any integer type. |
| T1 | element type of the input vector. Must be any integer type. |
| SZ | size of the input and returned vectors. |
| U | type of scalar operand src1. Must be any integer type. |
| src0 | the input vector. |
| src1 | the number of bit positions the input vector shall be rotated. |
| __XETLA_API xetla_vector< T0, SZ > gpu::xetla::xetla_ror | ( | xetla_vector< T1, SZ > | src0, |
| xetla_vector< T1, SZ > | src1 | ||
| ) |
Rotate right operation with two vector inputs.
| T0 | element type of the returned vector. Must be any integer type. |
| T1 | element type of the input vector. Must be any integer type. |
| SZ | size of the input and returned vectors. |
| src0 | the input vector. |
| src1 | the vector with number of bit positions by which the elements of the input vector src0 shall be rotated. |
| std::remove_const< T0 >::type gpu::xetla::xetla_shl | ( | T1 | src0, |
| T2 | src1, | ||
| Sat | sat = {} |
||
| ) |
Shift left operation (scalar version)
| T0 | element type of the returned value. Must be any integer type. |
| T1 | element type of the input value. Must be any integer type. |
| T2 | type of scalar operand src1. Must be any integer type. |
| src0 | the input value. |
| src1 | the number of bit positions the input vector shall be shifted. |
| sat | enables/disables the saturation (off by default). Possible values: saturation_on/saturation_off. |
| __XETLA_API xetla_vector< T0, SZ > gpu::xetla::xetla_shl | ( | xetla_vector< T1, SZ > | src0, |
| U | src1, | ||
| Sat | sat = {} |
||
| ) |
Shift left operation (vector version)
| T0 | element type of the returned vector. Must be any integer type. |
| T1 | element type of the input vector. Must be any integer type. |
| SZ | size of the input and returned vector. |
| U | type of scalar operand src1. Must be any integer type. |
| src0 | the input vector. |
| src1 | the number of bit positions the input vector shall be shifted. |
| sat | enables/disables the saturation (off by default). Possible values: saturation_on/saturation_off. |
| __XETLA_API std::remove_const< T0 >::type gpu::xetla::xetla_shr | ( | T1 | src0, |
| T2 | src1, | ||
| Sat | sat = {} |
||
| ) |
Shift right operation (scalar version)
| T0 | element type of the returned value. Must be any integer type. |
| T1 | element type of the input value. Must be any integer type. |
| T2 | type of scalar operand src1. Must be any integer type. |
| src0 | the input value. |
| src1 | the number of bit positions the input vector shall be shifted. |
| sat | enables/disables the saturation (off by default). Possible values: saturation_on/saturation_off. |
| __XETLA_API xetla_vector< T0, SZ > gpu::xetla::xetla_shr | ( | xetla_vector< T1, SZ > | src0, |
| U | src1, | ||
| Sat | sat = {} |
||
| ) |
Shift right operation (vector version)
| T0 | element type of the returned vector. Must be any integer type. |
| T1 | element type of the input vector. Must be any integer type. |
| SZ | size of the input and returned vector. |
| U | type of scalar operand src1. Must be any integer type. |
| src0 | the input vector. |
| src1 | the number of bit positions the input vector shall be shifted. |
| sat | enables/disables the saturation (off by default). Possible values: saturation_on/saturation_off. |
| __XETLA_API xetla_mask< N > gpu::xetla::xetla_unpack_mask | ( | uint32_t | src0 | ) |
Unpack an unsigned 32-bit integer value into a xetla_mask.
Only N least significant bits are used, where N is the number of elements in the result mask. Each input bit is stored into the corresponding vector element of the output mask.
| N | Size of the output mask. |
| src0 | The input packed mask. |