[libcxx-commits] [PATCH] D144363: [libcxx] <experimental/simd> Added simd width functions, simd_size traits and related tests

Yin Zhang via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jun 29 00:43:13 PDT 2023


Joy12138 added inline comments.


================
Comment at: libcxx/include/experimental/__simd/utility.h:20
 template <class _Tp>
-using native_simd = simd<_Tp, simd_abi::native<_Tp>>;
-
-template <class _Tp, int _Np>
-using fixed_size_simd = simd<_Tp, simd_abi::fixed_size<_Np>>;
-
+_LIBCPP_HIDE_FROM_ABI constexpr bool __is_vectorizable() {
+  return is_arithmetic_v<_Tp> && !is_const_v<_Tp> && !is_volatile_v<_Tp> && !is_same_v<_Tp, bool>;
----------------
philnik wrote:
> Why isn't this simply a variable template?
This is mainly used to give a flag for SFINAE check. I think it's better to use it as a function. WDYT?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144363/new/

https://reviews.llvm.org/D144363



More information about the libcxx-commits mailing list