/// <summary> /// Copy data from the GPU into the host buffer making sure to grow the host buffer capacity if needed. /// </summary> /// <param name="nCount">Specifies the number of items to copy.</param> /// <param name="hGpu">Specifies the source GPU data to copy.</param> public void CopyFromGpu(int nCount, long hGpu) { if (nCount > m_lCapacity) { Free(); m_hBuffer = m_cuda.AllocHostBuffer(nCount); m_lCapacity = nCount; } m_cuda.CopyDeviceToHost(nCount, hGpu, m_hBuffer); }