Library/ManagedCuda/CudaSolve/CudaSolveSparse.cs
/// <summary>
/// This function checks if A has symmetric pattern or not. The output parameter issym
/// reports 1 if A is symmetric; otherwise, it reports 0.
/// </summary>
/// <param name="m">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 m elements that contains the start of every row.</param>
/// <param name="csrEndPtrA">integer array of m elements that contains the end of the last row plus one.</param>
/// <param name="csrColIndA">integer array of nnzAcolumn indices of the nonzero elements of matrix A.</param>
/// <returns>1 if A is symmetric; 0 otherwise.</returns>
This function checks if A has symmetric pattern or not. The output parameter issym
reports 1 if A is symmetric; otherwise, it reports 0.
This function checks if A has symmetric pattern or not . The output parameter issym reports 1 if A is symmetric ; otherwise it reports 0 .
public int CsrissymHost(int m, int nnzA, CudaSparseMatrixDescriptor descrA, int[] csrRowPtrA, int[] csrEndPtrA, int[] csrColIndA)
		{
			int issym = 0;
			res = CudaSolveNativeMethods.Sparse.cusolverSpXcsrissymHost(_handle, m, nnzA, descrA.Descriptor, csrRowPtrA, csrEndPtrA, csrColIndA, ref issym);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cusolverSpXcsrissymHost", res));
			if (res != cusolverStatus.Success) throw new CudaSolveException(res);
			return issym;
		}
public int CsrissymHost ( int m , int nnzA , CudaSparseMatrixDescriptor descrA , int [ ] csrRowPtrA , int [ ] csrEndPtrA , int [ ] csrColIndA ) { int issym = 0 ; res = CudaSolveNativeMethods . Sparse . cusolverSpXcsrissymHost ( _handle , m , nnzA , descrA . Descriptor , csrRowPtrA , csrEndPtrA , csrColIndA , ref issym ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != cusolverStatus . Success ) throw new CudaSolveException ( res ) ; return issym ; }
This function checks if A has symmetric pattern or not.
This function checks if A has symmetric pattern or not .
1 if A is symmetric; 0 otherwise.
1 if A is symmetric ; 0 otherwise .
m
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 m elements that contains the start of every row.
integer array of m elements that contains the start of every row .
csrEndPtrA
int[]
integer array of m elements that contains the end of the last row plus one.
integer array of m elements that contains the end of the last row plus one .
csrColIndA
int[]
integer array of nnzAcolumn indices of the nonzero elements of matrix A.
integer array of nnzAcolumn indices of the nonzero elements of matrix A .