[libcxx-commits] [PATCH] D153319: [libcxx] <experimental/simd> Added aliagned flag types, traits is_simd_flag_type[_v], memory_alignment[_v] and related tests
Yin Zhang via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jul 10 01:30:36 PDT 2023
Joy12138 added inline comments.
================
Comment at: libcxx/test/std/experimental/simd/simd.traits/memory_alignment.pass.cpp:28-29
+ bit_ceil(sizeof(bool) * ex::simd_size_v<T, SimdAbi>));
+ static_assert(
+ ex::memory_alignment_v<ex::simd_mask<T, SimdAbi>> == bit_ceil(sizeof(bool) * ex::simd_size_v<T, SimdAbi>));
+ }
----------------
philnik wrote:
> It looks to me like this is technically implementation-defined. Am I correct in that interpretation?
If my understanding of the document is correct, the basic type of the `simd_mask` is `bool`, while the storage type in the internal implementation layer is implementation-defined. Alignment should be calculated using `bool`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153319/new/
https://reviews.llvm.org/D153319
More information about the libcxx-commits
mailing list