Experimental library header <experimental/simd>
From cppreference.net
<
cpp
|
header
|
experimental
C++
Standard library headers
Experimental library headers
| Execution P2300 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <experimental/execution> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Filesystem TS | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <experimental/filesystem> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Parallelism TS (v1, v2) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Library Fundamentals TS (v1, v2, v3) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Concurrency TS | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Ranges TS | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Coroutines TS | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
experimental/coroutine
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Networking TS | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Reflection TS | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <experimental/reflect> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
头文件定义了用于数据并行对象逐元素运算的类模板、标签类型、特征类型及函数模板。
概要
namespace std::experimental { inline namespace parallelism_v2 { namespace simd_abi { using scalar = /* 见下文 */; template <int N> using fixed_size = /* 见下文 */; template <class T> constexpr int max_fixed_size = /* 实现定义 */; template <class T> using compatible = /* 实现定义 */; template <class T> using native = /* 实现定义 */; template <class T, size_t N, class... Abis> struct deduce { using type = /* 见下文 */; }; template <class T, size_t N, class... Abis> using deduce_t = typename deduce<T, N, Abis...>::type; } // namespace simd_abi struct element_aligned_tag {}; struct vector_aligned_tag {}; template <size_t> struct overaligned_tag {}; inline constexpr element_aligned_tag element_aligned{}; inline constexpr vector_aligned_tag vector_aligned{}; template <size_t N> constexpr overaligned_tag<N> overaligned{}; // 9.4, simd 类型特征 template <class T> struct is_abi_tag; template <class T> constexpr bool is_abi_tag_v = is_abi_tag<T>::value; template <class T> struct is_simd; template <class T> constexpr bool is_simd_v = is_simd<T>::value; template <class T> struct is_simd_mask; template <class T> constexpr bool is_simd_mask_v = is_simd_mask<T>::value; template <class T> struct is_simd_flag_type; template <class T> constexpr bool is_simd_flag_type_v = is_simd_flag_type<T>::value; template <class T, class Abi = simd_abi::compatible<T>> struct simd_size; template <class T, class Abi = simd_abi::compatible<T>> constexpr size_t simd_size_v = simd_size<T, Abi>::value; template <class T, class U = typename T::value_type> struct memory_alignment; template <class T, class U = typename T::value_type> constexpr size_t memory_alignment_v = memory_alignment<T, U>::value; template <class T, class V> struct rebind_simd { using type = /* 见下文 */; }; template <class T, class V> using rebind_simd_t = typename rebind_simd<T, V>::type; template <int N, class V> struct resize_simd { using type = /* 见下文 */; }; template <int N, class V> using resize_simd_t = typename resize_simd<N, V>::type; // 9.6, 类模板 simd template <class T, class Abi = simd_abi::compatible<T>> class simd; template <class T> using native_simd = simd<T, simd_abi::native<T>>; template <class T, int N> using fixed_size_simd = simd<T, simd_abi::fixed_size<N>>; // 9.8, 类模板 simd_mask template <class T, class Abi = simd_abi::compatible<T>> class simd_mask; template <class T> using native_simd_mask = simd_mask<T, simd_abi::native<T>>; template <class T, int N> <span class