Skip to content

Commit 369ea3a

Browse files
committed
Updated test and removed unused code.
1 parent c7acb89 commit 369ea3a

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

clang/lib/Sema/SemaSYCL.cpp

-8
Original file line numberDiff line numberDiff line change
@@ -5304,14 +5304,6 @@ void ConstructFreeFunctionKernel(Sema &SemaRef, FunctionDecl *FD) {
53045304
SemaRef, FD->getLocation(), FD->isInlined(), false /*IsSIMDKernel */,
53055305
true /*IsFreeFunction*/, FD, SemaRef.getSyclIntegrationHeader());
53065306

5307-
#if 0
5308-
// TODO: remove this dummy struct
5309-
RecordDecl *DummyClass =
5310-
SemaRef.getASTContext().buildImplicitRecord("__dummy_class");
5311-
DummyClass->startDefinition();
5312-
DummyClass->completeDefinition();
5313-
CXXRecordDecl *DummyClass1 = static_cast<CXXRecordDecl *>(DummyClass);
5314-
#endif
53155307
FreeFunctionKernelBodyCreator kernel_body(SemaRef, kernel_decl, FD);
53165308

53175309
// Kernel object size is irrelevant, so set to 0.

sycl/test-e2e/KernelAndProgram/free_function_kernels.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ SYCL_EXTERNAL
128128
SYCL_EXT_ONEAPI_FUNCTION_PROPERTY(
129129
(ext::oneapi::experimental::nd_range_kernel<1>))
130130
void ff_1(int *ptr, int start, int end) {
131-
nd_item<1> Item = ext::oneapi::experimental::this_nd_item<1>();
131+
nd_item<1> Item = ext::oneapi::this_work_item::get_nd_item<1>();
132132
id<1> GId = Item.get_global_id();
133133
ptr[GId.get(0)] = GId.get(0) + start + end;
134134
}
@@ -175,7 +175,7 @@ SYCL_EXT_ONEAPI_FUNCTION_PROPERTY(
175175
(ext::oneapi::experimental::nd_range_kernel<2>))
176176
void ff_2(int *ptr, int start, struct Simple S) {
177177
int(&ptr2D)[4][4] = *reinterpret_cast<int(*)[4][4]>(ptr);
178-
nd_item<2> Item = ext::oneapi::experimental::this_nd_item<2>();
178+
nd_item<2> Item = ext::oneapi::this_work_item::get_nd_item<2>();
179179
id<2> GId = Item.get_global_id();
180180
id<2> LId = Item.get_local_id();
181181
ptr2D[GId.get(0)][GId.get(1)] =
@@ -229,7 +229,7 @@ SYCL_EXTERNAL SYCL_EXT_ONEAPI_FUNCTION_PROPERTY((
229229
ext::oneapi::experimental::nd_range_kernel<2>)) void ff_3(T *ptr, T start,
230230
struct Simple S) {
231231
int(&ptr2D)[4][4] = *reinterpret_cast<int(*)[4][4]>(ptr);
232-
nd_item<2> Item = ext::oneapi::experimental::this_nd_item<2>();
232+
nd_item<2> Item = ext::oneapi::this_work_item::get_nd_item<2>();
233233
id<2> GId = Item.get_global_id();
234234
id<2> LId = Item.get_local_id();
235235
ptr2D[GId.get(0)][GId.get(1)] =

0 commit comments

Comments
 (0)