Show / Hide Table of Contents

    Class CudaSolveNativeMethods.Sparse

    The cuSolverSP library was mainly designed to a solve sparse linear system AxB and the least-squares problem x = argmin||A*z-b||

    Inheritance
    System.Object
    CudaSolveNativeMethods.Sparse
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: ManagedCuda.CudaSolve
    Assembly: CudaSolve.dll
    Syntax
    public static class Sparse

    Methods

    cusolverSpCcsreigsHost(cusolverSpHandle, Int32, Int32, cusparseMatDescr, cuFloatComplex[], Int32[], Int32[], cuFloatComplex, cuFloatComplex, ref Int32)

    Declaration
    public static cusolverStatus cusolverSpCcsreigsHost(cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, cuFloatComplex[] csrValA, int[] csrRowPtrA, int[] csrColIndA, cuFloatComplex left_bottom_corner, cuFloatComplex right_upper_corner, ref int num_eigs)
    Parameters
    Type Name Description
    cusolverSpHandle handle
    System.Int32 m
    System.Int32 nnz
    cusparseMatDescr descrA
    cuFloatComplex[] csrValA
    System.Int32[] csrRowPtrA
    System.Int32[] csrColIndA
    cuFloatComplex left_bottom_corner
    cuFloatComplex right_upper_corner
    System.Int32 num_eigs
    Returns
    Type Description
    cusolverStatus

    cusolverSpCcsreigvsi(cusolverSpHandle, Int32, Int32, cusparseMatDescr, CUdeviceptr, CUdeviceptr, CUdeviceptr, cuFloatComplex, CUdeviceptr, Int32, Single, ref cuFloatComplex, CUdeviceptr)

    This function solves the simple eigenvalue problem Ax=lambdax by shift-inverse method.

    Declaration
    public static cusolverStatus cusolverSpCcsreigvsi(cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, CUdeviceptr csrValA, CUdeviceptr csrRowPtrA, CUdeviceptr csrColIndA, cuFloatComplex mu0, CUdeviceptr x0, int maxite, float tol, ref cuFloatComplex mu, CUdeviceptr x)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows and columns of matrix A.

    System.Int32 nnz

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    CUdeviceptr csrValA

    array of nnz (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    CUdeviceptr csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    CUdeviceptr csrColIndA

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    cuFloatComplex mu0

    initial guess of eigenvalue.

    CUdeviceptr x0

    initial guess of eigenvector, a vecotr of size m.

    System.Int32 maxite

    maximum iterations in shift-inverse method.

    System.Single tol

    tolerance for convergence.

    cuFloatComplex mu

    approximated eigenvalue nearest mu0 under tolerance.

    CUdeviceptr x

    approximated eigenvector of size m.

    Returns
    Type Description
    cusolverStatus

    cusolverSpCcsreigvsiHost(cusolverSpHandle, Int32, Int32, cusparseMatDescr, cuFloatComplex[], Int32[], Int32[], cuFloatComplex, cuFloatComplex[], Int32, Single, ref cuFloatComplex, cuFloatComplex[])

    This function solves the simple eigenvalue problem Ax=lambdax by shift-inverse method.

    Declaration
    public static cusolverStatus cusolverSpCcsreigvsiHost(cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, cuFloatComplex[] csrValA, int[] csrRowPtrA, int[] csrColIndA, cuFloatComplex mu0, cuFloatComplex[] x0, int maxite, float tol, ref cuFloatComplex mu, cuFloatComplex[] x)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows and columns of matrix A.

    System.Int32 nnz

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    cuFloatComplex[] csrValA

    array of nnz (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    System.Int32[] csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    System.Int32[] csrColIndA

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    cuFloatComplex mu0

    initial guess of eigenvalue.

    cuFloatComplex[] x0

    initial guess of eigenvector, a vecotr of size m.

    System.Int32 maxite

    maximum iterations in shift-inverse method.

    System.Single tol

    tolerance for convergence.

    cuFloatComplex mu

    approximated eigenvalue nearest mu0 under tolerance.

    cuFloatComplex[] x

    approximated eigenvector of size m.

    Returns
    Type Description
    cusolverStatus

    cusolverSpCcsrlsqvqrHost(cusolverSpHandle, Int32, Int32, Int32, cusparseMatDescr, cuFloatComplex[], Int32[], Int32[], cuFloatComplex[], Single, ref Int32, cuFloatComplex[], Int32[], ref Single)

    This function solves the following least-square problem x = argmin||A*z-b||

    Declaration
    public static cusolverStatus cusolverSpCcsrlsqvqrHost(cusolverSpHandle handle, int m, int n, int nnz, cusparseMatDescr descrA, cuFloatComplex[] csrValA, int[] csrRowPtrA, int[] csrColIndA, cuFloatComplex[] b, float tol, ref int rankA, cuFloatComplex[] x, int[] p, ref float min_norm)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows of matrix A.

    System.Int32 n

    number of columns of matrix A.

    System.Int32 nnz

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    cuFloatComplex[] csrValA

    array of nnz (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    System.Int32[] csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    System.Int32[] csrColIndA

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    cuFloatComplex[] b

    right hand side vector of size m.

    System.Single tol

    tolerance to decide rank of A.

    System.Int32 rankA

    numerical rank of A.

    cuFloatComplex[] x

    solution vector of size n, x=pinv(A)*b.

    System.Int32[] p

    a vector of size n, which represents the permuation matrix P satisfying AP^T=QR.

    System.Single min_norm

    ||A*x-b||, x=pinv(A)*b.

    Returns
    Type Description
    cusolverStatus

    cusolverSpCcsrlsvchol(cusolverSpHandle, Int32, Int32, cusparseMatDescr, CUdeviceptr, CUdeviceptr, CUdeviceptr, CUdeviceptr, Single, Int32, CUdeviceptr, ref Int32)

    This function solves the linear system A*x=b

    Declaration
    public static cusolverStatus cusolverSpCcsrlsvchol(cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, CUdeviceptr csrVal, CUdeviceptr csrRowPtr, CUdeviceptr csrColInd, CUdeviceptr b, float tol, int reorder, CUdeviceptr x, ref int singularity)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows and columns of matrix A.

    System.Int32 nnz

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    CUdeviceptr csrVal

    array of nnz (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    CUdeviceptr csrRowPtr

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    CUdeviceptr csrColInd

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    CUdeviceptr b

    right hand side vector of size m.

    System.Single tol

    tolerance to decide singularity.

    System.Int32 reorder

    no effect.

    CUdeviceptr x

    solution vector of size m, x = inv(A)*b.

    System.Int32 singularity

    -1 if A is symmetric postive definite.

    Returns
    Type Description
    cusolverStatus

    cusolverSpCcsrlsvcholHost(cusolverSpHandle, Int32, Int32, cusparseMatDescr, cuFloatComplex[], Int32[], Int32[], cuFloatComplex[], Single, Int32, cuFloatComplex[], ref Int32)

    This function solves the linear system A*x=b

    Declaration
    public static cusolverStatus cusolverSpCcsrlsvcholHost(cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, cuFloatComplex[] csrVal, int[] csrRowPtr, int[] csrColInd, cuFloatComplex[] b, float tol, int reorder, cuFloatComplex[] x, ref int singularity)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows and columns of matrix A.

    System.Int32 nnz

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    cuFloatComplex[] csrVal

    array of nnz (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    System.Int32[] csrRowPtr

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    System.Int32[] csrColInd

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    cuFloatComplex[] b

    right hand side vector of size m.

    System.Single tol

    tolerance to decide singularity.

    System.Int32 reorder

    no effect.

    cuFloatComplex[] x

    solution vector of size m, x = inv(A)*b.

    System.Int32 singularity

    -1 if A is symmetric postive definite.

    Returns
    Type Description
    cusolverStatus

    cusolverSpCcsrlsvluHost(cusolverSpHandle, Int32, Int32, cusparseMatDescr, cuFloatComplex[], Int32[], Int32[], cuFloatComplex[], Single, Int32, cuFloatComplex[], ref Int32)

    This function solves the linear system A*x=b

    Declaration
    public static cusolverStatus cusolverSpCcsrlsvluHost(cusolverSpHandle handle, int n, int nnzA, cusparseMatDescr descrA, cuFloatComplex[] csrValA, int[] csrRowPtrA, int[] csrColIndA, cuFloatComplex[] b, float tol, int reorder, cuFloatComplex[] x, ref int singularity)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 n

    number of rows and columns of matrix A.

    System.Int32 nnzA

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    cuFloatComplex[] csrValA

    array of nnzA (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    System.Int32[] csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    System.Int32[] csrColIndA

    integer array of nnzA (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    cuFloatComplex[] b

    right hand side vector of size n.

    System.Single tol

    tolerance to decide if singular or not.

    System.Int32 reorder

    no ordering if reorder=0. Otherwise, symrcm is used to reduce zero fill-in.

    cuFloatComplex[] x

    solution vector of size n, x = inv(A)*b.

    System.Int32 singularity

    -1 if A is invertible. Otherwise, first index j such that U(j,j)≈0

    Returns
    Type Description
    cusolverStatus

    cusolverSpCcsrlsvqr(cusolverSpHandle, Int32, Int32, cusparseMatDescr, CUdeviceptr, CUdeviceptr, CUdeviceptr, CUdeviceptr, Single, Int32, CUdeviceptr, ref Int32)

    This function solves the linear system A*x=b

    Declaration
    public static cusolverStatus cusolverSpCcsrlsvqr(cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, CUdeviceptr csrValA, CUdeviceptr csrRowPtrA, CUdeviceptr csrColIndA, CUdeviceptr b, float tol, int reorder, CUdeviceptr x, ref int singularity)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows and columns of matrix A.

    System.Int32 nnz

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    CUdeviceptr csrValA

    array of nnz (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    CUdeviceptr csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    CUdeviceptr csrColIndA

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    CUdeviceptr b

    right hand side vector of size m.

    System.Single tol

    tolerance to decide if singular or not.

    System.Int32 reorder

    no effect.

    CUdeviceptr x

    solution vector of size m, x = inv(A)*b.

    System.Int32 singularity

    -1 if A is invertible. Otherwise, first index j such that R(j,j)≈0

    Returns
    Type Description
    cusolverStatus

    cusolverSpCcsrlsvqrHost(cusolverSpHandle, Int32, Int32, cusparseMatDescr, cuFloatComplex[], Int32[], Int32[], cuFloatComplex[], Single, Int32, cuFloatComplex[], ref Int32)

    This function solves the linear system A*x=b

    Declaration
    public static cusolverStatus cusolverSpCcsrlsvqrHost(cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, cuFloatComplex[] csrValA, int[] csrRowPtrA, int[] csrColIndA, cuFloatComplex[] b, float tol, int reorder, cuFloatComplex[] x, ref int singularity)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows and columns of matrix A.

    System.Int32 nnz

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    cuFloatComplex[] csrValA

    array of nnz (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    System.Int32[] csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    System.Int32[] csrColIndA

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    cuFloatComplex[] b

    right hand side vector of size m.

    System.Single tol

    tolerance to decide if singular or not.

    System.Int32 reorder

    no effect.

    cuFloatComplex[] x

    solution vector of size m, x = inv(A)*b.

    System.Int32 singularity

    -1 if A is invertible. Otherwise, first index j such that R(j,j)≈0

    Returns
    Type Description
    cusolverStatus

    cusolverSpCcsrqrBufferInfoBatched(cusolverSpHandle, Int32, Int32, Int32, cusparseMatDescr, CUdeviceptr, CUdeviceptr, CUdeviceptr, Int32, csrqrInfo, ref SizeT, ref SizeT)

    The batched sparse QR factorization is used to solve either a set of least-squares problems or a set of linear systems

    Declaration
    public static cusolverStatus cusolverSpCcsrqrBufferInfoBatched(cusolverSpHandle handle, int m, int n, int nnz, cusparseMatDescr descrA, CUdeviceptr csrVal, CUdeviceptr csrRowPtr, CUdeviceptr csrColInd, int batchSize, csrqrInfo info, ref SizeT internalDataInBytes, ref SizeT workspaceInBytes)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows of each matrix Aj.

    System.Int32 n

    number of columns of each matrix Aj.

    System.Int32 nnz

    number of nonzeros of each matrix Aj. It is the size csrColIndA.

    cusparseMatDescr 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.

    CUdeviceptr csrVal

    array of nnzA*batchSize nonzero elements of matrices A0, A1, .... All matrices are aggregated one after another.

    CUdeviceptr csrRowPtr

    integer array of m+1 elements that contains the start of every row and the end of the last row plus one.

    CUdeviceptr csrColInd

    integer array of nnzAcolumn indices of the nonzero elements of each matrix Aj.

    System.Int32 batchSize

    number of systems to be solved.

    csrqrInfo info

    opaque structure for QR factorization.

    SizeT internalDataInBytes

    number of bytes of the internal data.

    SizeT workspaceInBytes

    number of bytes of the buffer in numerical factorization.

    Returns
    Type Description
    cusolverStatus

    cusolverSpCcsrqrsvBatched(cusolverSpHandle, Int32, Int32, Int32, cusparseMatDescr, CUdeviceptr, CUdeviceptr, CUdeviceptr, CUdeviceptr, CUdeviceptr, Int32, csrqrInfo, CUdeviceptr)

    The batched sparse QR factorization is used to solve either a set of least-squares problems or a set of linear systems

    Declaration
    public static cusolverStatus cusolverSpCcsrqrsvBatched(cusolverSpHandle handle, int m, int n, int nnz, cusparseMatDescr descrA, CUdeviceptr csrValA, CUdeviceptr csrRowPtrA, CUdeviceptr csrColIndA, CUdeviceptr b, CUdeviceptr x, int batchSize, csrqrInfo info, CUdeviceptr pBuffer)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows of each matrix Aj.

    System.Int32 n

    number of columns of each matrix Aj.

    System.Int32 nnz

    number of nonzeros of each matrix Aj. It is the size csrColIndA.

    cusparseMatDescr 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.

    CUdeviceptr csrValA

    array of nnzA*batchSize nonzero elements of matrices A0, A1, .... All matrices are aggregated one after another.

    CUdeviceptr csrRowPtrA

    integer array of m+1 elements that contains the start of every row and the end of the last row plus one.

    CUdeviceptr csrColIndA

    integer array of nnzAcolumn indices of the nonzero elements of each matrix Aj.

    CUdeviceptr b

    array of m*batchSize of right-hand-side vectors b0, b1, .... All vectors are aggregated one after another.

    CUdeviceptr x

    array of m*batchSize of solution vectors x0, x1, .... All vectors are aggregated one after another.

    System.Int32 batchSize

    number of systems to be solved.

    csrqrInfo info

    opaque structure for QR factorization.

    CUdeviceptr pBuffer

    buffer allocated by the user, the size is returned by cusolverSpXcsrqrBufferInfoBatched().

    Returns
    Type Description
    cusolverStatus

    cusolverSpCreate(ref cusolverSpHandle)

    This function initializes the cuSolverSP library and creates a handle on the cuSolver context. It must be called before any other cuSolverSP API function is invoked. It allocates hardware resources necessary for accessing the GPU.

    Declaration
    public static cusolverStatus cusolverSpCreate(ref cusolverSpHandle handle)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    the pointer to the handle to the cuSolverSP context.

    Returns
    Type Description
    cusolverStatus

    cusolverSpCreateCsrqrInfo(ref csrqrInfo)

    The batched sparse QR factorization is used to solve either a set of least-squares problems or a set of linear systems

    Declaration
    public static cusolverStatus cusolverSpCreateCsrqrInfo(ref csrqrInfo info)
    Parameters
    Type Name Description
    csrqrInfo info

    opaque structure for QR factorization.

    Returns
    Type Description
    cusolverStatus

    cusolverSpDcsreigsHost(cusolverSpHandle, Int32, Int32, cusparseMatDescr, Double[], Int32[], Int32[], cuDoubleComplex, cuDoubleComplex, ref Int32)

    Declaration
    public static cusolverStatus cusolverSpDcsreigsHost(cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, double[] csrValA, int[] csrRowPtrA, int[] csrColIndA, cuDoubleComplex left_bottom_corner, cuDoubleComplex right_upper_corner, ref int num_eigs)
    Parameters
    Type Name Description
    cusolverSpHandle handle
    System.Int32 m
    System.Int32 nnz
    cusparseMatDescr descrA
    System.Double[] csrValA
    System.Int32[] csrRowPtrA
    System.Int32[] csrColIndA
    cuDoubleComplex left_bottom_corner
    cuDoubleComplex right_upper_corner
    System.Int32 num_eigs
    Returns
    Type Description
    cusolverStatus

    cusolverSpDcsreigvsi(cusolverSpHandle, Int32, Int32, cusparseMatDescr, CUdeviceptr, CUdeviceptr, CUdeviceptr, Double, CUdeviceptr, Int32, Double, ref Double, CUdeviceptr)

    This function solves the simple eigenvalue problem Ax=lambdax by shift-inverse method.

    Declaration
    public static cusolverStatus cusolverSpDcsreigvsi(cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, CUdeviceptr csrValA, CUdeviceptr csrRowPtrA, CUdeviceptr csrColIndA, double mu0, CUdeviceptr x0, int maxite, double tol, ref double mu, CUdeviceptr x)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows and columns of matrix A.

    System.Int32 nnz

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    CUdeviceptr csrValA

    array of nnz (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    CUdeviceptr csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    CUdeviceptr csrColIndA

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    System.Double mu0

    initial guess of eigenvalue.

    CUdeviceptr x0

    initial guess of eigenvector, a vecotr of size m.

    System.Int32 maxite

    maximum iterations in shift-inverse method.

    System.Double tol

    tolerance for convergence.

    System.Double mu

    approximated eigenvalue nearest mu0 under tolerance.

    CUdeviceptr x

    approximated eigenvector of size m.

    Returns
    Type Description
    cusolverStatus

    cusolverSpDcsreigvsiHost(cusolverSpHandle, Int32, Int32, cusparseMatDescr, Double[], Int32[], Int32[], Double, Double[], Int32, Double, ref Double, Double[])

    This function solves the simple eigenvalue problem Ax=lambdax by shift-inverse method.

    Declaration
    public static cusolverStatus cusolverSpDcsreigvsiHost(cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, double[] csrValA, int[] csrRowPtrA, int[] csrColIndA, double mu0, double[] x0, int maxite, double tol, ref double mu, double[] x)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows and columns of matrix A.

    System.Int32 nnz

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    System.Double[] csrValA

    array of nnz (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    System.Int32[] csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    System.Int32[] csrColIndA

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    System.Double mu0

    initial guess of eigenvalue.

    System.Double[] x0

    initial guess of eigenvector, a vecotr of size m.

    System.Int32 maxite

    maximum iterations in shift-inverse method.

    System.Double tol

    tolerance for convergence.

    System.Double mu

    approximated eigenvalue nearest mu0 under tolerance.

    System.Double[] x

    approximated eigenvector of size m.

    Returns
    Type Description
    cusolverStatus

    cusolverSpDcsrlsqvqrHost(cusolverSpHandle, Int32, Int32, Int32, cusparseMatDescr, Double[], Int32[], Int32[], Double[], Double, ref Int32, Double[], Int32[], ref Double)

    This function solves the following least-square problem x = argmin||A*z-b||

    Declaration
    public static cusolverStatus cusolverSpDcsrlsqvqrHost(cusolverSpHandle handle, int m, int n, int nnz, cusparseMatDescr descrA, double[] csrValA, int[] csrRowPtrA, int[] csrColIndA, double[] b, double tol, ref int rankA, double[] x, int[] p, ref double min_norm)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows of matrix A.

    System.Int32 n

    number of columns of matrix A.

    System.Int32 nnz

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    System.Double[] csrValA

    array of nnz (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    System.Int32[] csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    System.Int32[] csrColIndA

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    System.Double[] b

    right hand side vector of size m.

    System.Double tol

    tolerance to decide rank of A.

    System.Int32 rankA

    numerical rank of A.

    System.Double[] x

    solution vector of size n, x=pinv(A)*b.

    System.Int32[] p

    a vector of size n, which represents the permuation matrix P satisfying AP^T=QR.

    System.Double min_norm

    ||A*x-b||, x=pinv(A)*b.

    Returns
    Type Description
    cusolverStatus

    cusolverSpDcsrlsvchol(cusolverSpHandle, Int32, Int32, cusparseMatDescr, CUdeviceptr, CUdeviceptr, CUdeviceptr, CUdeviceptr, Double, Int32, CUdeviceptr, ref Int32)

    This function solves the linear system A*x=b

    Declaration
    public static cusolverStatus cusolverSpDcsrlsvchol(cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, CUdeviceptr csrVal, CUdeviceptr csrRowPtr, CUdeviceptr csrColInd, CUdeviceptr b, double tol, int reorder, CUdeviceptr x, ref int singularity)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows and columns of matrix A.

    System.Int32 nnz

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    CUdeviceptr csrVal

    array of nnz (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    CUdeviceptr csrRowPtr

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    CUdeviceptr csrColInd

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    CUdeviceptr b

    right hand side vector of size m.

    System.Double tol

    tolerance to decide singularity.

    System.Int32 reorder

    no effect.

    CUdeviceptr x

    solution vector of size m, x = inv(A)*b.

    System.Int32 singularity

    -1 if A is symmetric postive definite.

    Returns
    Type Description
    cusolverStatus

    cusolverSpDcsrlsvcholHost(cusolverSpHandle, Int32, Int32, cusparseMatDescr, Double[], Int32[], Int32[], Double[], Double, Int32, Double[], ref Int32)

    This function solves the linear system A*x=b

    Declaration
    public static cusolverStatus cusolverSpDcsrlsvcholHost(cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, double[] csrVal, int[] csrRowPtr, int[] csrColInd, double[] b, double tol, int reorder, double[] x, ref int singularity)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows and columns of matrix A.

    System.Int32 nnz

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    System.Double[] csrVal

    array of nnz (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    System.Int32[] csrRowPtr

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    System.Int32[] csrColInd

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    System.Double[] b

    right hand side vector of size m.

    System.Double tol

    tolerance to decide singularity.

    System.Int32 reorder

    no effect.

    System.Double[] x

    solution vector of size m, x = inv(A)*b.

    System.Int32 singularity

    -1 if A is symmetric postive definite.

    Returns
    Type Description
    cusolverStatus

    cusolverSpDcsrlsvluHost(cusolverSpHandle, Int32, Int32, cusparseMatDescr, Double[], Int32[], Int32[], Double[], Double, Int32, Double[], ref Int32)

    This function solves the linear system A*x=b

    Declaration
    public static cusolverStatus cusolverSpDcsrlsvluHost(cusolverSpHandle handle, int n, int nnzA, cusparseMatDescr descrA, double[] csrValA, int[] csrRowPtrA, int[] csrColIndA, double[] b, double tol, int reorder, double[] x, ref int singularity)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 n

    number of rows and columns of matrix A.

    System.Int32 nnzA

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    System.Double[] csrValA

    array of nnzA (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    System.Int32[] csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    System.Int32[] csrColIndA

    integer array of nnzA (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    System.Double[] b

    right hand side vector of size n.

    System.Double tol

    tolerance to decide if singular or not.

    System.Int32 reorder

    no ordering if reorder=0. Otherwise, symrcm is used to reduce zero fill-in.

    System.Double[] x

    solution vector of size n, x = inv(A)*b.

    System.Int32 singularity

    -1 if A is invertible. Otherwise, first index j such that U(j,j)≈0

    Returns
    Type Description
    cusolverStatus

    cusolverSpDcsrlsvqr(cusolverSpHandle, Int32, Int32, cusparseMatDescr, CUdeviceptr, CUdeviceptr, CUdeviceptr, CUdeviceptr, Double, Int32, CUdeviceptr, ref Int32)

    This function solves the linear system A*x=b

    Declaration
    public static cusolverStatus cusolverSpDcsrlsvqr(cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, CUdeviceptr csrValA, CUdeviceptr csrRowPtrA, CUdeviceptr csrColIndA, CUdeviceptr b, double tol, int reorder, CUdeviceptr x, ref int singularity)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows and columns of matrix A.

    System.Int32 nnz

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    CUdeviceptr csrValA

    array of nnz (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    CUdeviceptr csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    CUdeviceptr csrColIndA

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    CUdeviceptr b

    right hand side vector of size m.

    System.Double tol

    tolerance to decide if singular or not.

    System.Int32 reorder

    no effect.

    CUdeviceptr x

    solution vector of size m, x = inv(A)*b.

    System.Int32 singularity

    -1 if A is invertible. Otherwise, first index j such that R(j,j)≈0

    Returns
    Type Description
    cusolverStatus

    cusolverSpDcsrlsvqrHost(cusolverSpHandle, Int32, Int32, cusparseMatDescr, Double[], Int32[], Int32[], Double[], Double, Int32, Double[], ref Int32)

    This function solves the linear system A*x=b

    Declaration
    public static cusolverStatus cusolverSpDcsrlsvqrHost(cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, double[] csrValA, int[] csrRowPtrA, int[] csrColIndA, double[] b, double tol, int reorder, double[] x, ref int singularity)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows and columns of matrix A.

    System.Int32 nnz

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    System.Double[] csrValA

    array of nnz (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    System.Int32[] csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    System.Int32[] csrColIndA

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    System.Double[] b

    right hand side vector of size m.

    System.Double tol

    tolerance to decide if singular or not.

    System.Int32 reorder

    no effect.

    System.Double[] x

    solution vector of size m, x = inv(A)*b.

    System.Int32 singularity

    -1 if A is invertible. Otherwise, first index j such that R(j,j)≈0

    Returns
    Type Description
    cusolverStatus

    cusolverSpDcsrqrBufferInfoBatched(cusolverSpHandle, Int32, Int32, Int32, cusparseMatDescr, CUdeviceptr, CUdeviceptr, CUdeviceptr, Int32, csrqrInfo, ref SizeT, ref SizeT)

    The batched sparse QR factorization is used to solve either a set of least-squares problems or a set of linear systems

    Declaration
    public static cusolverStatus cusolverSpDcsrqrBufferInfoBatched(cusolverSpHandle handle, int m, int n, int nnz, cusparseMatDescr descrA, CUdeviceptr csrVal, CUdeviceptr csrRowPtr, CUdeviceptr csrColInd, int batchSize, csrqrInfo info, ref SizeT internalDataInBytes, ref SizeT workspaceInBytes)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows of each matrix Aj.

    System.Int32 n

    number of columns of each matrix Aj.

    System.Int32 nnz

    number of nonzeros of each matrix Aj. It is the size csrColIndA.

    cusparseMatDescr 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.

    CUdeviceptr csrVal

    array of nnzA*batchSize nonzero elements of matrices A0, A1, .... All matrices are aggregated one after another.

    CUdeviceptr csrRowPtr

    integer array of m+1 elements that contains the start of every row and the end of the last row plus one.

    CUdeviceptr csrColInd

    integer array of nnzAcolumn indices of the nonzero elements of each matrix Aj.

    System.Int32 batchSize

    number of systems to be solved.

    csrqrInfo info

    opaque structure for QR factorization.

    SizeT internalDataInBytes

    number of bytes of the internal data.

    SizeT workspaceInBytes

    number of bytes of the buffer in numerical factorization.

    Returns
    Type Description
    cusolverStatus

    cusolverSpDcsrqrsvBatched(cusolverSpHandle, Int32, Int32, Int32, cusparseMatDescr, CUdeviceptr, CUdeviceptr, CUdeviceptr, CUdeviceptr, CUdeviceptr, Int32, csrqrInfo, CUdeviceptr)

    The batched sparse QR factorization is used to solve either a set of least-squares problems or a set of linear systems

    Declaration
    public static cusolverStatus cusolverSpDcsrqrsvBatched(cusolverSpHandle handle, int m, int n, int nnz, cusparseMatDescr descrA, CUdeviceptr csrValA, CUdeviceptr csrRowPtrA, CUdeviceptr csrColIndA, CUdeviceptr b, CUdeviceptr x, int batchSize, csrqrInfo info, CUdeviceptr pBuffer)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows of each matrix Aj.

    System.Int32 n

    number of columns of each matrix Aj.

    System.Int32 nnz

    number of nonzeros of each matrix Aj. It is the size csrColIndA.

    cusparseMatDescr 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.

    CUdeviceptr csrValA

    array of nnzA*batchSize nonzero elements of matrices A0, A1, .... All matrices are aggregated one after another.

    CUdeviceptr csrRowPtrA

    integer array of m+1 elements that contains the start of every row and the end of the last row plus one.

    CUdeviceptr csrColIndA

    integer array of nnzAcolumn indices of the nonzero elements of each matrix Aj.

    CUdeviceptr b

    array of m*batchSize of right-hand-side vectors b0, b1, .... All vectors are aggregated one after another.

    CUdeviceptr x

    array of m*batchSize of solution vectors x0, x1, .... All vectors are aggregated one after another.

    System.Int32 batchSize

    number of systems to be solved.

    csrqrInfo info

    opaque structure for QR factorization.

    CUdeviceptr pBuffer

    buffer allocated by the user, the size is returned by cusolverSpXcsrqrBufferInfoBatched().

    Returns
    Type Description
    cusolverStatus

    cusolverSpDestroy(cusolverSpHandle)

    This function releases CPU-side resources used by the cuSolverSP library.

    Declaration
    public static cusolverStatus cusolverSpDestroy(cusolverSpHandle handle)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    the handle to the cuSolverSP context.

    Returns
    Type Description
    cusolverStatus

    cusolverSpDestroyCsrqrInfo(csrqrInfo)

    The batched sparse QR factorization is used to solve either a set of least-squares problems or a set of linear systems

    Declaration
    public static cusolverStatus cusolverSpDestroyCsrqrInfo(csrqrInfo info)
    Parameters
    Type Name Description
    csrqrInfo info

    opaque structure for QR factorization.

    Returns
    Type Description
    cusolverStatus

    cusolverSpGetStream(cusolverSpHandle, ref CUstream)

    This function gets the stream to be used by the cuSolverSP library to execute its routines.

    Declaration
    public static cusolverStatus cusolverSpGetStream(cusolverSpHandle handle, ref CUstream streamId)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    the handle to the cuSolverSP context.

    CUstream streamId

    the stream to be used by the library.

    Returns
    Type Description
    cusolverStatus

    cusolverSpScsreigsHost(cusolverSpHandle, Int32, Int32, cusparseMatDescr, Single[], Int32[], Int32[], cuFloatComplex, cuFloatComplex, ref Int32)

    Declaration
    public static cusolverStatus cusolverSpScsreigsHost(cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, float[] csrValA, int[] csrRowPtrA, int[] csrColIndA, cuFloatComplex left_bottom_corner, cuFloatComplex right_upper_corner, ref int num_eigs)
    Parameters
    Type Name Description
    cusolverSpHandle handle
    System.Int32 m
    System.Int32 nnz
    cusparseMatDescr descrA
    System.Single[] csrValA
    System.Int32[] csrRowPtrA
    System.Int32[] csrColIndA
    cuFloatComplex left_bottom_corner
    cuFloatComplex right_upper_corner
    System.Int32 num_eigs
    Returns
    Type Description
    cusolverStatus

    cusolverSpScsreigvsi(cusolverSpHandle, Int32, Int32, cusparseMatDescr, CUdeviceptr, CUdeviceptr, CUdeviceptr, Single, CUdeviceptr, Int32, Single, ref Single, CUdeviceptr)

    This function solves the simple eigenvalue problem Ax=lambdax by shift-inverse method.

    Declaration
    public static cusolverStatus cusolverSpScsreigvsi(cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, CUdeviceptr csrValA, CUdeviceptr csrRowPtrA, CUdeviceptr csrColIndA, float mu0, CUdeviceptr x0, int maxite, float tol, ref float mu, CUdeviceptr x)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows and columns of matrix A.

    System.Int32 nnz

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    CUdeviceptr csrValA

    array of nnz (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    CUdeviceptr csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    CUdeviceptr csrColIndA

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    System.Single mu0

    initial guess of eigenvalue.

    CUdeviceptr x0

    initial guess of eigenvector, a vecotr of size m.

    System.Int32 maxite

    maximum iterations in shift-inverse method.

    System.Single tol

    tolerance for convergence.

    System.Single mu

    approximated eigenvalue nearest mu0 under tolerance.

    CUdeviceptr x

    approximated eigenvector of size m.

    Returns
    Type Description
    cusolverStatus

    cusolverSpScsreigvsiHost(cusolverSpHandle, Int32, Int32, cusparseMatDescr, Single[], Int32[], Int32[], Single, Single[], Int32, Single, ref Single, Single[])

    This function solves the simple eigenvalue problem Ax=lambdax by shift-inverse method.

    Declaration
    public static cusolverStatus cusolverSpScsreigvsiHost(cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, float[] csrValA, int[] csrRowPtrA, int[] csrColIndA, float mu0, float[] x0, int maxite, float tol, ref float mu, float[] x)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows and columns of matrix A.

    System.Int32 nnz

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    System.Single[] csrValA

    array of nnz (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    System.Int32[] csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    System.Int32[] csrColIndA

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    System.Single mu0

    initial guess of eigenvalue.

    System.Single[] x0

    initial guess of eigenvector, a vecotr of size m.

    System.Int32 maxite

    maximum iterations in shift-inverse method.

    System.Single tol

    tolerance for convergence.

    System.Single mu

    approximated eigenvalue nearest mu0 under tolerance.

    System.Single[] x

    approximated eigenvector of size m.

    Returns
    Type Description
    cusolverStatus

    cusolverSpScsrlsqvqrHost(cusolverSpHandle, Int32, Int32, Int32, cusparseMatDescr, Single[], Int32[], Int32[], Single[], Single, ref Int32, Single[], Int32[], ref Single)

    This function solves the following least-square problem x = argmin||A*z-b||

    Declaration
    public static cusolverStatus cusolverSpScsrlsqvqrHost(cusolverSpHandle handle, int m, int n, int nnz, cusparseMatDescr descrA, float[] csrValA, int[] csrRowPtrA, int[] csrColIndA, float[] b, float tol, ref int rankA, float[] x, int[] p, ref float min_norm)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows of matrix A.

    System.Int32 n

    number of columns of matrix A.

    System.Int32 nnz

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    System.Single[] csrValA

    array of nnz (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    System.Int32[] csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    System.Int32[] csrColIndA

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    System.Single[] b

    right hand side vector of size m.

    System.Single tol

    tolerance to decide rank of A.

    System.Int32 rankA

    numerical rank of A.

    System.Single[] x

    solution vector of size n, x=pinv(A)*b.

    System.Int32[] p

    a vector of size n, which represents the permuation matrix P satisfying AP^T=QR.

    System.Single min_norm

    ||A*x-b||, x=pinv(A)*b.

    Returns
    Type Description
    cusolverStatus

    cusolverSpScsrlsvchol(cusolverSpHandle, Int32, Int32, cusparseMatDescr, CUdeviceptr, CUdeviceptr, CUdeviceptr, CUdeviceptr, Single, Int32, CUdeviceptr, ref Int32)

    This function solves the linear system A*x=b

    Declaration
    public static cusolverStatus cusolverSpScsrlsvchol(cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, CUdeviceptr csrVal, CUdeviceptr csrRowPtr, CUdeviceptr csrColInd, CUdeviceptr b, float tol, int reorder, CUdeviceptr x, ref int singularity)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows and columns of matrix A.

    System.Int32 nnz

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    CUdeviceptr csrVal

    array of nnz (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    CUdeviceptr csrRowPtr

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    CUdeviceptr csrColInd

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    CUdeviceptr b

    right hand side vector of size m.

    System.Single tol

    tolerance to decide singularity.

    System.Int32 reorder

    no effect.

    CUdeviceptr x

    solution vector of size m, x = inv(A)*b.

    System.Int32 singularity

    -1 if A is symmetric postive definite.

    Returns
    Type Description
    cusolverStatus

    cusolverSpScsrlsvcholHost(cusolverSpHandle, Int32, Int32, cusparseMatDescr, Single[], Int32[], Int32[], Single[], Single, Int32, Single[], ref Int32)

    This function solves the linear system A*x=b

    Declaration
    public static cusolverStatus cusolverSpScsrlsvcholHost(cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, float[] csrVal, int[] csrRowPtr, int[] csrColInd, float[] b, float tol, int reorder, float[] x, ref int singularity)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows and columns of matrix A.

    System.Int32 nnz

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    System.Single[] csrVal

    array of nnz (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    System.Int32[] csrRowPtr

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    System.Int32[] csrColInd

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    System.Single[] b

    right hand side vector of size m.

    System.Single tol

    tolerance to decide singularity.

    System.Int32 reorder

    no effect.

    System.Single[] x

    solution vector of size m, x = inv(A)*b.

    System.Int32 singularity

    -1 if A is symmetric postive definite.

    Returns
    Type Description
    cusolverStatus

    cusolverSpScsrlsvluHost(cusolverSpHandle, Int32, Int32, cusparseMatDescr, Single[], Int32[], Int32[], Single[], Single, Int32, Single[], ref Int32)

    This function solves the linear system A*x=b

    Declaration
    public static cusolverStatus cusolverSpScsrlsvluHost(cusolverSpHandle handle, int n, int nnzA, cusparseMatDescr descrA, float[] csrValA, int[] csrRowPtrA, int[] csrColIndA, float[] b, float tol, int reorder, float[] x, ref int singularity)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 n

    number of rows and columns of matrix A.

    System.Int32 nnzA

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    System.Single[] csrValA

    array of nnzA (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    System.Int32[] csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    System.Int32[] csrColIndA

    integer array of nnzA (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    System.Single[] b

    right hand side vector of size n.

    System.Single tol

    tolerance to decide if singular or not.

    System.Int32 reorder

    no ordering if reorder=0. Otherwise, symrcm is used to reduce zero fill-in.

    System.Single[] x

    solution vector of size n, x = inv(A)*b.

    System.Int32 singularity

    -1 if A is invertible. Otherwise, first index j such that U(j,j)≈0

    Returns
    Type Description
    cusolverStatus

    cusolverSpScsrlsvqr(cusolverSpHandle, Int32, Int32, cusparseMatDescr, CUdeviceptr, CUdeviceptr, CUdeviceptr, CUdeviceptr, Single, Int32, CUdeviceptr, ref Int32)

    This function solves the linear system A*x=b

    Declaration
    public static cusolverStatus cusolverSpScsrlsvqr(cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, CUdeviceptr csrValA, CUdeviceptr csrRowPtrA, CUdeviceptr csrColIndA, CUdeviceptr b, float tol, int reorder, CUdeviceptr x, ref int singularity)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows and columns of matrix A.

    System.Int32 nnz

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    CUdeviceptr csrValA

    array of nnz (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    CUdeviceptr csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    CUdeviceptr csrColIndA

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    CUdeviceptr b

    right hand side vector of size m.

    System.Single tol

    tolerance to decide if singular or not.

    System.Int32 reorder

    no effect.

    CUdeviceptr x

    solution vector of size m, x = inv(A)*b.

    System.Int32 singularity

    -1 if A is invertible. Otherwise, first index j such that R(j,j)≈0

    Returns
    Type Description
    cusolverStatus

    cusolverSpScsrlsvqrHost(cusolverSpHandle, Int32, Int32, cusparseMatDescr, Single[], Int32[], Int32[], Single[], Single, Int32, Single[], ref Int32)

    This function solves the linear system A*x=b

    Declaration
    public static cusolverStatus cusolverSpScsrlsvqrHost(cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, float[] csrValA, int[] csrRowPtrA, int[] csrColIndA, float[] b, float tol, int reorder, float[] x, ref int singularity)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows and columns of matrix A.

    System.Int32 nnz

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    System.Single[] csrValA

    array of nnz (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    System.Int32[] csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    System.Int32[] csrColIndA

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    System.Single[] b

    right hand side vector of size m.

    System.Single tol

    tolerance to decide if singular or not.

    System.Int32 reorder

    no effect.

    System.Single[] x

    solution vector of size m, x = inv(A)*b.

    System.Int32 singularity

    -1 if A is invertible. Otherwise, first index j such that R(j,j)≈0

    Returns
    Type Description
    cusolverStatus

    cusolverSpScsrqrBufferInfoBatched(cusolverSpHandle, Int32, Int32, Int32, cusparseMatDescr, CUdeviceptr, CUdeviceptr, CUdeviceptr, Int32, csrqrInfo, ref SizeT, ref SizeT)

    The batched sparse QR factorization is used to solve either a set of least-squares problems or a set of linear systems

    Declaration
    public static cusolverStatus cusolverSpScsrqrBufferInfoBatched(cusolverSpHandle handle, int m, int n, int nnz, cusparseMatDescr descrA, CUdeviceptr csrVal, CUdeviceptr csrRowPtr, CUdeviceptr csrColInd, int batchSize, csrqrInfo info, ref SizeT internalDataInBytes, ref SizeT workspaceInBytes)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows of each matrix Aj.

    System.Int32 n

    number of columns of each matrix Aj.

    System.Int32 nnz

    number of nonzeros of each matrix Aj. It is the size csrColIndA.

    cusparseMatDescr 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.

    CUdeviceptr csrVal

    array of nnzA*batchSize nonzero elements of matrices A0, A1, .... All matrices are aggregated one after another.

    CUdeviceptr csrRowPtr

    integer array of m+1 elements that contains the start of every row and the end of the last row plus one.

    CUdeviceptr csrColInd

    integer array of nnzAcolumn indices of the nonzero elements of each matrix Aj.

    System.Int32 batchSize

    number of systems to be solved.

    csrqrInfo info

    opaque structure for QR factorization.

    SizeT internalDataInBytes

    number of bytes of the internal data.

    SizeT workspaceInBytes

    number of bytes of the buffer in numerical factorization.

    Returns
    Type Description
    cusolverStatus

    cusolverSpScsrqrsvBatched(cusolverSpHandle, Int32, Int32, Int32, cusparseMatDescr, CUdeviceptr, CUdeviceptr, CUdeviceptr, CUdeviceptr, CUdeviceptr, Int32, csrqrInfo, CUdeviceptr)

    The batched sparse QR factorization is used to solve either a set of least-squares problems or a set of linear systems

    Declaration
    public static cusolverStatus cusolverSpScsrqrsvBatched(cusolverSpHandle handle, int m, int n, int nnz, cusparseMatDescr descrA, CUdeviceptr csrValA, CUdeviceptr csrRowPtrA, CUdeviceptr csrColIndA, CUdeviceptr b, CUdeviceptr x, int batchSize, csrqrInfo info, CUdeviceptr pBuffer)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows of each matrix Aj.

    System.Int32 n

    number of columns of each matrix Aj.

    System.Int32 nnz

    number of nonzeros of each matrix Aj. It is the size csrColIndA.

    cusparseMatDescr 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.

    CUdeviceptr csrValA

    array of nnzA*batchSize nonzero elements of matrices A0, A1, .... All matrices are aggregated one after another.

    CUdeviceptr csrRowPtrA

    integer array of m+1 elements that contains the start of every row and the end of the last row plus one.

    CUdeviceptr csrColIndA

    integer array of nnzAcolumn indices of the nonzero elements of each matrix Aj.

    CUdeviceptr b

    array of m*batchSize of right-hand-side vectors b0, b1, .... All vectors are aggregated one after another.

    CUdeviceptr x

    array of m*batchSize of solution vectors x0, x1, .... All vectors are aggregated one after another.

    System.Int32 batchSize

    number of systems to be solved.

    csrqrInfo info

    opaque structure for QR factorization.

    CUdeviceptr pBuffer

    buffer allocated by the user, the size is returned by cusolverSpXcsrqrBufferInfoBatched().

    Returns
    Type Description
    cusolverStatus

    cusolverSpSetStream(cusolverSpHandle, CUstream)

    This function sets the stream to be used by the cuSolverSP library to execute its routines.

    Declaration
    public static cusolverStatus cusolverSpSetStream(cusolverSpHandle handle, CUstream streamId)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    the handle to the cuSolverSP context.

    CUstream streamId

    the stream to be used by the library.

    Returns
    Type Description
    cusolverStatus

    cusolverSpXcsrissymHost(cusolverSpHandle, Int32, Int32, cusparseMatDescr, Int32[], Int32[], Int32[], ref Int32)

    This function checks if A has symmetric pattern or not. The output parameter issym reports 1 if A is symmetric; otherwise, it reports 0.

    Declaration
    public static cusolverStatus cusolverSpXcsrissymHost(cusolverSpHandle handle, int m, int nnzA, cusparseMatDescr descrA, int[] csrRowPtrA, int[] csrEndPtrA, int[] csrColIndA, ref int issym)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows and columns of matrix A.

    System.Int32 nnzA

    number of nonzeros of matrix A. It is the size of csrValA and csrColIndA.

    cusparseMatDescr 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.

    System.Int32[] csrRowPtrA

    integer array of m elements that contains the start of every row.

    System.Int32[] csrEndPtrA

    integer array of m elements that contains the end of the last row plus one.

    System.Int32[] csrColIndA

    integer array of nnzAcolumn indices of the nonzero elements of matrix A.

    System.Int32 issym

    1 if A is symmetric; 0 otherwise.

    Returns
    Type Description
    cusolverStatus

    cusolverSpXcsrperm_bufferSizeHost(cusolverSpHandle, Int32, Int32, Int32, cusparseMatDescr, Int32[], Int32[], Int32[], Int32[], ref SizeT)

    Given a left permutation vector p which corresponds to permutation matrix P and a right permutation vector q which corresponds to permutation matrix Q, this function computes permutation of matrix A by B = PAQ^T

    Declaration
    public static cusolverStatus cusolverSpXcsrperm_bufferSizeHost(cusolverSpHandle handle, int m, int n, int nnzA, cusparseMatDescr descrA, int[] csrRowPtrA, int[] csrColIndA, int[] p, int[] q, ref SizeT bufferSizeInBytes)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows of matrix A.

    System.Int32 n

    number of columns of matrix A.

    System.Int32 nnzA

    number of nonzeros of matrix A. It is the size of csrValA and csrColIndA.

    cusparseMatDescr 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.

    System.Int32[] csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    System.Int32[] csrColIndA

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    System.Int32[] p

    left permutation vector of size m.

    System.Int32[] q

    right permutation vector of size n.

    SizeT bufferSizeInBytes

    number of bytes of the buffer.

    Returns
    Type Description
    cusolverStatus

    cusolverSpXcsrpermHost(cusolverSpHandle, Int32, Int32, Int32, cusparseMatDescr, Int32[], Int32[], Int32[], Int32[], Int32[], Byte[])

    Given a left permutation vector p which corresponds to permutation matrix P and a right permutation vector q which corresponds to permutation matrix Q, this function computes permutation of matrix A by B = PAQ^T

    Declaration
    public static cusolverStatus cusolverSpXcsrpermHost(cusolverSpHandle handle, int m, int n, int nnzA, cusparseMatDescr descrA, int[] csrRowPtrA, int[] csrColIndA, int[] p, int[] q, int[] map, byte[] pBuffer)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows of matrix A.

    System.Int32 n

    number of columns of matrix A.

    System.Int32 nnzA

    number of nonzeros of matrix A. It is the size of csrValA and csrColIndA.

    cusparseMatDescr 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.

    System.Int32[] csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    System.Int32[] csrColIndA

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    System.Int32[] p

    left permutation vector of size m.

    System.Int32[] q

    right permutation vector of size n.

    System.Int32[] map

    integer array of nnzA indices. If the user wants to get relationship between A and B, map must be set 0:1:(nnzA-1).

    System.Byte[] pBuffer

    buffer allocated by the user, the size is returned by csrperm_bufferSize().

    Returns
    Type Description
    cusolverStatus

    cusolverSpXcsrqrAnalysisBatched(cusolverSpHandle, Int32, Int32, Int32, cusparseMatDescr, CUdeviceptr, CUdeviceptr, csrqrInfo)

    The batched sparse QR factorization is used to solve either a set of least-squares problems or a set of linear systems

    Declaration
    public static cusolverStatus cusolverSpXcsrqrAnalysisBatched(cusolverSpHandle handle, int m, int n, int nnzA, cusparseMatDescr descrA, CUdeviceptr csrRowPtrA, CUdeviceptr csrColIndA, csrqrInfo info)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows of each matrix Aj.

    System.Int32 n

    number of columns of each matrix Aj.

    System.Int32 nnzA

    number of nonzeros of each matrix Aj. It is the size csrColIndA.

    cusparseMatDescr 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.

    CUdeviceptr csrRowPtrA

    integer array of m+1 elements that contains the start of every row and the end of the last row plus one.

    CUdeviceptr csrColIndA

    integer array of nnzAcolumn indices of the nonzero elements of each matrix Aj.

    csrqrInfo info

    opaque structure for QR factorization.

    Returns
    Type Description
    cusolverStatus

    cusolverSpXcsrsymamdHost(cusolverSpHandle, Int32, Int32, cusparseMatDescr, Int32[], Int32[], Int32[])

    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.

    Declaration
    public static cusolverStatus cusolverSpXcsrsymamdHost(cusolverSpHandle handle, int n, int nnzA, cusparseMatDescr descrA, int[] csrRowPtrA, int[] csrColIndA, int[] p)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 n

    number of rows and columns of matrix A.

    System.Int32 nnzA

    number of nonzeros of matrix A. It is the size of csrValA and csrColIndA.

    cusparseMatDescr 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.

    System.Int32[] csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    System.Int32[] csrColIndA

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    System.Int32[] p

    permutation vector of size n.

    Returns
    Type Description
    cusolverStatus

    cusolverSpXcsrsymmdqHost(cusolverSpHandle, Int32, Int32, cusparseMatDescr, Int32[], Int32[], Int32[])

    Symmetric minimum degree algorithm based on quotient graph.

    This function implements Symmetric 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.

    Declaration
    public static cusolverStatus cusolverSpXcsrsymmdqHost(cusolverSpHandle handle, int n, int nnzA, cusparseMatDescr descrA, int[] csrRowPtrA, int[] csrColIndA, int[] p)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 n

    number of rows and columns of matrix A.

    System.Int32 nnzA

    number of nonzeros of matrix A. It is the size of csrValA and csrColIndA.

    cusparseMatDescr 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.

    System.Int32[] csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    System.Int32[] csrColIndA

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    System.Int32[] p

    permutation vector of size n.

    Returns
    Type Description
    cusolverStatus

    cusolverSpXcsrsymrcmHost(cusolverSpHandle, Int32, Int32, cusparseMatDescr, Int32[], Int32[], Int32[])

    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.

    Declaration
    public static cusolverStatus cusolverSpXcsrsymrcmHost(cusolverSpHandle handle, int n, int nnzA, cusparseMatDescr descrA, int[] csrRowPtrA, int[] csrColIndA, int[] p)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 n

    number of rows and columns of matrix A.

    System.Int32 nnzA

    number of nonzeros of matrix A. It is the size of csrValA and csrColIndA.

    cusparseMatDescr 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.

    System.Int32[] csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    System.Int32[] csrColIndA

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    System.Int32[] p

    permutation vector of size n.

    Returns
    Type Description
    cusolverStatus

    cusolverSpZcsreigsHost(cusolverSpHandle, Int32, Int32, cusparseMatDescr, cuDoubleComplex[], Int32[], Int32[], cuDoubleComplex, cuDoubleComplex, ref Int32)

    Declaration
    public static cusolverStatus cusolverSpZcsreigsHost(cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, cuDoubleComplex[] csrValA, int[] csrRowPtrA, int[] csrColIndA, cuDoubleComplex left_bottom_corner, cuDoubleComplex right_upper_corner, ref int num_eigs)
    Parameters
    Type Name Description
    cusolverSpHandle handle
    System.Int32 m
    System.Int32 nnz
    cusparseMatDescr descrA
    cuDoubleComplex[] csrValA
    System.Int32[] csrRowPtrA
    System.Int32[] csrColIndA
    cuDoubleComplex left_bottom_corner
    cuDoubleComplex right_upper_corner
    System.Int32 num_eigs
    Returns
    Type Description
    cusolverStatus

    cusolverSpZcsreigvsi(cusolverSpHandle, Int32, Int32, cusparseMatDescr, CUdeviceptr, CUdeviceptr, CUdeviceptr, cuDoubleComplex, CUdeviceptr, Int32, Double, ref cuDoubleComplex, CUdeviceptr)

    This function solves the simple eigenvalue problem Ax=lambdax by shift-inverse method.

    Declaration
    public static cusolverStatus cusolverSpZcsreigvsi(cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, CUdeviceptr csrValA, CUdeviceptr csrRowPtrA, CUdeviceptr csrColIndA, cuDoubleComplex mu0, CUdeviceptr x0, int maxite, double tol, ref cuDoubleComplex mu, CUdeviceptr x)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows and columns of matrix A.

    System.Int32 nnz

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    CUdeviceptr csrValA

    array of nnz (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    CUdeviceptr csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    CUdeviceptr csrColIndA

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    cuDoubleComplex mu0

    initial guess of eigenvalue.

    CUdeviceptr x0

    initial guess of eigenvector, a vecotr of size m.

    System.Int32 maxite

    maximum iterations in shift-inverse method.

    System.Double tol

    tolerance for convergence.

    cuDoubleComplex mu

    approximated eigenvalue nearest mu0 under tolerance.

    CUdeviceptr x

    approximated eigenvector of size m.

    Returns
    Type Description
    cusolverStatus

    cusolverSpZcsreigvsiHost(cusolverSpHandle, Int32, Int32, cusparseMatDescr, cuDoubleComplex[], Int32[], Int32[], cuDoubleComplex, cuDoubleComplex[], Int32, Double, ref cuDoubleComplex, cuDoubleComplex[])

    This function solves the simple eigenvalue problem Ax=lambdax by shift-inverse method.

    Declaration
    public static cusolverStatus cusolverSpZcsreigvsiHost(cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, cuDoubleComplex[] csrValA, int[] csrRowPtrA, int[] csrColIndA, cuDoubleComplex mu0, cuDoubleComplex[] x0, int maxite, double tol, ref cuDoubleComplex mu, cuDoubleComplex[] x)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows and columns of matrix A.

    System.Int32 nnz

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    cuDoubleComplex[] csrValA

    array of nnz (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    System.Int32[] csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    System.Int32[] csrColIndA

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    cuDoubleComplex mu0

    initial guess of eigenvalue.

    cuDoubleComplex[] x0

    initial guess of eigenvector, a vecotr of size m.

    System.Int32 maxite

    maximum iterations in shift-inverse method.

    System.Double tol

    tolerance for convergence.

    cuDoubleComplex mu

    approximated eigenvalue nearest mu0 under tolerance.

    cuDoubleComplex[] x

    approximated eigenvector of size m.

    Returns
    Type Description
    cusolverStatus

    cusolverSpZcsrlsqvqrHost(cusolverSpHandle, Int32, Int32, Int32, cusparseMatDescr, cuDoubleComplex[], Int32[], Int32[], cuDoubleComplex[], Double, ref Int32, cuDoubleComplex[], Int32[], ref Double)

    This function solves the following least-square problem x = argmin||A*z-b||

    Declaration
    public static cusolverStatus cusolverSpZcsrlsqvqrHost(cusolverSpHandle handle, int m, int n, int nnz, cusparseMatDescr descrA, cuDoubleComplex[] csrValA, int[] csrRowPtrA, int[] csrColIndA, cuDoubleComplex[] b, double tol, ref int rankA, cuDoubleComplex[] x, int[] p, ref double min_norm)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows of matrix A.

    System.Int32 n

    number of columns of matrix A.

    System.Int32 nnz

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    cuDoubleComplex[] csrValA

    array of nnz (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    System.Int32[] csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    System.Int32[] csrColIndA

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    cuDoubleComplex[] b

    right hand side vector of size m.

    System.Double tol

    tolerance to decide rank of A.

    System.Int32 rankA

    numerical rank of A.

    cuDoubleComplex[] x

    solution vector of size n, x=pinv(A)*b.

    System.Int32[] p

    a vector of size n, which represents the permuation matrix P satisfying AP^T=QR.

    System.Double min_norm

    ||A*x-b||, x=pinv(A)*b.

    Returns
    Type Description
    cusolverStatus

    cusolverSpZcsrlsvchol(cusolverSpHandle, Int32, Int32, cusparseMatDescr, CUdeviceptr, CUdeviceptr, CUdeviceptr, CUdeviceptr, Double, Int32, CUdeviceptr, ref Int32)

    This function solves the linear system A*x=b

    Declaration
    public static cusolverStatus cusolverSpZcsrlsvchol(cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, CUdeviceptr csrVal, CUdeviceptr csrRowPtr, CUdeviceptr csrColInd, CUdeviceptr b, double tol, int reorder, CUdeviceptr x, ref int singularity)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows and columns of matrix A.

    System.Int32 nnz

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    CUdeviceptr csrVal

    array of nnz (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    CUdeviceptr csrRowPtr

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    CUdeviceptr csrColInd

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    CUdeviceptr b

    right hand side vector of size m.

    System.Double tol

    tolerance to decide singularity.

    System.Int32 reorder

    no effect.

    CUdeviceptr x

    solution vector of size m, x = inv(A)*b.

    System.Int32 singularity

    -1 if A is symmetric postive definite.

    Returns
    Type Description
    cusolverStatus

    cusolverSpZcsrlsvcholHost(cusolverSpHandle, Int32, Int32, cusparseMatDescr, cuDoubleComplex[], Int32[], Int32[], cuDoubleComplex[], Double, Int32, cuDoubleComplex[], ref Int32)

    This function solves the linear system A*x=b

    Declaration
    public static cusolverStatus cusolverSpZcsrlsvcholHost(cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, cuDoubleComplex[] csrVal, int[] csrRowPtr, int[] csrColInd, cuDoubleComplex[] b, double tol, int reorder, cuDoubleComplex[] x, ref int singularity)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows and columns of matrix A.

    System.Int32 nnz

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    cuDoubleComplex[] csrVal

    array of nnz (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    System.Int32[] csrRowPtr

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    System.Int32[] csrColInd

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    cuDoubleComplex[] b

    right hand side vector of size m.

    System.Double tol

    tolerance to decide singularity.

    System.Int32 reorder

    no effect.

    cuDoubleComplex[] x

    solution vector of size m, x = inv(A)*b.

    System.Int32 singularity

    -1 if A is symmetric postive definite.

    Returns
    Type Description
    cusolverStatus

    cusolverSpZcsrlsvluHost(cusolverSpHandle, Int32, Int32, cusparseMatDescr, cuDoubleComplex[], Int32[], Int32[], cuDoubleComplex[], Double, Int32, cuDoubleComplex[], ref Int32)

    This function solves the linear system A*x=b

    Declaration
    public static cusolverStatus cusolverSpZcsrlsvluHost(cusolverSpHandle handle, int n, int nnzA, cusparseMatDescr descrA, cuDoubleComplex[] csrValA, int[] csrRowPtrA, int[] csrColIndA, cuDoubleComplex[] b, double tol, int reorder, cuDoubleComplex[] x, ref int singularity)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 n

    number of rows and columns of matrix A.

    System.Int32 nnzA

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    cuDoubleComplex[] csrValA

    array of nnzA (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    System.Int32[] csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    System.Int32[] csrColIndA

    integer array of nnzA (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    cuDoubleComplex[] b

    right hand side vector of size n.

    System.Double tol

    tolerance to decide if singular or not.

    System.Int32 reorder

    no ordering if reorder=0. Otherwise, symrcm is used to reduce zero fill-in.

    cuDoubleComplex[] x

    solution vector of size n, x = inv(A)*b.

    System.Int32 singularity

    -1 if A is invertible. Otherwise, first index j such that U(j,j)≈0

    Returns
    Type Description
    cusolverStatus

    cusolverSpZcsrlsvqr(cusolverSpHandle, Int32, Int32, cusparseMatDescr, CUdeviceptr, CUdeviceptr, CUdeviceptr, CUdeviceptr, Double, Int32, CUdeviceptr, ref Int32)

    This function solves the linear system A*x=b

    Declaration
    public static cusolverStatus cusolverSpZcsrlsvqr(cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, CUdeviceptr csrValA, CUdeviceptr csrRowPtrA, CUdeviceptr csrColIndA, CUdeviceptr b, double tol, int reorder, CUdeviceptr x, ref int singularity)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows and columns of matrix A.

    System.Int32 nnz

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    CUdeviceptr csrValA

    array of nnz (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    CUdeviceptr csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    CUdeviceptr csrColIndA

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    CUdeviceptr b

    right hand side vector of size m.

    System.Double tol

    tolerance to decide if singular or not.

    System.Int32 reorder

    no effect.

    CUdeviceptr x

    solution vector of size m, x = inv(A)*b.

    System.Int32 singularity

    -1 if A is invertible. Otherwise, first index j such that R(j,j)≈0

    Returns
    Type Description
    cusolverStatus

    cusolverSpZcsrlsvqrHost(cusolverSpHandle, Int32, Int32, cusparseMatDescr, cuDoubleComplex[], Int32[], Int32[], cuDoubleComplex[], Double, Int32, cuDoubleComplex[], ref Int32)

    This function solves the linear system A*x=b

    Declaration
    public static cusolverStatus cusolverSpZcsrlsvqrHost(cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, cuDoubleComplex[] csrValA, int[] csrRowPtrA, int[] csrColIndA, cuDoubleComplex[] b, double tol, int reorder, cuDoubleComplex[] x, ref int singularity)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows and columns of matrix A.

    System.Int32 nnz

    number of nonzeros of matrix A.

    cusparseMatDescr 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.

    cuDoubleComplex[] csrValA

    array of nnz (= csrRowPtrA(n) * csrRowPtrA(0)) nonzero elements of matrix A.

    System.Int32[] csrRowPtrA

    integer array of n + 1 elements that contains the start of every row and the end of the last row plus one.

    System.Int32[] csrColIndA

    integer array of nnz (=csrRowPtrA(n) * csrRowPtrA(0)) column indices of the nonzero elements of matrix A.

    cuDoubleComplex[] b

    right hand side vector of size m.

    System.Double tol

    tolerance to decide if singular or not.

    System.Int32 reorder

    no effect.

    cuDoubleComplex[] x

    solution vector of size m, x = inv(A)*b.

    System.Int32 singularity

    -1 if A is invertible. Otherwise, first index j such that R(j,j)≈0

    Returns
    Type Description
    cusolverStatus

    cusolverSpZcsrqrBufferInfoBatched(cusolverSpHandle, Int32, Int32, Int32, cusparseMatDescr, CUdeviceptr, CUdeviceptr, CUdeviceptr, Int32, csrqrInfo, ref SizeT, ref SizeT)

    The batched sparse QR factorization is used to solve either a set of least-squares problems or a set of linear systems

    Declaration
    public static cusolverStatus cusolverSpZcsrqrBufferInfoBatched(cusolverSpHandle handle, int m, int n, int nnz, cusparseMatDescr descrA, CUdeviceptr csrVal, CUdeviceptr csrRowPtr, CUdeviceptr csrColInd, int batchSize, csrqrInfo info, ref SizeT internalDataInBytes, ref SizeT workspaceInBytes)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows of each matrix Aj.

    System.Int32 n

    number of columns of each matrix Aj.

    System.Int32 nnz

    number of nonzeros of each matrix Aj. It is the size csrColIndA.

    cusparseMatDescr 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.

    CUdeviceptr csrVal

    array of nnzA*batchSize nonzero elements of matrices A0, A1, .... All matrices are aggregated one after another.

    CUdeviceptr csrRowPtr

    integer array of m+1 elements that contains the start of every row and the end of the last row plus one.

    CUdeviceptr csrColInd

    integer array of nnzAcolumn indices of the nonzero elements of each matrix Aj.

    System.Int32 batchSize

    number of systems to be solved.

    csrqrInfo info

    opaque structure for QR factorization.

    SizeT internalDataInBytes

    number of bytes of the internal data.

    SizeT workspaceInBytes

    number of bytes of the buffer in numerical factorization.

    Returns
    Type Description
    cusolverStatus

    cusolverSpZcsrqrsvBatched(cusolverSpHandle, Int32, Int32, Int32, cusparseMatDescr, CUdeviceptr, CUdeviceptr, CUdeviceptr, CUdeviceptr, CUdeviceptr, Int32, csrqrInfo, CUdeviceptr)

    The batched sparse QR factorization is used to solve either a set of least-squares problems or a set of linear systems

    Declaration
    public static cusolverStatus cusolverSpZcsrqrsvBatched(cusolverSpHandle handle, int m, int n, int nnz, cusparseMatDescr descrA, CUdeviceptr csrValA, CUdeviceptr csrRowPtrA, CUdeviceptr csrColIndA, CUdeviceptr b, CUdeviceptr x, int batchSize, csrqrInfo info, CUdeviceptr pBuffer)
    Parameters
    Type Name Description
    cusolverSpHandle handle

    handle to the cuSolverSP library context.

    System.Int32 m

    number of rows of each matrix Aj.

    System.Int32 n

    number of columns of each matrix Aj.

    System.Int32 nnz

    number of nonzeros of each matrix Aj. It is the size csrColIndA.

    cusparseMatDescr 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.

    CUdeviceptr csrValA

    array of nnzA*batchSize nonzero elements of matrices A0, A1, .... All matrices are aggregated one after another.

    CUdeviceptr csrRowPtrA

    integer array of m+1 elements that contains the start of every row and the end of the last row plus one.

    CUdeviceptr csrColIndA

    integer array of nnzAcolumn indices of the nonzero elements of each matrix Aj.

    CUdeviceptr b

    array of m*batchSize of right-hand-side vectors b0, b1, .... All vectors are aggregated one after another.

    CUdeviceptr x

    array of m*batchSize of solution vectors x0, x1, .... All vectors are aggregated one after another.

    System.Int32 batchSize

    number of systems to be solved.

    csrqrInfo info

    opaque structure for QR factorization.

    CUdeviceptr pBuffer

    buffer allocated by the user, the size is returned by cusolverSpXcsrqrBufferInfoBatched().

    Returns
    Type Description
    cusolverStatus
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX