Library/ManagedCuda/CudaDeviceVariable.cs
/// <summary>
/// Copy data from host to device memory
/// </summary>
/// <param name="source">Source pointer to host memory</param>
Copy data from host to device memory
Copy data from host to device memory
public void CopyToDevice(IntPtr source)
		{
			if (disposed) throw new ObjectDisposedException(this.ToString());
			CUResult res;
			res = DriverAPINativeMethods.SynchronousMemcpy_v2.cuMemcpyHtoD_v2(_devPtr, 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 ) { if ( disposed ) throw new ObjectDisposedException ( this . ToString ( ) ) ; CUResult res ; res = DriverAPINativeMethods . SynchronousMemcpy_v2 . cuMemcpyHtoD_v2 ( _devPtr , 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