示例#1
0
        /// <summary>
        /// Set the host buffer data, making to expand the capcity if needed.
        /// </summary>
        /// <param name="rgSrc">Specifies the source data to set in the host buffer.</param>
        public void SetHostData(T[] rgSrc)
        {
            if (m_lCapacity < rgSrc.Length)
            {
                Free();
                m_hBuffer = m_cuda.AllocHostBuffer(rgSrc.Length);
            }

            m_cuda.SetHostMemory(m_hBuffer, rgSrc);
        }