|
11 | 11 | #define SYCL_SIMPLE_SWIZZLES
|
12 | 12 | #include <sycl/sycl.hpp>
|
13 | 13 |
|
| 14 | +#include <cstddef> |
| 15 | + |
14 | 16 | void check_vectors(sycl::int4 a, sycl::int4 b, sycl::int4 c, sycl::int4 gold) {
|
15 | 17 | sycl::int4 result = a * (sycl::int4)b.y() + c;
|
16 | 18 | assert((int)result.x() == (int)gold.x());
|
@@ -100,17 +102,17 @@ int main() {
|
100 | 102 | auto asVec = inputVec.template swizzle<sycl::elem::s0, sycl::elem::s1>()
|
101 | 103 | .template as<sycl::vec<int16_t, 1>>();
|
102 | 104 |
|
103 |
| - // Check that [u]long[n] type aliases match vec<[unsigned] long, n> types. |
104 |
| - assert((std::is_same<sycl::vec<long, 2>, sycl::long2>::value)); |
105 |
| - assert((std::is_same<sycl::vec<long, 3>, sycl::long3>::value)); |
106 |
| - assert((std::is_same<sycl::vec<long, 4>, sycl::long4>::value)); |
107 |
| - assert((std::is_same<sycl::vec<long, 8>, sycl::long8>::value)); |
108 |
| - assert((std::is_same<sycl::vec<long, 16>, sycl::long16>::value)); |
109 |
| - assert((std::is_same<sycl::vec<unsigned long, 2>, sycl::ulong2>::value)); |
110 |
| - assert((std::is_same<sycl::vec<unsigned long, 3>, sycl::ulong3>::value)); |
111 |
| - assert((std::is_same<sycl::vec<unsigned long, 4>, sycl::ulong4>::value)); |
112 |
| - assert((std::is_same<sycl::vec<unsigned long, 8>, sycl::ulong8>::value)); |
113 |
| - assert((std::is_same<sycl::vec<unsigned long, 16>, sycl::ulong16>::value)); |
| 105 | + // Check that [u]long[n] type aliases match vec<[u]int64_t, n> types. |
| 106 | + assert((std::is_same<sycl::vec<std::int64_t, 2>, sycl::long2>::value)); |
| 107 | + assert((std::is_same<sycl::vec<std::int64_t, 3>, sycl::long3>::value)); |
| 108 | + assert((std::is_same<sycl::vec<std::int64_t, 4>, sycl::long4>::value)); |
| 109 | + assert((std::is_same<sycl::vec<std::int64_t, 8>, sycl::long8>::value)); |
| 110 | + assert((std::is_same<sycl::vec<std::int64_t, 16>, sycl::long16>::value)); |
| 111 | + assert((std::is_same<sycl::vec<std::uint64_t, 2>, sycl::ulong2>::value)); |
| 112 | + assert((std::is_same<sycl::vec<std::uint64_t, 3>, sycl::ulong3>::value)); |
| 113 | + assert((std::is_same<sycl::vec<std::uint64_t, 4>, sycl::ulong4>::value)); |
| 114 | + assert((std::is_same<sycl::vec<std::uint64_t, 8>, sycl::ulong8>::value)); |
| 115 | + assert((std::is_same<sycl::vec<std::uint64_t, 16>, sycl::ulong16>::value)); |
114 | 116 |
|
115 | 117 | // Check convert() from and to various types.
|
116 | 118 | check_convert_from<int8_t>();
|
|
0 commit comments