| 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-exception |
| 6 |
// |
| 7 |
//===----------------------------------------------------------------------===// |
| 8 |
|
| 9 |
// UNSUPPORTED: c++03, c++11, c++14 |
| 10 |
|
| 11 |
// <experimental/simd> |
| 12 |
// |
| 13 |
// [simd.class] |
| 14 |
// static constexpr std::size_t size() noexcept; |
| 15 |
|
| 16 |
#include "../test_utils.h" |
| 17 |
|
| 18 |
namespace ex = std::experimental::parallelism_v2; |
| 19 |
|
| 20 |
template <class T, std::size_t> |
| 21 |
struct CheckSimdWidth { |
| 22 |
template <class SimdAbi> |
| 23 |
void operator()() { |
| 24 |
static_assert(ex::simd<T, SimdAbi>::size() == ex::simd_size_v<T, SimdAbi>); |
| 25 |
} |
| 26 |
}; |
| 27 |
|
| 28 |
int main(int, char**) { |
| 29 |
test_all_simd_abi<CheckSimdWidth>(); |
| 30 |
return 0; |
| 31 |
} |