Library/ManagedCuda/CudaDeviceVariable.cs
/// <summary>
/// Async Copy data from device to device memory
/// </summary>
/// <param name="source">Source</param>
/// <param name="stream"></param>
Async Copy data from device to device memory
Async Copy data from device to device memory
public void AsyncCopyToDevice(CudaDeviceVariable<T> source, CUstream stream)
		{
			if (disposed) throw new ObjectDisposedException(this.ToString());
			SizeT aSizeInBytes = MinSize(source.Size) * _typeSize;
			CUResult res;
			res = DriverAPINativeMethods.AsynchronousMemcpy_v2.cuMemcpyDtoDAsync_v2(_devPtr, source.DevicePointer, aSizeInBytes, stream);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuMemcpyDtoDAsync", res));
			if (res != CUResult.Success)
				throw new CudaException(res);
		}
public void AsyncCopyToDevice ( CudaDeviceVariable < T > source , CUstream stream ) { if ( disposed ) throw new ObjectDisposedException ( this . ToString ( ) ) ; SizeT aSizeInBytes = MinSize ( source . Size ) * _typeSize ; CUResult res ; res = DriverAPINativeMethods . AsynchronousMemcpy_v2 . cuMemcpyDtoDAsync_v2 ( _devPtr , source . DevicePointer , aSizeInBytes , 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
CudaDeviceVariable<T>
None
stream
CUstream
None