@@ -15,6 +15,29 @@ bool test_simd_ctors() SYCL_ESIMD_FUNCTION {
1515 return v0[0 ] + v1[1 ] + v2[2 ] + v3[3 ] == 1 + 1 + 2 + 6 ;
1616}
1717
18+ void test_simd_class_traits () SYCL_ESIMD_FUNCTION {
19+ static_assert (std::is_default_constructible<simd<int , 4 >>::value,
20+ " type trait mismatch" );
21+ static_assert (std::is_trivially_default_constructible<simd<int , 4 >>::value,
22+ " type trait mismatch" );
23+ static_assert (std::is_copy_constructible<simd<int , 4 >>::value,
24+ " type trait mismatch" );
25+ static_assert (!std::is_trivially_copy_constructible<simd<int , 4 >>::value,
26+ " type trait mismatch" );
27+ static_assert (std::is_move_constructible<simd<int , 4 >>::value,
28+ " type trait mismatch" );
29+ static_assert (!std::is_trivially_move_constructible<simd<int , 4 >>::value,
30+ " type trait mismatch" );
31+ static_assert (std::is_copy_assignable<simd<int , 4 >>::value,
32+ " type trait mismatch" );
33+ static_assert (std::is_trivially_copy_assignable<simd<int , 4 >>::value,
34+ " type trait mismatch" );
35+ static_assert (std::is_move_assignable<simd<int , 4 >>::value,
36+ " type trait mismatch" );
37+ static_assert (std::is_trivially_move_assignable<simd<int , 4 >>::value,
38+ " type trait mismatch" );
39+ }
40+
1841void test_conversion () SYCL_ESIMD_FUNCTION {
1942 simd<int , 32 > v = 3 ;
2043 simd<float , 32 > f = v;
0 commit comments