Library/ManagedCuda/CudaPitchedDeviceVariable.cs
/// <summary>
/// Async Copy data from device to device memory (1D Copy, copies destination pitch * height bytes data)
/// </summary>
/// <param name="source">Source pointer to device memory</param>
/// <param name="stream"></param>
Async Copy data from device to device memory (1D Copy, copies destination pitch * height bytes data)
Async Copy data from device to device memory ( 1D Copy copies destination pitch * height bytes data )
public void AsyncCopyToDevice(CUdeviceptr source, CudaStream stream)
		{
			if (disposed) throw new ObjectDisposedException(this.ToString());
			SizeT aSizeInBytes = _pitch * _height;
			CUResult res;
			res = DriverAPINativeMethods.AsynchronousMemcpy_v2.cuMemcpyDtoDAsync_v2(_devPtr, source, aSizeInBytes, 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 , CudaStream stream ) { if ( disposed ) throw new ObjectDisposedException ( this . ToString ( ) ) ; SizeT aSizeInBytes = _pitch * _height ; CUResult res ; res = DriverAPINativeMethods . AsynchronousMemcpy_v2 . cuMemcpyDtoDAsync_v2 ( _devPtr , source , aSizeInBytes , 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 (1D Copy, copies destination pitch * height bytes data)
Async Copy data from device to device memory ( 1D Copy copies destination pitch * height bytes data )
source
CUdeviceptr
Source pointer to device memory
Source pointer to device memory
stream
CudaStream
None