@@ -19,13 +19,9 @@ context ctx = q.get_context();
1919
2020constexpr size_t SIZE = 128 ;
2121
22- template <typename T> struct S {
23- T val;
24- };
22+ template <typename T> struct S { T val; };
2523
26- template <typename T> struct M {
27- T val;
28- };
24+ template <typename T> struct M { T val; };
2925
3026union U {
3127 S<int > s;
@@ -43,7 +39,7 @@ void test_struct(size_t SIZE, size_t WGSIZE) {
4339 }
4440 nd_range ndr{{SIZE}, {WGSIZE}};
4541 q.submit ([&](sycl::handler &cgh) {
46- ext::oneapi::experimental::work_group_memory<S<T>[]> mem{ WGSIZE, cgh};
42+ ext::oneapi::experimental::work_group_memory<S<T>[]> mem { WGSIZE, cgh };
4743 ext::oneapi::experimental ::work_group_memory<T> result{cgh};
4844 cgh.parallel_for (ndr, [=](nd_item<> it) {
4945 size_t local_id = it.get_local_id ();
@@ -148,7 +144,7 @@ template <typename T, typename... Ts> void test_marray() {
148144 assert (buf && " Shared USM allocation failed!" );
149145 T expected = 0 ;
150146 for (int i = 0 ; i < WGSIZE; ++i) {
151- buf[i] = T (i);
147+ buf[i] = T (i) / WGSIZE ;
152148 expected = expected + buf[i];
153149 }
154150 nd_range ndr{{SIZE}, {WGSIZE}};
@@ -186,7 +182,7 @@ template <typename T, typename... Ts> void test_vec() {
186182 assert (buf && " Shared USM allocation failed!" );
187183 T expected = 0 ;
188184 for (int i = 0 ; i < WGSIZE; ++i) {
189- buf[i] = ext::intel::math::sqrt ( T (i)) ;
185+ buf[i] = T (i) / WGSIZE ;
190186 expected = expected + buf[i];
191187 }
192188 nd_range ndr{{SIZE}, {WGSIZE}};
0 commit comments