[PATCH] D41422: [libcxx] implement <experimental/simd> operators and reduction.
Marshall Clow via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 25 08:43:47 PDT 2018
mclow.lists added a comment.
Herald added subscribers: bixia, jlebar.
A few nits, a bit of things moving underneath you, but this looks good.
Need to add more stuff to the tests ;-)
================
Comment at: libcxx/include/experimental/simd:1421
template <class _Tp, class _Abi>
-_Tp hmin(const simd<_Tp, _Abi>&);
+_Tp hmin(const simd<_Tp, _Abi>& __v) {
+ _Tp __acc = __v[0];
----------------
In the TS, `hmin`, `hmax` (and a bunch of others) are noexcept. This was added in P1110, in response to NB comments CH 30 and CH 33.
Need to fix that here, and add `ASSERT_NOEXCEPT` to a bunch of tests.
================
Comment at: libcxx/include/experimental/simd:1482
template <class _MaskType, class _Tp>
class const_where_expression {
public:
----------------
We're going to need a lot of `_LIBCPP_TYPE_VIS` and other annotations. That can be a separate patch, though
================
Comment at: libcxx/include/experimental/simd:1657
+ simd operator++(int) {
+ auto __tmp = *this;
+ ++*this;
----------------
I don't think that `auto` buys you anything here. `simd` is fine, and no longer.
================
Comment at: libcxx/test/std/experimental/simd/simd.horizontal/hmax.pass.cpp:23
+
+void test_hmax() {
+ {
----------------
Check the return types here with `ASSERT_SAME_TYPE`
https://reviews.llvm.org/D41422
More information about the cfe-commits
mailing list