[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
Tue Jul 4 03:00:59 PDT 2023


Joy12138 marked an inline comment as done.
Joy12138 added inline comments.


================
Comment at: libcxx/include/experimental/__simd/traits.h:80
+    class _Up = typename _Tp::value_type,
+    class = enable_if_t<(is_simd_v<_Tp> && __is_vectorizable<_Up>()) || (is_simd_mask_v<_Tp> && is_same_v<_Up, bool>)>>
+inline constexpr size_t memory_alignment_v = vector_aligned_tag::__alignment<_Tp, _Up>;
----------------
philnik wrote:
> philnik wrote:
> > Same here - does this even work with variables and this needs a SFINAE test.
> Isn't this implicit through `is_simd_mask_v`?
I don't think so. `_Up` should be able to be provided by the user. `_Tp::value_type` is just a default type.


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