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.

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.

Both source and destination needs to be an instance of cuda::std::mdspan. They can also convert to cuda::std::mdspan, but the type needs to contain mdspan template arguments as member aliases named value_type, extents_type, layout_type and accessor_type. The resulting mdspan is required to be exhaustive. The element types of both the source and destination type are 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.

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

  • __stream – Stream that the copy should be inserted into

  • __src – Source to copy from

  • __dst – Destination to copy into

  • __config – Configuration for the copy