32 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.class]14// static constexpr std::size_t size() noexcept;15 16#include "../test_utils.h"17 18namespace ex = std::experimental::parallelism_v2;19 20template <class T, std::size_t>21struct 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 28int main(int, char**) {29 test_all_simd_abi<CheckSimdWidth>();30 return 0;31}32