FreeBSD Manual Pages
std::experi...md::copy_to(3) C++ Standard Libary std::experi...md::copy_to(3) NAME std::experimental::simd::copy_to - std::experimental::simd::copy_to Synopsis template< class U, class Flags > (parallelism TS v2) void copy_to( U* mem, Flags flags ); The store function copies all elements of a simd such that the i-th element is converted to U and subsequently written to mem[i] for all i in the range of [0, size()). Parameters mem - a pointer into an array where [mem, mem + size()) is a valid range flags - if of type vector_aligned_tag, the load constructor may as- sume mem to point to storage aligned by memory_alignment_v<simd, U> Type requirements - U must be a vectorizable type. - is_simd_flag_type_v<Flags> must be true. Example // Run this code #include <experimental/simd> #include <iostream> namespace stdx = std::experimental; int main() { alignas(stdx::memory_alignment_v<stdx::native_simd<int>>) std::array<int, stdx::native_simd<int>::size()> mem = {}; stdx::native_simd<int> a = 7; a.copy_to(&mem[0], stdx::vector_aligned); for (int e : mem) std::cout << e << ' '; std::cout << '\n'; } Possible output: 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 See also element_aligned_tag flag indicating alignment of the load/store ad- dress to element element_aligned alignment (parallelism TS v2) (class) vector_aligned_tag flag indicating alignment of the load/store ad- dress to vector vector_aligned alignment (parallelism TS v2) (class) overaligned_tag flag indicating alignment of the load/store ad- dress to the overaligned specified alignment (parallelism TS v2) (class template) memory_alignment obtains an appropriate alignment for vec- tor_aligned (parallelism TS v2) (class template) copy_from loads simd elements from contiguous memory (parallelism TS v2) (public member function) http://cppreference.com 2024.06.10 std::experi...md::copy_to(3)
NAME | Synopsis | Parameters | Type requirements | Example | Possible output: | See also
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=std::experimental::simd::copy_to&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>
