std::experi...ry_alignment(3)

๐Ÿ“ฆ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

๐Ÿ’– std::experimental::memory_alignment (3)

hii bestie!! welcome to the std::experimental::memory_alignment page from the C++ Standard Library manual, section 3 โ€” yes, the manual name is literally in the building, and we're about to make alignment feel less mysterious โœจ


๐ŸŒธ NAME

std::experimental::memory_alignment - std::experimental::memory_alignment

like... the name is the name twice, and honestly? iconic ๐Ÿ’…

โœจ Synopsis

Defined in header <experimental/simd>
template< class T, class U = typename T::value_type >  (parallelism
       TS v2)
struct memory_alignment;

okay so here's the tea: if is_simd_mask_v<T> is true and U is bool, or if is_simd_v<T> is true and U is a vectorizable type, then this provides the member constant value equal to the minimum alignment of a pointer passed to a load constructor, copy_from function, or copy_to function. For any other types T and U, there is no member value. no cap.

โš ๏ธ important vibe check: if the program adds specializations for std::memory_alignment or std::memory_alignment_v (since C++17), the behavior is undefined. like, don't do that, bestie ๐Ÿ˜ญ

๐Ÿงฎ Member constants

  • value โ€” the minimum alignment of a pointer passed to a load constructor, copy_from [static] function, or copy_to function (public static member constant).

๐ŸŽ€ Member functions

  • operator std::size_t โ€” converts the object to std::size_t, returns value (public member function).
  • operator() โ€” returns value (C++14) (public member function).

๐Ÿงธ Member types

Type โ†’ Definition mapping, bestie:

  • value_type โ€” std::size_t
  • type โ€” std::integral_constant< std::size_t, value>

๐Ÿ˜ญ Example

This section is incomplete Reason: no example

๐Ÿ‘€ See also

  • vector_aligned_tag โ€” flag indicating alignment of the load/store address to vector.
  • vector_aligned โ€” alignment (parallelism TS v2) (class).
  • constructor โ€” constructs a simd object (parallelism TS v2) (public member function of std::experimental::simd<T,Abi>).
  • copy_from โ€” loads simd elements from contiguous memory (parallelism TS v2) (public member function of std::experimental::simd<T,Abi>).
  • copy_to โ€” stores simd elements to contiguous memory (parallelism TS v2) (public member function of std::experimental::simd<T,Abi>).
  • constructor โ€” constructs a simd_mask object (parallelism TS v2) (public member function of std::experimental::simd_mask<T,Abi>).
  • copy_from โ€” loads simd_mask elements from contiguous memory (parallelism TS v2) (public member function of std::experimental::simd_mask<T,Abi>).
  • copy_to โ€” stores simd_mask elements to contiguous memory (parallelism TS v2) (public member function of std::experimental::simd_mask<T,Abi>).

๐Ÿ—‚๏ธ Category

  • Todo no example

okay that's the whole tea ๐Ÿซถ source: http://cppreference.com, version/date: 2024.06.10, and the manual tag is std::experi...ry_alignment(3) โ€” bye bestie, mwah ๐Ÿ’–

๐Ÿ“ฆ where this page comes from