[libcxx-commits] [PATCH] D144364: [libcxx] <experimental/simd> Added internal storage type, constructors, subscript operators of class simd/simd_mask and related tests

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jul 27 21:05:27 PDT 2023


philnik accepted this revision.
philnik added a comment.
This revision is now accepted and ready to land.

LGTM with the remaining comments addressed.



================
Comment at: libcxx/include/experimental/__simd/reference.h:33
+    if constexpr (is_same_v<_Vp, bool>)
+      __s_.__set(__idx_, std::experimental::parallelism_v2::__set_all_bits<_Tp>(__v));
+    else
----------------
To avoid ADL you don't have to fully qualify the name.


================
Comment at: libcxx/include/experimental/__simd/scalar.h:31
+  _Tp __get([[maybe_unused]] size_t __idx) const noexcept {
+    _LIBCPP_ASSERT_UNCATEGORIZED(__idx == 0, "Index is out of bounds");
+    return __data;
----------------
Note: Once the data is actually reachable, this should get a test.


================
Comment at: libcxx/include/experimental/__simd/utility.h:54
+_LIBCPP_HIDE_FROM_ABI auto constexpr __set_all_bits(bool __v) {
+  return __v ? (std::numeric_limits<decltype(__choose_mask_type<_Tp>())>::max()) : 0;
+}
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144364



More information about the libcxx-commits mailing list