tmp/tmp7pljb9em/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### General <a id="simd.general">[[simd.general]]</a>
|
| 2 |
+
|
| 3 |
+
Subclause [[simd]] defines data-parallel types and operations on these
|
| 4 |
+
types.
|
| 5 |
+
|
| 6 |
+
[*Note 1*: The intent is to support acceleration through data-parallel
|
| 7 |
+
execution resources where available, such as SIMD registers and
|
| 8 |
+
instructions or execution units driven by a common instruction decoder.
|
| 9 |
+
SIMD stands for “Single Instruction Stream – Multiple Data Stream”; it
|
| 10 |
+
is defined in Flynn 1966. — *end note*]
|
| 11 |
+
|
| 12 |
+
The set of *vectorizable types* comprises
|
| 13 |
+
|
| 14 |
+
- all standard integer types, character types, and the types `float` and
|
| 15 |
+
`double` [[basic.fundamental]];
|
| 16 |
+
- `std::float16_t`, `std::float32_t`, and `std::float64_t` if defined
|
| 17 |
+
[[basic.extended.fp]]; and
|
| 18 |
+
- `complex<T>` where `T` is a vectorizable floating-point type.
|
| 19 |
+
|
| 20 |
+
The term *data-parallel type* refers to all enabled specializations of
|
| 21 |
+
the `basic_vec` and `basic_mask` class templates. A
|
| 22 |
+
*data-parallel object* is an object of data-parallel type.
|
| 23 |
+
|
| 24 |
+
Each specialization of `basic_vec` or `basic_mask` is either enabled or
|
| 25 |
+
disabled, as described in [[simd.overview]] and [[simd.mask.overview]].
|
| 26 |
+
|
| 27 |
+
A data-parallel type consists of one or more elements of an underlying
|
| 28 |
+
vectorizable type, called the *element type*. The number of elements is
|
| 29 |
+
a constant for each data-parallel type and called the *width* of that
|
| 30 |
+
type. The elements in a data-parallel type are indexed from 0 to
|
| 31 |
+
$\textrm{width} - 1$.
|
| 32 |
+
|
| 33 |
+
An *element-wise operation* applies a specified operation to the
|
| 34 |
+
elements of one or more data-parallel objects. Each such application is
|
| 35 |
+
unsequenced with respect to the others. A *unary element-wise operation*
|
| 36 |
+
is an element-wise operation that applies a unary operation to each
|
| 37 |
+
element of a data-parallel object. A *binary element-wise operation* is
|
| 38 |
+
an element-wise operation that applies a binary operation to
|
| 39 |
+
corresponding elements of two data-parallel objects.
|
| 40 |
+
|
| 41 |
+
Given a `basic_mask<Bytes, Abi>` object `mask`, the *selected indices*
|
| 42 |
+
signify the integers i in the range \[`0`, `mask.size()`) for which
|
| 43 |
+
`mask[i]` is `true`. Given a data-parallel object `data`, the
|
| 44 |
+
*selected elements* signify the elements `data[i]` for all selected
|
| 45 |
+
indices i.
|
| 46 |
+
|
| 47 |
+
The conversion from an arithmetic type `U` to a vectorizable type `T` is
|
| 48 |
+
*value-preserving* if all possible values of `U` can be represented with
|
| 49 |
+
type `T`.
|
| 50 |
+
|