Shift concatenated pairs of elements and return one element-width result.
More...
|
template<vec_unsigned_integer _Up, vec_integral _Sp>
requires (sizeof(typename _Up::value_type) == sizeof(typename _Sp::value_type)) |
| constexpr _Up | xvec::simd::funnel_shift_right (const _Up &high, const _Up &low, const _Sp &s) |
| | Funnel shift corresponding element pairs right. Conceptually concatenate each high element with its corresponding low element, shift right, and return the low N bits, where N is the element bit width.
|
| template<vec_unsigned_integer _Up, std::integral _Sp> |
| constexpr _Up | xvec::simd::funnel_shift_right (const _Up &high, const _Up &low, _Sp s) |
| | Funnel shift every element pair right using a shared shift count.
|
template<vec_unsigned_integer _Up, vec_integral _Sp>
requires (sizeof(typename _Up::value_type) == sizeof(typename _Sp::value_type)) |
| constexpr _Up | xvec::simd::funnel_shift_left (const _Up &high, const _Up &low, const _Sp &s) |
| | Funnel shift corresponding element pairs left. Conceptually concatenate each high element with its corresponding low element, shift left, and return the high N bits, where N is the element bit width.
|
| template<vec_unsigned_integer _Up, std::integral _Sp> |
| constexpr _Up | xvec::simd::funnel_shift_left (const _Up &high, const _Up &low, _Sp s) |
| | Funnel shift every element pair left using a shared shift count.
|
Shift concatenated pairs of elements and return one element-width result.
Proposed in P4010.
- See also
- https://wg21.link/P4010
◆ funnel_shift_left() [1/2]
template<vec_unsigned_integer _Up, std::integral _Sp>
| _Up xvec::simd::funnel_shift_left |
( |
const _Up & | high, |
|
|
const _Up & | low, |
|
|
_Sp | s ) |
|
constexpr |
Funnel shift every element pair left using a shared shift count.
- Parameters
-
| high | The upper elements of the concatenation. |
| low | The lower elements of the concatenation. |
| s | The shared shift count. |
- Precondition
- 0 <= s < N, where N is the element bit width.
- Returns
- A vector containing the funnel-shift results.
◆ funnel_shift_left() [2/2]
template<vec_unsigned_integer _Up, vec_integral _Sp>
requires (sizeof(typename _Up::value_type) == sizeof(typename _Sp::value_type))
| _Up xvec::simd::funnel_shift_left |
( |
const _Up & | high, |
|
|
const _Up & | low, |
|
|
const _Sp & | s ) |
|
constexpr |
Funnel shift corresponding element pairs left. Conceptually concatenate each high element with its corresponding low element, shift left, and return the high N bits, where N is the element bit width.
- Template Parameters
-
| _Up | The unsigned vector type. |
| _Sp | The integral shift-count vector type. |
- Parameters
-
| high | The upper elements of the concatenation. |
| low | The lower elements of the concatenation. |
| s | The element-wise shift counts. |
- Precondition
- For every element i, 0 <= s[i] < N.
- Returns
- A vector containing the funnel-shift results.
◆ funnel_shift_right() [1/2]
template<vec_unsigned_integer _Up, std::integral _Sp>
| _Up xvec::simd::funnel_shift_right |
( |
const _Up & | high, |
|
|
const _Up & | low, |
|
|
_Sp | s ) |
|
constexpr |
Funnel shift every element pair right using a shared shift count.
- Parameters
-
| high | The upper elements of the concatenation. |
| low | The lower elements of the concatenation. |
| s | The shared shift count. |
- Precondition
- 0 <= s < N, where N is the element bit width.
- Returns
- A vector containing the funnel-shift results.
◆ funnel_shift_right() [2/2]
template<vec_unsigned_integer _Up, vec_integral _Sp>
requires (sizeof(typename _Up::value_type) == sizeof(typename _Sp::value_type))
| _Up xvec::simd::funnel_shift_right |
( |
const _Up & | high, |
|
|
const _Up & | low, |
|
|
const _Sp & | s ) |
|
constexpr |
Funnel shift corresponding element pairs right. Conceptually concatenate each high element with its corresponding low element, shift right, and return the low N bits, where N is the element bit width.
- Template Parameters
-
| _Up | The unsigned vector type. |
| _Sp | The integral shift-count vector type. |
- Parameters
-
| high | The upper elements of the concatenation. |
| low | The lower elements of the concatenation. |
| s | The element-wise shift counts. |
- Precondition
- For every element i, 0 <= s[i] < N.
- Returns
- A vector containing the funnel-shift results.