std::experi...x_fixed_size(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ’… NAME πŸ’…

hey bestie, welcome to the std::experi...x_fixed_size(3) page from the C++ Standard Libary manual ✨

std::experimental::simd_abi::max_fixed_size - std::experimental::simd_abi::max_fixed_size β€” yep, the original NAME line really does repeat the same name after the dash, and we're keeping both, no erasing πŸ’–

✨ Synopsis ✨

Defined in header <experimental/simd> 🫢

template< class T >
inline constexpr int max_fixed_size =
(parallelism TS v2)
/*implementation-defined*/;

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, and that's the tea β˜•

🧠 Notes 🧠

Okay so here's the vibe check: it is unspecified whether an implementation supports simd<T, fixed_size<N>> with N > max_fixed_size<T>. Also, the value of max_fixed_size<T> may depend on compiler flags and may change between different compiler versions. It's giving "implementation-defined main character energy," so yeah β€” that's the situation, fr fr πŸ’€

πŸ§ͺ Example πŸ§ͺ

Run this code, bestie:

#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 πŸ‘€

  • fixed_size β€” tag type for storing specified number of elements (parallelism TS v2) (alias template) 🌸

πŸ’– that's the whole page! source: http://cppreference.com, date/version: 2024.06.10, footer title: std::experi...x_fixed_size(3). mwah, go slay your SIMD era 🧚✨

πŸ“¦ where this page comes from