Library/ManagedCuda/CudaDeviceVariable.cs
/// <summary>
/// Copy data from device to host memory
/// </summary>
/// <param name="dest">Destination data in host memory</param>
/// <param name="offsetSrc">Offset to source pointer in bytes</param>
Copy data from device to host memory
Copy data from device to host memory
public void CopyToHost(IntPtr dest, SizeT offsetSrc)
		{
			if (disposed) throw new ObjectDisposedException(this.ToString());
			CUResult res;
			res = DriverAPINativeMethods.SynchronousMemcpy_v2.cuMemcpyDtoH_v2(dest, _devPtr + offsetSrc, _size * _typeSize);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuMemcpyDtoH", res));
			if (res != CUResult.Success)
				throw new CudaException(res);
		}
public void CopyToHost ( IntPtr dest , SizeT offsetSrc ) { if ( disposed ) throw new ObjectDisposedException ( this . ToString ( ) ) ; CUResult res ; res = DriverAPINativeMethods . SynchronousMemcpy_v2 . cuMemcpyDtoH_v2 ( dest , _devPtr + offsetSrc , _size * _typeSize ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != CUResult . Success ) throw new CudaException ( res ) ; }
Copy data from device to host memory
Copy data from device to host memory
dest
IntPtr
Destination data in host memory
Destination data in host memory
offsetSrc
SizeT
Offset to source pointer in bytes
Offset to source pointer in bytes