std::experi...:to_native,(3)
π NAME
okay so bestie, welcome to the std::experi...:to_native,(3) page from the C++ Standard Library manual β¨ and today we're talking about std::experimental::to_fixed_size and std::experimental::to_native β two little icons whose whole job is converting your simd objects between ABIs π¦ (yes, the to_compatible girlies are here too, stay tuned, they're in the synopsis iykyk π
).
πΈ SYNOPSIS
okay first thing first, everything below lives in the header <experimental/simd> β well, <experimental/simd>, not me fumbling the backtick, periodt. π
β¨ (1) β to_fixed_size for simd
template< class T, class Abi >
fixed_size_simd<T, simd_size_v<T, Abi>> (1)
(parallelism TS v2)
to_fixed_size( const simd<T, Abi>& v ) noexcept;
π¦ (2) β to_fixed_size for simd_mask
template< class T, class Abi >
fixed_size_simd_mask<T, simd_size_v<T, Abi>> (2)
(parallelism TS v2)
to_fixed_size( const simd_mask<T, Abi>& v ) noexcept;
π (3) β to_native for fixed_size_simd
template< class T, std::size_t N >
native_simd<T> (3)
(parallelism TS v2)
to_native( const fixed_size_simd<T, N>& v ) noexcept;
π (4) β to_native for fixed_size_simd_mask
template< class T, std::size_t N >
native_simd_mask<T> (4)
(parallelism TS v2)
to_native( const fixed_size_simd_mask<T, N>>& v ) noexcept;
lowkey that >> in (4) is exactly how it appears in the source, bestie β I am not touching it, not my business, no cap π
π (5) β to_compatible for fixed_size_simd
template< class T, std::size_t N >
simd<T> (5)
(parallelism TS v2)
to_compatible( const fixed_size_simd<T, N>& v ) noexcept;
π (6) β to_compatible for fixed_size_simd_mask
template< class T, std::size_t N >
simd_mask<T> (6)
(parallelism TS v2)
to_compatible( const fixed_size_simd_mask<T, N>& v )
noexcept;
So what do all six actually do? They return a simd or simd_mask object with the same elements, but a different ABI π₯ literally the same vibe, different outfit, slay π
β οΈ and here's the receiving-grammar moment: (3)β(6) do not participate in overloading resolution unless N is the same as the size of the return type. that's it, that's the rule, respect it π«Ά
π PARAMETERS
vβ the inputsimdorsimd_maskobject π (like, the thing you're converting, the main character, the one we're rooting for)
π RETURN VALUE
The simd or simd_mask object with the specified ABI β¨ β same contents, new ABI energy, iconic behaviour, no notes π
π EXAMPLE
This section is incomplete.
Reason: no example.
not me crying, there's literally no example to give you π the page says it's incomplete and gives us "no example" and honestly? we respect the honesty.
π§ CATEGORY
- Todo: no example π
and that's the whole page, bestie! catch you on the next one π source and version for the receipts: http://cppreference.com, dated 2024.06.10, from the std::experi...:to_native,(3) page itself β mwah, bye, ily, drink water πΈβ¨π«Ά
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms