Library/ManagedCuda/CudaDeviceVariable.cs
/// <summary>
/// Async Copy data from device to device memory
/// </summary>
/// <param name="source">Source pointer to device memory</param>
/// <param name="offsetSrc">Offset to source pointer in bytes</param>
/// <param name="offsetDest">Offset to destination pointer in bytes</param>
/// <param name="sizeInBytes">Size to copy in bytes</param>
/// <param name="stream"></param>
Async Copy data from device to device memory
Async Copy data from device to device memory
public void AsyncCopyToDevice(CUdeviceptr source, SizeT offsetSrc, SizeT offsetDest, SizeT sizeInBytes, CudaStream stream)
		{
			if (disposed) throw new ObjectDisposedException(this.ToString());
			CUResult res;
			res = DriverAPINativeMethods.AsynchronousMemcpy_v2.cuMemcpyDtoDAsync_v2(_devPtr + offsetDest, source + offsetSrc, sizeInBytes, stream.Stream);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuMemcpyDtoDAsync", res));
			if (res != CUResult.Success)
				throw new CudaException(res);
		}
public void AsyncCopyToDevice ( CUdeviceptr source , SizeT offsetSrc , SizeT offsetDest , SizeT sizeInBytes , CudaStream stream ) { if ( disposed ) throw new ObjectDisposedException ( this . ToString ( ) ) ; CUResult res ; res = DriverAPINativeMethods . AsynchronousMemcpy_v2 . cuMemcpyDtoDAsync_v2 ( _devPtr + offsetDest , source + offsetSrc , sizeInBytes , stream . Stream ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != CUResult . Success ) throw new CudaException ( res ) ; }
Async Copy data from device to device memory
Async Copy data from device to device memory
source
CUdeviceptr
Source pointer to device memory
Source pointer to device memory
offsetSrc
SizeT
Offset to source pointer in bytes
Offset to source pointer in bytes
offsetDest
SizeT
Offset to destination pointer in bytes
Offset to destination pointer in bytes
sizeInBytes
SizeT
Size to copy in bytes
Size to copy in bytes
stream
CudaStream
None