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