|
| template<vec_type _V, detail::binary_reduction_fn< typename _V::value_type > _BinaryFn = std::plus<>> |
| constexpr _V::value_type | xvec::simd::reduce (const _V &v, _BinaryFn binop={}) |
| | Apply a reduction operation across all elements of the basic_vec value to reduce them to a single scalar value.
|
| template<typename _Tp, typename _Abi, detail::binary_reduction_fn< _Tp > _BinaryFn = std::plus<>> |
| constexpr _Tp | xvec::simd::reduce (const basic_vec< _Tp, _Abi > &v, const typename basic_vec< _Tp, _Abi >::mask_type &m, _BinaryFn binop={}, std::type_identity_t< _Tp > identity_element=detail::choose_identity_element< _BinaryFn, _Tp >()) |
| | Apply a reduction operation across all elements of the basic_vec value, using a mask and identity element.
|
| template<detail::vectorizable _Tp, detail::binary_reduction_fn< _Tp > _BinaryFn = std::plus<>> |
| constexpr _Tp | xvec::simd::reduce (const _Tp &v, _BinaryFn binop={}) noexcept |
| | Apply a reduction operation to a scalar value.
|
| template<detail::vectorizable _Tp, detail::binary_reduction_fn< _Tp > _BinaryFn = std::plus<>> |
| constexpr _Tp | xvec::simd::reduce (const _Tp &v, std::same_as< bool > auto m, _BinaryFn binop={}, std::type_identity_t< _Tp > identity_element=detail::choose_identity_element< _BinaryFn, _Tp >()) noexcept |
| | Apply a reduction operation to a conditionally selected scalar value.
|
template<vec_type _V>
requires requires (_V x) { min(x, x); } |
| constexpr _V::value_type | xvec::simd::reduce_min (const _V &v) noexcept |
| | Return the minimum vector element.
|
template<vec_type _V>
requires requires (_V x) { reduce_min(x); } |
| constexpr _V::value_type | xvec::simd::reduce_min (const _V &v, const typename _V::mask_type &m) noexcept |
| | Compute the minimum reduction over selected vector elements.
|
template<vec_type _V>
requires requires (_V x) { max(x, x); } |
| constexpr _V::value_type | xvec::simd::reduce_max (const _V &v) noexcept |
| | Return the maximum vector element.
|
template<vec_type _V>
requires requires (_V x) { reduce_max(x); } |
| constexpr _V::value_type | xvec::simd::reduce_max (const _V &v, const typename _V::mask_type &m) noexcept |
| | Compute the maximum reduction over selected vector elements.
|
template<detail::vectorizable _Tp>
requires std::totally_ordered<_Tp> |
| constexpr _Tp | xvec::simd::reduce_min (const _Tp &v) noexcept |
| | Return the minimum of a scalar value.
|
template<detail::vectorizable _Tp>
requires std::totally_ordered<_Tp> |
| constexpr _Tp | xvec::simd::reduce_min (const _Tp &v, std::same_as< bool > auto m) noexcept |
| | Return the minimum of a conditionally selected scalar value.
|
template<detail::vectorizable _Tp>
requires std::totally_ordered<_Tp> |
| constexpr _Tp | xvec::simd::reduce_max (const _Tp &v) noexcept |
| | Return the maximum of a scalar value.
|
template<detail::vectorizable _Tp>
requires std::totally_ordered<_Tp> |
| constexpr _Tp | xvec::simd::reduce_max (const _Tp &v, std::same_as< bool > auto m) noexcept |
| | Return the maximum of a conditionally selected scalar value.
|
Reduce vectors to scalar values, with masked and scalar-generic overloads.