21 #ifdef CUML_ENABLE_GPU
27 template <device_type dst_type, device_type src_type,
typename T>
28 void copy(T* dst, T
const* src, uint32_t size, uint32_t dst_offset, uint32_t src_offset)
30 detail::copy<dst_type, src_type, T>(dst + dst_offset, src + src_offset, size,
cuda_stream{});
33 template <device_type dst_type, device_type src_type,
typename T>
35 T* dst, T
const* src, uint32_t size, uint32_t dst_offset, uint32_t src_offset,
cuda_stream stream)
37 detail::copy<dst_type, src_type, T>(dst + dst_offset, src + src_offset, size, stream);
40 template <device_type dst_type, device_type src_type,
typename T>
41 void copy(T* dst, T
const* src, uint32_t size)
43 detail::copy<dst_type, src_type, T>(dst, src, size,
cuda_stream{});
46 template <device_type dst_type, device_type src_type,
typename T>
49 detail::copy<dst_type, src_type, T>(dst, src, size, stream);
63 detail::copy<device_type::gpu, device_type::gpu, T>(
64 dst + dst_offset, src + src_offset, size, stream);
66 detail::copy<device_type::cpu, device_type::cpu, T>(
67 dst + dst_offset, src + src_offset, size, stream);
69 detail::copy<device_type::gpu, device_type::cpu, T>(
70 dst + dst_offset, src + src_offset, size, stream);
72 detail::copy<device_type::cpu, device_type::gpu, T>(
73 dst + dst_offset, src + src_offset, size, stream);
80 copy<T>(dst, src, size, dst_type, src_type, 0, 0,
cuda_stream{});
91 copy<T>(dst, src, size, dst_type, src_type, 0, 0, stream);
Definition: buffer.hpp:35
int cuda_stream
Definition: cuda_stream.hpp:25
device_type
Definition: device_type.hpp:18
const_agnostic_same_t< T, U > copy(buffer< T > &dst, buffer< U > const &src, typename buffer< T >::index_type dst_offset, typename buffer< U >::index_type src_offset, typename buffer< T >::index_type size, cuda_stream stream)
Definition: buffer.hpp:327