tmp/tmpkc7uu3la/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Memory permute <a id="simd.permute.memory">[[simd.permute.memory]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
template<class V = see below, ranges::contiguous_range R, simd-integral I, class... Flags>
|
| 5 |
+
requires ranges::sized_range<R>
|
| 6 |
+
constexpr V unchecked_gather_from(R&& in, const I& indices, flags<Flags...> f = {});
|
| 7 |
+
template<class V = see below, ranges::contiguous_range R, simd-integral I, class... Flags>
|
| 8 |
+
requires ranges::sized_range<R>
|
| 9 |
+
constexpr V unchecked_gather_from(R&& in, const typename I::mask_type& mask,
|
| 10 |
+
const I& indices, flags<Flags...> f = {});
|
| 11 |
+
```
|
| 12 |
+
|
| 13 |
+
Let `mask` be `typename I::mask_type(true)` for the overload with no
|
| 14 |
+
`mask` parameter.
|
| 15 |
+
|
| 16 |
+
*Preconditions:* All values in
|
| 17 |
+
`select(mask, indices, typename I::value_type())` are in the range
|
| 18 |
+
\[`0`, `ranges::size(in)`).
|
| 19 |
+
|
| 20 |
+
*Effects:* Equivalent to:
|
| 21 |
+
`return partial_gather_from<V>(in, mask, indices, f);`
|
| 22 |
+
|
| 23 |
+
*Remarks:* The default argument for template parameter `V` is
|
| 24 |
+
`vec<ranges::range_value_t<R>, I::size()>`.
|
| 25 |
+
|
| 26 |
+
``` cpp
|
| 27 |
+
template<class V = see below, ranges::contiguous_range R, simd-integral I, class... Flags>
|
| 28 |
+
requires ranges::sized_range<R>
|
| 29 |
+
constexpr V partial_gather_from(R&& in, const I& indices, flags<Flags...> f = {});
|
| 30 |
+
template<class V = see below, ranges::contiguous_range R, simd-integral I, class... Flags>
|
| 31 |
+
requires ranges::sized_range<R>
|
| 32 |
+
constexpr V partial_gather_from(R&& in, const typename I::mask_type& mask,
|
| 33 |
+
const I& indices, flags<Flags...> f = {});
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
Let:
|
| 37 |
+
|
| 38 |
+
- `mask` be `typename I::mask_type(true)` for the overload with no
|
| 39 |
+
`mask` parameter;
|
| 40 |
+
- `T` be `typename V::value_type`.
|
| 41 |
+
|
| 42 |
+
*Mandates:*
|
| 43 |
+
|
| 44 |
+
- `ranges::range_value_t<R>` is a vectorizable type,
|
| 45 |
+
- `same_as<remove_cvref_t<V>, V>` is `true`,
|
| 46 |
+
- `V` is an enabled specialization of `basic_vec`,
|
| 47 |
+
- `V::size() == I::size()` is `true`, and
|
| 48 |
+
- if the template parameter pack `Flags` does not contain
|
| 49 |
+
*convert-flag*, then the conversion from `ranges::range_value_t<R>` to
|
| 50 |
+
`T` is value-preserving.
|
| 51 |
+
|
| 52 |
+
*Preconditions:*
|
| 53 |
+
|
| 54 |
+
- If the template parameter pack `Flags` contains *aligned-flag*,
|
| 55 |
+
`ranges::data(in)` points to storage aligned by
|
| 56 |
+
`alignment_v<V, ranges::range_value_t<R>>`.
|
| 57 |
+
- If the template parameter pack `Flags` contains
|
| 58 |
+
*`overaligned-flag`*`<N>`, `ranges::data(in)` points to storage
|
| 59 |
+
aligned by `N`.
|
| 60 |
+
|
| 61 |
+
*Returns:* A `basic_vec` object where the iᵗʰ element is initialized to
|
| 62 |
+
the result of
|
| 63 |
+
|
| 64 |
+
``` cpp
|
| 65 |
+
mask[i] && indices[i] < ranges::size(in) ? static_cast<T>(ranges::data(in)[indices[i]]) : T()
|
| 66 |
+
```
|
| 67 |
+
|
| 68 |
+
for all i in the range \[`0`, `I::size()`).
|
| 69 |
+
|
| 70 |
+
*Remarks:* The default argument for template parameter `V` is
|
| 71 |
+
`vec<ranges::range_value_t<R>, I::size()>`.
|
| 72 |
+
|
| 73 |
+
``` cpp
|
| 74 |
+
template<simd-vec-type V, ranges::contiguous_range R, simd-integral I, class... Flags>
|
| 75 |
+
requires ranges::sized_range<R>
|
| 76 |
+
constexpr void unchecked_scatter_to(const V& v, R&& out, const I& indices,
|
| 77 |
+
flags<Flags...> f = {});
|
| 78 |
+
template<simd-vec-type V, ranges::contiguous_range R, simd-integral I, class... Flags>
|
| 79 |
+
requires ranges::sized_range<R>
|
| 80 |
+
constexpr void unchecked_scatter_to(const V& v, R&& out, const typename I::mask_type& mask,
|
| 81 |
+
const I& indices, flags<Flags...> f = {});
|
| 82 |
+
```
|
| 83 |
+
|
| 84 |
+
Let `mask` be `typename I::mask_type(true)` for the overload with no
|
| 85 |
+
`mask` parameter.
|
| 86 |
+
|
| 87 |
+
*Preconditions:* All values in
|
| 88 |
+
`select(mask, indices, typename I::value_type())` are in the range
|
| 89 |
+
\[`0`, `ranges::size(out)`).
|
| 90 |
+
|
| 91 |
+
*Effects:* Equivalent to:
|
| 92 |
+
`partial_scatter_to(v, out, mask, indices, f);`
|
| 93 |
+
|
| 94 |
+
``` cpp
|
| 95 |
+
template<simd-vec-type V, ranges::contiguous_range R, simd-integral I, class... Flags>
|
| 96 |
+
requires ranges::sized_range<R>
|
| 97 |
+
constexpr void
|
| 98 |
+
partial_scatter_to(const V& v, R&& out, const I& indices, flags<Flags...> f = {});
|
| 99 |
+
template<simd-vec-type V, ranges::contiguous_range R, simd-integral I, class... Flags>
|
| 100 |
+
requires ranges::sized_range<R>
|
| 101 |
+
constexpr void partial_scatter_to(const V& v, R&& out, const typename I::mask_type& mask,
|
| 102 |
+
const I& indices, flags<Flags...> f = {});
|
| 103 |
+
```
|
| 104 |
+
|
| 105 |
+
Let `mask` be `typename I::mask_type(true)` for the overload with no
|
| 106 |
+
`mask` parameter.
|
| 107 |
+
|
| 108 |
+
*Constraints:* `V::size() == I::size()` is `true`.
|
| 109 |
+
|
| 110 |
+
*Mandates:*
|
| 111 |
+
|
| 112 |
+
- `ranges::range_value_t<R>` is a vectorizable type, and
|
| 113 |
+
- if the template parameter pack `Flags` does not contain
|
| 114 |
+
*convert-flag*, then the conversion from `typename V::value_type` to
|
| 115 |
+
`ranges::range_value_t<R>` is value-preserving.
|
| 116 |
+
|
| 117 |
+
*Preconditions:*
|
| 118 |
+
|
| 119 |
+
- For all selected indices i the values `indices[`i`]` are unique.
|
| 120 |
+
- If the template parameter pack `Flags` contains *aligned-flag*,
|
| 121 |
+
`ranges::data(out)` points to storage aligned by
|
| 122 |
+
`alignment_v<V, ranges::range_value_t<R>>`.
|
| 123 |
+
- If the template parameter pack `Flags` contains
|
| 124 |
+
*`overaligned-flag`*`<N>`, `ranges::data(out)` points to storage
|
| 125 |
+
aligned by `N`.
|
| 126 |
+
|
| 127 |
+
*Effects:* For all i in the range \[`0`, `I::size()`), if
|
| 128 |
+
`mask[`i`] && (indices[`i`] < ranges::size(out))` is `true`, evaluates
|
| 129 |
+
`ranges::data(out)[indices[`i`]] = v[`i`]`.
|
| 130 |
+
|