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