std::experi...k::copy_from(3)

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

πŸ’… 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 type vector_aligned_tag, the load constructor may assume mem to point to storage aligned by memory_alignment_v<simd_mask>

πŸ¦‹ TYPE REQUIREMENTS πŸ¦‹

  • is_simd_flag_type_v<Flags> must be true. That's the vibe check, and Flags has 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 for vector_aligned (parallelism TS v2) (class template)
  • constructor β€” constructs a simd_mask object (parallelism TS v2) (public member function)
  • copy_to β€” stores simd_mask elements to contiguous memory (parallelism TS v2) (public member function)
  • copy_from β€” loads simd elements from contiguous memory (parallelism TS v2) (public member function of std::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