fill_bytes#

template<typename _DstTy, ::cuda::std::enable_if_t<__spannable<transformed_device_argument_t<_DstTy>>, int> = 0>
inline void cuda::fill_bytes(
stream_ref __stream,
_DstTy &&__dst,
::cuda::std::uint8_t __value
)#

Launches an operation to bytewise fill the memory 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.

The destination needs to be or launch_transform to a contiguous_range and convert to cuda::std::span. The element type of the destination is required to be trivially copyable.

The destination cannot reside in pagable host memory.

Note

This overload accepts mdspan-compatible types.

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

  • __dst – Destination memory to fill

  • __value – Value to fill into every byte in the destination