Class CudaSolveNativeMethods.Dense
The cuSolverDN library was designed to solve dense linear systems of the form Ax=B
Inheritance
Inherited Members
Namespace: ManagedCuda.CudaSolve
Assembly: CudaSolve.dll
Syntax
public static class Dense
Methods
cusolverDnCgebrd(cusolverDnHandle, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, CUdeviceptr, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
This function reduces a general real m×n matrix A to upper or lower bidiagonal form B by an orthogonal transformation: Q^HAP=B
Declaration
public static cusolverStatus cusolverDnCgebrd(cusolverDnHandle handle, int m, int n, CUdeviceptr A, int lda, CUdeviceptr D, CUdeviceptr E, CUdeviceptr TAUQ, CUdeviceptr TAUP, CUdeviceptr Work, int Lwork, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | D | array of dimension min(m,n). The diagonal elements of the bidiagonal matrix B: D(i) = A(i,i). |
| CUdeviceptr | E | array of dimension min(m,n). The off-diagonal elements of the bidiagonal matrix B: if m>=n, E(i) = A(i,i+1) for i = 1,2,...,n-1; if m<n, E(i) = A(i+1,i) for i = 1,2,...,m-1. |
| CUdeviceptr | TAUQ | array of dimension min(m,n). The scalar factors of the elementary reflectors which represent the orthogonal matrix Q. |
| CUdeviceptr | TAUP | array of dimension min(m,n). The scalar factors of the elementary reflectors which represent the orthogonal matrix P. |
| CUdeviceptr | Work | working space, array of size Lwork. |
| System.Int32 | Lwork | size of Work, returned by gebrd_bufferSize. |
| CUdeviceptr | devInfo | if devInfo = 0, the operation is successful. if devInfo = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnCgebrd_bufferSize(cusolverDnHandle, Int32, Int32, ref Int32)
This function reduces a general real m×n matrix A to upper or lower bidiagonal form B by an orthogonal transformation: Q^HAP=B
Declaration
public static cusolverStatus cusolverDnCgebrd_bufferSize(cusolverDnHandle handle, int m, int n, ref int Lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| System.Int32 | Lwork | size of Work, returned by gebrd_bufferSize. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnCgeqrf(cusolverDnHandle, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
This function computes the QR factorization of a m×n matrix A=Q*R where A is a m×n matrix, Q is a m×n matrix, and R is a n×n upper triangular matrix.
Declaration
public static cusolverStatus cusolverDnCgeqrf(cusolverDnHandle handle, int m, int n, CUdeviceptr A, int lda, CUdeviceptr TAU, CUdeviceptr Workspace, int Lwork, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | TAU | array of dimension at least min(m,n). |
| CUdeviceptr | Workspace | working space, array of size Lwork. |
| System.Int32 | Lwork | size of working array Workspace. |
| CUdeviceptr | devInfo | if info = 0, the LU factorization is successful. if info = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnCgeqrf_bufferSize(cusolverDnHandle, Int32, Int32, CUdeviceptr, Int32, ref Int32)
This function computes the QR factorization of a m×n matrix A=Q*R where A is a m×n matrix, Q is a m×n matrix, and R is a n×n upper triangular matrix.
Declaration
public static cusolverStatus cusolverDnCgeqrf_bufferSize(cusolverDnHandle handle, int m, int n, CUdeviceptr A, int lda, ref int Lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| System.Int32 | Lwork | size of working array Workspace. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnCgesvd(cusolverDnHandle, Char, Char, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr)
This function computes the singular value decomposition (SVD) of a m×n matrix A and corresponding the left and/or right singular vectors.
Declaration
public static cusolverStatus cusolverDnCgesvd(cusolverDnHandle handle, char jobu, char jobvt, int m, int n, CUdeviceptr A, int lda, CUdeviceptr S, CUdeviceptr U, int ldu, CUdeviceptr VT, int ldvt, CUdeviceptr Work, int Lwork, CUdeviceptr rwork, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Char | jobu | specifies options for computing all or part of the matrix U: = 'A': all m columns of U are returned in array U: = 'S': the first min(m,n) columns of U (the left singular vectors) are returned in the array U; = 'O': the first min(m,n) columns of U (the left singular vectors) are overwritten on the array A; = 'N': no columns of U (no left singular vectors) are computed. |
| System.Char | jobvt | specifies options for computing all or part of the matrix VT: = 'A': all N rows of VT are returned in the array VT; = 'S': the first min(m,n) rows of VT (the right singular vectors) are returned in the array VT; = 'O': the first min(m,n) rows of VT (the right singular vectors) are overwritten on the array A; = 'N': no rows of V**T (no right singular vectors) are computed. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). On exit, the contents of A are destroyed. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | S | array of dimension min(m,n). The singular values of A, sorted so that S(i)
|
| CUdeviceptr | U | array of dimension ldu * m with ldu is not less than max(1,m). U contains the m×m unitary matrix U. |
| System.Int32 | ldu | leading dimension of two-dimensional array used to store matrix U. |
| CUdeviceptr | VT | array of dimension ldvt * n with ldvt is not less than max(1,n). VT contains the n×n unitary matrix V**T. |
| System.Int32 | ldvt | leading dimension of two-dimensional array used to store matrix Vt. |
| CUdeviceptr | Work | working space, array of size Lwork. |
| System.Int32 | Lwork | size of Work, returned by gesvd_bufferSize. |
| CUdeviceptr | rwork | |
| CUdeviceptr | devInfo | if devInfo = 0, the operation is successful. if devInfo = -i, the ith parameter is wrong. if devInfo > 0, devInfo indicates how many superdiagonals of an intermediate bidiagonal form B did not converge to zero. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnCgesvd_bufferSize(cusolverDnHandle, Int32, Int32, ref Int32)
This function computes the singular value decomposition (SVD) of a m×n matrix A and corresponding the left and/or right singular vectors.
Declaration
public static cusolverStatus cusolverDnCgesvd_bufferSize(cusolverDnHandle handle, int m, int n, ref int Lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| System.Int32 | Lwork | size of Work, returned by gesvd_bufferSize. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnCgetrf(cusolverDnHandle, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, CUdeviceptr)
This function computes the LU factorization of a m×n matrix PA=LU where A is a m×n matrix, P is a permutation matrix, L is a lower triangular matrix with unit diagonal, and U is an upper triangular matrix.
Declaration
public static cusolverStatus cusolverDnCgetrf(cusolverDnHandle handle, int m, int n, CUdeviceptr A, int lda, CUdeviceptr Workspace, CUdeviceptr devIpiv, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | Workspace | working space, array of size Lwork. |
| CUdeviceptr | devIpiv | array of size at least min(m,n), containing pivot indices. |
| CUdeviceptr | devInfo | if devInfo = 0, the LU factorization is successful. if devInfo = -i, the i-th parameter is wrong. if devInfo = i, the U(i,i) = 0. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnCgetrf_bufferSize(cusolverDnHandle, Int32, Int32, CUdeviceptr, Int32, ref Int32)
This function computes the LU factorization of a m×n matrix PA=LU where A is a m×n matrix, P is a permutation matrix, L is a lower triangular matrix with unit diagonal, and U is an upper triangular matrix.
Declaration
public static cusolverStatus cusolverDnCgetrf_bufferSize(cusolverDnHandle handle, int m, int n, CUdeviceptr A, int lda, ref int Lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| System.Int32 | Lwork | size of Workspace |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnCgetrs(cusolverDnHandle, Operation, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
This function solves a linear system of multiple right-hand sides op(A)*X=B.
Declaration
public static cusolverStatus cusolverDnCgetrs(cusolverDnHandle handle, Operation trans, int n, int nrhs, CUdeviceptr A, int lda, CUdeviceptr devIpiv, CUdeviceptr B, int ldb, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| Operation | trans | operation op(A) that is non- or (conj.) transpose. |
| System.Int32 | n | number of rows and columns of matrix A. |
| System.Int32 | nrhs | number of right-hand sides. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | devIpiv | array of size at least n, containing pivot indices. |
| CUdeviceptr | B | array of dimension ldb * nrhs with ldb is not less than max(1,n). |
| System.Int32 | ldb | leading dimension of two-dimensional array used to store matrix B. |
| CUdeviceptr | devInfo | if devInfo = 0, the operation is successful. if devInfo = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnCheevd(cusolverDnHandle, cusolverEigMode, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
This function computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix A.
Declaration
public static cusolverStatus cusolverDnCheevd(cusolverDnHandle handle, cusolverEigMode jobz, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr W, CUdeviceptr work, int lwork, CUdeviceptr info)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| cusolverEigMode | jobz | specifies options to either compute eigenvalue only or compute eigen-pair. |
| FillMode | uplo | specifies which part of A and B are stored. |
| System.Int32 | n | number of rows (or columns) of matrix A and B. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n). |
| CUdeviceptr | W | a real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1). |
| CUdeviceptr | work | working space, array of size lwork. |
| System.Int32 | lwork | size of work, returned by sygvd_bufferSize. |
| CUdeviceptr | info | if devInfo = 0, the operation is successful. if devInfo = -i, the i-th parameter is wrong. if devInfo = i (>0), devInfo indicates either potrf or syevd is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnCheevd_bufferSize(cusolverDnHandle, cusolverEigMode, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, ref Int32)
This function computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix A.
Declaration
public static cusolverStatus cusolverDnCheevd_bufferSize(cusolverDnHandle handle, cusolverEigMode jobz, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr W, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| cusolverEigMode | jobz | specifies options to either compute eigenvalue only or compute eigen-pair. |
| FillMode | uplo | specifies which part of A and B are stored. |
| System.Int32 | n | number of rows (or columns) of matrix A and B. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n). |
| CUdeviceptr | W | a real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1). |
| System.Int32 | lwork | size of work. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnChegvd(cusolverDnHandle, cusolverEigType, cusolverEigMode, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
This function computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix-pair (A,B).
Declaration
public static cusolverStatus cusolverDnChegvd(cusolverDnHandle handle, cusolverEigType itype, cusolverEigMode jobz, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr B, int ldb, CUdeviceptr W, CUdeviceptr work, int lwork, CUdeviceptr info)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| cusolverEigType | itype | Specifies the problem type to be solved. |
| cusolverEigMode | jobz | specifies options to either compute eigenvalue only or compute eigen-pair. |
| FillMode | uplo | specifies which part of A and B are stored. |
| System.Int32 | n | number of rows (or columns) of matrix A and B. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n). |
| CUdeviceptr | B | array of dimension ldb * n. |
| System.Int32 | ldb | leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n). |
| CUdeviceptr | W | a real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1). |
| CUdeviceptr | work | working space, array of size lwork. |
| System.Int32 | lwork | size of work, returned by sygvd_bufferSize. |
| CUdeviceptr | info | if devInfo = 0, the operation is successful. if devInfo = -i, the i-th parameter is wrong. if devInfo = i (>0), devInfo indicates either potrf or syevd is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnChegvd_bufferSize(cusolverDnHandle, cusolverEigType, cusolverEigMode, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, ref Int32)
The helper functions below can calculate the sizes needed for pre-allocated buffer.
Declaration
public static cusolverStatus cusolverDnChegvd_bufferSize(cusolverDnHandle handle, cusolverEigType itype, cusolverEigMode jobz, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr B, int ldb, CUdeviceptr W, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| cusolverEigType | itype | Specifies the problem type to be solved. |
| cusolverEigMode | jobz | specifies options to either compute eigenvalue only or compute eigen-pair. |
| FillMode | uplo | specifies which part of A and B are stored. |
| System.Int32 | n | number of rows (or columns) of matrix A and B. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n). |
| CUdeviceptr | B | array of dimension ldb * n. |
| System.Int32 | ldb | leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n). |
| CUdeviceptr | W | a real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1). |
| System.Int32 | lwork | size of work |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnChetrd(cusolverDnHandle, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
Declaration
public static cusolverStatus cusolverDnChetrd(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr d, CUdeviceptr e, CUdeviceptr tau, CUdeviceptr work, int lwork, CUdeviceptr info)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | |
| FillMode | uplo | |
| System.Int32 | n | |
| CUdeviceptr | A | |
| System.Int32 | lda | |
| CUdeviceptr | d | |
| CUdeviceptr | e | |
| CUdeviceptr | tau | |
| CUdeviceptr | work | |
| System.Int32 | lwork | |
| CUdeviceptr | info |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnChetrd_bufferSize(cusolverDnHandle, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, CUdeviceptr, ref Int32)
Declaration
public static cusolverStatus cusolverDnChetrd_bufferSize(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr d, CUdeviceptr e, CUdeviceptr tau, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | |
| FillMode | uplo | |
| System.Int32 | n | |
| CUdeviceptr | A | |
| System.Int32 | lda | |
| CUdeviceptr | d | |
| CUdeviceptr | e | |
| CUdeviceptr | tau | |
| System.Int32 | lwork |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnClaswp(cusolverDnHandle, Int32, CUdeviceptr, Int32, Int32, Int32, CUdeviceptr, Int32)
Declaration
public static cusolverStatus cusolverDnClaswp(cusolverDnHandle handle, int n, CUdeviceptr A, int lda, int k1, int k2, CUdeviceptr devIpiv, int incx)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | |
| System.Int32 | n | |
| CUdeviceptr | A | |
| System.Int32 | lda | |
| System.Int32 | k1 | |
| System.Int32 | k2 | |
| CUdeviceptr | devIpiv | |
| System.Int32 | incx |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnCpotrf(cusolverDnHandle, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr)
This function computes the Cholesky factorization of a Hermitian positive-definite matrix.
Declaration
public static cusolverStatus cusolverDnCpotrf(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr Workspace, int Lwork, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| FillMode | uplo | indicates if matrix A lower or upper part is stored, the other part is not referenced. |
| System.Int32 | n | number of rows and columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | Workspace | working space, array of size Lwork. |
| System.Int32 | Lwork | size of Workspace |
| CUdeviceptr | devInfo | if devInfo = 0, the Cholesky factorization is successful. if devInfo = -i, the i-th parameter is wrong. if devInfo = i, the leading minor of order i is not positive definite. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnCpotrf_bufferSize(cusolverDnHandle, FillMode, Int32, CUdeviceptr, Int32, ref Int32)
This function computes the Cholesky factorization of a Hermitian positive-definite matrix.
Declaration
public static cusolverStatus cusolverDnCpotrf_bufferSize(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, ref int Lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| FillMode | uplo | indicates if matrix A lower or upper part is stored, the other part is not referenced. |
| System.Int32 | n | number of rows and columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| System.Int32 | Lwork | size of Workspace |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnCpotrs(cusolverDnHandle, FillMode, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr)
This function solves a system of linear equations A*X=B where A is a n×n Hermitian matrix, only lower or upper part is meaningful.
Declaration
public static cusolverStatus cusolverDnCpotrs(cusolverDnHandle handle, FillMode uplo, int n, int nrhs, CUdeviceptr A, int lda, CUdeviceptr B, int ldb, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| FillMode | uplo | indicates if matrix A lower or upper part is stored, the other part is not referenced. |
| System.Int32 | n | number of rows and columns of matrix A. |
| System.Int32 | nrhs | number of columns of matrix X and B. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). A is either lower cholesky factor L or upper Cholesky factor U. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | B | array of dimension ldb * nrhs. ldb is not less than max(1,n). As an input, B is right hand side matrix. As an output, B is the solution matrix. |
| System.Int32 | ldb | leading dimension of two-dimensional array used to store matrix B. |
| CUdeviceptr | devInfo | if devInfo = 0, the Cholesky factorization is successful. if devInfo = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnCreate(ref cusolverDnHandle)
This function initializes the cuSolverDN library and creates a handle on the cuSolverDN context. It must be called before any other cuSolverDN API function is invoked. It allocates hardware resources necessary for accessing the GPU
Declaration
public static cusolverStatus cusolverDnCreate(ref cusolverDnHandle handle)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | the pointer to the handle to the cuSolverDN context. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnCsytrf(cusolverDnHandle, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
This function computes the Bunch-Kaufman factorization of a n×n symmetric indefinite matrix.
Declaration
public static cusolverStatus cusolverDnCsytrf(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr ipiv, CUdeviceptr work, int lwork, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| FillMode | uplo | indicates if matrix A lower or upper part is stored, the other part is not referenced. |
| System.Int32 | n | number of rows and columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | ipiv | array of size at least n, containing pivot indices. |
| CUdeviceptr | work | working space, array of size lwork. |
| System.Int32 | lwork | size of working space work. |
| CUdeviceptr | devInfo | if devInfo = 0, the LU factorization is successful. if devInfo = -i, the i-th parameter is wrong. if devInfo = i, the D(i,i) = 0. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnCsytrf_bufferSize(cusolverDnHandle, Int32, CUdeviceptr, Int32, ref Int32)
This function computes the Bunch-Kaufman factorization of a n×n symmetric indefinite matrix.
Declaration
public static cusolverStatus cusolverDnCsytrf_bufferSize(cusolverDnHandle handle, int n, CUdeviceptr A, int lda, ref int Lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | n | number of rows and columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| System.Int32 | Lwork | size of working space work. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnCungbr(cusolverDnHandle, SideMode, Int32, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
generates one of the unitary matrices Q or P**T determined by GEBRD
Declaration
public static cusolverStatus cusolverDnCungbr(cusolverDnHandle handle, SideMode side, int m, int n, int k, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr work, int lwork, CUdeviceptr info)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| SideMode | side | if side = CUBLAS_SIDE_LEFT, generate Q. if side = CUBLAS_SIDE_RIGHT, generate P**T. |
| System.Int32 | m | number of rows of matrix Q or P**T. |
| System.Int32 | n | if side = CUBLAS_SIDE_LEFT, m>= n>= min(m,k). if side = CUBLAS_SIDE_RIGHT, n>= m>= min(n,k). |
| System.Int32 | k | if side = CUBLAS_SIDE_LEFT, the number of columns in the original mby- k matrix reduced by gebrd. if side = CUBLAS_SIDE_RIGHT, the number of rows in the original k-by-n matrix reduced by gebrd. |
| CUdeviceptr | A | array of dimension lda * n On entry, the vectors which define the elementary reflectors, as returned by gebrd. On exit, the m-by-n matrix Q or P**T. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m); |
| CUdeviceptr | tau | array of dimension min(m,k) if side is CUBLAS_SIDE_LEFT; of dimension min(n,k) if side is CUBLAS_SIDE_RIGHT; tau(i) must contain the scalar factor of the elementary reflector H(i) or G(i), which determines Q or P**T, as returned by gebrd in its array argument TAUQ or TAUP. |
| CUdeviceptr | work | working space, array of size lwork. |
| System.Int32 | lwork | size of working array work. |
| CUdeviceptr | info | if info = 0, the ormqr is successful. if info = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnCungbr_bufferSize(cusolverDnHandle, SideMode, Int32, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, ref Int32)
generates one of the unitary matrices Q or P**T determined by GEBRD
Declaration
public static cusolverStatus cusolverDnCungbr_bufferSize(cusolverDnHandle handle, SideMode side, int m, int n, int k, CUdeviceptr A, int lda, CUdeviceptr tau, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| SideMode | side | if side = CUBLAS_SIDE_LEFT, generate Q. if side = CUBLAS_SIDE_RIGHT, generate P**T. |
| System.Int32 | m | number of rows of matrix Q or P**T. |
| System.Int32 | n | if side = CUBLAS_SIDE_LEFT, m>= n>= min(m,k). if side = CUBLAS_SIDE_RIGHT, n>= m>= min(n,k). |
| System.Int32 | k | if side = CUBLAS_SIDE_LEFT, the number of columns in the original mby- k matrix reduced by gebrd. if side = CUBLAS_SIDE_RIGHT, the number of rows in the original k-by-n matrix reduced by gebrd. |
| CUdeviceptr | A | array of dimension lda * n On entry, the vectors which define the elementary reflectors, as returned by gebrd. On exit, the m-by-n matrix Q or P**T. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m); |
| CUdeviceptr | tau | array of dimension min(m,k) if side is CUBLAS_SIDE_LEFT; of dimension min(n,k) if side is CUBLAS_SIDE_RIGHT; tau(i) must contain the scalar factor of the elementary reflector H(i) or G(i), which determines Q or P**T, as returned by gebrd in its array argument TAUQ or TAUP. |
| System.Int32 | lwork | size of working array work. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnCungqr(cusolverDnHandle, Int32, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
generate unitary matrix Q from QR factorization
Declaration
public static cusolverStatus cusolverDnCungqr(cusolverDnHandle handle, int m, int n, int k, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr work, int lwork, CUdeviceptr info)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix Q. m >= 0; |
| System.Int32 | n | number of columns of matrix Q. m >= n >= 0; |
| System.Int32 | k | number of elementary relfections whose product defines the matrix Q. n >= k >= 0; |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). i-th column of A contains elementary reflection vector. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m). |
| CUdeviceptr | tau | array of dimension k. tau(i) is the scalar of i-th elementary reflection vector. |
| CUdeviceptr | work | working space, rray of size lwork. |
| System.Int32 | lwork | size of working array work. |
| CUdeviceptr | info | if info = 0, the orgqr is successful. if info = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnCungqr_bufferSize(cusolverDnHandle, Int32, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, ref Int32)
generate unitary matrix Q from QR factorization
Declaration
public static cusolverStatus cusolverDnCungqr_bufferSize(cusolverDnHandle handle, int m, int n, int k, CUdeviceptr A, int lda, CUdeviceptr tau, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix Q. m >= 0; |
| System.Int32 | n | number of columns of matrix Q. m >= n >= 0; |
| System.Int32 | k | number of elementary relfections whose product defines the matrix Q. n >= k >= 0; |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). i-th column of A contains elementary reflection vector. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m). |
| CUdeviceptr | tau | array of dimension k. tau(i) is the scalar of i-th elementary reflection vector. |
| System.Int32 | lwork | size of working array work. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnCungtr(cusolverDnHandle, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
generate unitary Q comes from sytrd
Declaration
public static cusolverStatus cusolverDnCungtr(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr work, int lwork, CUdeviceptr info)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| FillMode | uplo | uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A contains elementary reflectors from sytrd. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A contains elementary reflectors from sytrd. |
| System.Int32 | n | number of rows (columns) of matrix Q. |
| CUdeviceptr | A | array of dimension lda * n On entry, matrix A from sytrd contains the elementary reflectors. On exit, matrix A contains the n-by-n orthogonal matrix Q. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda >= max(1,n). |
| CUdeviceptr | tau | array of dimension (n-1) tau(i) is the scalar of i-th elementary reflection vector. |
| CUdeviceptr | work | working space, array of size lwork. |
| System.Int32 | lwork | size of working array work. |
| CUdeviceptr | info | if info = 0, the orgtr is successful. if info = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnCungtr_bufferSize(cusolverDnHandle, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, ref Int32)
generate unitary Q comes from sytrd
Declaration
public static cusolverStatus cusolverDnCungtr_bufferSize(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr tau, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| FillMode | uplo | uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A contains elementary reflectors from sytrd. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A contains elementary reflectors from sytrd. |
| System.Int32 | n | number of rows (columns) of matrix Q. |
| CUdeviceptr | A | array of dimension lda * n On entry, matrix A from sytrd contains the elementary reflectors. On exit, matrix A contains the n-by-n orthogonal matrix Q. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda >= max(1,n). |
| CUdeviceptr | tau | array of dimension (n-1) tau(i) is the scalar of i-th elementary reflection vector. |
| System.Int32 | lwork | size of working array work. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnCunmqr(cusolverDnHandle, SideMode, Operation, Int32, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr)
This function overwrites m×n matrix C by
Declaration
public static cusolverStatus cusolverDnCunmqr(cusolverDnHandle handle, SideMode side, Operation trans, int m, int n, int k, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr C, int ldc, CUdeviceptr work, int lwork, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| SideMode | side | indicates if matrix Q is on the left or right of C. |
| Operation | trans | operation op(Q) that is non- or (conj.) transpose. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| System.Int32 | k | number of elementary relfections. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | tau | array of dimension at least min(m,n). The vector tau is from geqrf, so tau(i) is the scalar of i-th elementary reflection vector. |
| CUdeviceptr | C | array of size ldc * n. On exit, C is overwritten by op(Q)*C. |
| System.Int32 | ldc | leading dimension of two-dimensional array of matrix C. ldc >= max(1,m). |
| CUdeviceptr | work | working space, array of size lwork. |
| System.Int32 | lwork | size of working array work. |
| CUdeviceptr | devInfo | if info = 0, the ormqr is successful. if info = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnCunmqr_bufferSize(cusolverDnHandle, SideMode, Operation, Int32, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, ref Int32)
This function computes the QR factorization of a m×n matrix A=Q*R where A is a m×n matrix, Q is a m×n matrix, and R is a n×n upper triangular matrix.
Declaration
public static cusolverStatus cusolverDnCunmqr_bufferSize(cusolverDnHandle handle, SideMode side, Operation trans, int m, int n, int k, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr C, int ldc, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| SideMode | side | indicates if matrix Q is on the left or right of C. |
| Operation | trans | operation op(Q) that is non- or (conj.) transpose. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| System.Int32 | k | number of elementary relfections. |
| CUdeviceptr | A | array of dimension lda * k with lda is not less than max(1,m). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | tau | array of dimension at least min(m,n). |
| CUdeviceptr | C | array of size ldc * n. On exit, C is overwritten by op(Q)*C. |
| System.Int32 | ldc | leading dimension of two-dimensional array of matrix C. ldc >= max(1,m). |
| System.Int32 | lwork | size of working array Workspace. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnCunmtr(cusolverDnHandle, SideMode, FillMode, Operation, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr)
This function overwrites m×n matrix C by
Declaration
public static cusolverStatus cusolverDnCunmtr(cusolverDnHandle handle, SideMode side, FillMode uplo, Operation trans, int m, int n, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr C, int ldc, CUdeviceptr work, int lwork, CUdeviceptr info)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| SideMode | side | side = CUBLAS_SIDE_LEFT, apply Q or QT from the Left; side = CUBLAS_SIDE_RIGHT, apply Q or QT from the Right. |
| FillMode | uplo | specifies which part of A and B are stored. |
| Operation | trans | operation op(Q) that is non- or (conj.) transpose. |
| System.Int32 | m | number of rows of matrix C. |
| System.Int32 | n | number of columns of matrix C. |
| CUdeviceptr | A | array of dimension lda * m if side = CUBLAS_SIDE_LEFT; lda * n if side = CUBLAS_SIDE_RIGHT. The matrix A from sytrd contains the elementary reflectors. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. if side is CUBLAS_SIDE_LEFT, lda >= max(1,m); if side is CUBLAS_SIDE_RIGHT, lda >= max(1,n). |
| CUdeviceptr | tau | array of dimension (m-1) if side is CUBLAS_SIDE_LEFT; of dimension (n-1) if side is CUBLAS_SIDE_RIGHT; The vector tau is from sytrd, so tau(i) is the scalar of i-th elementary reflection vector. |
| CUdeviceptr | C | array of size ldc * n. On exit, C is overwritten by op(Q)C or Cop(Q). |
| System.Int32 | ldc | leading dimension of two-dimensional array of matrix C. ldc >= max(1,m). |
| CUdeviceptr | work | working space, array of size lwork. |
| System.Int32 | lwork | size of working array work. |
| CUdeviceptr | info | if info = 0, the ormqr is successful. if info = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnCunmtr_bufferSize(cusolverDnHandle, SideMode, FillMode, Operation, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, ref Int32)
This function overwrites m×n matrix C by
Declaration
public static cusolverStatus cusolverDnCunmtr_bufferSize(cusolverDnHandle handle, SideMode side, FillMode uplo, Operation trans, int m, int n, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr C, int ldc, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| SideMode | side | side = CUBLAS_SIDE_LEFT, apply Q or QT from the Left; side = CUBLAS_SIDE_RIGHT, apply Q or QT from the Right. |
| FillMode | uplo | specifies which part of A and B are stored. |
| Operation | trans | operation op(Q) that is non- or (conj.) transpose. |
| System.Int32 | m | number of rows of matrix C. |
| System.Int32 | n | number of columns of matrix C. |
| CUdeviceptr | A | array of dimension lda * m if side = CUBLAS_SIDE_LEFT; lda * n if side = CUBLAS_SIDE_RIGHT. The matrix A from sytrd contains the elementary reflectors. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. if side is CUBLAS_SIDE_LEFT, lda >= max(1,m); if side is CUBLAS_SIDE_RIGHT, lda >= max(1,n). |
| CUdeviceptr | tau | array of dimension (m-1) if side is CUBLAS_SIDE_LEFT; of dimension (n-1) if side is CUBLAS_SIDE_RIGHT; The vector tau is from sytrd, so tau(i) is the scalar of i-th elementary reflection vector. |
| CUdeviceptr | C | array of size ldc * n. On exit, C is overwritten by op(Q)C or Cop(Q). |
| System.Int32 | ldc | leading dimension of two-dimensional array of matrix C. ldc >= max(1,m). |
| System.Int32 | lwork | size of working array work. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDestroy(cusolverDnHandle)
This function releases CPU-side resources used by the cuSolverDN library.
Declaration
public static cusolverStatus cusolverDnDestroy(cusolverDnHandle handle)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDgebrd(cusolverDnHandle, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, CUdeviceptr, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
This function reduces a general real m×n matrix A to upper or lower bidiagonal form B by an orthogonal transformation: Q^HAP=B
Declaration
public static cusolverStatus cusolverDnDgebrd(cusolverDnHandle handle, int m, int n, CUdeviceptr A, int lda, CUdeviceptr D, CUdeviceptr E, CUdeviceptr TAUQ, CUdeviceptr TAUP, CUdeviceptr Work, int Lwork, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | D | array of dimension min(m,n). The diagonal elements of the bidiagonal matrix B: D(i) = A(i,i). |
| CUdeviceptr | E | array of dimension min(m,n). The off-diagonal elements of the bidiagonal matrix B: if m>=n, E(i) = A(i,i+1) for i = 1,2,...,n-1; if m<n, E(i) = A(i+1,i) for i = 1,2,...,m-1. |
| CUdeviceptr | TAUQ | array of dimension min(m,n). The scalar factors of the elementary reflectors which represent the orthogonal matrix Q. |
| CUdeviceptr | TAUP | array of dimension min(m,n). The scalar factors of the elementary reflectors which represent the orthogonal matrix P. |
| CUdeviceptr | Work | working space, array of size Lwork. |
| System.Int32 | Lwork | size of Work, returned by gebrd_bufferSize. |
| CUdeviceptr | devInfo | if devInfo = 0, the operation is successful. if devInfo = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDgebrd_bufferSize(cusolverDnHandle, Int32, Int32, ref Int32)
This function reduces a general real m×n matrix A to upper or lower bidiagonal form B by an orthogonal transformation: Q^HAP=B
Declaration
public static cusolverStatus cusolverDnDgebrd_bufferSize(cusolverDnHandle handle, int m, int n, ref int Lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| System.Int32 | Lwork | size of Work, returned by gebrd_bufferSize. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDgeqrf(cusolverDnHandle, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
This function computes the QR factorization of a m×n matrix A=Q*R where A is a m×n matrix, Q is a m×n matrix, and R is a n×n upper triangular matrix.
Declaration
public static cusolverStatus cusolverDnDgeqrf(cusolverDnHandle handle, int m, int n, CUdeviceptr A, int lda, CUdeviceptr TAU, CUdeviceptr Workspace, int Lwork, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | TAU | array of dimension at least min(m,n). |
| CUdeviceptr | Workspace | working space, array of size Lwork. |
| System.Int32 | Lwork | size of working array Workspace. |
| CUdeviceptr | devInfo | if info = 0, the LU factorization is successful. if info = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDgeqrf_bufferSize(cusolverDnHandle, Int32, Int32, CUdeviceptr, Int32, ref Int32)
This function computes the QR factorization of a m×n matrix A=Q*R where A is a m×n matrix, Q is a m×n matrix, and R is a n×n upper triangular matrix.
Declaration
public static cusolverStatus cusolverDnDgeqrf_bufferSize(cusolverDnHandle handle, int m, int n, CUdeviceptr A, int lda, ref int Lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| System.Int32 | Lwork | size of working array Workspace. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDgesvd(cusolverDnHandle, Char, Char, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr)
This function computes the singular value decomposition (SVD) of a m×n matrix A and corresponding the left and/or right singular vectors.
Declaration
public static cusolverStatus cusolverDnDgesvd(cusolverDnHandle handle, char jobu, char jobvt, int m, int n, CUdeviceptr A, int lda, CUdeviceptr S, CUdeviceptr U, int ldu, CUdeviceptr VT, int ldvt, CUdeviceptr Work, int Lwork, CUdeviceptr rwork, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Char | jobu | specifies options for computing all or part of the matrix U: = 'A': all m columns of U are returned in array U: = 'S': the first min(m,n) columns of U (the left singular vectors) are returned in the array U; = 'O': the first min(m,n) columns of U (the left singular vectors) are overwritten on the array A; = 'N': no columns of U (no left singular vectors) are computed. |
| System.Char | jobvt | specifies options for computing all or part of the matrix VT: = 'A': all N rows of VT are returned in the array VT; = 'S': the first min(m,n) rows of VT (the right singular vectors) are returned in the array VT; = 'O': the first min(m,n) rows of VT (the right singular vectors) are overwritten on the array A; = 'N': no rows of V**T (no right singular vectors) are computed. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). On exit, the contents of A are destroyed. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | S | array of dimension min(m,n). The singular values of A, sorted so that S(i)
|
| CUdeviceptr | U | array of dimension ldu * m with ldu is not less than max(1,m). U contains the m×m unitary matrix U. |
| System.Int32 | ldu | leading dimension of two-dimensional array used to store matrix U. |
| CUdeviceptr | VT | array of dimension ldvt * n with ldvt is not less than max(1,n). VT contains the n×n unitary matrix V**T. |
| System.Int32 | ldvt | leading dimension of two-dimensional array used to store matrix Vt. |
| CUdeviceptr | Work | working space, array of size Lwork. |
| System.Int32 | Lwork | size of Work, returned by gesvd_bufferSize. |
| CUdeviceptr | rwork | |
| CUdeviceptr | devInfo | if devInfo = 0, the operation is successful. if devInfo = -i, the ith parameter is wrong. if devInfo > 0, devInfo indicates how many superdiagonals of an intermediate bidiagonal form B did not converge to zero. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDgesvd_bufferSize(cusolverDnHandle, Int32, Int32, ref Int32)
This function computes the singular value decomposition (SVD) of a m×n matrix A and corresponding the left and/or right singular vectors.
Declaration
public static cusolverStatus cusolverDnDgesvd_bufferSize(cusolverDnHandle handle, int m, int n, ref int Lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| System.Int32 | Lwork | size of Work, returned by gesvd_bufferSize. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDgetrf(cusolverDnHandle, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, CUdeviceptr)
This function computes the LU factorization of a m×n matrix PA=LU where A is a m×n matrix, P is a permutation matrix, L is a lower triangular matrix with unit diagonal, and U is an upper triangular matrix.
Declaration
public static cusolverStatus cusolverDnDgetrf(cusolverDnHandle handle, int m, int n, CUdeviceptr A, int lda, CUdeviceptr Workspace, CUdeviceptr devIpiv, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | Workspace | working space, array of size Lwork. |
| CUdeviceptr | devIpiv | array of size at least min(m,n), containing pivot indices. |
| CUdeviceptr | devInfo | if devInfo = 0, the LU factorization is successful. if devInfo = -i, the i-th parameter is wrong. if devInfo = i, the U(i,i) = 0. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDgetrf_bufferSize(cusolverDnHandle, Int32, Int32, CUdeviceptr, Int32, ref Int32)
This function computes the LU factorization of a m×n matrix PA=LU where A is a m×n matrix, P is a permutation matrix, L is a lower triangular matrix with unit diagonal, and U is an upper triangular matrix.
Declaration
public static cusolverStatus cusolverDnDgetrf_bufferSize(cusolverDnHandle handle, int m, int n, CUdeviceptr A, int lda, ref int Lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| System.Int32 | Lwork | size of Workspace |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDgetrs(cusolverDnHandle, Operation, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
This function solves a linear system of multiple right-hand sides op(A)*X=B.
Declaration
public static cusolverStatus cusolverDnDgetrs(cusolverDnHandle handle, Operation trans, int n, int nrhs, CUdeviceptr A, int lda, CUdeviceptr devIpiv, CUdeviceptr B, int ldb, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| Operation | trans | operation op(A) that is non- or (conj.) transpose. |
| System.Int32 | n | number of rows and columns of matrix A. |
| System.Int32 | nrhs | number of right-hand sides. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | devIpiv | array of size at least n, containing pivot indices. |
| CUdeviceptr | B | array of dimension ldb * nrhs with ldb is not less than max(1,n). |
| System.Int32 | ldb | leading dimension of two-dimensional array used to store matrix B. |
| CUdeviceptr | devInfo | if devInfo = 0, the operation is successful. if devInfo = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDlaswp(cusolverDnHandle, Int32, CUdeviceptr, Int32, Int32, Int32, CUdeviceptr, Int32)
Declaration
public static cusolverStatus cusolverDnDlaswp(cusolverDnHandle handle, int n, CUdeviceptr A, int lda, int k1, int k2, CUdeviceptr devIpiv, int incx)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | |
| System.Int32 | n | |
| CUdeviceptr | A | |
| System.Int32 | lda | |
| System.Int32 | k1 | |
| System.Int32 | k2 | |
| CUdeviceptr | devIpiv | |
| System.Int32 | incx |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDorgbr(cusolverDnHandle, SideMode, Int32, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
generates one of the unitary matrices Q or P**T determined by GEBRD
Declaration
public static cusolverStatus cusolverDnDorgbr(cusolverDnHandle handle, SideMode side, int m, int n, int k, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr work, int lwork, CUdeviceptr info)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| SideMode | side | if side = CUBLAS_SIDE_LEFT, generate Q. if side = CUBLAS_SIDE_RIGHT, generate P**T. |
| System.Int32 | m | number of rows of matrix Q or P**T. |
| System.Int32 | n | if side = CUBLAS_SIDE_LEFT, m>= n>= min(m,k). if side = CUBLAS_SIDE_RIGHT, n>= m>= min(n,k). |
| System.Int32 | k | if side = CUBLAS_SIDE_LEFT, the number of columns in the original mby- k matrix reduced by gebrd. if side = CUBLAS_SIDE_RIGHT, the number of rows in the original k-by-n matrix reduced by gebrd. |
| CUdeviceptr | A | array of dimension lda * n On entry, the vectors which define the elementary reflectors, as returned by gebrd. On exit, the m-by-n matrix Q or P**T. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m); |
| CUdeviceptr | tau | array of dimension min(m,k) if side is CUBLAS_SIDE_LEFT; of dimension min(n,k) if side is CUBLAS_SIDE_RIGHT; tau(i) must contain the scalar factor of the elementary reflector H(i) or G(i), which determines Q or P**T, as returned by gebrd in its array argument TAUQ or TAUP. |
| CUdeviceptr | work | working space, array of size lwork. |
| System.Int32 | lwork | size of working array work. |
| CUdeviceptr | info | if info = 0, the ormqr is successful. if info = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDorgbr_bufferSize(cusolverDnHandle, SideMode, Int32, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, ref Int32)
generates one of the unitary matrices Q or P**T determined by GEBRD
Declaration
public static cusolverStatus cusolverDnDorgbr_bufferSize(cusolverDnHandle handle, SideMode side, int m, int n, int k, CUdeviceptr A, int lda, CUdeviceptr tau, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| SideMode | side | if side = CUBLAS_SIDE_LEFT, generate Q. if side = CUBLAS_SIDE_RIGHT, generate P**T. |
| System.Int32 | m | number of rows of matrix Q or P**T. |
| System.Int32 | n | if side = CUBLAS_SIDE_LEFT, m>= n>= min(m,k). if side = CUBLAS_SIDE_RIGHT, n>= m>= min(n,k). |
| System.Int32 | k | if side = CUBLAS_SIDE_LEFT, the number of columns in the original mby- k matrix reduced by gebrd. if side = CUBLAS_SIDE_RIGHT, the number of rows in the original k-by-n matrix reduced by gebrd. |
| CUdeviceptr | A | array of dimension lda * n On entry, the vectors which define the elementary reflectors, as returned by gebrd. On exit, the m-by-n matrix Q or P**T. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m); |
| CUdeviceptr | tau | array of dimension min(m,k) if side is CUBLAS_SIDE_LEFT; of dimension min(n,k) if side is CUBLAS_SIDE_RIGHT; tau(i) must contain the scalar factor of the elementary reflector H(i) or G(i), which determines Q or P**T, as returned by gebrd in its array argument TAUQ or TAUP. |
| System.Int32 | lwork | size of working array work. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDorgqr(cusolverDnHandle, Int32, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
generate unitary matrix Q from QR factorization
Declaration
public static cusolverStatus cusolverDnDorgqr(cusolverDnHandle handle, int m, int n, int k, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr work, int lwork, CUdeviceptr info)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix Q. m >= 0; |
| System.Int32 | n | number of columns of matrix Q. m >= n >= 0; |
| System.Int32 | k | number of elementary relfections whose product defines the matrix Q. n >= k >= 0; |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). i-th column of A contains elementary reflection vector. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m). |
| CUdeviceptr | tau | array of dimension k. tau(i) is the scalar of i-th elementary reflection vector. |
| CUdeviceptr | work | working space, rray of size lwork. |
| System.Int32 | lwork | size of working array work. |
| CUdeviceptr | info | if info = 0, the orgqr is successful. if info = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDorgqr_bufferSize(cusolverDnHandle, Int32, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, ref Int32)
generate unitary matrix Q from QR factorization
Declaration
public static cusolverStatus cusolverDnDorgqr_bufferSize(cusolverDnHandle handle, int m, int n, int k, CUdeviceptr A, int lda, CUdeviceptr tau, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix Q. m >= 0; |
| System.Int32 | n | number of columns of matrix Q. m >= n >= 0; |
| System.Int32 | k | number of elementary relfections whose product defines the matrix Q. n >= k >= 0; |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). i-th column of A contains elementary reflection vector. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m). |
| CUdeviceptr | tau | array of dimension k. tau(i) is the scalar of i-th elementary reflection vector. |
| System.Int32 | lwork | size of working array work. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDorgtr(cusolverDnHandle, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
generate unitary Q comes from sytrd
Declaration
public static cusolverStatus cusolverDnDorgtr(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr work, int lwork, CUdeviceptr info)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| FillMode | uplo | uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A contains elementary reflectors from sytrd. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A contains elementary reflectors from sytrd. |
| System.Int32 | n | number of rows (columns) of matrix Q. |
| CUdeviceptr | A | array of dimension lda * n On entry, matrix A from sytrd contains the elementary reflectors. On exit, matrix A contains the n-by-n orthogonal matrix Q. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda >= max(1,n). |
| CUdeviceptr | tau | array of dimension (n-1) tau(i) is the scalar of i-th elementary reflection vector. |
| CUdeviceptr | work | working space, array of size lwork. |
| System.Int32 | lwork | size of working array work. |
| CUdeviceptr | info | if info = 0, the orgtr is successful. if info = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDorgtr_bufferSize(cusolverDnHandle, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, ref Int32)
generate unitary Q comes from sytrd
Declaration
public static cusolverStatus cusolverDnDorgtr_bufferSize(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr tau, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| FillMode | uplo | uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A contains elementary reflectors from sytrd. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A contains elementary reflectors from sytrd. |
| System.Int32 | n | number of rows (columns) of matrix Q. |
| CUdeviceptr | A | array of dimension lda * n On entry, matrix A from sytrd contains the elementary reflectors. On exit, matrix A contains the n-by-n orthogonal matrix Q. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda >= max(1,n). |
| CUdeviceptr | tau | array of dimension (n-1) tau(i) is the scalar of i-th elementary reflection vector. |
| System.Int32 | lwork | size of working array work. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDormqr(cusolverDnHandle, SideMode, Operation, Int32, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr)
This function overwrites m×n matrix C by
Declaration
public static cusolverStatus cusolverDnDormqr(cusolverDnHandle handle, SideMode side, Operation trans, int m, int n, int k, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr C, int ldc, CUdeviceptr work, int lwork, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| SideMode | side | indicates if matrix Q is on the left or right of C. |
| Operation | trans | operation op(Q) that is non- or (conj.) transpose. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| System.Int32 | k | number of elementary relfections. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | tau | array of dimension at least min(m,n). The vector tau is from geqrf, so tau(i) is the scalar of i-th elementary reflection vector. |
| CUdeviceptr | C | array of size ldc * n. On exit, C is overwritten by op(Q)*C. |
| System.Int32 | ldc | leading dimension of two-dimensional array of matrix C. ldc >= max(1,m). |
| CUdeviceptr | work | working space, array of size lwork. |
| System.Int32 | lwork | size of working array work. |
| CUdeviceptr | devInfo | if info = 0, the ormqr is successful. if info = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDormqr_bufferSize(cusolverDnHandle, SideMode, Operation, Int32, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, ref Int32)
This function computes the QR factorization of a m×n matrix A=Q*R where A is a m×n matrix, Q is a m×n matrix, and R is a n×n upper triangular matrix.
Declaration
public static cusolverStatus cusolverDnDormqr_bufferSize(cusolverDnHandle handle, SideMode side, Operation trans, int m, int n, int k, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr C, int ldc, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| SideMode | side | indicates if matrix Q is on the left or right of C. |
| Operation | trans | operation op(Q) that is non- or (conj.) transpose. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| System.Int32 | k | number of elementary relfections. |
| CUdeviceptr | A | array of dimension lda * k with lda is not less than max(1,m). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | tau | array of dimension at least min(m,n). |
| CUdeviceptr | C | array of size ldc * n. On exit, C is overwritten by op(Q)*C. |
| System.Int32 | ldc | leading dimension of two-dimensional array of matrix C. ldc >= max(1,m). |
| System.Int32 | lwork | size of working array Workspace. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDormtr(cusolverDnHandle, SideMode, FillMode, Operation, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr)
This function overwrites m×n matrix C by
Declaration
public static cusolverStatus cusolverDnDormtr(cusolverDnHandle handle, SideMode side, FillMode uplo, Operation trans, int m, int n, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr C, int ldc, CUdeviceptr work, int lwork, CUdeviceptr info)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| SideMode | side | side = CUBLAS_SIDE_LEFT, apply Q or QT from the Left; side = CUBLAS_SIDE_RIGHT, apply Q or QT from the Right. |
| FillMode | uplo | specifies which part of A and B are stored. |
| Operation | trans | operation op(Q) that is non- or (conj.) transpose. |
| System.Int32 | m | number of rows of matrix C. |
| System.Int32 | n | number of columns of matrix C. |
| CUdeviceptr | A | array of dimension lda * m if side = CUBLAS_SIDE_LEFT; lda * n if side = CUBLAS_SIDE_RIGHT. The matrix A from sytrd contains the elementary reflectors. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. if side is CUBLAS_SIDE_LEFT, lda >= max(1,m); if side is CUBLAS_SIDE_RIGHT, lda >= max(1,n). |
| CUdeviceptr | tau | array of dimension (m-1) if side is CUBLAS_SIDE_LEFT; of dimension (n-1) if side is CUBLAS_SIDE_RIGHT; The vector tau is from sytrd, so tau(i) is the scalar of i-th elementary reflection vector. |
| CUdeviceptr | C | array of size ldc * n. On exit, C is overwritten by op(Q)C or Cop(Q). |
| System.Int32 | ldc | leading dimension of two-dimensional array of matrix C. ldc >= max(1,m). |
| CUdeviceptr | work | working space, array of size lwork. |
| System.Int32 | lwork | size of working array work. |
| CUdeviceptr | info | if info = 0, the ormqr is successful. if info = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDormtr_bufferSize(cusolverDnHandle, SideMode, FillMode, Operation, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, ref Int32)
This function overwrites m×n matrix C by
Declaration
public static cusolverStatus cusolverDnDormtr_bufferSize(cusolverDnHandle handle, SideMode side, FillMode uplo, Operation trans, int m, int n, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr C, int ldc, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| SideMode | side | side = CUBLAS_SIDE_LEFT, apply Q or QT from the Left; side = CUBLAS_SIDE_RIGHT, apply Q or QT from the Right. |
| FillMode | uplo | specifies which part of A and B are stored. |
| Operation | trans | operation op(Q) that is non- or (conj.) transpose. |
| System.Int32 | m | number of rows of matrix C. |
| System.Int32 | n | number of columns of matrix C. |
| CUdeviceptr | A | array of dimension lda * m if side = CUBLAS_SIDE_LEFT; lda * n if side = CUBLAS_SIDE_RIGHT. The matrix A from sytrd contains the elementary reflectors. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. if side is CUBLAS_SIDE_LEFT, lda >= max(1,m); if side is CUBLAS_SIDE_RIGHT, lda >= max(1,n). |
| CUdeviceptr | tau | array of dimension (m-1) if side is CUBLAS_SIDE_LEFT; of dimension (n-1) if side is CUBLAS_SIDE_RIGHT; The vector tau is from sytrd, so tau(i) is the scalar of i-th elementary reflection vector. |
| CUdeviceptr | C | array of size ldc * n. On exit, C is overwritten by op(Q)C or Cop(Q). |
| System.Int32 | ldc | leading dimension of two-dimensional array of matrix C. ldc >= max(1,m). |
| System.Int32 | lwork | size of working array work. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDpotrf(cusolverDnHandle, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr)
This function computes the Cholesky factorization of a Hermitian positive-definite matrix.
Declaration
public static cusolverStatus cusolverDnDpotrf(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr Workspace, int Lwork, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| FillMode | uplo | indicates if matrix A lower or upper part is stored, the other part is not referenced. |
| System.Int32 | n | number of rows and columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | Workspace | working space, array of size Lwork. |
| System.Int32 | Lwork | size of Workspace |
| CUdeviceptr | devInfo | if devInfo = 0, the Cholesky factorization is successful. if devInfo = -i, the i-th parameter is wrong. if devInfo = i, the leading minor of order i is not positive definite. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDpotrf_bufferSize(cusolverDnHandle, FillMode, Int32, CUdeviceptr, Int32, ref Int32)
This function computes the Cholesky factorization of a Hermitian positive-definite matrix.
Declaration
public static cusolverStatus cusolverDnDpotrf_bufferSize(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, ref int Lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| FillMode | uplo | indicates if matrix A lower or upper part is stored, the other part is not referenced. |
| System.Int32 | n | number of rows and columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| System.Int32 | Lwork | size of Workspace |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDpotrs(cusolverDnHandle, FillMode, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr)
This function solves a system of linear equations A*X=B where A is a n×n Hermitian matrix, only lower or upper part is meaningful.
Declaration
public static cusolverStatus cusolverDnDpotrs(cusolverDnHandle handle, FillMode uplo, int n, int nrhs, CUdeviceptr A, int lda, CUdeviceptr B, int ldb, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| FillMode | uplo | indicates if matrix A lower or upper part is stored, the other part is not referenced. |
| System.Int32 | n | number of rows and columns of matrix A. |
| System.Int32 | nrhs | number of columns of matrix X and B. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). A is either lower cholesky factor L or upper Cholesky factor U. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | B | array of dimension ldb * nrhs. ldb is not less than max(1,n). As an input, B is right hand side matrix. As an output, B is the solution matrix. |
| System.Int32 | ldb | leading dimension of two-dimensional array used to store matrix B. |
| CUdeviceptr | devInfo | if devInfo = 0, the Cholesky factorization is successful. if devInfo = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDsyevd(cusolverDnHandle, cusolverEigMode, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
This function computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix A.
Declaration
public static cusolverStatus cusolverDnDsyevd(cusolverDnHandle handle, cusolverEigMode jobz, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr W, CUdeviceptr work, int lwork, CUdeviceptr info)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| cusolverEigMode | jobz | specifies options to either compute eigenvalue only or compute eigen-pair. |
| FillMode | uplo | specifies which part of A and B are stored. |
| System.Int32 | n | number of rows (or columns) of matrix A and B. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n). |
| CUdeviceptr | W | a real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1). |
| CUdeviceptr | work | working space, array of size lwork. |
| System.Int32 | lwork | size of work, returned by sygvd_bufferSize. |
| CUdeviceptr | info | if devInfo = 0, the operation is successful. if devInfo = -i, the i-th parameter is wrong. if devInfo = i (>0), devInfo indicates either potrf or syevd is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDsyevd_bufferSize(cusolverDnHandle, cusolverEigMode, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, ref Int32)
This function computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix A.
Declaration
public static cusolverStatus cusolverDnDsyevd_bufferSize(cusolverDnHandle handle, cusolverEigMode jobz, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr W, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| cusolverEigMode | jobz | specifies options to either compute eigenvalue only or compute eigen-pair. |
| FillMode | uplo | specifies which part of A and B are stored. |
| System.Int32 | n | number of rows (or columns) of matrix A and B. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n). |
| CUdeviceptr | W | a real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1). |
| System.Int32 | lwork | size of work. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDsygvd(cusolverDnHandle, cusolverEigType, cusolverEigMode, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
This function computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix-pair (A,B).
Declaration
public static cusolverStatus cusolverDnDsygvd(cusolverDnHandle handle, cusolverEigType itype, cusolverEigMode jobz, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr B, int ldb, CUdeviceptr W, CUdeviceptr work, int lwork, CUdeviceptr info)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| cusolverEigType | itype | Specifies the problem type to be solved. |
| cusolverEigMode | jobz | specifies options to either compute eigenvalue only or compute eigen-pair. |
| FillMode | uplo | specifies which part of A and B are stored. |
| System.Int32 | n | number of rows (or columns) of matrix A and B. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n). |
| CUdeviceptr | B | array of dimension ldb * n. |
| System.Int32 | ldb | leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n). |
| CUdeviceptr | W | a real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1). |
| CUdeviceptr | work | working space, array of size lwork. |
| System.Int32 | lwork | size of work, returned by sygvd_bufferSize. |
| CUdeviceptr | info | if devInfo = 0, the operation is successful. if devInfo = -i, the i-th parameter is wrong. if devInfo = i (>0), devInfo indicates either potrf or syevd is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDsygvd_bufferSize(cusolverDnHandle, cusolverEigType, cusolverEigMode, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, ref Int32)
The helper functions below can calculate the sizes needed for pre-allocated buffer.
Declaration
public static cusolverStatus cusolverDnDsygvd_bufferSize(cusolverDnHandle handle, cusolverEigType itype, cusolverEigMode jobz, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr B, int ldb, CUdeviceptr W, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| cusolverEigType | itype | Specifies the problem type to be solved. |
| cusolverEigMode | jobz | specifies options to either compute eigenvalue only or compute eigen-pair. |
| FillMode | uplo | specifies which part of A and B are stored. |
| System.Int32 | n | number of rows (or columns) of matrix A and B. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n). |
| CUdeviceptr | B | array of dimension ldb * n. |
| System.Int32 | ldb | leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n). |
| CUdeviceptr | W | a real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1). |
| System.Int32 | lwork | size of work |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDsytrd(cusolverDnHandle, Char, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
Declaration
public static cusolverStatus cusolverDnDsytrd(cusolverDnHandle handle, char uplo, int n, CUdeviceptr A, int lda, CUdeviceptr D, CUdeviceptr E, CUdeviceptr tau, CUdeviceptr Work, int Lwork, CUdeviceptr info)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | |
| System.Char | uplo | |
| System.Int32 | n | |
| CUdeviceptr | A | |
| System.Int32 | lda | |
| CUdeviceptr | D | |
| CUdeviceptr | E | |
| CUdeviceptr | tau | |
| CUdeviceptr | Work | |
| System.Int32 | Lwork | |
| CUdeviceptr | info |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDsytrd_bufferSize(cusolverDnHandle, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, CUdeviceptr, ref Int32)
Declaration
public static cusolverStatus cusolverDnDsytrd_bufferSize(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr d, CUdeviceptr e, CUdeviceptr tau, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | |
| FillMode | uplo | |
| System.Int32 | n | |
| CUdeviceptr | A | |
| System.Int32 | lda | |
| CUdeviceptr | d | |
| CUdeviceptr | e | |
| CUdeviceptr | tau | |
| System.Int32 | lwork |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDsytrf(cusolverDnHandle, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
This function computes the Bunch-Kaufman factorization of a n×n symmetric indefinite matrix.
Declaration
public static cusolverStatus cusolverDnDsytrf(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr ipiv, CUdeviceptr work, int lwork, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| FillMode | uplo | indicates if matrix A lower or upper part is stored, the other part is not referenced. |
| System.Int32 | n | number of rows and columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | ipiv | array of size at least n, containing pivot indices. |
| CUdeviceptr | work | working space, array of size lwork. |
| System.Int32 | lwork | size of working space work. |
| CUdeviceptr | devInfo | if devInfo = 0, the LU factorization is successful. if devInfo = -i, the i-th parameter is wrong. if devInfo = i, the D(i,i) = 0. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnDsytrf_bufferSize(cusolverDnHandle, Int32, CUdeviceptr, Int32, ref Int32)
This function computes the Bunch-Kaufman factorization of a n×n symmetric indefinite matrix.
Declaration
public static cusolverStatus cusolverDnDsytrf_bufferSize(cusolverDnHandle handle, int n, CUdeviceptr A, int lda, ref int Lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | n | number of rows and columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| System.Int32 | Lwork | size of working space work. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnGetStream(cusolverDnHandle, ref CUstream)
This function sets the stream to be used by the cuSolverDN library to execute its routines.
Declaration
public static cusolverStatus cusolverDnGetStream(cusolverDnHandle handle, ref CUstream sreamId)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| CUstream | sreamId | the stream to be used by the library. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSetStream(cusolverDnHandle, CUstream)
This function sets the stream to be used by the cuSolverDN library to execute its routines.
Declaration
public static cusolverStatus cusolverDnSetStream(cusolverDnHandle handle, CUstream streamId)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| CUstream | streamId | the stream to be used by the library. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSgebrd(cusolverDnHandle, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, CUdeviceptr, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
This function reduces a general real m×n matrix A to upper or lower bidiagonal form B by an orthogonal transformation: Q^HAP=B
Declaration
public static cusolverStatus cusolverDnSgebrd(cusolverDnHandle handle, int m, int n, CUdeviceptr A, int lda, CUdeviceptr D, CUdeviceptr E, CUdeviceptr TAUQ, CUdeviceptr TAUP, CUdeviceptr Work, int Lwork, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | D | array of dimension min(m,n). The diagonal elements of the bidiagonal matrix B: D(i) = A(i,i). |
| CUdeviceptr | E | array of dimension min(m,n). The off-diagonal elements of the bidiagonal matrix B: if m>=n, E(i) = A(i,i+1) for i = 1,2,...,n-1; if m<n, E(i) = A(i+1,i) for i = 1,2,...,m-1. |
| CUdeviceptr | TAUQ | array of dimension min(m,n). The scalar factors of the elementary reflectors which represent the orthogonal matrix Q. |
| CUdeviceptr | TAUP | array of dimension min(m,n). The scalar factors of the elementary reflectors which represent the orthogonal matrix P. |
| CUdeviceptr | Work | working space, array of size Lwork. |
| System.Int32 | Lwork | size of Work, returned by gebrd_bufferSize. |
| CUdeviceptr | devInfo | if devInfo = 0, the operation is successful. if devInfo = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSgebrd_bufferSize(cusolverDnHandle, Int32, Int32, ref Int32)
This function reduces a general real m×n matrix A to upper or lower bidiagonal form B by an orthogonal transformation: Q^HAP=B
Declaration
public static cusolverStatus cusolverDnSgebrd_bufferSize(cusolverDnHandle handle, int m, int n, ref int Lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| System.Int32 | Lwork | size of Work, returned by gebrd_bufferSize. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSgeqrf(cusolverDnHandle, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
This function computes the QR factorization of a m×n matrix A=Q*R where A is a m×n matrix, Q is a m×n matrix, and R is a n×n upper triangular matrix.
Declaration
public static cusolverStatus cusolverDnSgeqrf(cusolverDnHandle handle, int m, int n, CUdeviceptr A, int lda, CUdeviceptr TAU, CUdeviceptr Workspace, int Lwork, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | TAU | array of dimension at least min(m,n). |
| CUdeviceptr | Workspace | working space, array of size Lwork. |
| System.Int32 | Lwork | size of working array Workspace. |
| CUdeviceptr | devInfo | if info = 0, the LU factorization is successful. if info = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSgeqrf_bufferSize(cusolverDnHandle, Int32, Int32, CUdeviceptr, Int32, ref Int32)
This function computes the QR factorization of a m×n matrix A=Q*R where A is a m×n matrix, Q is a m×n matrix, and R is a n×n upper triangular matrix.
Declaration
public static cusolverStatus cusolverDnSgeqrf_bufferSize(cusolverDnHandle handle, int m, int n, CUdeviceptr A, int lda, ref int Lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| System.Int32 | Lwork | size of working array Workspace. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSgesvd(cusolverDnHandle, Char, Char, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr)
This function computes the singular value decomposition (SVD) of a m×n matrix A and corresponding the left and/or right singular vectors.
Declaration
public static cusolverStatus cusolverDnSgesvd(cusolverDnHandle handle, char jobu, char jobvt, int m, int n, CUdeviceptr A, int lda, CUdeviceptr S, CUdeviceptr U, int ldu, CUdeviceptr VT, int ldvt, CUdeviceptr Work, int Lwork, CUdeviceptr rwork, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Char | jobu | specifies options for computing all or part of the matrix U: = 'A': all m columns of U are returned in array U: = 'S': the first min(m,n) columns of U (the left singular vectors) are returned in the array U; = 'O': the first min(m,n) columns of U (the left singular vectors) are overwritten on the array A; = 'N': no columns of U (no left singular vectors) are computed. |
| System.Char | jobvt | specifies options for computing all or part of the matrix VT: = 'A': all N rows of VT are returned in the array VT; = 'S': the first min(m,n) rows of VT (the right singular vectors) are returned in the array VT; = 'O': the first min(m,n) rows of VT (the right singular vectors) are overwritten on the array A; = 'N': no rows of V**T (no right singular vectors) are computed. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). On exit, the contents of A are destroyed. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | S | array of dimension min(m,n). The singular values of A, sorted so that S(i)
|
| CUdeviceptr | U | array of dimension ldu * m with ldu is not less than max(1,m). U contains the m×m unitary matrix U. |
| System.Int32 | ldu | leading dimension of two-dimensional array used to store matrix U. |
| CUdeviceptr | VT | array of dimension ldvt * n with ldvt is not less than max(1,n). VT contains the n×n unitary matrix V**T. |
| System.Int32 | ldvt | leading dimension of two-dimensional array used to store matrix Vt. |
| CUdeviceptr | Work | working space, array of size Lwork. |
| System.Int32 | Lwork | size of Work, returned by gesvd_bufferSize. |
| CUdeviceptr | rwork | |
| CUdeviceptr | devInfo | if devInfo = 0, the operation is successful. if devInfo = -i, the ith parameter is wrong. if devInfo > 0, devInfo indicates how many superdiagonals of an intermediate bidiagonal form B did not converge to zero. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSgesvd_bufferSize(cusolverDnHandle, Int32, Int32, ref Int32)
This function computes the singular value decomposition (SVD) of a m×n matrix A and corresponding the left and/or right singular vectors.
Declaration
public static cusolverStatus cusolverDnSgesvd_bufferSize(cusolverDnHandle handle, int m, int n, ref int Lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| System.Int32 | Lwork | size of Work, returned by gesvd_bufferSize. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSgetrf(cusolverDnHandle, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, CUdeviceptr)
This function computes the LU factorization of a m×n matrix PA=LU where A is a m×n matrix, P is a permutation matrix, L is a lower triangular matrix with unit diagonal, and U is an upper triangular matrix.
Declaration
public static cusolverStatus cusolverDnSgetrf(cusolverDnHandle handle, int m, int n, CUdeviceptr A, int lda, CUdeviceptr Workspace, CUdeviceptr devIpiv, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | Workspace | working space, array of size Lwork. |
| CUdeviceptr | devIpiv | array of size at least min(m,n), containing pivot indices. |
| CUdeviceptr | devInfo | if devInfo = 0, the LU factorization is successful. if devInfo = -i, the i-th parameter is wrong. if devInfo = i, the U(i,i) = 0. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSgetrf_bufferSize(cusolverDnHandle, Int32, Int32, CUdeviceptr, Int32, ref Int32)
This function computes the LU factorization of a m×n matrix PA=LU where A is a m×n matrix, P is a permutation matrix, L is a lower triangular matrix with unit diagonal, and U is an upper triangular matrix.
Declaration
public static cusolverStatus cusolverDnSgetrf_bufferSize(cusolverDnHandle handle, int m, int n, CUdeviceptr A, int lda, ref int Lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| System.Int32 | Lwork | size of Workspace |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSgetrs(cusolverDnHandle, Operation, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
This function solves a linear system of multiple right-hand sides op(A)*X=B.
Declaration
public static cusolverStatus cusolverDnSgetrs(cusolverDnHandle handle, Operation trans, int n, int nrhs, CUdeviceptr A, int lda, CUdeviceptr devIpiv, CUdeviceptr B, int ldb, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| Operation | trans | operation op(A) that is non- or (conj.) transpose. |
| System.Int32 | n | number of rows and columns of matrix A. |
| System.Int32 | nrhs | number of right-hand sides. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | devIpiv | array of size at least n, containing pivot indices. |
| CUdeviceptr | B | array of dimension ldb * nrhs with ldb is not less than max(1,n). |
| System.Int32 | ldb | leading dimension of two-dimensional array used to store matrix B. |
| CUdeviceptr | devInfo | if devInfo = 0, the operation is successful. if devInfo = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSlaswp(cusolverDnHandle, Int32, CUdeviceptr, Int32, Int32, Int32, CUdeviceptr, Int32)
Declaration
public static cusolverStatus cusolverDnSlaswp(cusolverDnHandle handle, int n, CUdeviceptr A, int lda, int k1, int k2, CUdeviceptr devIpiv, int incx)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | |
| System.Int32 | n | |
| CUdeviceptr | A | |
| System.Int32 | lda | |
| System.Int32 | k1 | |
| System.Int32 | k2 | |
| CUdeviceptr | devIpiv | |
| System.Int32 | incx |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSorgbr(cusolverDnHandle, SideMode, Int32, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
generates one of the unitary matrices Q or P**T determined by GEBRD
Declaration
public static cusolverStatus cusolverDnSorgbr(cusolverDnHandle handle, SideMode side, int m, int n, int k, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr work, int lwork, CUdeviceptr info)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| SideMode | side | if side = CUBLAS_SIDE_LEFT, generate Q. if side = CUBLAS_SIDE_RIGHT, generate P**T. |
| System.Int32 | m | number of rows of matrix Q or P**T. |
| System.Int32 | n | if side = CUBLAS_SIDE_LEFT, m>= n>= min(m,k). if side = CUBLAS_SIDE_RIGHT, n>= m>= min(n,k). |
| System.Int32 | k | if side = CUBLAS_SIDE_LEFT, the number of columns in the original mby- k matrix reduced by gebrd. if side = CUBLAS_SIDE_RIGHT, the number of rows in the original k-by-n matrix reduced by gebrd. |
| CUdeviceptr | A | array of dimension lda * n On entry, the vectors which define the elementary reflectors, as returned by gebrd. On exit, the m-by-n matrix Q or P**T. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m); |
| CUdeviceptr | tau | array of dimension min(m,k) if side is CUBLAS_SIDE_LEFT; of dimension min(n,k) if side is CUBLAS_SIDE_RIGHT; tau(i) must contain the scalar factor of the elementary reflector H(i) or G(i), which determines Q or P**T, as returned by gebrd in its array argument TAUQ or TAUP. |
| CUdeviceptr | work | working space, array of size lwork. |
| System.Int32 | lwork | size of working array work. |
| CUdeviceptr | info | if info = 0, the ormqr is successful. if info = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSorgbr_bufferSize(cusolverDnHandle, SideMode, Int32, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, ref Int32)
generates one of the unitary matrices Q or P**T determined by GEBRD
Declaration
public static cusolverStatus cusolverDnSorgbr_bufferSize(cusolverDnHandle handle, SideMode side, int m, int n, int k, CUdeviceptr A, int lda, CUdeviceptr tau, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| SideMode | side | if side = CUBLAS_SIDE_LEFT, generate Q. if side = CUBLAS_SIDE_RIGHT, generate P**T. |
| System.Int32 | m | number of rows of matrix Q or P**T. |
| System.Int32 | n | if side = CUBLAS_SIDE_LEFT, m>= n>= min(m,k). if side = CUBLAS_SIDE_RIGHT, n>= m>= min(n,k). |
| System.Int32 | k | if side = CUBLAS_SIDE_LEFT, the number of columns in the original mby- k matrix reduced by gebrd. if side = CUBLAS_SIDE_RIGHT, the number of rows in the original k-by-n matrix reduced by gebrd. |
| CUdeviceptr | A | array of dimension lda * n On entry, the vectors which define the elementary reflectors, as returned by gebrd. On exit, the m-by-n matrix Q or P**T. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m); |
| CUdeviceptr | tau | array of dimension min(m,k) if side is CUBLAS_SIDE_LEFT; of dimension min(n,k) if side is CUBLAS_SIDE_RIGHT; tau(i) must contain the scalar factor of the elementary reflector H(i) or G(i), which determines Q or P**T, as returned by gebrd in its array argument TAUQ or TAUP. |
| System.Int32 | lwork | size of working array work. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSorgqr(cusolverDnHandle, Int32, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
generate unitary matrix Q from QR factorization
Declaration
public static cusolverStatus cusolverDnSorgqr(cusolverDnHandle handle, int m, int n, int k, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr work, int lwork, CUdeviceptr info)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix Q. m >= 0; |
| System.Int32 | n | number of columns of matrix Q. m >= n >= 0; |
| System.Int32 | k | number of elementary relfections whose product defines the matrix Q. n >= k >= 0; |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). i-th column of A contains elementary reflection vector. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m). |
| CUdeviceptr | tau | array of dimension k. tau(i) is the scalar of i-th elementary reflection vector. |
| CUdeviceptr | work | working space, rray of size lwork. |
| System.Int32 | lwork | size of working array work. |
| CUdeviceptr | info | if info = 0, the orgqr is successful. if info = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSorgqr_bufferSize(cusolverDnHandle, Int32, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, ref Int32)
generate unitary matrix Q from QR factorization
Declaration
public static cusolverStatus cusolverDnSorgqr_bufferSize(cusolverDnHandle handle, int m, int n, int k, CUdeviceptr A, int lda, CUdeviceptr tau, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix Q. m >= 0; |
| System.Int32 | n | number of columns of matrix Q. m >= n >= 0; |
| System.Int32 | k | number of elementary relfections whose product defines the matrix Q. n >= k >= 0; |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). i-th column of A contains elementary reflection vector. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m). |
| CUdeviceptr | tau | array of dimension k. tau(i) is the scalar of i-th elementary reflection vector. |
| System.Int32 | lwork | size of working array work. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSorgtr(cusolverDnHandle, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
generate unitary Q comes from sytrd
Declaration
public static cusolverStatus cusolverDnSorgtr(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr work, int lwork, CUdeviceptr info)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| FillMode | uplo | uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A contains elementary reflectors from sytrd. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A contains elementary reflectors from sytrd. |
| System.Int32 | n | number of rows (columns) of matrix Q. |
| CUdeviceptr | A | array of dimension lda * n On entry, matrix A from sytrd contains the elementary reflectors. On exit, matrix A contains the n-by-n orthogonal matrix Q. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda >= max(1,n). |
| CUdeviceptr | tau | array of dimension (n-1) tau(i) is the scalar of i-th elementary reflection vector. |
| CUdeviceptr | work | working space, array of size lwork. |
| System.Int32 | lwork | size of working array work. |
| CUdeviceptr | info | if info = 0, the orgtr is successful. if info = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSorgtr_bufferSize(cusolverDnHandle, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, ref Int32)
generate unitary Q comes from sytrd
Declaration
public static cusolverStatus cusolverDnSorgtr_bufferSize(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr tau, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| FillMode | uplo | uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A contains elementary reflectors from sytrd. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A contains elementary reflectors from sytrd. |
| System.Int32 | n | number of rows (columns) of matrix Q. |
| CUdeviceptr | A | array of dimension lda * n On entry, matrix A from sytrd contains the elementary reflectors. On exit, matrix A contains the n-by-n orthogonal matrix Q. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda >= max(1,n). |
| CUdeviceptr | tau | array of dimension (n-1) tau(i) is the scalar of i-th elementary reflection vector. |
| System.Int32 | lwork | size of working array work. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSormqr(cusolverDnHandle, SideMode, Operation, Int32, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr)
This function overwrites m×n matrix C by
Declaration
public static cusolverStatus cusolverDnSormqr(cusolverDnHandle handle, SideMode side, Operation trans, int m, int n, int k, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr C, int ldc, CUdeviceptr work, int lwork, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| SideMode | side | indicates if matrix Q is on the left or right of C. |
| Operation | trans | operation op(Q) that is non- or (conj.) transpose. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| System.Int32 | k | number of elementary relfections. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | tau | array of dimension at least min(m,n). The vector tau is from geqrf, so tau(i) is the scalar of i-th elementary reflection vector. |
| CUdeviceptr | C | array of size ldc * n. On exit, C is overwritten by op(Q)*C. |
| System.Int32 | ldc | leading dimension of two-dimensional array of matrix C. ldc >= max(1,m). |
| CUdeviceptr | work | working space, array of size lwork. |
| System.Int32 | lwork | size of working array work. |
| CUdeviceptr | devInfo | if info = 0, the ormqr is successful. if info = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSormqr_bufferSize(cusolverDnHandle, SideMode, Operation, Int32, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, ref Int32)
This function computes the QR factorization of a m×n matrix A=Q*R where A is a m×n matrix, Q is a m×n matrix, and R is a n×n upper triangular matrix.
Declaration
public static cusolverStatus cusolverDnSormqr_bufferSize(cusolverDnHandle handle, SideMode side, Operation trans, int m, int n, int k, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr C, int ldc, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| SideMode | side | indicates if matrix Q is on the left or right of C. |
| Operation | trans | operation op(Q) that is non- or (conj.) transpose. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| System.Int32 | k | number of elementary relfections. |
| CUdeviceptr | A | array of dimension lda * k with lda is not less than max(1,m). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | tau | array of dimension at least min(m,n). |
| CUdeviceptr | C | array of size ldc * n. On exit, C is overwritten by op(Q)*C. |
| System.Int32 | ldc | leading dimension of two-dimensional array of matrix C. ldc >= max(1,m). |
| System.Int32 | lwork | size of working array Workspace. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSormtr(cusolverDnHandle, SideMode, FillMode, Operation, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr)
This function overwrites m×n matrix C by
Declaration
public static cusolverStatus cusolverDnSormtr(cusolverDnHandle handle, SideMode side, FillMode uplo, Operation trans, int m, int n, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr C, int ldc, CUdeviceptr work, int lwork, CUdeviceptr info)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| SideMode | side | side = CUBLAS_SIDE_LEFT, apply Q or QT from the Left; side = CUBLAS_SIDE_RIGHT, apply Q or QT from the Right. |
| FillMode | uplo | specifies which part of A and B are stored. |
| Operation | trans | operation op(Q) that is non- or (conj.) transpose. |
| System.Int32 | m | number of rows of matrix C. |
| System.Int32 | n | number of columns of matrix C. |
| CUdeviceptr | A | array of dimension lda * m if side = CUBLAS_SIDE_LEFT; lda * n if side = CUBLAS_SIDE_RIGHT. The matrix A from sytrd contains the elementary reflectors. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. if side is CUBLAS_SIDE_LEFT, lda >= max(1,m); if side is CUBLAS_SIDE_RIGHT, lda >= max(1,n). |
| CUdeviceptr | tau | array of dimension (m-1) if side is CUBLAS_SIDE_LEFT; of dimension (n-1) if side is CUBLAS_SIDE_RIGHT; The vector tau is from sytrd, so tau(i) is the scalar of i-th elementary reflection vector. |
| CUdeviceptr | C | array of size ldc * n. On exit, C is overwritten by op(Q)C or Cop(Q). |
| System.Int32 | ldc | leading dimension of two-dimensional array of matrix C. ldc >= max(1,m). |
| CUdeviceptr | work | working space, array of size lwork. |
| System.Int32 | lwork | size of working array work. |
| CUdeviceptr | info | if info = 0, the ormqr is successful. if info = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSormtr_bufferSize(cusolverDnHandle, SideMode, FillMode, Operation, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, ref Int32)
This function overwrites m×n matrix C by
Declaration
public static cusolverStatus cusolverDnSormtr_bufferSize(cusolverDnHandle handle, SideMode side, FillMode uplo, Operation trans, int m, int n, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr C, int ldc, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| SideMode | side | side = CUBLAS_SIDE_LEFT, apply Q or QT from the Left; side = CUBLAS_SIDE_RIGHT, apply Q or QT from the Right. |
| FillMode | uplo | specifies which part of A and B are stored. |
| Operation | trans | operation op(Q) that is non- or (conj.) transpose. |
| System.Int32 | m | number of rows of matrix C. |
| System.Int32 | n | number of columns of matrix C. |
| CUdeviceptr | A | array of dimension lda * m if side = CUBLAS_SIDE_LEFT; lda * n if side = CUBLAS_SIDE_RIGHT. The matrix A from sytrd contains the elementary reflectors. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. if side is CUBLAS_SIDE_LEFT, lda >= max(1,m); if side is CUBLAS_SIDE_RIGHT, lda >= max(1,n). |
| CUdeviceptr | tau | array of dimension (m-1) if side is CUBLAS_SIDE_LEFT; of dimension (n-1) if side is CUBLAS_SIDE_RIGHT; The vector tau is from sytrd, so tau(i) is the scalar of i-th elementary reflection vector. |
| CUdeviceptr | C | array of size ldc * n. On exit, C is overwritten by op(Q)C or Cop(Q). |
| System.Int32 | ldc | leading dimension of two-dimensional array of matrix C. ldc >= max(1,m). |
| System.Int32 | lwork | size of working array work. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSpotrf(cusolverDnHandle, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr)
This function computes the Cholesky factorization of a Hermitian positive-definite matrix.
Declaration
public static cusolverStatus cusolverDnSpotrf(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr Workspace, int Lwork, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| FillMode | uplo | indicates if matrix A lower or upper part is stored, the other part is not referenced. |
| System.Int32 | n | number of rows and columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | Workspace | working space, array of size Lwork. |
| System.Int32 | Lwork | size of Workspace |
| CUdeviceptr | devInfo | if devInfo = 0, the Cholesky factorization is successful. if devInfo = -i, the i-th parameter is wrong. if devInfo = i, the leading minor of order i is not positive definite. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSpotrf_bufferSize(cusolverDnHandle, FillMode, Int32, CUdeviceptr, Int32, ref Int32)
This function computes the Cholesky factorization of a Hermitian positive-definite matrix.
Declaration
public static cusolverStatus cusolverDnSpotrf_bufferSize(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, ref int Lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| FillMode | uplo | indicates if matrix A lower or upper part is stored, the other part is not referenced. |
| System.Int32 | n | number of rows and columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| System.Int32 | Lwork | size of Workspace |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSpotrs(cusolverDnHandle, FillMode, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr)
This function solves a system of linear equations A*X=B where A is a n×n Hermitian matrix, only lower or upper part is meaningful.
Declaration
public static cusolverStatus cusolverDnSpotrs(cusolverDnHandle handle, FillMode uplo, int n, int nrhs, CUdeviceptr A, int lda, CUdeviceptr B, int ldb, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| FillMode | uplo | indicates if matrix A lower or upper part is stored, the other part is not referenced. |
| System.Int32 | n | number of rows and columns of matrix A. |
| System.Int32 | nrhs | number of columns of matrix X and B. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). A is either lower cholesky factor L or upper Cholesky factor U. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | B | array of dimension ldb * nrhs. ldb is not less than max(1,n). As an input, B is right hand side matrix. As an output, B is the solution matrix. |
| System.Int32 | ldb | leading dimension of two-dimensional array used to store matrix B. |
| CUdeviceptr | devInfo | if devInfo = 0, the Cholesky factorization is successful. if devInfo = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSsyevd(cusolverDnHandle, cusolverEigMode, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
This function computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix A.
Declaration
public static cusolverStatus cusolverDnSsyevd(cusolverDnHandle handle, cusolverEigMode jobz, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr W, CUdeviceptr work, int lwork, CUdeviceptr info)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| cusolverEigMode | jobz | specifies options to either compute eigenvalue only or compute eigen-pair. |
| FillMode | uplo | specifies which part of A and B are stored. |
| System.Int32 | n | number of rows (or columns) of matrix A and B. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n). |
| CUdeviceptr | W | a real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1). |
| CUdeviceptr | work | working space, array of size lwork. |
| System.Int32 | lwork | size of work, returned by sygvd_bufferSize. |
| CUdeviceptr | info | if devInfo = 0, the operation is successful. if devInfo = -i, the i-th parameter is wrong. if devInfo = i (>0), devInfo indicates either potrf or syevd is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSsyevd_bufferSize(cusolverDnHandle, cusolverEigMode, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, ref Int32)
This function computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix A.
Declaration
public static cusolverStatus cusolverDnSsyevd_bufferSize(cusolverDnHandle handle, cusolverEigMode jobz, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr W, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| cusolverEigMode | jobz | specifies options to either compute eigenvalue only or compute eigen-pair. |
| FillMode | uplo | specifies which part of A and B are stored. |
| System.Int32 | n | number of rows (or columns) of matrix A and B. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n). |
| CUdeviceptr | W | a real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1). |
| System.Int32 | lwork | size of work. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSsygvd(cusolverDnHandle, cusolverEigType, cusolverEigMode, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
This function computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix-pair (A,B).
Declaration
public static cusolverStatus cusolverDnSsygvd(cusolverDnHandle handle, cusolverEigType itype, cusolverEigMode jobz, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr B, int ldb, CUdeviceptr W, CUdeviceptr work, int lwork, CUdeviceptr info)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| cusolverEigType | itype | Specifies the problem type to be solved. |
| cusolverEigMode | jobz | specifies options to either compute eigenvalue only or compute eigen-pair. |
| FillMode | uplo | specifies which part of A and B are stored. |
| System.Int32 | n | number of rows (or columns) of matrix A and B. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n). |
| CUdeviceptr | B | array of dimension ldb * n. |
| System.Int32 | ldb | leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n). |
| CUdeviceptr | W | a real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1). |
| CUdeviceptr | work | working space, array of size lwork. |
| System.Int32 | lwork | size of work, returned by sygvd_bufferSize. |
| CUdeviceptr | info | if devInfo = 0, the operation is successful. if devInfo = -i, the i-th parameter is wrong. if devInfo = i (>0), devInfo indicates either potrf or syevd is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSsygvd_bufferSize(cusolverDnHandle, cusolverEigType, cusolverEigMode, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, ref Int32)
The helper functions below can calculate the sizes needed for pre-allocated buffer.
Declaration
public static cusolverStatus cusolverDnSsygvd_bufferSize(cusolverDnHandle handle, cusolverEigType itype, cusolverEigMode jobz, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr B, int ldb, CUdeviceptr W, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| cusolverEigType | itype | Specifies the problem type to be solved. |
| cusolverEigMode | jobz | specifies options to either compute eigenvalue only or compute eigen-pair. |
| FillMode | uplo | specifies which part of A and B are stored. |
| System.Int32 | n | number of rows (or columns) of matrix A and B. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n). |
| CUdeviceptr | B | array of dimension ldb * n. |
| System.Int32 | ldb | leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n). |
| CUdeviceptr | W | a real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1). |
| System.Int32 | lwork | size of work |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSsytrd(cusolverDnHandle, Char, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
Declaration
public static cusolverStatus cusolverDnSsytrd(cusolverDnHandle handle, char uplo, int n, CUdeviceptr A, int lda, CUdeviceptr D, CUdeviceptr E, CUdeviceptr tau, CUdeviceptr Work, int Lwork, CUdeviceptr info)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | |
| System.Char | uplo | |
| System.Int32 | n | |
| CUdeviceptr | A | |
| System.Int32 | lda | |
| CUdeviceptr | D | |
| CUdeviceptr | E | |
| CUdeviceptr | tau | |
| CUdeviceptr | Work | |
| System.Int32 | Lwork | |
| CUdeviceptr | info |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSsytrd_bufferSize(cusolverDnHandle, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, CUdeviceptr, ref Int32)
Declaration
public static cusolverStatus cusolverDnSsytrd_bufferSize(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr d, CUdeviceptr e, CUdeviceptr tau, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | |
| FillMode | uplo | |
| System.Int32 | n | |
| CUdeviceptr | A | |
| System.Int32 | lda | |
| CUdeviceptr | d | |
| CUdeviceptr | e | |
| CUdeviceptr | tau | |
| System.Int32 | lwork |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSsytrf(cusolverDnHandle, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
This function computes the Bunch-Kaufman factorization of a n×n symmetric indefinite matrix.
Declaration
public static cusolverStatus cusolverDnSsytrf(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr ipiv, CUdeviceptr work, int lwork, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| FillMode | uplo | indicates if matrix A lower or upper part is stored, the other part is not referenced. |
| System.Int32 | n | number of rows and columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | ipiv | array of size at least n, containing pivot indices. |
| CUdeviceptr | work | working space, array of size lwork. |
| System.Int32 | lwork | size of working space work. |
| CUdeviceptr | devInfo | if devInfo = 0, the LU factorization is successful. if devInfo = -i, the i-th parameter is wrong. if devInfo = i, the D(i,i) = 0. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnSsytrf_bufferSize(cusolverDnHandle, Int32, CUdeviceptr, Int32, ref Int32)
This function computes the Bunch-Kaufman factorization of a n×n symmetric indefinite matrix.
Declaration
public static cusolverStatus cusolverDnSsytrf_bufferSize(cusolverDnHandle handle, int n, CUdeviceptr A, int lda, ref int Lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | n | number of rows and columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| System.Int32 | Lwork | size of working space work. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZgebrd(cusolverDnHandle, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, CUdeviceptr, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
This function reduces a general real m×n matrix A to upper or lower bidiagonal form B by an orthogonal transformation: Q^HAP=B
Declaration
public static cusolverStatus cusolverDnZgebrd(cusolverDnHandle handle, int m, int n, CUdeviceptr A, int lda, CUdeviceptr D, CUdeviceptr E, CUdeviceptr TAUQ, CUdeviceptr TAUP, CUdeviceptr Work, int Lwork, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | D | array of dimension min(m,n). The diagonal elements of the bidiagonal matrix B: D(i) = A(i,i). |
| CUdeviceptr | E | array of dimension min(m,n). The off-diagonal elements of the bidiagonal matrix B: if m>=n, E(i) = A(i,i+1) for i = 1,2,...,n-1; if m<n, E(i) = A(i+1,i) for i = 1,2,...,m-1. |
| CUdeviceptr | TAUQ | array of dimension min(m,n). The scalar factors of the elementary reflectors which represent the orthogonal matrix Q. |
| CUdeviceptr | TAUP | array of dimension min(m,n). The scalar factors of the elementary reflectors which represent the orthogonal matrix P. |
| CUdeviceptr | Work | working space, array of size Lwork. |
| System.Int32 | Lwork | size of Work, returned by gebrd_bufferSize. |
| CUdeviceptr | devInfo | if devInfo = 0, the operation is successful. if devInfo = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZgebrd_bufferSize(cusolverDnHandle, Int32, Int32, ref Int32)
This function reduces a general real m×n matrix A to upper or lower bidiagonal form B by an orthogonal transformation: Q^HAP=B
Declaration
public static cusolverStatus cusolverDnZgebrd_bufferSize(cusolverDnHandle handle, int m, int n, ref int Lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| System.Int32 | Lwork | size of Work, returned by gebrd_bufferSize. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZgeqrf(cusolverDnHandle, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
This function computes the QR factorization of a m×n matrix A=Q*R where A is a m×n matrix, Q is a m×n matrix, and R is a n×n upper triangular matrix.
Declaration
public static cusolverStatus cusolverDnZgeqrf(cusolverDnHandle handle, int m, int n, CUdeviceptr A, int lda, CUdeviceptr TAU, CUdeviceptr Workspace, int Lwork, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | TAU | array of dimension at least min(m,n). |
| CUdeviceptr | Workspace | working space, array of size Lwork. |
| System.Int32 | Lwork | size of working array Workspace. |
| CUdeviceptr | devInfo | if info = 0, the LU factorization is successful. if info = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZgeqrf_bufferSize(cusolverDnHandle, Int32, Int32, CUdeviceptr, Int32, ref Int32)
This function computes the QR factorization of a m×n matrix A=Q*R where A is a m×n matrix, Q is a m×n matrix, and R is a n×n upper triangular matrix.
Declaration
public static cusolverStatus cusolverDnZgeqrf_bufferSize(cusolverDnHandle handle, int m, int n, CUdeviceptr A, int lda, ref int Lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| System.Int32 | Lwork | size of working array Workspace. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZgesvd(cusolverDnHandle, Char, Char, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr)
This function computes the singular value decomposition (SVD) of a m×n matrix A and corresponding the left and/or right singular vectors.
Declaration
public static cusolverStatus cusolverDnZgesvd(cusolverDnHandle handle, char jobu, char jobvt, int m, int n, CUdeviceptr A, int lda, CUdeviceptr S, CUdeviceptr U, int ldu, CUdeviceptr VT, int ldvt, CUdeviceptr Work, int Lwork, CUdeviceptr rwork, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Char | jobu | specifies options for computing all or part of the matrix U: = 'A': all m columns of U are returned in array U: = 'S': the first min(m,n) columns of U (the left singular vectors) are returned in the array U; = 'O': the first min(m,n) columns of U (the left singular vectors) are overwritten on the array A; = 'N': no columns of U (no left singular vectors) are computed. |
| System.Char | jobvt | specifies options for computing all or part of the matrix VT: = 'A': all N rows of VT are returned in the array VT; = 'S': the first min(m,n) rows of VT (the right singular vectors) are returned in the array VT; = 'O': the first min(m,n) rows of VT (the right singular vectors) are overwritten on the array A; = 'N': no rows of V**T (no right singular vectors) are computed. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). On exit, the contents of A are destroyed. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | S | array of dimension min(m,n). The singular values of A, sorted so that S(i)
|
| CUdeviceptr | U | array of dimension ldu * m with ldu is not less than max(1,m). U contains the m×m unitary matrix U. |
| System.Int32 | ldu | leading dimension of two-dimensional array used to store matrix U. |
| CUdeviceptr | VT | array of dimension ldvt * n with ldvt is not less than max(1,n). VT contains the n×n unitary matrix V**T. |
| System.Int32 | ldvt | leading dimension of two-dimensional array used to store matrix Vt. |
| CUdeviceptr | Work | working space, array of size Lwork. |
| System.Int32 | Lwork | size of Work, returned by gesvd_bufferSize. |
| CUdeviceptr | rwork | |
| CUdeviceptr | devInfo | if devInfo = 0, the operation is successful. if devInfo = -i, the ith parameter is wrong. if devInfo > 0, devInfo indicates how many superdiagonals of an intermediate bidiagonal form B did not converge to zero. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZgesvd_bufferSize(cusolverDnHandle, Int32, Int32, ref Int32)
This function computes the singular value decomposition (SVD) of a m×n matrix A and corresponding the left and/or right singular vectors.
Declaration
public static cusolverStatus cusolverDnZgesvd_bufferSize(cusolverDnHandle handle, int m, int n, ref int Lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| System.Int32 | Lwork | size of Work, returned by gesvd_bufferSize. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZgetrf(cusolverDnHandle, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, CUdeviceptr)
This function computes the LU factorization of a m×n matrix PA=LU where A is a m×n matrix, P is a permutation matrix, L is a lower triangular matrix with unit diagonal, and U is an upper triangular matrix.
Declaration
public static cusolverStatus cusolverDnZgetrf(cusolverDnHandle handle, int m, int n, CUdeviceptr A, int lda, CUdeviceptr Workspace, CUdeviceptr devIpiv, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | Workspace | working space, array of size Lwork. |
| CUdeviceptr | devIpiv | array of size at least min(m,n), containing pivot indices. |
| CUdeviceptr | devInfo | if devInfo = 0, the LU factorization is successful. if devInfo = -i, the i-th parameter is wrong. if devInfo = i, the U(i,i) = 0. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZgetrf_bufferSize(cusolverDnHandle, Int32, Int32, CUdeviceptr, Int32, ref Int32)
This function computes the LU factorization of a m×n matrix PA=LU where A is a m×n matrix, P is a permutation matrix, L is a lower triangular matrix with unit diagonal, and U is an upper triangular matrix.
Declaration
public static cusolverStatus cusolverDnZgetrf_bufferSize(cusolverDnHandle handle, int m, int n, CUdeviceptr A, int lda, ref int Lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| System.Int32 | Lwork | size of Workspace |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZgetrs(cusolverDnHandle, Operation, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
This function solves a linear system of multiple right-hand sides op(A)*X=B.
Declaration
public static cusolverStatus cusolverDnZgetrs(cusolverDnHandle handle, Operation trans, int n, int nrhs, CUdeviceptr A, int lda, CUdeviceptr devIpiv, CUdeviceptr B, int ldb, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| Operation | trans | operation op(A) that is non- or (conj.) transpose. |
| System.Int32 | n | number of rows and columns of matrix A. |
| System.Int32 | nrhs | number of right-hand sides. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | devIpiv | array of size at least n, containing pivot indices. |
| CUdeviceptr | B | array of dimension ldb * nrhs with ldb is not less than max(1,n). |
| System.Int32 | ldb | leading dimension of two-dimensional array used to store matrix B. |
| CUdeviceptr | devInfo | if devInfo = 0, the operation is successful. if devInfo = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZheevd(cusolverDnHandle, cusolverEigMode, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
This function computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix A.
Declaration
public static cusolverStatus cusolverDnZheevd(cusolverDnHandle handle, cusolverEigMode jobz, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr W, CUdeviceptr work, int lwork, CUdeviceptr info)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| cusolverEigMode | jobz | specifies options to either compute eigenvalue only or compute eigen-pair. |
| FillMode | uplo | specifies which part of A and B are stored. |
| System.Int32 | n | number of rows (or columns) of matrix A and B. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n). |
| CUdeviceptr | W | a real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1). |
| CUdeviceptr | work | working space, array of size lwork. |
| System.Int32 | lwork | size of work, returned by sygvd_bufferSize. |
| CUdeviceptr | info | if devInfo = 0, the operation is successful. if devInfo = -i, the i-th parameter is wrong. if devInfo = i (>0), devInfo indicates either potrf or syevd is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZheevd_bufferSize(cusolverDnHandle, cusolverEigMode, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, ref Int32)
This function computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix A.
Declaration
public static cusolverStatus cusolverDnZheevd_bufferSize(cusolverDnHandle handle, cusolverEigMode jobz, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr W, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| cusolverEigMode | jobz | specifies options to either compute eigenvalue only or compute eigen-pair. |
| FillMode | uplo | specifies which part of A and B are stored. |
| System.Int32 | n | number of rows (or columns) of matrix A and B. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n). |
| CUdeviceptr | W | a real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1). |
| System.Int32 | lwork | size of work. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZhegvd(cusolverDnHandle, cusolverEigType, cusolverEigMode, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
This function computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix-pair (A,B).
Declaration
public static cusolverStatus cusolverDnZhegvd(cusolverDnHandle handle, cusolverEigType itype, cusolverEigMode jobz, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr B, int ldb, CUdeviceptr W, CUdeviceptr work, int lwork, CUdeviceptr info)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| cusolverEigType | itype | Specifies the problem type to be solved. |
| cusolverEigMode | jobz | specifies options to either compute eigenvalue only or compute eigen-pair. |
| FillMode | uplo | specifies which part of A and B are stored. |
| System.Int32 | n | number of rows (or columns) of matrix A and B. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n). |
| CUdeviceptr | B | array of dimension ldb * n. |
| System.Int32 | ldb | leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n). |
| CUdeviceptr | W | a real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1). |
| CUdeviceptr | work | working space, array of size lwork. |
| System.Int32 | lwork | size of work, returned by sygvd_bufferSize. |
| CUdeviceptr | info | if devInfo = 0, the operation is successful. if devInfo = -i, the i-th parameter is wrong. if devInfo = i (>0), devInfo indicates either potrf or syevd is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZhegvd_bufferSize(cusolverDnHandle, cusolverEigType, cusolverEigMode, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr, ref Int32)
The helper functions below can calculate the sizes needed for pre-allocated buffer.
Declaration
public static cusolverStatus cusolverDnZhegvd_bufferSize(cusolverDnHandle handle, cusolverEigType itype, cusolverEigMode jobz, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr B, int ldb, CUdeviceptr W, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| cusolverEigType | itype | Specifies the problem type to be solved. |
| cusolverEigMode | jobz | specifies options to either compute eigenvalue only or compute eigen-pair. |
| FillMode | uplo | specifies which part of A and B are stored. |
| System.Int32 | n | number of rows (or columns) of matrix A and B. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n). |
| CUdeviceptr | B | array of dimension ldb * n. |
| System.Int32 | ldb | leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n). |
| CUdeviceptr | W | a real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1). |
| System.Int32 | lwork | size of work |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZhetrd(cusolverDnHandle, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
Declaration
public static cusolverStatus cusolverDnZhetrd(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr d, CUdeviceptr e, CUdeviceptr tau, CUdeviceptr work, int lwork, CUdeviceptr info)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | |
| FillMode | uplo | |
| System.Int32 | n | |
| CUdeviceptr | A | |
| System.Int32 | lda | |
| CUdeviceptr | d | |
| CUdeviceptr | e | |
| CUdeviceptr | tau | |
| CUdeviceptr | work | |
| System.Int32 | lwork | |
| CUdeviceptr | info |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZhetrd_bufferSize(cusolverDnHandle, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, CUdeviceptr, ref Int32)
Declaration
public static cusolverStatus cusolverDnZhetrd_bufferSize(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr d, CUdeviceptr e, CUdeviceptr tau, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | |
| FillMode | uplo | |
| System.Int32 | n | |
| CUdeviceptr | A | |
| System.Int32 | lda | |
| CUdeviceptr | d | |
| CUdeviceptr | e | |
| CUdeviceptr | tau | |
| System.Int32 | lwork |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZlaswp(cusolverDnHandle, Int32, CUdeviceptr, Int32, Int32, Int32, CUdeviceptr, Int32)
Declaration
public static cusolverStatus cusolverDnZlaswp(cusolverDnHandle handle, int n, CUdeviceptr A, int lda, int k1, int k2, CUdeviceptr devIpiv, int incx)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | |
| System.Int32 | n | |
| CUdeviceptr | A | |
| System.Int32 | lda | |
| System.Int32 | k1 | |
| System.Int32 | k2 | |
| CUdeviceptr | devIpiv | |
| System.Int32 | incx |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZpotrf(cusolverDnHandle, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr)
This function computes the Cholesky factorization of a Hermitian positive-definite matrix.
Declaration
public static cusolverStatus cusolverDnZpotrf(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr Workspace, int Lwork, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| FillMode | uplo | indicates if matrix A lower or upper part is stored, the other part is not referenced. |
| System.Int32 | n | number of rows and columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | Workspace | working space, array of size Lwork. |
| System.Int32 | Lwork | size of Workspace |
| CUdeviceptr | devInfo | if devInfo = 0, the Cholesky factorization is successful. if devInfo = -i, the i-th parameter is wrong. if devInfo = i, the leading minor of order i is not positive definite. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZpotrf_bufferSize(cusolverDnHandle, FillMode, Int32, CUdeviceptr, Int32, ref Int32)
This function computes the Cholesky factorization of a Hermitian positive-definite matrix.
Declaration
public static cusolverStatus cusolverDnZpotrf_bufferSize(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, ref int Lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| FillMode | uplo | indicates if matrix A lower or upper part is stored, the other part is not referenced. |
| System.Int32 | n | number of rows and columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| System.Int32 | Lwork | size of Workspace |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZpotrs(cusolverDnHandle, FillMode, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr)
This function solves a system of linear equations A*X=B where A is a n×n Hermitian matrix, only lower or upper part is meaningful.
Declaration
public static cusolverStatus cusolverDnZpotrs(cusolverDnHandle handle, FillMode uplo, int n, int nrhs, CUdeviceptr A, int lda, CUdeviceptr B, int ldb, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| FillMode | uplo | indicates if matrix A lower or upper part is stored, the other part is not referenced. |
| System.Int32 | n | number of rows and columns of matrix A. |
| System.Int32 | nrhs | number of columns of matrix X and B. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). A is either lower cholesky factor L or upper Cholesky factor U. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | B | array of dimension ldb * nrhs. ldb is not less than max(1,n). As an input, B is right hand side matrix. As an output, B is the solution matrix. |
| System.Int32 | ldb | leading dimension of two-dimensional array used to store matrix B. |
| CUdeviceptr | devInfo | if devInfo = 0, the Cholesky factorization is successful. if devInfo = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZsytrf(cusolverDnHandle, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
This function computes the Bunch-Kaufman factorization of a n×n symmetric indefinite matrix.
Declaration
public static cusolverStatus cusolverDnZsytrf(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr ipiv, CUdeviceptr work, int lwork, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| FillMode | uplo | indicates if matrix A lower or upper part is stored, the other part is not referenced. |
| System.Int32 | n | number of rows and columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | ipiv | array of size at least n, containing pivot indices. |
| CUdeviceptr | work | working space, array of size lwork. |
| System.Int32 | lwork | size of working space work. |
| CUdeviceptr | devInfo | if devInfo = 0, the LU factorization is successful. if devInfo = -i, the i-th parameter is wrong. if devInfo = i, the D(i,i) = 0. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZsytrf_bufferSize(cusolverDnHandle, Int32, CUdeviceptr, Int32, ref Int32)
This function computes the Bunch-Kaufman factorization of a n×n symmetric indefinite matrix.
Declaration
public static cusolverStatus cusolverDnZsytrf_bufferSize(cusolverDnHandle handle, int n, CUdeviceptr A, int lda, ref int Lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | n | number of rows and columns of matrix A. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,n). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| System.Int32 | Lwork | size of working space work. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZungbr(cusolverDnHandle, SideMode, Int32, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
generates one of the unitary matrices Q or P**T determined by GEBRD
Declaration
public static cusolverStatus cusolverDnZungbr(cusolverDnHandle handle, SideMode side, int m, int n, int k, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr work, int lwork, CUdeviceptr info)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| SideMode | side | if side = CUBLAS_SIDE_LEFT, generate Q. if side = CUBLAS_SIDE_RIGHT, generate P**T. |
| System.Int32 | m | number of rows of matrix Q or P**T. |
| System.Int32 | n | if side = CUBLAS_SIDE_LEFT, m>= n>= min(m,k). if side = CUBLAS_SIDE_RIGHT, n>= m>= min(n,k). |
| System.Int32 | k | if side = CUBLAS_SIDE_LEFT, the number of columns in the original mby- k matrix reduced by gebrd. if side = CUBLAS_SIDE_RIGHT, the number of rows in the original k-by-n matrix reduced by gebrd. |
| CUdeviceptr | A | array of dimension lda * n On entry, the vectors which define the elementary reflectors, as returned by gebrd. On exit, the m-by-n matrix Q or P**T. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m); |
| CUdeviceptr | tau | array of dimension min(m,k) if side is CUBLAS_SIDE_LEFT; of dimension min(n,k) if side is CUBLAS_SIDE_RIGHT; tau(i) must contain the scalar factor of the elementary reflector H(i) or G(i), which determines Q or P**T, as returned by gebrd in its array argument TAUQ or TAUP. |
| CUdeviceptr | work | working space, array of size lwork. |
| System.Int32 | lwork | size of working array work. |
| CUdeviceptr | info | if info = 0, the ormqr is successful. if info = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZungbr_bufferSize(cusolverDnHandle, SideMode, Int32, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, ref Int32)
generates one of the unitary matrices Q or P**T determined by GEBRD
Declaration
public static cusolverStatus cusolverDnZungbr_bufferSize(cusolverDnHandle handle, SideMode side, int m, int n, int k, CUdeviceptr A, int lda, CUdeviceptr tau, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| SideMode | side | if side = CUBLAS_SIDE_LEFT, generate Q. if side = CUBLAS_SIDE_RIGHT, generate P**T. |
| System.Int32 | m | number of rows of matrix Q or P**T. |
| System.Int32 | n | if side = CUBLAS_SIDE_LEFT, m>= n>= min(m,k). if side = CUBLAS_SIDE_RIGHT, n>= m>= min(n,k). |
| System.Int32 | k | if side = CUBLAS_SIDE_LEFT, the number of columns in the original mby- k matrix reduced by gebrd. if side = CUBLAS_SIDE_RIGHT, the number of rows in the original k-by-n matrix reduced by gebrd. |
| CUdeviceptr | A | array of dimension lda * n On entry, the vectors which define the elementary reflectors, as returned by gebrd. On exit, the m-by-n matrix Q or P**T. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m); |
| CUdeviceptr | tau | array of dimension min(m,k) if side is CUBLAS_SIDE_LEFT; of dimension min(n,k) if side is CUBLAS_SIDE_RIGHT; tau(i) must contain the scalar factor of the elementary reflector H(i) or G(i), which determines Q or P**T, as returned by gebrd in its array argument TAUQ or TAUP. |
| System.Int32 | lwork | size of working array work. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZungqr(cusolverDnHandle, Int32, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
generate unitary matrix Q from QR factorization
Declaration
public static cusolverStatus cusolverDnZungqr(cusolverDnHandle handle, int m, int n, int k, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr work, int lwork, CUdeviceptr info)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix Q. m >= 0; |
| System.Int32 | n | number of columns of matrix Q. m >= n >= 0; |
| System.Int32 | k | number of elementary relfections whose product defines the matrix Q. n >= k >= 0; |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). i-th column of A contains elementary reflection vector. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m). |
| CUdeviceptr | tau | array of dimension k. tau(i) is the scalar of i-th elementary reflection vector. |
| CUdeviceptr | work | working space, rray of size lwork. |
| System.Int32 | lwork | size of working array work. |
| CUdeviceptr | info | if info = 0, the orgqr is successful. if info = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZungqr_bufferSize(cusolverDnHandle, Int32, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, ref Int32)
generate unitary matrix Q from QR factorization
Declaration
public static cusolverStatus cusolverDnZungqr_bufferSize(cusolverDnHandle handle, int m, int n, int k, CUdeviceptr A, int lda, CUdeviceptr tau, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| System.Int32 | m | number of rows of matrix Q. m >= 0; |
| System.Int32 | n | number of columns of matrix Q. m >= n >= 0; |
| System.Int32 | k | number of elementary relfections whose product defines the matrix Q. n >= k >= 0; |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). i-th column of A contains elementary reflection vector. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m). |
| CUdeviceptr | tau | array of dimension k. tau(i) is the scalar of i-th elementary reflection vector. |
| System.Int32 | lwork | size of working array work. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZungtr(cusolverDnHandle, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr)
generate unitary Q comes from sytrd
Declaration
public static cusolverStatus cusolverDnZungtr(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr work, int lwork, CUdeviceptr info)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| FillMode | uplo | uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A contains elementary reflectors from sytrd. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A contains elementary reflectors from sytrd. |
| System.Int32 | n | number of rows (columns) of matrix Q. |
| CUdeviceptr | A | array of dimension lda * n On entry, matrix A from sytrd contains the elementary reflectors. On exit, matrix A contains the n-by-n orthogonal matrix Q. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda >= max(1,n). |
| CUdeviceptr | tau | array of dimension (n-1) tau(i) is the scalar of i-th elementary reflection vector. |
| CUdeviceptr | work | working space, array of size lwork. |
| System.Int32 | lwork | size of working array work. |
| CUdeviceptr | info | if info = 0, the orgtr is successful. if info = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZungtr_bufferSize(cusolverDnHandle, FillMode, Int32, CUdeviceptr, Int32, CUdeviceptr, ref Int32)
generate unitary Q comes from sytrd
Declaration
public static cusolverStatus cusolverDnZungtr_bufferSize(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr tau, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| FillMode | uplo | uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A contains elementary reflectors from sytrd. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A contains elementary reflectors from sytrd. |
| System.Int32 | n | number of rows (columns) of matrix Q. |
| CUdeviceptr | A | array of dimension lda * n On entry, matrix A from sytrd contains the elementary reflectors. On exit, matrix A contains the n-by-n orthogonal matrix Q. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. lda >= max(1,n). |
| CUdeviceptr | tau | array of dimension (n-1) tau(i) is the scalar of i-th elementary reflection vector. |
| System.Int32 | lwork | size of working array work. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZunmqr(cusolverDnHandle, SideMode, Operation, Int32, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr)
This function overwrites m×n matrix C by
Declaration
public static cusolverStatus cusolverDnZunmqr(cusolverDnHandle handle, SideMode side, Operation trans, int m, int n, int k, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr C, int ldc, CUdeviceptr work, int lwork, CUdeviceptr devInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| SideMode | side | indicates if matrix Q is on the left or right of C. |
| Operation | trans | operation op(Q) that is non- or (conj.) transpose. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| System.Int32 | k | number of elementary relfections. |
| CUdeviceptr | A | array of dimension lda * n with lda is not less than max(1,m). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | tau | array of dimension at least min(m,n). The vector tau is from geqrf, so tau(i) is the scalar of i-th elementary reflection vector. |
| CUdeviceptr | C | array of size ldc * n. On exit, C is overwritten by op(Q)*C. |
| System.Int32 | ldc | leading dimension of two-dimensional array of matrix C. ldc >= max(1,m). |
| CUdeviceptr | work | working space, array of size lwork. |
| System.Int32 | lwork | size of working array work. |
| CUdeviceptr | devInfo | if info = 0, the ormqr is successful. if info = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZunmqr_bufferSize(cusolverDnHandle, SideMode, Operation, Int32, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, ref Int32)
This function computes the QR factorization of a m×n matrix A=Q*R where A is a m×n matrix, Q is a m×n matrix, and R is a n×n upper triangular matrix.
Declaration
public static cusolverStatus cusolverDnZunmqr_bufferSize(cusolverDnHandle handle, SideMode side, Operation trans, int m, int n, int k, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr C, int ldc, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| SideMode | side | indicates if matrix Q is on the left or right of C. |
| Operation | trans | operation op(Q) that is non- or (conj.) transpose. |
| System.Int32 | m | number of rows of matrix A. |
| System.Int32 | n | number of columns of matrix A. |
| System.Int32 | k | number of elementary relfections. |
| CUdeviceptr | A | array of dimension lda * k with lda is not less than max(1,m). |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. |
| CUdeviceptr | tau | array of dimension at least min(m,n). |
| CUdeviceptr | C | array of size ldc * n. On exit, C is overwritten by op(Q)*C. |
| System.Int32 | ldc | leading dimension of two-dimensional array of matrix C. ldc >= max(1,m). |
| System.Int32 | lwork | size of working array Workspace. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZunmtr(cusolverDnHandle, SideMode, FillMode, Operation, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, CUdeviceptr, Int32, CUdeviceptr)
This function overwrites m×n matrix C by
Declaration
public static cusolverStatus cusolverDnZunmtr(cusolverDnHandle handle, SideMode side, FillMode uplo, Operation trans, int m, int n, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr C, int ldc, CUdeviceptr work, int lwork, CUdeviceptr info)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| SideMode | side | side = CUBLAS_SIDE_LEFT, apply Q or QT from the Left; side = CUBLAS_SIDE_RIGHT, apply Q or QT from the Right. |
| FillMode | uplo | specifies which part of A and B are stored. |
| Operation | trans | operation op(Q) that is non- or (conj.) transpose. |
| System.Int32 | m | number of rows of matrix C. |
| System.Int32 | n | number of columns of matrix C. |
| CUdeviceptr | A | array of dimension lda * m if side = CUBLAS_SIDE_LEFT; lda * n if side = CUBLAS_SIDE_RIGHT. The matrix A from sytrd contains the elementary reflectors. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. if side is CUBLAS_SIDE_LEFT, lda >= max(1,m); if side is CUBLAS_SIDE_RIGHT, lda >= max(1,n). |
| CUdeviceptr | tau | array of dimension (m-1) if side is CUBLAS_SIDE_LEFT; of dimension (n-1) if side is CUBLAS_SIDE_RIGHT; The vector tau is from sytrd, so tau(i) is the scalar of i-th elementary reflection vector. |
| CUdeviceptr | C | array of size ldc * n. On exit, C is overwritten by op(Q)C or Cop(Q). |
| System.Int32 | ldc | leading dimension of two-dimensional array of matrix C. ldc >= max(1,m). |
| CUdeviceptr | work | working space, array of size lwork. |
| System.Int32 | lwork | size of working array work. |
| CUdeviceptr | info | if info = 0, the ormqr is successful. if info = -i, the i-th parameter is wrong. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |
cusolverDnZunmtr_bufferSize(cusolverDnHandle, SideMode, FillMode, Operation, Int32, Int32, CUdeviceptr, Int32, CUdeviceptr, CUdeviceptr, Int32, ref Int32)
This function overwrites m×n matrix C by
Declaration
public static cusolverStatus cusolverDnZunmtr_bufferSize(cusolverDnHandle handle, SideMode side, FillMode uplo, Operation trans, int m, int n, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr C, int ldc, ref int lwork)
Parameters
| Type | Name | Description |
|---|---|---|
| cusolverDnHandle | handle | handle to the cuSolverDN library context. |
| SideMode | side | side = CUBLAS_SIDE_LEFT, apply Q or QT from the Left; side = CUBLAS_SIDE_RIGHT, apply Q or QT from the Right. |
| FillMode | uplo | specifies which part of A and B are stored. |
| Operation | trans | operation op(Q) that is non- or (conj.) transpose. |
| System.Int32 | m | number of rows of matrix C. |
| System.Int32 | n | number of columns of matrix C. |
| CUdeviceptr | A | array of dimension lda * m if side = CUBLAS_SIDE_LEFT; lda * n if side = CUBLAS_SIDE_RIGHT. The matrix A from sytrd contains the elementary reflectors. |
| System.Int32 | lda | leading dimension of two-dimensional array used to store matrix A. if side is CUBLAS_SIDE_LEFT, lda >= max(1,m); if side is CUBLAS_SIDE_RIGHT, lda >= max(1,n). |
| CUdeviceptr | tau | array of dimension (m-1) if side is CUBLAS_SIDE_LEFT; of dimension (n-1) if side is CUBLAS_SIDE_RIGHT; The vector tau is from sytrd, so tau(i) is the scalar of i-th elementary reflection vector. |
| CUdeviceptr | C | array of size ldc * n. On exit, C is overwritten by op(Q)C or Cop(Q). |
| System.Int32 | ldc | leading dimension of two-dimensional array of matrix C. ldc >= max(1,m). |
| System.Int32 | lwork | size of working array work. |
Returns
| Type | Description |
|---|---|
| cusolverStatus |