blob: 3e6200bb1716527da9fadc08044851bde864ae6a [file] [log] [blame]
Tim Shen38cd7de2018-07-30 22:27:38 +00001//===----------------------------------------------------------------------===//
2//
Chandler Carruth57b08b02019-01-19 10:56:40 +00003// 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
Tim Shen38cd7de2018-07-30 22:27:38 +00006//
7//===----------------------------------------------------------------------===//
8
9// UNSUPPORTED: c++98, c++03, c++11, c++14
10
11// <experimental/simd>
12//
13// [simd.class]
14// simd() = default;
15
16#include <cstdint>
17#include <experimental/simd>
18
Marshall Clow7fc6a552019-05-31 18:35:30 +000019#include "test_macros.h"
20
Tim Shen38cd7de2018-07-30 22:27:38 +000021namespace ex = std::experimental::parallelism_v2;
22
JF Bastien2df59c52019-02-04 20:31:13 +000023int main(int, char**) {
Tim Shen38cd7de2018-07-30 22:27:38 +000024 static_assert(ex::native_simd<int32_t>().size() > 0, "");
25 static_assert(ex::fixed_size_simd<int32_t, 4>().size() == 4, "");
26 static_assert(ex::fixed_size_simd<int32_t, 5>().size() == 5, "");
27 static_assert(ex::fixed_size_simd<int32_t, 1>().size() == 1, "");
28 static_assert(ex::fixed_size_simd<char, 32>().size() == 32, "");
JF Bastien2df59c52019-02-04 20:31:13 +000029
30 return 0;
Tim Shen38cd7de2018-07-30 22:27:38 +000031}