brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · ff7e053 Raw
43 lines · cpp
1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9// UNSUPPORTED: c++03, c++11, c++1410 11// <experimental/simd>12//13// [simd.traits]14// template <class T, class U = typename T::value_type> struct memory_alignment;15// template <class T, class U = typename T::value_type>16//   inline constexpr std::size_t memory_alignment_v = memory_alignment<T, U>::value;17 18#include <experimental/simd>19 20namespace ex = std::experimental::parallelism_v2;21 22int main(int, char**) {23  (void)ex::memory_alignment<ex::native_simd<bool>, bool>::value;24  // expected-error-re@* {{no member named 'value' in {{.*}}}}25  (void)ex::memory_alignment<int, int>::value;26  // expected-error-re@* {{no member named 'value' in {{.*}}}}27  (void)ex::memory_alignment<ex::native_simd_mask<int>, int>::value;28  // expected-error-re@* {{no member named 'value' in {{.*}}}}29  (void)ex::memory_alignment<ex::native_simd<int>, bool>::value;30  // expected-error-re@* {{no member named 'value' in {{.*}}}}31 32  (void)ex::memory_alignment_v<ex::native_simd<bool>, bool>;33  // expected-error-re@* {{no member named 'value' in {{.*}}}}34  (void)ex::memory_alignment_v<int, int>;35  // expected-error-re@* {{no member named 'value' in {{.*}}}}36  (void)ex::memory_alignment_v<ex::native_simd_mask<int>, int>;37  // expected-error-re@* {{no member named 'value' in {{.*}}}}38  (void)ex::memory_alignment_v<ex::native_simd<int>, bool>;39  // expected-error-re@* {{no member named 'value' in {{.*}}}}40 41  return 0;42}43