Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit b56002e

Browse files
[SYCL] Adjust tests to get_native class methods removal
1 parent cc10e7d commit b56002e

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

SYCL/DeprecatedFeatures/device_platform_interop.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ int main() {
2828
cl_device_id cl_device;
2929
{
3030
device D2(device_selector);
31-
cl_device = D2.get_native<backend::opencl>();
31+
cl_device = get_native<backend::opencl>(D2);
3232
}
3333
device D3(cl_device);
3434
assert(D1 == D3 && "Device impls are different");
@@ -37,7 +37,7 @@ int main() {
3737
cl_platform_id cl_platform;
3838
{
3939
platform P2(device_selector);
40-
cl_platform = P2.get_native<backend::opencl>();
40+
cl_platform = get_native<backend::opencl>(P2);
4141
}
4242
platform P3(cl_platform);
4343
assert(P1 == P3 && "Platform impls are different");

SYCL/Plugin/interop-opencl.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ int main() {
4545
}
4646

4747
// Get native OpenCL handles
48-
auto ocl_platform = Platform.get_native<backend::opencl>();
49-
auto ocl_device = Device.get_native<backend::opencl>();
50-
auto ocl_context = Context.get_native<backend::opencl>();
51-
auto ocl_queue = Queue.get_native<backend::opencl>();
48+
auto ocl_platform = get_native<backend::opencl>(Platform);
49+
auto ocl_device = get_native<backend::opencl>(Device);
50+
auto ocl_context = get_native<backend::opencl>(Context);
51+
auto ocl_queue = get_native<backend::opencl>(Queue);
5252
auto ocl_buffers = get_native<backend::opencl>(Buffer);
5353
#ifdef SYCL2020_CONFORMANT_APIS
5454
assert(ocl_buffers.size() == 1);
@@ -68,10 +68,10 @@ int main() {
6868
#endif
6969

7070
// Check native handles
71-
assert(ocl_platform == PlatformInterop.get_native<backend::opencl>());
72-
assert(ocl_device == DeviceInterop.get_native<backend::opencl>());
73-
assert(ocl_context == ContextInterop.get_native<backend::opencl>());
74-
assert(ocl_queue == QueueInterop.get_native<backend::opencl>());
71+
assert(ocl_platform == get_native<backend::opencl>(PlatformInterop));
72+
assert(ocl_device == get_native<backend::opencl>(DeviceInterop));
73+
assert(ocl_context == get_native<backend::opencl>(ContextInterop));
74+
assert(ocl_queue == get_native<backend::opencl>(QueueInterop));
7575
assert(ocl_buffers == get_native<backend::opencl>(BufferInterop));
7676

7777
return 0;

0 commit comments

Comments
 (0)