[simd.general] (original) (raw)
29 Numerics library [numerics]
29.10 Data-parallel types [simd]
29.10.1 General [simd.general]
Subclause [simd] defines data-parallel types and operations on these types.
[Note 1:
The intent is to support acceleration through data-parallel execution resources where available, such as SIMD registers and instructions or execution units driven by a common instruction decoder.
SIMD stands for “Single Instruction Stream – Multiple Data Stream”; it is defined in Flynn 1966[bib].
— _end note_]
The set of vectorizable types comprises
- all standard integer types, character types, and the types float anddouble ([basic.fundamental]);
- std::float16_t, std::float32_t, and std::float64_t if defined ([basic.extended.fp]); and
- complex<T> where T is a vectorizable floating-point type.
The term data-parallel type refers to all enabled specializations of the basic_simd and basic_simd_mask class templates.
A data-parallel object is an object of data-parallel type.
A data-parallel type consists of one or more elements of an underlying vectorizable type, called the element type.
The number of elements is a constant for each data-parallel type and called thewidth of that type.
The elements in a data-parallel type are indexed from 0 to .
An element-wise operation applies a specified operation to the elements of one or more data-parallel objects.
Each such application is unsequenced with respect to the others.
A unary element-wise operation is an element-wise operation that applies a unary operation to each element of a data-parallel object.
A binary element-wise operation is an element-wise operation that applies a binary operation to corresponding elements of two data-parallel objects.
Given a basic_simd_mask<Bytes, Abi> object mask, theselected indices signify the integers i in the range [0, mask.size()) for which mask[i] is true.
Given a data-parallel object data, the selected elementssignify the elements data[i] for all selected indices i.
The conversion from an arithmetic type U to a vectorizable typeT is value-preserving if all possible values of U can be represented with type T.