Library/ManagedCuda/CudaArray1D.cs
/// <summary>
/// Copy data from array to host memory
/// </summary>
/// <param name="offsetInBytes">Offset in bytes of destination array</param>
/// <param name="dest">Destination array</param>
Copy data from array to host memory
Copy data from array to host memory
public void CopyFromArray1DToHost(VectorTypes.uchar4[] dest, SizeT offsetInBytes)
        {
            CUResult res;
            res = DriverAPINativeMethods.SynchronousMemcpy_v2.cuMemcpyAtoH_v2(dest, _cuArray, offsetInBytes, (dest.Length * Marshal.SizeOf(typeof(VectorTypes.uchar4))));
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuMemcpyAtoH", res));
            if (res != CUResult.Success)
                throw new CudaException(res);
        }
public void CopyFromArray1DToHost ( VectorTypes . uchar4 [ ] dest , SizeT offsetInBytes ) { CUResult res ; res = DriverAPINativeMethods . SynchronousMemcpy_v2 . cuMemcpyAtoH_v2 ( dest , _cuArray , offsetInBytes , ( dest . Length * Marshal . SizeOf ( typeof ( VectorTypes . uchar4 ) ) ) ) ; 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
VectorTypes.uchar4[]
None
offsetInBytes
SizeT
Offset in bytes of destination array
Offset in bytes of destination array