Library/ManagedCuda/CudaSolve/CudaSolveSparse.cs
/// <summary>
/// Symmetric Approximate minimum degree algorithm based on quotient graph.<para/>
/// This function implements Symmetric Approximate Minimum Degree Algorithm based
/// on Quotient Graph. It returns a permutation vector p such that A(p,p) would have less
/// zero fill-in during Cholesky factorization.
/// </summary>
/// <param name="n">number of rows and columns of matrix A.</param>
/// <param name="nnzA">number of nonzeros of matrix A. It is the size of csrValA and 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="csrRowPtrA">integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.</param>
/// <param name="csrColIndA">integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.</param>
/// <param name="p">permutation vector of size n.</param>
Symmetric Approximate minimum degree algorithm based on quotient graph.
This function implements Symmetric Approximate Minimum Degree Algorithm based
on Quotient Graph. It returns a permutation vector p such that A(p,p) would have less
zero fill-in during Cholesky factorization.
Symmetric Approximate minimum degree algorithm based on quotient graph . This function implements Symmetric Approximate Minimum Degree Algorithm based on Quotient Graph . It returns a permutation vector p such that A ( p p ) would have less zero fill - in during Cholesky factorization .
public void CsrsymamdHost(int n, int nnzA, CudaSparseMatrixDescriptor descrA, int[] csrRowPtrA, int[] csrColIndA, int[] p)
		{
			res = CudaSolveNativeMethods.Sparse.cusolverSpXcsrsymamdHost(_handle, n, nnzA, descrA.Descriptor, csrRowPtrA, csrColIndA, p);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cusolverSpXcsrsymamdHost", res));
			if (res != cusolverStatus.Success) throw new CudaSolveException(res);
		}
public void CsrsymamdHost ( int n , int nnzA , CudaSparseMatrixDescriptor descrA , int [ ] csrRowPtrA , int [ ] csrColIndA , int [ ] p ) { res = CudaSolveNativeMethods . Sparse . cusolverSpXcsrsymamdHost ( _handle , n , nnzA , descrA . Descriptor , csrRowPtrA , csrColIndA , p ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != cusolverStatus . Success ) throw new CudaSolveException ( res ) ; }
Symmetric Approximate minimum degree algorithm based on quotient graph.
Symmetric Approximate minimum degree algorithm based on quotient graph .
n
int
number of rows and columns of matrix A.
number of rows and columns of matrix A .
nnzA
int
number of nonzeros of matrix A. It is the size of csrValA and csrColIndA.
number of nonzeros of matrix A . It is the size of csrValA and 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 .
csrRowPtrA
int[]
integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.
integer array of n + 1 elements that contains the start of every row and the end of the last row plus one .
csrColIndA
int[]
integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.
integer array of nnz ( = csrRowPtrA ( n ) * csrRowPtrA ( 0 )) column indices of the nonzero elements of matrix A .
p
int[]
permutation vector of size n.
permutation vector of size n .