Skip to content

Commit 3b91baf

Browse files
authored
explicitly use sycl:: in memory handling functions call (#892)
1 parent df1c015 commit 3b91baf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dpnp/backend/src/memory_sycl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ char* dpnp_memory_alloc_c(size_t size_in_bytes)
6060
{
6161
memory_type = cl::sycl::usm::alloc::device;
6262
}
63-
array = reinterpret_cast<char*>(malloc(size_in_bytes, DPNP_QUEUE, memory_type));
63+
array = reinterpret_cast<char*>(sycl::malloc(size_in_bytes, DPNP_QUEUE, memory_type));
6464
if (array == nullptr)
6565
{
6666
// TODO add information about number of allocated bytes
@@ -87,13 +87,13 @@ void dpnp_memory_free_c(void* ptr)
8787
//std::cout << "dpnp_memory_free_c(ptr=" << (void*)ptr << ")" << std::endl;
8888
if (ptr != numpy_stub)
8989
{
90-
free(ptr, DPNP_QUEUE);
90+
sycl::free(ptr, DPNP_QUEUE);
9191
}
9292
}
9393

9494
void dpnp_memory_memcpy_c(void* dst, const void* src, size_t size_in_bytes)
9595
{
9696
//std::cout << "dpnp_memory_memcpy_c(dst=" << dst << ", src=" << src << ")" << std::endl;
9797

98-
memcpy(dst, src, size_in_bytes);
98+
DPNP_QUEUE.memcpy(dst, src, size_in_bytes).wait();
9999
}

0 commit comments

Comments
 (0)