diff options
| author | Tim Shen <timshen91@gmail.com> | 2018-07-30 22:27:38 +0000 |
|---|---|---|
| committer | Tim Shen <timshen91@gmail.com> | 2018-07-30 22:27:38 +0000 |
| commit | 38cd7de5ac9724c0bf95d346aacaafe649f78142 (patch) | |
| tree | 7568919f57db258a500731e5ef60c6d6fcdd9b43 /libcxx/test/std/experimental/simd/simd.casts/simd_cast.pass.cpp | |
| parent | 9f807f44b10135add1cce8daf4f004d984ba860b (diff) | |
| download | bcm5719-llvm-38cd7de5ac9724c0bf95d346aacaafe649f78142.tar.gz bcm5719-llvm-38cd7de5ac9724c0bf95d346aacaafe649f78142.zip | |
Re-apply "[libcxx] implement <simd> ABI for Clang/GCC vector extension, constructors, copy_from and copy_to."
...with proper guarding #ifdefs for unsupported C++11.
llvm-svn: 338318
Diffstat (limited to 'libcxx/test/std/experimental/simd/simd.casts/simd_cast.pass.cpp')
| -rw-r--r-- | libcxx/test/std/experimental/simd/simd.casts/simd_cast.pass.cpp | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/libcxx/test/std/experimental/simd/simd.casts/simd_cast.pass.cpp b/libcxx/test/std/experimental/simd/simd.casts/simd_cast.pass.cpp index af6b13fe878..d15f138d5b9 100644 --- a/libcxx/test/std/experimental/simd/simd.casts/simd_cast.pass.cpp +++ b/libcxx/test/std/experimental/simd/simd.casts/simd_cast.pass.cpp @@ -7,34 +7,40 @@ // //===----------------------------------------------------------------------===// -// UNSUPPORTED: c++98, c++03 +// UNSUPPORTED: c++98, c++03, c++11, c++14 // <experimental/simd> // // [simd.casts] -// template <class T, class U, class Abi> see below simd_cast(const simd<U, Abi>&); +// template <class T, class U, class Abi> see below ex::simd_cast<(const +// ex::simd<U, Abi>&); + #include <experimental/simd> #include <cstdint> -using namespace std::experimental::parallelism_v2; - -static_assert(std::is_same<decltype(simd_cast<int32_t>(native_simd<int32_t>())), - native_simd<int32_t>>::value, - ""); +namespace ex = std::experimental::parallelism_v2; static_assert( - std::is_same<decltype(simd_cast<int64_t>(fixed_size_simd<int32_t, 4>())), - fixed_size_simd<int64_t, 4>>::value, + std::is_same<decltype(ex::simd_cast<int32_t>(ex::native_simd<int32_t>())), + ex::native_simd<int32_t>>::value, ""); -static_assert(std::is_same<decltype(simd_cast<fixed_size_simd<int64_t, 1>>( - simd<int32_t, simd_abi::scalar>())), - fixed_size_simd<int64_t, 1>>::value, +static_assert(std::is_same<decltype(ex::simd_cast<int64_t>( + ex::fixed_size_simd<int32_t, 4>())), + ex::fixed_size_simd<int64_t, 4>>::value, ""); -static_assert(std::is_same<decltype(simd_cast<simd<int64_t, simd_abi::scalar>>( - fixed_size_simd<int32_t, 1>())), - simd<int64_t, simd_abi::scalar>>::value, - ""); +static_assert( + std::is_same<decltype(ex::simd_cast<ex::fixed_size_simd<int64_t, 1>>( + ex::simd<int32_t, ex::simd_abi::scalar>())), + ex::fixed_size_simd<int64_t, 1>>::value, + ""); + +static_assert( + std::is_same< + decltype(ex::simd_cast<ex::simd<int64_t, ex::simd_abi::scalar>>( + ex::fixed_size_simd<int32_t, 1>())), + ex::simd<int64_t, ex::simd_abi::scalar>>::value, + ""); int main() {} |

