1 //===----------------------------------------------------------------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is dual licensed under the MIT and the University of Illinois Open 6 // Source Licenses. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 // UNSUPPORTED: c++98, c++03 11 12 // <experimental/simd> 13 // 14 // [simd.casts] 15 // template <class T, class U, class Abi> see below static_simd_cast(const simd<U, Abi>&); 16 17 #include <experimental/simd> 18 #include <cstdint> 19 20 using namespace std::experimental::parallelism_v2; 21 22 static_assert( 23 std::is_same<decltype(static_simd_cast<float>(native_simd<int>())), 24 native_simd<float>>::value, 25 ""); 26 27 static_assert(std::is_same<decltype(static_simd_cast<fixed_size_simd<float, 1>>( 28 simd<int, simd_abi::scalar>())), 29 fixed_size_simd<float, 1>>::value, 30 ""); 31 32 static_assert( 33 std::is_same<decltype(static_simd_cast<simd<float, simd_abi::scalar>>( 34 fixed_size_simd<int, 1>())), 35 simd<float, simd_abi::scalar>>::value, 36 ""); 37 38 int main() {} 39