Example #1
0
        /// <summary>
        ///
        /// </summary>
        public void BlockedEllGet(out CudaDeviceVariable <indexT> ellColInd,
                                  out CudaDeviceVariable <dataT> ellValue, out long ellBlockSize, out long ellCols)
        {
            ellBlockSize = 0;
            ellCols      = 0;
            CUdeviceptr ptrIdx    = new CUdeviceptr();
            CUdeviceptr ptrValues = new CUdeviceptr();

            res = CudaSparseNativeMethods.cusparseBlockedEllGet(descr, ref rows, ref cols, ref ellBlockSize, ref ellCols, ref ptrIdx, ref ptrValues, ref typeIndices, ref idxBase, ref typeData);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cusparseBlockedEllGet", res));

            if (res != cusparseStatus.Success)
            {
                throw new CudaSparseException(res);
            }

            ellColInd = new CudaDeviceVariable <indexT>(ptrIdx);
            ellValue  = new CudaDeviceVariable <dataT>(ptrValues);
        }