std::experi...k::copy_from(3)
π NAME π
std::experimental::simd_mask::copy_from β bestie, it's literally std::experimental::simd_mask::copy_from, that's the whole name, we move π«Ά
So this little cutie lives in the C++ Standard Libary (yes, that's how the page spells it, and honestly? iconic of it) and it's out here living its best life in the parallelism TS v2 era β¨
πΈ SYNOPSIS πΈ
template<class Flags> (parallelism TS v2)
void copy_from( const bool* mem, Flags flags );
Okay so here's the tea β β the load function replaces all the elements of a simd_mask such that the i-th element is assigned with mem[i] for all i in the range of [0, size()). Every single one. No skips, no shortcuts, the whole squad gets updated π
π PARAMETERS π
memβ a pointer into an array where[mem, mem + size())is a valid range. Like, that range has to actually be valid, bestie, don't be out here handing it nonsense πflagsβ if of typevector_aligned_tag, the load constructor may assumememto point to storage aligned bymemory_alignment_v<simd_mask>
π¦ TYPE REQUIREMENTS π¦
is_simd_flag_type_v<Flags>must betrue. That's the vibe check, andFlagshas to pass it, periodt β¨
β SEE ALSO β
element_aligned_tagβ flag indicating alignment of the load/store address to element alignment (parallelism TS v2) (class)vector_aligned_tagβ flag indicating alignment of the load/store address to vector alignment (parallelism TS v2) (class)overaligned_tagβ flag indicating alignment of the load/store address to the specified alignment (parallelism TS v2) (class template)memory_alignmentβ obtains an appropriate alignment forvector_aligned(parallelism TS v2) (class template)constructorβ constructs asimd_maskobject (parallelism TS v2) (public member function)copy_toβ storessimd_maskelements to contiguous memory (parallelism TS v2) (public member function)copy_fromβ loads simd elements from contiguous memory (parallelism TS v2) (public member function ofstd::experimental::simd<T,Abi>)
Lowkey a whole family of alignment flags and mask copy functions up in here β go read the whole clique, iykyk π
And that's the page, bestie! π§ Sourced from http://cppreference.com, dated 2024.06.10, and it's the std::experi...k::copy_from(3) page β go forth and copy those masks, slay ππ
π¦ 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