Library/ManagedCuda/CudaArray1D.cs
/// <summary>
/// Copy data from device to array
/// </summary>
/// <param name="source">DevicePointer to copy data from</param>
/// <param name="aBytesToCopy">number of bytes to copy</param>
/// <param name="offsetInBytes">Offset in bytes of source array</param>
Copy data from device to array
Copy data from device to array
public void CopyFromDeviceToArray1D(CUdeviceptr source, SizeT aBytesToCopy, SizeT offsetInBytes)
        {
            CUResult res;
            res = DriverAPINativeMethods.SynchronousMemcpy_v2.cuMemcpyDtoA_v2(_cuArray, offsetInBytes, source, aBytesToCopy);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuMemcpyDtoA", res));
            if (res != CUResult.Success)
                throw new CudaException(res);
        }
public void CopyFromDeviceToArray1D ( CUdeviceptr source , SizeT aBytesToCopy , SizeT offsetInBytes ) { CUResult res ; res = DriverAPINativeMethods . SynchronousMemcpy_v2 . cuMemcpyDtoA_v2 ( _cuArray , offsetInBytes , source , aBytesToCopy ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != CUResult . Success ) throw new CudaException ( res ) ; }
Copy data from device to array
Copy data from device to array
source
CUdeviceptr
DevicePointer to copy data from
DevicePointer to copy data from
aBytesToCopy
SizeT
number of bytes to copy
number of bytes to copy
offsetInBytes
SizeT
Offset in bytes of source array
Offset in bytes of source array