@@ -41,6 +41,9 @@ namespace
4141{
4242constexpr size_t SIZE = 1024 ;
4343static_assert (SIZE % 8 == 0 );
44+
45+ using namespace dpctl ::syclinterface;
46+
4447} /* end of anonymous namespace */
4548
4649struct TestQueueSubmit : public ::testing::Test
@@ -92,8 +95,8 @@ TEST_F(TestQueueSubmit, CheckSubmitRange_saxpy)
9295 auto c = DPCTLmalloc_shared (SIZE * sizeof (float ), QRef);
9396 ASSERT_TRUE (c != nullptr );
9497
95- auto a_ptr = reinterpret_cast <float *>(unwrap (a));
96- auto b_ptr = reinterpret_cast <float *>(unwrap (b));
98+ auto a_ptr = reinterpret_cast <float *>(unwrap< void > (a));
99+ auto b_ptr = reinterpret_cast <float *>(unwrap< void > (b));
97100 // Initialize a,b
98101 for (auto i = 0ul ; i < SIZE; ++i) {
99102 a_ptr[i] = i + 1.0 ;
@@ -103,7 +106,8 @@ TEST_F(TestQueueSubmit, CheckSubmitRange_saxpy)
103106 // Create kernel args for axpy
104107 float d = 10.0 ;
105108 size_t Range[] = {SIZE};
106- void *args2[4 ] = {unwrap (a), unwrap (b), unwrap (c), (void *)&d};
109+ void *args2[4 ] = {unwrap<void >(a), unwrap<void >(b), unwrap<void >(c),
110+ (void *)&d};
107111 DPCTLKernelArgType addKernelArgTypes[] = {DPCTL_VOID_PTR, DPCTL_VOID_PTR,
108112 DPCTL_VOID_PTR, DPCTL_FLOAT};
109113 auto ERef = DPCTLQueue_SubmitRange (
@@ -152,8 +156,8 @@ TEST_F(TestQueueSubmit, CheckSubmitNDRange_saxpy)
152156 auto c = DPCTLmalloc_shared (SIZE * sizeof (float ), QRef);
153157 ASSERT_TRUE (c != nullptr );
154158
155- auto a_ptr = reinterpret_cast <float *>(unwrap (a));
156- auto b_ptr = reinterpret_cast <float *>(unwrap (b));
159+ auto a_ptr = reinterpret_cast <float *>(unwrap< void > (a));
160+ auto b_ptr = reinterpret_cast <float *>(unwrap< void > (b));
157161 // Initialize a,b
158162 for (auto i = 0ul ; i < SIZE; ++i) {
159163 a_ptr[i] = i + 1.0 ;
@@ -164,7 +168,8 @@ TEST_F(TestQueueSubmit, CheckSubmitNDRange_saxpy)
164168 float d = 10.0 ;
165169 size_t gRange [] = {1 , 1 , SIZE};
166170 size_t lRange[] = {1 , 1 , 8 };
167- void *args2[4 ] = {unwrap (a), unwrap (b), unwrap (c), (void *)&d};
171+ void *args2[4 ] = {unwrap<void >(a), unwrap<void >(b), unwrap<void >(c),
172+ (void *)&d};
168173 DPCTLKernelArgType addKernelArgTypes[] = {DPCTL_VOID_PTR, DPCTL_VOID_PTR,
169174 DPCTL_VOID_PTR, DPCTL_FLOAT};
170175 DPCTLSyclEventRef events[1 ];
0 commit comments