std::experimental::simd_abi::deduce
From cppreference.com
< cpp | experimental | simd
C++
Feature test macros (C++20)
Concepts library (C++20)
Metaprogramming library (C++11)
Ranges library (C++20)
Filesystem library (C++17)
Concurrency support library (C++11)
Execution control library (C++26)
Experimental
Filesystem library (filesystem TS)
Library fundamentals (library fundamentals TS)
Library fundamentals 2 (library fundamentals TS v2)
Library fundamentals 3 (library fundamentals TS v3)
Extensions for parallelism (parallelism TS)
Extensions for parallelism 2 (parallelism TS v2)
Extensions for concurrency (concurrency TS)
Extensions for concurrency 2 (concurrency TS v2)
Concepts (concepts TS)
Ranges (ranges TS)
Reflection (reflection TS)
Mathematical special functions (special functions TR)
Extensions for parallelism v2
Parallel exceptions
Additional execution policies
Algorithms
Task blocks
SIMD library
simd_abi::deduce
Defined in header
<experimental/simd>
template< class T, std::size_t N, class ...Abis >
struct deduce;
(parallelism TS v2)
struct deduce;
The type deduce<T, N, Abis...>::type is present if and only if:
- T is a vectorizable type,
- simd_abi::fixed_size<N> is supported, and
- every type in Abis... is an ABI tag.
Let DA
denote deduce<T, N, Abis...>::type when it presents, then
- simd_size_v<T, DA> == N,
- simd<T, DA> is default constructible, i.e. it is supported,
-
DA
issimd_abi::scalar
if N == 1, otherwise it is implementation-defined.
[edit] Member types
Name
Definition
type
an ABI tag type suitable for specified element type T
and size N
[edit] Helper types
template< class T, std::size_t N, class ...Abis >
using deduce_t = typename deduce<T, N, Abis...>::type;
(parallelism TS v2)
using deduce_t = typename deduce<T, N, Abis...>::type;
[edit] Notes
simd_abi::deduce
is SFINAE-friendly.
The ABI tag deduced via this facility is a Quality-of-Implementation feature.
Implementations can base the choice on Abis..., but can also ignore the Abis... arguments. A simple implementation might simply return fixed_size<N> unconditionally. An optimized implementation might return an implementation-defined extended ABI tag for most inputs. Consequently, if you need an ABI tag for a certain number of elements, use fixed_size
if ABI stability is of concern, and prefer deduce_t
otherwise.
[edit] Example
This section is incomplete
Reason: no example
Reason: no example