copy_bytes#

template<typename _SrcTy, typename _DstTy>
inline void cuda::copy_bytes(
stream_ref __stream,
_SrcTy &&__src,
_DstTy &&__dst,
copy_configuration __config = {}
)#

Launches a bytewise memory copy from source to destination into the provided stream.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Both source and destination needs to be a contiguous_range and convert to cuda::std::span. The element types of both the source and destination range is required to be trivially copyable.

This call might be synchronous if either source or destination is pagable host memory. It will be synchronous if both destination and copy is located in host memory.

Note

This overload accepts mdspan-compatible types.

Parameters:
  • __stream – Stream that the copy should be inserted into

  • __src – Source to copy from

  • __dst – Destination to copy into

  • __config – Configuration for the copy