@@ -58,6 +58,35 @@ BOOST_AUTO_TEST_CASE(vec_as) {
5858 BOOST_TEST (floats_in.y () == floats_out.y ());
5959 BOOST_TEST (floats_in.z () == floats_out.z ());
6060 BOOST_TEST (floats_in.w () == floats_out.w ());
61+
62+
63+ }
64+
65+ BOOST_AUTO_TEST_CASE (vec_as_print) {
66+ auto floats_in = sycl::float4{1 .f , 2 .f , 3 .f , 4 .f };
67+ auto ints = floats_in.as <sycl::int4>();
68+ auto floats_out = ints.as <sycl::float4>();
69+ BOOST_TEST (floats_in.x () == floats_out.x ());
70+ BOOST_TEST (floats_in.y () == floats_out.y ());
71+ BOOST_TEST (floats_in.z () == floats_out.z ());
72+ BOOST_TEST (floats_in.w () == floats_out.w ());
73+
74+ print_float_bits (floats_in.x ());
75+ print_float_bits (floats_in.y ());
76+ print_float_bits (floats_in.z ());
77+ print_float_bits (floats_in.w ());
78+
79+ std::cout << ints.x () << std::endl;
80+ std::cout << ints.y () << std::endl;
81+ std::cout << ints.z () << std::endl;
82+ std::cout << ints.w () << std::endl;
83+
84+ print_float_bits (floats_out.x ());
85+ print_float_bits (floats_out.y ());
86+ print_float_bits (floats_out.z ());
87+ print_float_bits (floats_out.w ());
88+
89+
6190}
6291
6392
0 commit comments