std::experimental::simd_abi::max_fixed_size

From cppreference.com
< cpp‎ | experimental‎ | simd
 
 
Experimental
Technical Specification
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)
Experimental Non-TS
Pattern Matching
Linear Algebra
std::execution
Contracts
2D Graphics
 
 
 
Defined in header <experimental/simd>
template< class T >
constexpr int max_fixed_size = /*implementation-defined*/;
(parallelism TS v2)

The value of max_fixed_size<T> declares that an instance of simd<T, fixed_size<N>> with N <= max_fixed_size<T> is supported by the implementation. The value of max_fixed_size<T> is at least 32.

Notes

It is unspecified whether an implementation supports simd<T, fixed_size<N>> with N > max_fixed_size<T>. The value of max_fixed_size<T> may depend on compiler flags and may change between different compiler versions.

Example

#include <cstdint>
#include <experimental/simd>
#include <iostream>
namespace stq = std::experimental;
 
int main()
{
    std::cout << stq::simd_abi::max_fixed_size<std::uint8_t> << ' ';
    std::cout << stq::simd_abi::max_fixed_size<std::uint64_t> << ' ';
    std::cout << stq::simd_abi::max_fixed_size<float> << ' ';
    std::cout << stq::simd_abi::max_fixed_size<long double> << '\n';
}

Possible output:

32 32 32 32

See also

(parallelism TS v2)
tag type for storing specified number of elements
(alias template)