warp.copy#
- warp.copy(dest, src, dest_offset=0, src_offset=0, count=0, stream=None)[source]#
Copy array contents from src to dest.
- Parameters:
dest (array) – Destination array, must be at least as large as source buffer
src (array) – Source array
dest_offset (int) – Element offset in the destination array
src_offset (int) – Element offset in the source array
count (int) – Number of array elements to copy (will copy all elements if set to 0)
stream (Stream | None) – The stream on which to perform the copy
The stream, if specified, can be from any device. If the stream is omitted, then Warp selects a stream based on the following rules: (1) If the destination array is on a CUDA device, use the current stream on the destination device. (2) Otherwise, if the source array is on a CUDA device, use the current stream on the source device.
If neither source nor destination are on a CUDA device, no stream is used for the copy.