std::experi...ry_alignment(3)
๐ 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 forstd::memory_alignmentorstd::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, orcopy_tofunction (public static member constant).
๐ Member functions
operator std::size_tโ converts the object tostd::size_t, returnsvalue(public member function).operator()โ returnsvalue(C++14) (public member function).
๐งธ Member types
Type โ Definition mapping, bestie:
value_typeโstd::size_ttypeโ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 asimdobject (parallelism TS v2) (public member function ofstd::experimental::simd<T,Abi>).copy_fromโ loadssimdelements from contiguous memory (parallelism TS v2) (public member function ofstd::experimental::simd<T,Abi>).copy_toโ storessimdelements to contiguous memory (parallelism TS v2) (public member function ofstd::experimental::simd<T,Abi>).constructorโ constructs asimd_maskobject (parallelism TS v2) (public member function ofstd::experimental::simd_mask<T,Abi>).copy_fromโ loadssimd_maskelements from contiguous memory (parallelism TS v2) (public member function ofstd::experimental::simd_mask<T,Abi>).copy_toโ storessimd_maskelements to contiguous memory (parallelism TS v2) (public member function ofstd::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
- 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