[PATCH] D44663: [libcxx] Update with R9 changes

2018-07-09 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment.

A few comments; more to come after the earlier patches land.




Comment at: libcxx/include/experimental/simd:1429
+struct deduce<_Tp, _Np, __simd_abi<__kind, __old_size>...> {
+  using type = __simd_abi<__kind, _Np>;
+};

Is this deliberately incomplete?
Comparing to N4755 - I see:

The member type shall be present if and only if:
* T is a vectorizable type, and
* simd_abi::fixed_size is supported (see 9.2.1), and
* every type in the Abis pack is an ABI tag.

Will a later patch fix this up?



Comment at: libcxx/include/experimental/simd:1725
 
 // NOTE: P0820 extension
 template 

We don't need the comments any more that P0820 has been adopted.




Comment at: libcxx/include/experimental/simd:1732
   __array_size>>::type
 split_by(const simd<_Tp, _Abi>& __v) {
+  arrayhttps://reviews.llvm.org/D44663



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D44663: [libcxx] Update with R9 changes

2018-03-19 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision.
timshen added a reviewer: mclow.lists.
Herald added subscribers: christof, sanjoy.
Herald added a reviewer: EricWF.

- change the uses of abi_for_size to simd_abi::deduce.
- remove the const in const_where_expression's template.


https://reviews.llvm.org/D44663

Files:
  libcxx/include/experimental/simd
  libcxx/test/std/experimental/simd/simd.elementwise/operators.pass.cpp
  libcxx/test/std/experimental/simd/simd.horizontal/concat.pass.cpp
  libcxx/test/std/experimental/simd/simd.horizontal/hmax.pass.cpp
  libcxx/test/std/experimental/simd/simd.horizontal/hmin.pass.cpp
  libcxx/test/std/experimental/simd/simd.horizontal/split.pass.cpp
  libcxx/test/std/experimental/simd/simd.traits/abi_for_size.pass.cpp
  libcxx/test/std/experimental/simd/simd.traits/simd_abi_deduce.pass.cpp
  libcxx/test/std/experimental/simd/simd.whereexpr/where.pass.cpp

Index: libcxx/test/std/experimental/simd/simd.whereexpr/where.pass.cpp
===
--- libcxx/test/std/experimental/simd/simd.whereexpr/where.pass.cpp
+++ libcxx/test/std/experimental/simd/simd.whereexpr/where.pass.cpp
@@ -43,25 +43,23 @@
 void compile_const_where() {
   {
 const native_simd a{};
-static_assert(
-std::is_same>::value,
-"");
+static_assert(std::is_same>::value,
+  "");
   }
   {
 const native_simd_mask a{};
 static_assert(
-std::is_same<
-decltype(where(a, a)),
-const_where_expression>::value,
+std::is_same>::value,
 "");
   }
   {
 const bool b = true;
 static_assert(std::is_same>::value,
+   const_where_expression>::value,
   "");
   }
 }
Index: libcxx/test/std/experimental/simd/simd.traits/simd_abi_deduce.pass.cpp
===
--- libcxx/test/std/experimental/simd/simd.traits/simd_abi_deduce.pass.cpp
+++ libcxx/test/std/experimental/simd/simd.traits/simd_abi_deduce.pass.cpp
@@ -20,11 +20,12 @@
 
 using namespace std::experimental::parallelism_v2;
 
-static_assert(std::is_same::type,
+static_assert(std::is_same::type,
simd_abi::fixed_size<4>>::value,
   "");
 
 static_assert(
-std::is_same, simd_abi::fixed_size<4>>::value, "");
+std::is_same, simd_abi::fixed_size<4>>::value,
+"");
 
 int main() {}
Index: libcxx/test/std/experimental/simd/simd.horizontal/split.pass.cpp
===
--- libcxx/test/std/experimental/simd/simd.horizontal/split.pass.cpp
+++ libcxx/test/std/experimental/simd/simd.horizontal/split.pass.cpp
@@ -26,11 +26,11 @@
 // const simd_mask&);
 //
 // template 
-// array / n, A>>, n> split_by(
+// array / n, A>>, n> split_by(
 // const simd& x);
 //
 // template 
-// array / n, A>>, n> split_by(
+// array / n, A>>, n> split_by(
 // const simd_mask& x);
 
 #include 
@@ -138,11 +138,11 @@
 
 void compile_split_simd_propagate_abi() {
   using compatible_simd_half =
-  simd>;
+  simd>;
   using native_simd_half =
-  simd>;
+  simd>;
 
   static_assert(
   std::is_same<
@@ -169,11 +169,11 @@
 
 void compile_split_simd_mask_propagate_abi() {
   using compatible_simd_mask_half =
-  simd_mask>;
+  simd_mask>;
   using native_simd_mask_half =
-  simd_mask