tmp/tmp4ju7h3ny/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Bit manipulation <a id="simd.bit">[[simd.bit]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
template<simd-vec-type V> constexpr V byteswap(const V& v) noexcept;
|
| 5 |
+
```
|
| 6 |
+
|
| 7 |
+
*Constraints:* The type `V::value_type` models `integral`.
|
| 8 |
+
|
| 9 |
+
*Returns:* A `basic_vec` object where the iᵗʰ element is initialized to
|
| 10 |
+
the result of `std::byteswap(v[`i`])` for all i in the range \[`0`,
|
| 11 |
+
`V::size()`).
|
| 12 |
+
|
| 13 |
+
``` cpp
|
| 14 |
+
template<simd-vec-type V> constexpr V bit_ceil(const V& v) noexcept;
|
| 15 |
+
```
|
| 16 |
+
|
| 17 |
+
*Constraints:* The type `V::value_type` is an unsigned integer
|
| 18 |
+
type [[basic.fundamental]].
|
| 19 |
+
|
| 20 |
+
*Preconditions:* For every i in the range \[`0`, `V::size()`), the
|
| 21 |
+
smallest power of 2 greater than or equal to `v[`i`]` is representable
|
| 22 |
+
as a value of type `V::value_type`.
|
| 23 |
+
|
| 24 |
+
*Returns:* A `basic_vec` object where the iᵗʰ element is initialized to
|
| 25 |
+
the result of `std::bit_ceil(v[`i`])` for all i in the range \[`0`,
|
| 26 |
+
`V::size()`).
|
| 27 |
+
|
| 28 |
+
*Remarks:* A function call expression that violates the precondition in
|
| 29 |
+
the *Preconditions:* element is not a core constant
|
| 30 |
+
expression [[expr.const]].
|
| 31 |
+
|
| 32 |
+
``` cpp
|
| 33 |
+
template<simd-vec-type V> constexpr V bit_floor(const V& v) noexcept;
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
*Constraints:* The type `V::value_type` is an unsigned integer
|
| 37 |
+
type [[basic.fundamental]].
|
| 38 |
+
|
| 39 |
+
*Returns:* A `basic_vec` object where the iᵗʰ element is initialized to
|
| 40 |
+
the result of `std::bit_floor(v[`i`])` for all i in the range \[`0`,
|
| 41 |
+
`V::size()`).
|
| 42 |
+
|
| 43 |
+
``` cpp
|
| 44 |
+
template<simd-vec-type V>
|
| 45 |
+
constexpr typename V::mask_type has_single_bit(const V& v) noexcept;
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
*Constraints:* The type `V::value_type` is an unsigned integer
|
| 49 |
+
type [[basic.fundamental]].
|
| 50 |
+
|
| 51 |
+
*Returns:* A `basic_mask` object where the iᵗʰ element is initialized to
|
| 52 |
+
the result of `std::has_single_bit(v[`i`])` for all i in the range
|
| 53 |
+
\[`0`, `V::size()`).
|
| 54 |
+
|
| 55 |
+
``` cpp
|
| 56 |
+
template<simd-vec-type V0, simd-vec-type V1>
|
| 57 |
+
constexpr V0 rotl(const V0& v0, const V1& v1) noexcept;
|
| 58 |
+
template<simd-vec-type V0, simd-vec-type V1>
|
| 59 |
+
constexpr V0 rotr(const V0& v0, const V1& v1) noexcept;
|
| 60 |
+
```
|
| 61 |
+
|
| 62 |
+
*Constraints:*
|
| 63 |
+
|
| 64 |
+
- The type `V0::value_type` is an unsigned integer
|
| 65 |
+
type [[basic.fundamental]],
|
| 66 |
+
- the type `V1::value_type` models `integral`,
|
| 67 |
+
- `V0::size() == V1::size()` is `true`, and
|
| 68 |
+
- `sizeof(typename V0::value_type) == sizeof(typename V1::value_type)`
|
| 69 |
+
is `true`.
|
| 70 |
+
|
| 71 |
+
*Returns:* A `basic_vec` object where the iᵗʰ element is initialized to
|
| 72 |
+
the result of *`bit-func`*`(v0[`i`], static_cast<int>(v1[`i`]))` for all
|
| 73 |
+
i in the range \[`0`, `V0::size()`), where *`bit-func`* is the
|
| 74 |
+
corresponding scalar function from `<bit>`.
|
| 75 |
+
|
| 76 |
+
``` cpp
|
| 77 |
+
template<simd-vec-type V> constexpr V rotl(const V& v, int s) noexcept;
|
| 78 |
+
template<simd-vec-type V> constexpr V rotr(const V& v, int s) noexcept;
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
*Constraints:* The type `V::value_type` is an unsigned integer
|
| 82 |
+
type [[basic.fundamental]].
|
| 83 |
+
|
| 84 |
+
*Returns:* A `basic_vec` object where the iᵗʰ element is initialized to
|
| 85 |
+
the result of *`bit-func`*`(v[`i`], s)` for all i in the range \[`0`,
|
| 86 |
+
`V::size()`), where *`bit-func`* is the corresponding scalar function
|
| 87 |
+
from `<bit>`.
|
| 88 |
+
|
| 89 |
+
``` cpp
|
| 90 |
+
template<simd-vec-type V>
|
| 91 |
+
constexpr rebind_t<make_signed_t<typename V::value_type>, V> bit_width(const V& v) noexcept;
|
| 92 |
+
template<simd-vec-type V>
|
| 93 |
+
constexpr rebind_t<make_signed_t<typename V::value_type>, V> countl_zero(const V& v) noexcept;
|
| 94 |
+
template<simd-vec-type V>
|
| 95 |
+
constexpr rebind_t<make_signed_t<typename V::value_type>, V> countl_one(const V& v) noexcept;
|
| 96 |
+
template<simd-vec-type V>
|
| 97 |
+
constexpr rebind_t<make_signed_t<typename V::value_type>, V> countr_zero(const V& v) noexcept;
|
| 98 |
+
template<simd-vec-type V>
|
| 99 |
+
constexpr rebind_t<make_signed_t<typename V::value_type>, V> countr_one(const V& v) noexcept;
|
| 100 |
+
template<simd-vec-type V>
|
| 101 |
+
constexpr rebind_t<make_signed_t<typename V::value_type>, V> popcount(const V& v) noexcept;
|
| 102 |
+
```
|
| 103 |
+
|
| 104 |
+
*Constraints:* The type `V::value_type` is an unsigned integer
|
| 105 |
+
type [[basic.fundamental]].
|
| 106 |
+
|
| 107 |
+
*Returns:* A `basic_vec` object where the iᵗʰ element is initialized to
|
| 108 |
+
the result of *`bit-func`*`(v[`i`])` for all i in the range \[`0`,
|
| 109 |
+
`V::size()`), where *`bit-func`* is the corresponding scalar function
|
| 110 |
+
from `<bit>`.
|
| 111 |
+
|