tmp/tmpvdbjs5kg/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Exposition-only helpers <a id="simd.expos.defn">[[simd.expos.defn]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
using simd-size-type = see below;
|
| 5 |
+
```
|
| 6 |
+
|
| 7 |
+
*simd-size-type* is an alias for a signed integer type.
|
| 8 |
+
|
| 9 |
+
``` cpp
|
| 10 |
+
template<size_t Bytes> using integer-from = see below;
|
| 11 |
+
```
|
| 12 |
+
|
| 13 |
+
*`integer-from`*`<Bytes>` is an alias for a signed integer type `T` such
|
| 14 |
+
that `sizeof(T)` equals `Bytes`.
|
| 15 |
+
|
| 16 |
+
``` cpp
|
| 17 |
+
template<class T, class Abi>
|
| 18 |
+
constexpr simd-size-type simd-size-v = see below;
|
| 19 |
+
```
|
| 20 |
+
|
| 21 |
+
*`simd-size-v`*`<T, Abi>` denotes the width of `basic_vec<T, Abi>` if
|
| 22 |
+
the specialization `basic_vec<T, Abi>` is enabled, or `0` otherwise.
|
| 23 |
+
|
| 24 |
+
``` cpp
|
| 25 |
+
template<class T> constexpr size_t mask-element-size = see below;
|
| 26 |
+
```
|
| 27 |
+
|
| 28 |
+
*`mask-element-size`*`<basic_mask<Bytes, Abi>>` has the value `Bytes`.
|
| 29 |
+
|
| 30 |
+
``` cpp
|
| 31 |
+
template<class T> using deduced-vec-t = see below;
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
Let `x` denote an lvalue of type `const T`.
|
| 35 |
+
|
| 36 |
+
*`deduced-vec-t`*`<T>` is an alias for
|
| 37 |
+
|
| 38 |
+
- `decltype(x + x)`, if the type of `x + x` is an enabled specialization
|
| 39 |
+
of `basic_vec`; otherwise
|
| 40 |
+
- `void`.
|
| 41 |
+
|
| 42 |
+
``` cpp
|
| 43 |
+
template<class V, class T> using make-compatible-simd-t = see below;
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
Let `x` denote an lvalue of type `const T`.
|
| 47 |
+
|
| 48 |
+
*`make-compatible-simd-t`*`<V, T>` is an alias for
|
| 49 |
+
|
| 50 |
+
- *`deduced-vec-t`*`<T>`, if that type is not `void`, otherwise
|
| 51 |
+
- `vec<decltype(x + x), V::size()>`.
|
| 52 |
+
|
| 53 |
+
``` cpp
|
| 54 |
+
template<class... Ts>
|
| 55 |
+
requires math-floating-point<Ts...>
|
| 56 |
+
using math-common-simd-t = see below;
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
Let `T0` denote `Ts...[0]`. Let `T1` denote `Ts...[1]`. Let `TRest`
|
| 60 |
+
denote a pack such that `T0, T1, TRest...` is equivalent to `Ts...`.
|
| 61 |
+
|
| 62 |
+
Let *`math-common-simd-t`*`<Ts...>` be an alias for
|
| 63 |
+
|
| 64 |
+
- *`deduced-vec-t`*`<T0>`, if `sizeof...(Ts)` equals 1; otherwise
|
| 65 |
+
- `common_type_t<`*`deduced-vec-t`*`<T0>, `*`deduced-vec-t`*`<T1>>`, if
|
| 66 |
+
`sizeof...(Ts)` equals 2 and
|
| 67 |
+
`math-floating-point<T0> && math-floating-point<T1>` is `true`;
|
| 68 |
+
otherwise
|
| 69 |
+
- `common_type_t<`*`deduced-vec-t`*`<T0>, T1>`, if `sizeof...(Ts)`
|
| 70 |
+
equals 2 and *`math-floating-point`*`<T0>` is `true`; otherwise
|
| 71 |
+
- `common_type_t<T0, `*`deduced-vec-t`*`<T1>>`, if `sizeof...(Ts)`
|
| 72 |
+
equals 2; otherwise
|
| 73 |
+
- `common_type_t<`*`math-common-simd-t`*`<T0, T1>, TRest...>`, if
|
| 74 |
+
*`math-common-simd-t`*`<T0, T1>` is valid and denotes a type;
|
| 75 |
+
otherwise
|
| 76 |
+
- `common_type_t<`*`math-common-simd-t`*`<TRest...>, T0, T1>`.
|
| 77 |
+
|
| 78 |
+
``` cpp
|
| 79 |
+
template<class BinaryOperation, class T>
|
| 80 |
+
concept reduction-binary-operation =
|
| 81 |
+
requires (const BinaryOperation binary_op, const vec<T, 1> v) {
|
| 82 |
+
{ binary_op(v, v) } -> same_as<vec<T, 1>>;
|
| 83 |
+
};
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
Types `BinaryOperation` and `T` model
|
| 87 |
+
`reduction-binary-operation<BinaryOperation, T>` only if:
|
| 88 |
+
|
| 89 |
+
- `BinaryOperation` is a binary element-wise operation and the operation
|
| 90 |
+
is commutative.
|
| 91 |
+
- An object of type `BinaryOperation` can be invoked with two arguments
|
| 92 |
+
of type `basic_vec<T, Abi>`, with unspecified ABI tag `Abi`, returning
|
| 93 |
+
a `basic_vec<T, Abi>`.
|
| 94 |
+
|