Skip to content

Commit 194cd00

Browse files
committed
Fix error in previous commit
Malloc doesn't belong in the anonymous namespace
1 parent 73ba5a1 commit 194cd00

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

sycl/include/syclcompat/memory.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -588,9 +588,6 @@ static inline T *malloc_shared(size_t count,
588588
return static_cast<T *>(sycl::malloc_shared(count * sizeof(T), q));
589589
}
590590

591-
// Anonymous namespace to disable ADL for functions which might clash (memcpy,
592-
// memset, free)
593-
namespace {
594591
/// Allocate memory block for 3D array on the device.
595592
/// \param size Size of the memory block, in bytes.
596593
/// \param q Queue to execute the allocate task.
@@ -615,7 +612,6 @@ static inline void *malloc(size_t &pitch, size_t x, size_t y,
615612
sycl::queue q = get_default_queue()) {
616613
return detail::malloc(pitch, x, y, 1, q);
617614
}
618-
} // namespace
619615

620616
/// Wait on the queue \p q and free the memory \p ptr.
621617
/// \param ptr Point to free.
@@ -630,6 +626,8 @@ static inline void wait_and_free(void *ptr,
630626
}
631627
}
632628

629+
// Anonymous namespace to disable ADL for functions which might clash (memcpy,
630+
// memset, free)
633631
namespace {
634632
/// Free the memory \p ptr on the default queue without synchronizing
635633
/// \param ptr Point to free.

0 commit comments

Comments
 (0)