Library/ManagedCuda/CudaSolve/CudaSolveSparse.cs
/// <summary>
/// This function implements Symmetric Reverse Cuthill-McKee permutation. It returns a
/// permutation vector p such that A(p,p) would concentrate nonzeros to diagonal. This is
/// equivalent to symrcm in MATLAB, however the result may not be the same because of
/// different heuristics in the pseudoperipheral finder.
/// </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>
This function implements Symmetric Reverse Cuthill-McKee permutation. It returns a
permutation vector p such that A(p,p) would concentrate nonzeros to diagonal. This is
equivalent to symrcm in MATLAB, however the result may not be the same because of
different heuristics in the pseudoperipheral finder.
This function implements Symmetric Reverse Cuthill - McKee permutation . It returns a permutation vector p such that A ( p p ) would concentrate nonzeros to diagonal . This is equivalent to symrcm in MATLAB however the result may not be the same because of different heuristics in the pseudoperipheral finder .
public void CsrsymrcmHost(int n, int nnzA, CudaSparseMatrixDescriptor descrA, int[] csrRowPtrA, int[] csrColIndA, int[] p)
		{
			res = CudaSolveNativeMethods.Sparse.cusolverSpXcsrsymrcmHost(_handle, n, nnzA, descrA.Descriptor, csrRowPtrA, csrColIndA, p);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cusolverSpXcsrsymrcmHost", res));
			if (res != cusolverStatus.Success) throw new CudaSolveException(res);
		}
public void CsrsymrcmHost ( int n , int nnzA , CudaSparseMatrixDescriptor descrA , int [ ] csrRowPtrA , int [ ] csrColIndA , int [ ] p ) { res = CudaSolveNativeMethods . Sparse . cusolverSpXcsrsymrcmHost ( _handle , n , nnzA , descrA . Descriptor , csrRowPtrA , csrColIndA , p ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != cusolverStatus . Success ) throw new CudaSolveException ( res ) ; }
This function implements Symmetric Reverse Cuthill-McKee permutation.
This function implements Symmetric Reverse Cuthill - McKee permutation .
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 .