diff --git a/src/cuda/api/memory.hpp b/src/cuda/api/memory.hpp index 766d2209..cd8e9dd7 100644 --- a/src/cuda/api/memory.hpp +++ b/src/cuda/api/memory.hpp @@ -1094,9 +1094,9 @@ void copy(const array_t& destination, const T* source, stream * @param stream_handle A stream on which to enqueue the copy operation */ template -void copy_single(T& destination, const T& source, stream::handle_t stream_handle) +void copy_single(T* destination, const T* source, stream::handle_t stream_handle) { - copy(&destination, &source, sizeof(T), stream_handle); + copy(destination, source, sizeof(T), stream_handle); } } // namespace detail_ @@ -1364,7 +1364,7 @@ inline void copy(T(&destination)[N], const_region_t source, const stream_t& stre * @param stream The CUDA command queue on which this copying will be enqueued */ template -void copy_single(T& destination, const T& source, const stream_t& stream); +void copy_single(T* destination, const T* source, const stream_t& stream); } // namespace async diff --git a/src/cuda/api/multi_wrapper_impls/memory.hpp b/src/cuda/api/multi_wrapper_impls/memory.hpp index 8e18ae9e..f9b80c65 100644 --- a/src/cuda/api/multi_wrapper_impls/memory.hpp +++ b/src/cuda/api/multi_wrapper_impls/memory.hpp @@ -81,9 +81,9 @@ inline void copy(span destination, const array_t& source, c } template -inline void copy_single(T& destination, const T& source, const stream_t& stream) +inline void copy_single(T* destination, const T* source, const stream_t& stream) { - detail_::copy_single(&destination, &source, sizeof(T), stream.handle()); + detail_::copy_single(destination, source, sizeof(T), stream.handle()); } } // namespace async