|
4 | 4 | // RUN: %CPU_RUN_PLACEHOLDER %t.out
|
5 | 5 | // RUN: %GPU_RUN_PLACEHOLDER %t.out
|
6 | 6 |
|
7 |
| -// TODO: Support global work offset on Level Zero. |
8 |
| -// UNSUPPORTED: level_zero |
9 |
| - |
10 | 7 | //==- free_function_queries.cpp - SYCL free function queries test -=//
|
11 | 8 | //
|
12 | 9 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
@@ -42,10 +39,10 @@ int main() {
|
42 | 39 | sycl::access::target::global_buffer>
|
43 | 40 | results_acc(results_buf.get_access<sycl::access::mode::write>(cgh));
|
44 | 41 | cgh.parallel_for<class IdTest>(n, [=](sycl::id<1> i) {
|
45 |
| - auto that_id = sycl::this_id<1>(); |
| 42 | + auto that_id = sycl::experimental::this_id<1>(); |
46 | 43 | results_acc[0] = that_id == i;
|
47 | 44 |
|
48 |
| - auto that_item = sycl::this_item<1>(); |
| 45 | + auto that_item = sycl::experimental::this_item<1>(); |
49 | 46 | results_acc[1] = that_item.get_id() == i;
|
50 | 47 | results_acc[2] = that_item.get_range() == sycl::range<1>(n);
|
51 | 48 | acc[i]++;
|
@@ -78,9 +75,9 @@ int main() {
|
78 | 75 | cgh.parallel_for<class ItemTest>(n, [=](auto i) {
|
79 | 76 | static_assert(std::is_same<decltype(i), sycl::item<1>>::value,
|
80 | 77 | "lambda arg type is unexpected");
|
81 |
| - auto that_id = sycl::this_id<1>(); |
| 78 | + auto that_id = sycl::experimental::this_id<1>(); |
82 | 79 | results_acc[0] = i.get_id() == that_id;
|
83 |
| - auto that_item = sycl::this_item<1>(); |
| 80 | + auto that_item = sycl::experimental::this_item<1>(); |
84 | 81 | results_acc[1] = i == that_item;
|
85 | 82 | acc[i]++;
|
86 | 83 | });
|
@@ -112,9 +109,9 @@ int main() {
|
112 | 109 | results_acc(results_buf.get_access<sycl::access::mode::write>(cgh));
|
113 | 110 | cgh.parallel_for<class ItemOffsetTest>(
|
114 | 111 | sycl::range<1>{n}, offset, [=](sycl::item<1, true> i) {
|
115 |
| - auto that_id = sycl::this_id<1>(); |
| 112 | + auto that_id = sycl::experimental::this_id<1>(); |
116 | 113 | results_acc[0] = i.get_id() == that_id;
|
117 |
| - auto that_item = sycl::this_item<1>(); |
| 114 | + auto that_item = sycl::experimental::this_item<1>(); |
118 | 115 | results_acc[1] = i == that_item;
|
119 | 116 | acc[that_item.get_linear_id()]++;
|
120 | 117 | });
|
@@ -147,13 +144,13 @@ int main() {
|
147 | 144 | cgh.parallel_for<class NdItemTest>(NDR, [=](auto nd_i) {
|
148 | 145 | static_assert(std::is_same<decltype(nd_i), sycl::nd_item<1>>::value,
|
149 | 146 | "lambda arg type is unexpected");
|
150 |
| - auto that_nd_item = sycl::this_nd_item<1>(); |
| 147 | + auto that_nd_item = sycl::experimental::this_nd_item<1>(); |
151 | 148 | results_acc[0] = that_nd_item == nd_i;
|
152 | 149 | auto nd_item_group = that_nd_item.get_group();
|
153 |
| - results_acc[1] = nd_item_group == sycl::this_group<1>(); |
| 150 | + results_acc[1] = nd_item_group == sycl::experimental::this_group<1>(); |
154 | 151 | auto nd_item_id = that_nd_item.get_global_id();
|
155 |
| - results_acc[2] = nd_item_id == sycl::this_id<1>(); |
156 |
| - auto that_item = sycl::this_item<1>(); |
| 152 | + results_acc[2] = nd_item_id == sycl::experimental::this_id<1>(); |
| 153 | + auto that_item = sycl::experimental::this_item<1>(); |
157 | 154 | results_acc[3] = nd_item_id == that_item.get_id();
|
158 | 155 | results_acc[4] =
|
159 | 156 | that_nd_item.get_global_range() == that_item.get_range();
|
|
0 commit comments