/// <summary> /// Updates the host data by copying the GPU data to the host data. /// </summary> /// <param name="lCount">Optionally, specifies a count (less than Count) to transfer.</param> /// <returns>An array of the host data is returned.</returns> public T[] update_cpu_data(long lCount = -1) { if (lCount >= 0) { if (lCount > m_lCapacity) { throw new ArgumentOutOfRangeException(); } m_lCount = lCount; } check_device(); if (m_lCount == 0) { m_rgCpuData = new List <T>().ToArray(); } else { m_rgCpuData = m_cuda.GetMemory(m_hGpuData, m_lCount); } return(m_rgCpuData); }