Library/ManagedCuda/CudaArray1D.cs
/// <summary>
/// Copy data from array to host memory
/// </summary>
/// <param name="dest">Pointer to Destination data</param>
/// <param name="sizeInBytes">Number of bytes to copy</param>
/// <param name="offsetInBytes">Offset in bytes of destination array</param>
Copy data from array to host memory
Copy data from array to host memory
public void CopyFromArray1DToHost(IntPtr dest, uint sizeInBytes, SizeT offsetInBytes)
        {
            CUResult res;
            res = DriverAPINativeMethods.SynchronousMemcpy_v2.cuMemcpyAtoH_v2(dest, _cuArray, offsetInBytes, sizeInBytes);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuMemcpyAtoH", res));
            if (res != CUResult.Success)
                throw new CudaException(res);
        }
public void CopyFromArray1DToHost ( IntPtr dest , uint sizeInBytes , SizeT offsetInBytes ) { CUResult res ; res = DriverAPINativeMethods . SynchronousMemcpy_v2 . cuMemcpyAtoH_v2 ( dest , _cuArray , offsetInBytes , sizeInBytes ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != CUResult . Success ) throw new CudaException ( res ) ; }
Copy data from array to host memory
Copy data from array to host memory
dest
IntPtr
Pointer to Destination data
Pointer to Destination data
sizeInBytes
uint
Number of bytes to copy
Number of bytes to copy
offsetInBytes
SizeT
Offset in bytes of destination array
Offset in bytes of destination array