Query mask elements, count selected elements, and find their indexes.
More...
Query mask elements, count selected elements, and find their indexes.
- See also
- https://eel.is/c++draft/simd.mask.reductions
◆ all_of() [1/2]
| bool xvec::simd::all_of |
( |
const mask_type auto & | mask | ) |
|
|
constexprnoexcept |
Return true if every mask element is true.
- Parameters
-
- Returns
- True if all elements are true.
◆ all_of() [2/2]
| bool xvec::simd::all_of |
( |
std::same_as< bool > auto | b | ) |
|
|
constexprnoexcept |
Apply all_of to one boolean element.
- Parameters
-
- Returns
- b.
◆ any_of() [1/2]
| bool xvec::simd::any_of |
( |
const mask_type auto & | mask | ) |
|
|
constexprnoexcept |
Return true if any mask element is true.
- Parameters
-
- Returns
- True if at least one element is true.
◆ any_of() [2/2]
| bool xvec::simd::any_of |
( |
std::same_as< bool > auto | b | ) |
|
|
constexprnoexcept |
Apply any_of to one boolean element.
- Parameters
-
- Returns
- b.
◆ none_of() [1/2]
| bool xvec::simd::none_of |
( |
const mask_type auto & | mask | ) |
|
|
constexprnoexcept |
Return true if no mask element is true.
- Parameters
-
- Returns
- True if all elements are false.
◆ none_of() [2/2]
| bool xvec::simd::none_of |
( |
std::same_as< bool > auto | b | ) |
|
|
constexprnoexcept |
Apply none_of to one boolean element.
- Parameters
-
- Returns
- !b.
◆ reduce_count() [1/2]
| simd_size_type xvec::simd::reduce_count |
( |
const mask_type auto & | mask | ) |
|
|
constexprnoexcept |
Count the true mask elements.
- Parameters
-
- Returns
- The number of true elements.
◆ reduce_count() [2/2]
| simd_size_type xvec::simd::reduce_count |
( |
std::same_as< bool > auto | b | ) |
|
|
constexprnoexcept |
Count one boolean element.
- Parameters
-
- Returns
- 1 if b is true, or 0 otherwise.
◆ reduce_max_index() [1/2]
| simd_size_type xvec::simd::reduce_max_index |
( |
const mask_type auto & | mask | ) |
|
|
constexprnoexcept |
Return the index of the last true mask element.
- Parameters
-
- Precondition
- At least one mask element is true.
- Returns
- The highest selected index.
◆ reduce_max_index() [2/2]
| simd_size_type xvec::simd::reduce_max_index |
( |
std::same_as< bool > | auto | ) |
|
|
constexprnoexcept |
Apply reduce_max_index to one boolean element.
- Precondition
- The input is true.
- Returns
- 0.
◆ reduce_min_index() [1/2]
| simd_size_type xvec::simd::reduce_min_index |
( |
const mask_type auto & | mask | ) |
|
|
constexprnoexcept |
Return the index of the first true mask element.
- Parameters
-
- Precondition
- At least one mask element is true.
- Returns
- The lowest selected index.
◆ reduce_min_index() [2/2]
| simd_size_type xvec::simd::reduce_min_index |
( |
std::same_as< bool > | auto | ) |
|
|
constexprnoexcept |
Apply reduce_min_index to one boolean element.
- Precondition
- The input is true.
- Returns
- 0.