Common mathematical functions | |||||||||||||||||||||||||||||||
Mathematical special functions(C++17) | |||||||||||||||||||||||||||||||
Mathematical constants(C++20) | |||||||||||||||||||||||||||||||
Basic linear algebra algorithms(C++26) | |||||||||||||||||||||||||||||||
Data-parallel types (SIMD)(C++26) | |||||||||||||||||||||||||||||||
Floating-point environment(C++11) | |||||||||||||||||||||||||||||||
Complex numbers | |||||||||||||||||||||||||||||||
Numeric array (valarray ) | |||||||||||||||||||||||||||||||
Pseudo-random number generation | |||||||||||||||||||||||||||||||
Bit manipulation(C++20) | |||||||||||||||||||||||||||||||
Saturation arithmetic(C++26) | |||||||||||||||||||||||||||||||
Factor operations | |||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||
Interpolations | |||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||
Generic numeric operations | |||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
C-style checked integer arithmetic | |||||||||||||||||||||||||||||||
|
Defined in header <simd> | ||
template<class T,class Abi=/*native-abi*/<T>> class basic_simd; | (1) | (since C++26) |
template<class T,/*simd-size-type*/ N=/*simd-size-v*/<T,/*native-abi*/<T>>> using simd= basic_simd<T,/*deduce-abi-t*/<T, N>>; | (2) | (since C++26) |
std::datapar::basic_simd
specialization is a data-parallel type. The default ABI tag is determined by the implementation at compile-time.std::datapar::simd
is an alias template that allows users to specify the width to a certain size. The default width is determined by the implementation at compile-time.Every specialization ofbasic_simd
is a complete type. The specialization is
T
is avectorizable type, and there exists valueM
in the range[
1,
64]
such thatAbi
isdeduce-abi-t<T, M>,T
is not a vectorizable type,Ifbasic_simd<T, Abi> is disabled, the specialization has all deleted default constructor, destructor, copy constructor, and copy assignment. In addition, only the member types below are present.
Ifbasic_simd<T, Abi> is enabled,basic_simd<T, Abi> isTriviallyCopyable.
Contents |
T | - | element type; a vectorizable type |
Abi | - | tag type used to determine the width and storage |
N | - | the width of the data-parallel type; the number of elements |
Type | Definition |
value_type | T |
mask_type | datapar::basic_simd_mask<sizeof(T), Abi> |
abi_type | Abi |
Name | Description |
constexprstd::integral_constant< simd-size-type , simd-size-v <T, Abi>> size[static] | the width ofbasic_simd (public static member constant) |
constructs abasic_simd object(public member function)[edit] | |
accesses specified element (public member function)[edit] | |
element-wise increment and decrement (public member function)[edit] | |
element-wise unary operators (public member function)[edit] |
element-wise binary operators (function)[edit] | |
element-wise compound binary operators (function)[edit] | |
element-wise relational operators (function)[edit] |
specializes element-wise selection forsimd_select (exposition-only function*)[edit] |
template<class R,class...Ts> basic_simd( R&& r, Ts...)->/* see below */; | (since C++26) | |
The deduction guide is present only if:
R
modelscontiguous_range
andsized_range
, andThe deduced type is equivalent todatapar::simd<ranges::range_value_t<R>,ranges::size(r)>.
Implementations are recommended to support explicit conversions between enabled specializations ofbasic_simd
and appropriate implementation-defined types. These appropriate types are non-standard vector types which are available in the implementation.
This section is incomplete Reason: no example |
(C++26) | data-parallel type with the element typebool (class template)[edit] |
(C++26) | convenience alias template forbasic_simd_mask that can specify its width(alias template)[edit] |
numeric arrays, array masks and array slices (class template)[edit] |