Library/ManagedCuda/CudaSolve/CudaSolveSparse.cs
/// <summary>
/// The batched sparse QR factorization is used to solve either a set of least-squares
/// problems or a set of linear systems
/// </summary>
/// <param name="m">number of rows of each matrix Aj.</param>
/// <param name="n">number of columns of each matrix Aj.</param>
/// <param name="nnz">number of nonzeros of each matrix Aj. It is the size csrColIndA.</param>
/// <param name="descrA">the descriptor of matrix A. The supported matrix type is
/// CUSPARSE_MATRIX_TYPE_GENERAL. Also, the supported index bases are CUSPARSE_INDEX_BASE_ZERO and CUSPARSE_INDEX_BASE_ONE.</param>
/// <param name="csrVal">array of nnzA*batchSize nonzero 
/// elements of matrices A0, A1, .... All matrices are aggregated one after another.</param>
/// <param name="csrRowPtr">integer array of m+1 elements that contains the
/// start of every row and the end of the last row plus one.</param>
/// <param name="csrColInd">integer array of nnzAcolumn indices of the nonzero elements of each matrix Aj.</param>
/// <param name="batchSize">number of systems to be solved.</param>
/// <param name="info">opaque structure for QR factorization.</param>
/// <param name="internalDataInBytes">number of bytes of the internal data.</param>
/// <param name="workspaceInBytes">number of bytes of the buffer in numerical factorization.</param>
The batched sparse QR factorization is used to solve either a set of least-squares
problems or a set of linear systems
The batched sparse QR factorization is used to solve either a set of least - squares problems or a set of linear systems
public void CsrqrBufferInfoBatched(int m, int n, int nnz, CudaSparseMatrixDescriptor descrA, CudaDeviceVariable<float> csrVal, CudaDeviceVariable<int> csrRowPtr, CudaDeviceVariable<int> csrColInd, int batchSize, CsrQrInfo info, ref SizeT internalDataInBytes, ref SizeT workspaceInBytes)
		{
			res = CudaSolveNativeMethods.Sparse.cusolverSpScsrqrBufferInfoBatched(_handle, m, n, nnz, descrA.Descriptor, csrVal.DevicePointer, csrRowPtr.DevicePointer, csrColInd.DevicePointer, batchSize, info.Info, ref internalDataInBytes, ref workspaceInBytes);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cusolverSpScsrqrBufferInfoBatched", res));
			if (res != cusolverStatus.Success) throw new CudaSolveException(res);
		}
public void CsrqrBufferInfoBatched ( int m , int n , int nnz , CudaSparseMatrixDescriptor descrA , CudaDeviceVariable < float > csrVal , CudaDeviceVariable < int > csrRowPtr , CudaDeviceVariable < int > csrColInd , int batchSize , CsrQrInfo info , ref SizeT internalDataInBytes , ref SizeT workspaceInBytes ) { res = CudaSolveNativeMethods . Sparse . cusolverSpScsrqrBufferInfoBatched ( _handle , m , n , nnz , descrA . Descriptor , csrVal . DevicePointer , csrRowPtr . DevicePointer , csrColInd . DevicePointer , batchSize , info . Info , ref internalDataInBytes , ref workspaceInBytes ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != cusolverStatus . Success ) throw new CudaSolveException ( res ) ; }
The batched sparse QR factorization is used to solve either a set of least-squares
problems or a set of linear systems
The batched sparse QR factorization is used to solve either a set of least - squares problems or a set of linear systems
m
int
number of rows of each matrix Aj.
number of rows of each matrix Aj .
n
int
number of columns of each matrix Aj.
number of columns of each matrix Aj .
nnz
int
number of nonzeros of each matrix Aj. It is the size csrColIndA.
number of nonzeros of each matrix Aj . It is the size csrColIndA .
descrA
CudaSparseMatrixDescriptor
the descriptor of matrix A. The supported matrix type is
CUSPARSE_MATRIX_TYPE_GENERAL. Also, the supported index bases are CUSPARSE_INDEX_BASE_ZERO and CUSPARSE_INDEX_BASE_ONE.
the descriptor of matrix A . The supported matrix type is CUSPARSE_MATRIX_TYPE_GENERAL . Also the supported index bases are CUSPARSE_INDEX_BASE_ZERO and CUSPARSE_INDEX_BASE_ONE .
csrVal
CudaDeviceVariable<float>
array of nnzA*batchSize nonzero
elements of matrices A0, A1, .... All matrices are aggregated one after another.
array of nnzA * batchSize nonzero elements of matrices A0 A1 .... All matrices are aggregated one after another .
csrRowPtr
CudaDeviceVariable<int>
integer array of m+1 elements that contains the
start of every row and the end of the last row plus one.
integer array of m + 1 elements that contains the start of every row and the end of the last row plus one .
csrColInd
CudaDeviceVariable<int>
integer array of nnzAcolumn indices of the nonzero elements of each matrix Aj.
integer array of nnzAcolumn indices of the nonzero elements of each matrix Aj .
batchSize
int
number of systems to be solved.
number of systems to be solved .
info
CsrQrInfo
opaque structure for QR factorization.
opaque structure for QR factorization .
SizeT
ref
internalDataInBytes
number of bytes of the internal data.
number of bytes of the internal data .
workspaceInBytes
number of bytes of the buffer in numerical factorization.
number of bytes of the buffer in numerical factorization .