tmp/tmpzol7r2bp/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### `simd` ABI tags <a id="simd.expos.abi">[[simd.expos.abi]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
template<class T> using native-abi = see below;
|
| 5 |
+
template<class T, simd-size-type N> using deduce-abi-t = see below;
|
| 6 |
+
```
|
| 7 |
+
|
| 8 |
+
An *ABI tag* is a type that indicates a choice of size and binary
|
| 9 |
+
representation for objects of data-parallel type.
|
| 10 |
+
|
| 11 |
+
[*Note 1*: The intent is for the size and binary representation to
|
| 12 |
+
depend on the target architecture and compiler flags. The ABI tag,
|
| 13 |
+
together with a given element type, implies the width. — *end note*]
|
| 14 |
+
|
| 15 |
+
[*Note 2*: The ABI tag is orthogonal to selecting the machine
|
| 16 |
+
instruction set. The selected machine instruction set limits the usable
|
| 17 |
+
ABI tag types, though (see [[simd.overview]]). The ABI tags enable users
|
| 18 |
+
to safely pass objects of data-parallel type between translation unit
|
| 19 |
+
boundaries (e.g., function calls or I/O). — *end note*]
|
| 20 |
+
|
| 21 |
+
An implementation defines ABI tag types as necessary for the following
|
| 22 |
+
aliases.
|
| 23 |
+
|
| 24 |
+
*`deduce-abi-t`*`<T, N>` is defined if
|
| 25 |
+
|
| 26 |
+
- `T` is a vectorizable type,
|
| 27 |
+
- `N` is greater than zero, and
|
| 28 |
+
- `N` is not larger than an implementation-defined maximum.
|
| 29 |
+
|
| 30 |
+
The *implementation-defined* maximum for `N` is not smaller than 64 and
|
| 31 |
+
can differ depending on `T`.
|
| 32 |
+
|
| 33 |
+
Where present, *`deduce-abi-t`*`<T, N>` names an ABI tag type such that
|
| 34 |
+
|
| 35 |
+
- *`simd-size-v`*`<T, `*`deduce-abi-t`*`<T, N>>` equals `N`,
|
| 36 |
+
- `basic_vec<T, `*`deduce-abi-t`*`<T, N>>` is enabled [[simd.overview]],
|
| 37 |
+
and
|
| 38 |
+
- `basic_mask<sizeof(T), `*`deduce-abi-t`*`<`*`integer-from`*`<sizeof(T)>, N>>`
|
| 39 |
+
is enabled.
|
| 40 |
+
|
| 41 |
+
*`native-abi`*`<T>` is an *implementation-defined* alias for an ABI tag.
|
| 42 |
+
`basic_vec<T, `*`native-abi`*`<T>>` is an enabled specialization.
|
| 43 |
+
|
| 44 |
+
[*Note 3*: The intent is to use the ABI tag producing the most
|
| 45 |
+
efficient data-parallel execution for the element type `T` on the
|
| 46 |
+
currently targeted system. For target architectures with ISA extensions,
|
| 47 |
+
compiler flags can change the type of the *`native-abi`*`<T>`
|
| 48 |
+
alias. — *end note*]
|
| 49 |
+
|
| 50 |
+
[*Example 1*:
|
| 51 |
+
|
| 52 |
+
Consider a target architecture supporting the ABI tags `__simd128` and
|
| 53 |
+
`__simd256`, where hardware support for `__simd256` exists only for
|
| 54 |
+
floating-point types. The implementation therefore defines
|
| 55 |
+
*`native-abi`*`<T>` as an alias for
|
| 56 |
+
|
| 57 |
+
- `__simd256` if `T` is a floating-point type, and
|
| 58 |
+
- `__simd128` otherwise.
|
| 59 |
+
|
| 60 |
+
— *end example*]
|
| 61 |
+
|