[libcxx-commits] [libcxx] [libc++] <experimental/simd> Add load constructor for class simd/simd_mask (PR #76610)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Sat Dec 30 01:51:47 PST 2023


================
@@ -0,0 +1,105 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03, c++11, c++14
+
+// <experimental/simd>
+//
+// [simd.class]
+// template<class U, class Flags> simd(const U* mem, Flags);
+
+#include "../test_utils.h"
+
+namespace ex = std::experimental::parallelism_v2;
+
+template <class T, class SimdAbi, std::size_t array_size>
+struct ElementAlignedLoadCtorHelper {
+  template <class U>
+  void operator()() const {
+    constexpr std::size_t alignas_size = alignof(U);
+    alignas(alignas_size) U buffer[array_size];
----------------
philnik777 wrote:

```suggestion
    U buffer[array_size];
```

https://github.com/llvm/llvm-project/pull/76610


More information about the libcxx-commits mailing list