tmp/tmp5hq3qze9/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Reductions <a id="simd.mask.reductions">[[simd.mask.reductions]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
template<size_t Bytes, class Abi>
|
| 5 |
+
constexpr bool all_of(const basic_mask<Bytes, Abi>& k) noexcept;
|
| 6 |
+
```
|
| 7 |
+
|
| 8 |
+
*Returns:* `true` if all boolean elements in `k` are `true`, otherwise
|
| 9 |
+
`false`.
|
| 10 |
+
|
| 11 |
+
``` cpp
|
| 12 |
+
template<size_t Bytes, class Abi>
|
| 13 |
+
constexpr bool any_of(const basic_mask<Bytes, Abi>& k) noexcept;
|
| 14 |
+
```
|
| 15 |
+
|
| 16 |
+
*Returns:* `true` if at least one boolean element in `k` is `true`,
|
| 17 |
+
otherwise `false`.
|
| 18 |
+
|
| 19 |
+
``` cpp
|
| 20 |
+
template<size_t Bytes, class Abi>
|
| 21 |
+
constexpr bool none_of(const basic_mask<Bytes, Abi>& k) noexcept;
|
| 22 |
+
```
|
| 23 |
+
|
| 24 |
+
*Returns:* `!any_of(k)`.
|
| 25 |
+
|
| 26 |
+
``` cpp
|
| 27 |
+
template<size_t Bytes, class Abi>
|
| 28 |
+
constexpr simd-size-type reduce_count(const basic_mask<Bytes, Abi>& k) noexcept;
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
*Returns:* The number of boolean elements in `k` that are `true`.
|
| 32 |
+
|
| 33 |
+
``` cpp
|
| 34 |
+
template<size_t Bytes, class Abi>
|
| 35 |
+
constexpr simd-size-type reduce_min_index(const basic_mask<Bytes, Abi>& k);
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
*Preconditions:* `any_of(k)` is `true`.
|
| 39 |
+
|
| 40 |
+
*Returns:* The lowest element index i where `k[`i`]` is `true`.
|
| 41 |
+
|
| 42 |
+
``` cpp
|
| 43 |
+
template<size_t Bytes, class Abi>
|
| 44 |
+
constexpr simd-size-type reduce_max_index(const basic_mask<Bytes, Abi>& k);
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
*Preconditions:* `any_of(k)` is `true`.
|
| 48 |
+
|
| 49 |
+
*Returns:* The greatest element index i where `k[`i`]` is `true`.
|
| 50 |
+
|
| 51 |
+
``` cpp
|
| 52 |
+
constexpr bool all_of(same_as<bool> auto x) noexcept;
|
| 53 |
+
constexpr bool any_of(same_as<bool> auto x) noexcept;
|
| 54 |
+
constexpr simd-size-type reduce_count(same_as<bool> auto x) noexcept;
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
*Returns:* `x`.
|
| 58 |
+
|
| 59 |
+
``` cpp
|
| 60 |
+
constexpr bool none_of(same_as<bool> auto x) noexcept;
|
| 61 |
+
```
|
| 62 |
+
|
| 63 |
+
*Returns:* `!x`.
|
| 64 |
+
|
| 65 |
+
``` cpp
|
| 66 |
+
constexpr simd-size-type reduce_min_index(same_as<bool> auto x);
|
| 67 |
+
constexpr simd-size-type reduce_max_index(same_as<bool> auto x);
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
+
*Preconditions:* `x` is `true`.
|
| 71 |
+
|
| 72 |
+
*Returns:* `0`.
|
| 73 |
+
|