Documentation
¶
Overview ¶
Package cusolver provides lazy-loaded bindings for the NVIDIA cuSOLVER dense API.
cuSOLVER provides GPU-accelerated dense linear algebra, including factorizations, eigensolvers, and iterative refinement.
Create a Handle, select a stream and configuration, then call an algorithm matching the matrix representation and precision.
Workspace and devInfo ¶
A routine such as Handle.Dgetrf takes a device workspace of lwork elements of the routine's data type (float64 for D routines, complex128 for Z routines), so its size in bytes is lwork times the size of that type. The routine's size helper, such as Handle.DgetrfBufferSize, returns lwork. The 64-bit routines, such as Handle.Xgetrf, and the iterative refinement routines size their workspaces in bytes, as their size helpers say.
A routine that reports devInfo sets it to -i when its i-th parameter, not counting the handle, is wrong.
Complex Single-Precision Dense Solvers ¶
- Handle.CCgels: These functions compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
- Handle.CCgelsBufferSize: returns the workspace size, in bytes, for Handle.CCgels.
- Handle.CCgesv: These functions are modelled after functions DSGESV and ZCGESV from LAPACK.
- Handle.CCgesvBufferSize: returns the workspace size, in bytes, for Handle.CCgesv.
- Handle.CEgels: These functions compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
- Handle.CEgelsBufferSize: returns the workspace size, in bytes, for Handle.CEgels.
- Handle.CEgesv: These functions are modelled after functions DSGESV and ZCGESV from LAPACK.
- Handle.CEgesvBufferSize: returns the workspace size, in bytes, for Handle.CEgesv.
- Handle.CKgels: These functions compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
- Handle.CKgelsBufferSize: returns the workspace size, in bytes, for Handle.CKgels.
- Handle.CKgesv: These functions are modelled after functions DSGESV and ZCGESV from LAPACK.
- Handle.CKgesvBufferSize: returns the workspace size, in bytes, for Handle.CKgesv.
- Handle.CYgels: These functions compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
- Handle.CYgelsBufferSize: returns the workspace size, in bytes, for Handle.CYgels.
- Handle.CYgesv: These functions are modelled after functions DSGESV and ZCGESV from LAPACK.
- Handle.CYgesvBufferSize: returns the workspace size, in bytes, for Handle.CYgesv.
- Handle.Cgebrd: reduces a general m×n matrix A to a real upper or lower bidiagonal form B by an orthogonal transformation: Qᴴ*A*P=B.
- Handle.CgebrdBufferSize: returns the workspace size, in elements of complex64, for Handle.Cgebrd.
- Handle.Cgeqrf: computes the QR factorization of an m×n matrix.
- Handle.CgeqrfBufferSize: returns the workspace size, in elements of complex64, for Handle.Cgeqrf.
- Handle.Cgesvd: computes the singular value decomposition (SVD) of an m×n matrix A and corresponding the left and/or right singular vectors.
- Handle.CgesvdBufferSize: returns the workspace size, in elements of complex64, for Handle.Cgesvd.
- Handle.CgesvdaStridedBatched: gesvda ( a stands for approximate) approximates the singular value decomposition of a tall skinny m×n matrix A and corresponding the left and right singular vectors.
- Handle.CgesvdaStridedBatchedBufferSize: returns the workspace size, in elements of complex64, for Handle.CgesvdaStridedBatched.
- Handle.Cgesvdj: computes the singular value decomposition (SVD) of an m×n matrix A and corresponding the left and/or right singular vectors.
- Handle.CgesvdjBatched: computes singular values and singular vectors of a sequence of general m×n matrices.
- Handle.CgesvdjBatchedBufferSize: returns the workspace size, in elements of complex64, for Handle.CgesvdjBatched.
- Handle.CgesvdjBufferSize: returns the workspace size, in elements of complex64, for Handle.Cgesvdj.
- Handle.Cgetrf: computes the LU factorization of an m×n matrix.
- Handle.CgetrfBufferSize: returns the workspace size, in elements of complex64, for Handle.Cgetrf.
- Handle.Cgetrs: solves a linear system of multiple right-hand sides.
- Handle.Cheevd: computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix A.
- Handle.CheevdBufferSize: returns the workspace size, in elements of complex64, for Handle.Cheevd.
- Handle.Cheevdx: computes all or selection of the eigenvalues and optionally eigenvectors of a symmetric (Hermitian) n×n matrix A.
- Handle.CheevdxBufferSize: returns the workspace size, in elements of complex64, for Handle.Cheevdx.
- Handle.Cheevj: computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix A.
- Handle.CheevjBatched: computes eigenvalues and eigenvectors of a sequence of symmetric (Hermitian) n×n matrices.
- Handle.CheevjBatchedBufferSize: returns the workspace size, in elements of complex64, for Handle.CheevjBatched.
- Handle.CheevjBufferSize: returns the workspace size, in elements of complex64, for Handle.Cheevj.
- Handle.Chegvd: computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix-pair ( A, B).
- Handle.ChegvdBufferSize: returns the workspace size, in elements of complex64, for Handle.Chegvd.
- Handle.Chegvdx: computes all or selection of the eigenvalues and optionally eigenvectors of a symmetric (Hermitian) n×n matrix-pair ( A, B).
- Handle.ChegvdxBufferSize: returns the workspace size, in elements of complex64, for Handle.Chegvdx.
- Handle.Chegvj: computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix-pair ( A, B).
- Handle.ChegvjBufferSize: returns the workspace size, in elements of complex64, for Handle.Chegvj.
- Handle.Chetrd: reduces a general symmetric (Hermitian) n×n matrix A to real symmetric tridiagonal form T by an orthogonal transformation: Qᴴ*A*Q=T.
- Handle.ChetrdBufferSize: returns the workspace size, in elements of complex64, for Handle.Chetrd.
- Handle.Claswp.
- Handle.Clauum.
- Handle.ClauumBufferSize.
- Handle.Cpotrf: computes the Cholesky factorization of a Hermitian positive-definite matrix.
- Handle.CpotrfBatched: computes the Cholesky factorization of a sequence of Hermitian positive-definite matrices.
- Handle.CpotrfBufferSize: returns the workspace size, in elements of complex64, for Handle.Cpotrf.
- Handle.Cpotri: computes the inverse of a positive-definite matrix A using the Cholesky factorization.
- Handle.CpotriBufferSize: returns the workspace size, in elements of complex64, for Handle.Cpotri.
- Handle.Cpotrs: solves a system of linear equations.
- Handle.CpotrsBatched: solves a sequence of linear systems.
- Handle.Csytrf: computes the factorization of a symmetric indefinite matrix using the Bunch-Kaufman diagonal pivoting.
- Handle.CsytrfBufferSize: returns the workspace size, in elements of complex64, for Handle.Csytrf.
- Handle.Csytri.
- Handle.CsytriBufferSize.
- Handle.Cungbr: generates one of the unitary matrices Q or P**H determined by gebrd when reducing a matrix A to bidiagonal form: Qᴴ*A*P=B.
- Handle.CungbrBufferSize: returns the workspace size, in elements of complex64, for Handle.Cungbr.
- Handle.Cungqr: overwrites m×n matrix A.
- Handle.CungqrBufferSize: returns the workspace size, in elements of complex64, for Handle.Cungqr.
- Handle.Cungtr: generates a unitary matrix Q which is defined as the product of n-1 elementary reflectors of order n, as returned by sytrd:
- Handle.CungtrBufferSize: returns the workspace size, in elements of complex64, for Handle.Cungtr.
- Handle.Cunmqr: overwrites m×n matrix C.
- Handle.CunmqrBufferSize: returns the workspace size, in elements of complex64, for Handle.Cunmqr.
- Handle.Cunmtr: overwrites m×n matrix C.
- Handle.CunmtrBufferSize: returns the workspace size, in elements of complex64, for Handle.Cunmtr.
Handle and Parameter Lifecycle ¶
- Create: initializes the cuSolverDN library and creates a handle on the cuSolverDN context.
- CreateGesvdjInfo: creates and initializes the structure of gesvdj and gesvdjBatched to default values.
- CreateParams: creates and initializes the structure of 64-bit API to default values.
- CreateSyevjInfo: creates and initializes the structure of syevj, syevjBatched and sygvj to default values.
- Handle.Close: releases CPU-side resources used by the cuSolverDN library.
- GesvdjInfo.Close: destroys and releases any memory required by the structure.
- Params.Close: destroys and releases any memory required by the structure.
- SyevjInfo.Close: destroys and releases any memory required by the structure.
Double-Precision Dense Solvers ¶
- Handle.DBgels: These functions compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
- Handle.DBgelsBufferSize: returns the workspace size, in bytes, for Handle.DBgels.
- Handle.DBgesv: These functions are modelled after functions DSGESV and ZCGESV from LAPACK.
- Handle.DBgesvBufferSize: returns the workspace size, in bytes, for Handle.DBgesv.
- Handle.DDgels: These functions compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
- Handle.DDgelsBufferSize: returns the workspace size, in bytes, for Handle.DDgels.
- Handle.DDgesv: These functions are modelled after functions DSGESV and ZCGESV from LAPACK.
- Handle.DDgesvBufferSize: returns the workspace size, in bytes, for Handle.DDgesv.
- Handle.DHgels: These functions compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
- Handle.DHgelsBufferSize: returns the workspace size, in bytes, for Handle.DHgels.
- Handle.DHgesv: These functions are modelled after functions DSGESV and ZCGESV from LAPACK.
- Handle.DHgesvBufferSize: returns the workspace size, in bytes, for Handle.DHgesv.
- Handle.DSgels: These functions compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
- Handle.DSgelsBufferSize: returns the workspace size, in bytes, for Handle.DSgels.
- Handle.DSgesv: These functions are modelled after functions DSGESV and ZCGESV from LAPACK.
- Handle.DSgesvBufferSize: returns the workspace size, in bytes, for Handle.DSgesv.
- Handle.DXgels: These functions compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
- Handle.DXgelsBufferSize: returns the workspace size, in bytes, for Handle.DXgels.
- Handle.DXgesv: These functions are modelled after functions DSGESV and ZCGESV from LAPACK.
- Handle.DXgesvBufferSize: returns the workspace size, in bytes, for Handle.DXgesv.
- Handle.Dgebrd: reduces a general m×n matrix A to a real upper or lower bidiagonal form B by an orthogonal transformation: Qᴴ*A*P=B.
- Handle.DgebrdBufferSize: returns the workspace size, in elements of float64, for Handle.Dgebrd.
- Handle.Dgeqrf: computes the QR factorization of an m×n matrix.
- Handle.DgeqrfBufferSize: returns the workspace size, in elements of float64, for Handle.Dgeqrf.
- Handle.Dgesvd: computes the singular value decomposition (SVD) of an m×n matrix A and corresponding the left and/or right singular vectors.
- Handle.DgesvdBufferSize: returns the workspace size, in elements of float64, for Handle.Dgesvd.
- Handle.DgesvdaStridedBatched: gesvda ( a stands for approximate) approximates the singular value decomposition of a tall skinny m×n matrix A and corresponding the left and right singular vectors.
- Handle.DgesvdaStridedBatchedBufferSize: returns the workspace size, in elements of float64, for Handle.DgesvdaStridedBatched.
- Handle.Dgesvdj: computes the singular value decomposition (SVD) of an m×n matrix A and corresponding the left and/or right singular vectors.
- Handle.DgesvdjBatched: computes singular values and singular vectors of a sequence of general m×n matrices.
- Handle.DgesvdjBatchedBufferSize: returns the workspace size, in elements of float64, for Handle.DgesvdjBatched.
- Handle.DgesvdjBufferSize: returns the workspace size, in elements of float64, for Handle.Dgesvdj.
- Handle.Dgetrf: computes the LU factorization of an m×n matrix.
- Handle.DgetrfBufferSize: returns the workspace size, in elements of float64, for Handle.Dgetrf.
- Handle.Dgetrs: solves a linear system of multiple right-hand sides.
- Handle.Dlaswp.
- Handle.Dlauum.
- Handle.DlauumBufferSize.
- Handle.Dorgbr: generates one of the unitary matrices Q or P**H determined by gebrd when reducing a matrix A to bidiagonal form: Qᴴ*A*P=B.
- Handle.DorgbrBufferSize: returns the workspace size, in elements of float64, for Handle.Dorgbr.
- Handle.Dorgqr: overwrites m×n matrix A.
- Handle.DorgqrBufferSize: returns the workspace size, in elements of float64, for Handle.Dorgqr.
- Handle.Dorgtr: generates a unitary matrix Q which is defined as the product of n-1 elementary reflectors of order n, as returned by sytrd:
- Handle.DorgtrBufferSize: returns the workspace size, in elements of float64, for Handle.Dorgtr.
- Handle.Dormqr: overwrites m×n matrix C.
- Handle.DormqrBufferSize: returns the workspace size, in elements of float64, for Handle.Dormqr.
- Handle.Dormtr: overwrites m×n matrix C.
- Handle.DormtrBufferSize: returns the workspace size, in elements of float64, for Handle.Dormtr.
- Handle.Dpotrf: computes the Cholesky factorization of a Hermitian positive-definite matrix.
- Handle.DpotrfBatched: computes the Cholesky factorization of a sequence of Hermitian positive-definite matrices.
- Handle.DpotrfBufferSize: returns the workspace size, in elements of float64, for Handle.Dpotrf.
- Handle.Dpotri: computes the inverse of a positive-definite matrix A using the Cholesky factorization.
- Handle.DpotriBufferSize: returns the workspace size, in elements of float64, for Handle.Dpotri.
- Handle.Dpotrs: solves a system of linear equations.
- Handle.DpotrsBatched: solves a sequence of linear systems.
- Handle.Dsyevd: computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix A.
- Handle.DsyevdBufferSize: returns the workspace size, in elements of float64, for Handle.Dsyevd.
- Handle.Dsyevdx: computes all or selection of the eigenvalues and optionally eigenvectors of a symmetric (Hermitian) n×n matrix A.
- Handle.DsyevdxBufferSize: returns the workspace size, in elements of float64, for Handle.Dsyevdx.
- Handle.Dsyevj: computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix A.
- Handle.DsyevjBatched: computes eigenvalues and eigenvectors of a sequence of symmetric (Hermitian) n×n matrices.
- Handle.DsyevjBatchedBufferSize: returns the workspace size, in elements of float64, for Handle.DsyevjBatched.
- Handle.DsyevjBufferSize: returns the workspace size, in elements of float64, for Handle.Dsyevj.
- Handle.Dsygvd: computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix-pair ( A, B).
- Handle.DsygvdBufferSize: returns the workspace size, in elements of float64, for Handle.Dsygvd.
- Handle.Dsygvdx: computes all or selection of the eigenvalues and optionally eigenvectors of a symmetric (Hermitian) n×n matrix-pair ( A, B).
- Handle.DsygvdxBufferSize: returns the workspace size, in elements of float64, for Handle.Dsygvdx.
- Handle.Dsygvj: computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix-pair ( A, B).
- Handle.DsygvjBufferSize: returns the workspace size, in elements of float64, for Handle.Dsygvj.
- Handle.Dsytrd: reduces a general symmetric (Hermitian) n×n matrix A to real symmetric tridiagonal form T by an orthogonal transformation: Qᴴ*A*Q=T.
- Handle.DsytrdBufferSize: returns the workspace size, in elements of float64, for Handle.Dsytrd.
- Handle.Dsytrf: computes the factorization of a symmetric indefinite matrix using the Bunch-Kaufman diagonal pivoting.
- Handle.DsytrfBufferSize: returns the workspace size, in elements of float64, for Handle.Dsytrf.
- Handle.Dsytri.
- Handle.DsytriBufferSize.
Configuration and Diagnostics ¶
- Handle.DeterministicMode: queries the deterministic mode which is set for handle.
- Handle.EmulationSpecialValuesSupport: queries the special floating point value support which is set for handle if floating point emulation is allowed.
- Handle.EmulationStrategy: queries the emulation strategy which is set for handle.
- Handle.FixedPointEmulationMantissaBitOffset: queries the mantissa bit offset for fixed point FP64 emulation in case of dynamic mantissa control mode.
- Handle.FixedPointEmulationMantissaControl: queries how the number of mantissa bits is determined for fixed point FP64 emulation.
- Handle.FixedPointEmulationMaxMantissaBitCount: queries the maximum number of mantissa bits used for fixed point FP64 emulation.
- Handle.MathMode: queries the math modes which are set for handle.
- GetProperty.
- GetVersion.
- Params.SetAdvOptions: configures algorithm algo of function, a 64-bit API routine.
- Handle.SetDeterministicMode: sets the deterministic mode of all cuSolverDN functions for handle.
- Handle.SetEmulationSpecialValuesSupport: sets the handling of special floating point values for handle, which is used once floating point emulation is allowed.
- Handle.SetEmulationStrategy: sets the emulation strategy of all cuSolverDN functions for handle.
- Handle.SetFixedPointEmulationMantissaBitOffset: sets the mantissa bit offset for fixed point FP64 emulation in case of dynamic mantissa control mode.
- Handle.SetFixedPointEmulationMantissaControl: sets how the number of mantissa bits is determined for fixed point FP64 emulation.
- Handle.SetFixedPointEmulationMaxMantissaBitCount: sets the maximum number of mantissa bits for fixed point FP64 emulation.
- Handle.SetMathMode: sets the math modes of all cuSolverDN functions for handle.
Stream and Library Queries ¶
- Handle.Stream: queries the stream to be used by the cuSolverDN library to execute its routines.
- Handle.SetStream: sets the stream to be used by the cuSolverDN library to execute its routines.
Iterative Refinement ¶
- NewIRSInfos: creates and initializes the Infos structure that will hold the refinement information of an Iterative Refinement Solver (IRS) call.
- IRSInfos.Close: destroys and releases any memory required by the Infos structure.
- IRSInfos.MaxIters: returns the maximal allowed number of iterations that was set for the corresponding call to the IRS solver.
- IRSInfos.Niters: returns the total number of iterations performed by the IRS solver.
- IRSInfos.OuterNiters: returns the number of iterations performed by the outer refinement loop of the IRS solver.
- IRSInfos.ResidualHistory: If the user called IRSInfos.RequestResidual before the call to the IRS function, then the IRS solver will store the convergence history (residual norms) of the refinement phase in a matrix that can be accessed via a pointer returned by this function.
- IRSInfos.RequestResidual: tells the IRS solver to store the convergence history (residual norms) of the refinement phase in a matrix that can be accessed via a pointer returned by the IRSInfos.ResidualHistory function.
- NewIRSParams: creates and initializes the structure of parameters for an IRS solver such as the Handle.IRSXgesv or the Handle.IRSXgels functions to default values.
- IRSParams.Close: destroys and releases any memory required by the Params structure.
- IRSParams.DisableFallback: disables the fallback to the main precision in case the Iterative Refinement Solver (IRS) failed to converge.
- IRSParams.EnableFallback: enable the fallback to the main precision in case the Iterative Refinement Solver (IRS) failed to converge.
- IRSParams.MaxIters: returns the current setting in the params structure for the maximal allowed number of iterations (for example, either the default MaxIters, or the one set by the user in case he set it using IRSParams.SetMaxIters).
- IRSParams.SetMaxIters: sets the total number of allowed refinement iterations after which the solver will stop.
- IRSParams.SetMaxItersInner: sets the maximal number of iterations allowed for the inner refinement solver.
- IRSParams.SetRefinementSolver: sets the refinement solver to be used in the Iterative Refinement Solver functions such as the Handle.IRSXgesv or the Handle.IRSXgels functions.
- IRSParams.SetSolverLowestPrecision: sets the lowest precision that will be used by Iterative Refinement Solver.
- IRSParams.SetSolverMainPrecision: sets the main precision for the Iterative Refinement Solver (IRS).
- IRSParams.SetSolverPrecisions: sets both the main and the lowest precision for the Iterative Refinement Solver (IRS).
- IRSParams.SetTol: sets the tolerance for the refinement solver.
- IRSParams.SetTolInner: sets the tolerance for the inner refinement solver when the refinement solver consists of two-levels solver (for example, IrsRefineClassicalGmres or IrsRefineGmresGmres cases).
- Handle.IRSXgels: is designed to perform same functionality as cusolverDn<T1><T2>gels() functions, but wrapped in a more generic and expert interface that gives user more control to parametrize the function as well as it provides more information on output.
- Handle.IRSXgelsBufferSize: returns the workspace size, in bytes, for Handle.IRSXgels.
- Handle.IRSXgesv: is designed to perform same functionality as cusolverDn<T1><T2>gesv() functions, but wrapped in a more generic and expert interface that gives user more control to parametrize the function as well as it provides more information on output.
- Handle.IRSXgesvBufferSize: returns the workspace size, in bytes, for Handle.IRSXgesv.
Logging ¶
- LoggerForceDisable: disables logging for the entire run.
- LoggerOpenFile: opens a logging output file in the given path.
- LoggerSetCallback: sets the logging callback function.
- LoggerSetFile: sets the logging output file.
- LoggerSetLevel: sets the value of the logging level.
- LoggerSetMask: sets the value of the logging mask.
Single-Precision Dense Solvers ¶
- Handle.SBgels: These functions compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
- Handle.SBgelsBufferSize: returns the workspace size, in bytes, for Handle.SBgels.
- Handle.SBgesv: These functions are modelled after functions DSGESV and ZCGESV from LAPACK.
- Handle.SBgesvBufferSize: returns the workspace size, in bytes, for Handle.SBgesv.
- Handle.SHgels: These functions compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
- Handle.SHgelsBufferSize: returns the workspace size, in bytes, for Handle.SHgels.
- Handle.SHgesv: These functions are modelled after functions DSGESV and ZCGESV from LAPACK.
- Handle.SHgesvBufferSize: returns the workspace size, in bytes, for Handle.SHgesv.
- Handle.SSgels: These functions compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
- Handle.SSgelsBufferSize: returns the workspace size, in bytes, for Handle.SSgels.
- Handle.SSgesv: These functions are modelled after functions DSGESV and ZCGESV from LAPACK.
- Handle.SSgesvBufferSize: returns the workspace size, in bytes, for Handle.SSgesv.
- Handle.SXgels: These functions compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
- Handle.SXgelsBufferSize: returns the workspace size, in bytes, for Handle.SXgels.
- Handle.SXgesv: These functions are modelled after functions DSGESV and ZCGESV from LAPACK.
- Handle.SXgesvBufferSize: returns the workspace size, in bytes, for Handle.SXgesv.
- Handle.Sgebrd: reduces a general m×n matrix A to a real upper or lower bidiagonal form B by an orthogonal transformation: Qᴴ*A*P=B.
- Handle.SgebrdBufferSize: returns the workspace size, in elements of float32, for Handle.Sgebrd.
- Handle.Sgeqrf: computes the QR factorization of an m×n matrix.
- Handle.SgeqrfBufferSize: returns the workspace size, in elements of float32, for Handle.Sgeqrf.
- Handle.Sgesvd: computes the singular value decomposition (SVD) of an m×n matrix A and corresponding the left and/or right singular vectors.
- Handle.SgesvdBufferSize: returns the workspace size, in elements of float32, for Handle.Sgesvd.
- Handle.SgesvdaStridedBatched: gesvda ( a stands for approximate) approximates the singular value decomposition of a tall skinny m×n matrix A and corresponding the left and right singular vectors.
- Handle.SgesvdaStridedBatchedBufferSize: returns the workspace size, in elements of float32, for Handle.SgesvdaStridedBatched.
- Handle.Sgesvdj: computes the singular value decomposition (SVD) of an m×n matrix A and corresponding the left and/or right singular vectors.
- Handle.SgesvdjBatched: computes singular values and singular vectors of a sequence of general m×n matrices.
- Handle.SgesvdjBatchedBufferSize: returns the workspace size, in elements of float32, for Handle.SgesvdjBatched.
- Handle.SgesvdjBufferSize: returns the workspace size, in elements of float32, for Handle.Sgesvdj.
- Handle.Sgetrf: computes the LU factorization of an m×n matrix.
- Handle.SgetrfBufferSize: returns the workspace size, in elements of float32, for Handle.Sgetrf.
- Handle.Sgetrs: solves a linear system of multiple right-hand sides.
- Handle.Slaswp.
- Handle.Slauum.
- Handle.SlauumBufferSize.
- Handle.Sorgbr: generates one of the unitary matrices Q or P**H determined by gebrd when reducing a matrix A to bidiagonal form: Qᴴ*A*P=B.
- Handle.SorgbrBufferSize: returns the workspace size, in elements of float32, for Handle.Sorgbr.
- Handle.Sorgqr: overwrites m×n matrix A.
- Handle.SorgqrBufferSize: returns the workspace size, in elements of float32, for Handle.Sorgqr.
- Handle.Sorgtr: generates a unitary matrix Q which is defined as the product of n-1 elementary reflectors of order n, as returned by sytrd:
- Handle.SorgtrBufferSize: returns the workspace size, in elements of float32, for Handle.Sorgtr.
- Handle.Sormqr: overwrites m×n matrix C.
- Handle.SormqrBufferSize: returns the workspace size, in elements of float32, for Handle.Sormqr.
- Handle.Sormtr: overwrites m×n matrix C.
- Handle.SormtrBufferSize: returns the workspace size, in elements of float32, for Handle.Sormtr.
- Handle.Spotrf: computes the Cholesky factorization of a Hermitian positive-definite matrix.
- Handle.SpotrfBatched: computes the Cholesky factorization of a sequence of Hermitian positive-definite matrices.
- Handle.SpotrfBufferSize: returns the workspace size, in elements of float32, for Handle.Spotrf.
- Handle.Spotri: computes the inverse of a positive-definite matrix A using the Cholesky factorization.
- Handle.SpotriBufferSize: returns the workspace size, in elements of float32, for Handle.Spotri.
- Handle.Spotrs: solves a system of linear equations.
- Handle.SpotrsBatched: solves a sequence of linear systems.
- Handle.Ssyevd: computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix A.
- Handle.SsyevdBufferSize: returns the workspace size, in elements of float32, for Handle.Ssyevd.
- Handle.Ssyevdx: computes all or selection of the eigenvalues and optionally eigenvectors of a symmetric (Hermitian) n×n matrix A.
- Handle.SsyevdxBufferSize: returns the workspace size, in elements of float32, for Handle.Ssyevdx.
- Handle.Ssyevj: computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix A.
- Handle.SsyevjBatched: computes eigenvalues and eigenvectors of a sequence of symmetric (Hermitian) n×n matrices.
- Handle.SsyevjBatchedBufferSize: returns the workspace size, in elements of float32, for Handle.SsyevjBatched.
- Handle.SsyevjBufferSize: returns the workspace size, in elements of float32, for Handle.Ssyevj.
- Handle.Ssygvd: computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix-pair ( A, B).
- Handle.SsygvdBufferSize: returns the workspace size, in elements of float32, for Handle.Ssygvd.
- Handle.Ssygvdx: computes all or selection of the eigenvalues and optionally eigenvectors of a symmetric (Hermitian) n×n matrix-pair ( A, B).
- Handle.SsygvdxBufferSize: returns the workspace size, in elements of float32, for Handle.Ssygvdx.
- Handle.Ssygvj: computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix-pair ( A, B).
- Handle.SsygvjBufferSize: returns the workspace size, in elements of float32, for Handle.Ssygvj.
- Handle.Ssytrd: reduces a general symmetric (Hermitian) n×n matrix A to real symmetric tridiagonal form T by an orthogonal transformation: Qᴴ*A*Q=T.
- Handle.SsytrdBufferSize: returns the workspace size, in elements of float32, for Handle.Ssytrd.
- Handle.Ssytrf: computes the factorization of a symmetric indefinite matrix using the Bunch-Kaufman diagonal pivoting.
- Handle.SsytrfBufferSize: returns the workspace size, in elements of float32, for Handle.Ssytrf.
- Handle.Ssytri.
- Handle.SsytriBufferSize.
Generic Dense Solvers ¶
- Handle.Xgeev: computes for an n-by-n real non-symmetric or complex non-Hermitian matrix A the eigenvalues and, optionally, the left and/or right eigenvectors.
- Handle.XgeevBufferSize: returns the workspace sizes, in bytes, for Handle.Xgeev.
- Handle.Xgeqrf: computes the QR factorization of a m×n matrix.
- Handle.XgeqrfBufferSize: returns the workspace sizes, in bytes, for Handle.Xgeqrf.
- Handle.Xgesvd: computes the singular value decomposition (SVD) of an m×n matrix A and corresponding the left and/or right singular vectors.
- Handle.XgesvdBufferSize: returns the workspace sizes, in bytes, for Handle.Xgesvd.
- Handle.XgesvdjGetResidual: reports the Frobenius norm of the internal residual returned by gesvdj.
- Handle.XgesvdjGetSweeps: reports number of executed sweeps of gesvdj.
- GesvdjInfo.XgesvdjSetMaxSweeps: configures the maximum number of sweeps in gesvdj.
- GesvdjInfo.XgesvdjSetSortEig: If sort_svd is zero, the singular values are not sorted.
- GesvdjInfo.XgesvdjSetTolerance: configures tolerance of gesvdj.
- Handle.Xgesvdp: computes the singular value decomposition (SVD) of an m×n matrix A and corresponding the left and/or right singular vectors.
- Handle.XgesvdpBufferSize: returns the workspace sizes, in bytes, for Handle.Xgesvdp.
- Handle.Xgesvdr: computes the approximated rank-k singular value decomposition (k-SVD) of an m×n matrix A and the corresponding left and/or right singular vectors.
- Handle.XgesvdrBufferSize: returns the workspace sizes, in bytes, for Handle.Xgesvdr.
- Handle.Xgetrf: computes the LU factorization of a m×n matrix.
- Handle.XgetrfBufferSize: returns the workspace sizes, in bytes, for Handle.Xgetrf.
- Handle.Xgetrs: solves a linear system of multiple right-hand sides.
- Handle.Xhetrf: computes the factorization of a Hermitian indefinite matrix using the Bunch-Kaufman diagonal pivoting and the generic API interface.
- Handle.XhetrfBufferSize: returns the workspace sizes, in bytes, for Handle.Xhetrf.
- Handle.Xhetrs: solves a system of linear equations with a Hermitian indefinite coefficient matrix using the generic API interface.
- Handle.XhetrsBufferSize: returns the workspace sizes, in bytes, for Handle.Xhetrs.
- Handle.Xlarft: forms the triangular factor T of a real block reflector H of order n, which is defined as a product of k elementary reflectors.
- Handle.XlarftBufferSize: returns the workspace sizes, in bytes, for Handle.Xlarft.
- Handle.Xpolar: computes the polar decomposition of an m×n matrix A (where m≥n).
- Handle.XpolarBufferSize: returns the workspace sizes, in bytes, for Handle.Xpolar.
- Handle.Xpotrf: computes the Cholesky factorization of a Hermitian positive-definite matrix using the generic API interface.
- Handle.XpotrfBufferSize: returns the workspace sizes, in bytes, for Handle.Xpotrf.
- Handle.Xpotrs: solves a system of linear equations.
- Handle.Xstedc: computes all eigenvalues and (optionally) eigenvectors of a real symmetric tridiagonal matrix using the divide and conquer algorithm.
- Handle.XstedcBufferSize: returns the workspace sizes, in bytes, for Handle.Xstedc.
- Handle.XsyevBatched: computes eigenvalues and eigenvectors of a sequence of symmetric (Hermitian) n×n matrices.
- Handle.XsyevBatchedBufferSize: returns the workspace sizes, in bytes, for Handle.XsyevBatched.
- Handle.Xsyevd: computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix A using the generic API interface.
- Handle.XsyevdBufferSize: returns the workspace sizes, in bytes, for Handle.Xsyevd.
- Handle.Xsyevdx: computes all or selection of the eigenvalues and optionally eigenvectors of a symmetric (Hermitian) n×n matrix A using the generic API interface.
- Handle.XsyevdxBufferSize: returns the workspace sizes, in bytes, for Handle.Xsyevdx.
- Handle.XsyevjGetResidual: reports residual of syevj or sygvj.
- Handle.XsyevjGetSweeps: reports number of executed sweeps of syevj or sygvj.
- SyevjInfo.XsyevjSetMaxSweeps: configures maximum number of sweeps in syevj.
- SyevjInfo.XsyevjSetSortEig: If sort_eig is zero, the eigenvalues are not sorted.
- SyevjInfo.XsyevjSetTolerance: configures tolerance of syevj.
- Handle.XsygvStridedBatched.
- Handle.XsygvStridedBatchedBufferSize.
- Handle.Xsygvd: The following routine computes all the eigenvalues, and optionally, the eigenvectors of a generalized symmetric (Hermitian) definite eigenproblem.
- Handle.XsygvdBufferSize: returns the workspace sizes, in bytes, for Handle.Xsygvd.
- Handle.Xsygvdx: The following routine computes all or selection of the eigenvalues, and optionally, the eigenvectors of a generalized symmetric (Hermitian) definite eigenproblem.
- Handle.XsygvdxBufferSize: returns the workspace sizes, in bytes, for Handle.Xsygvdx.
- Handle.Xsytrf: computes the factorization of a symmetric indefinite matrix using the Bunch-Kaufman diagonal pivoting and the generic API interface.
- Handle.XsytrfBufferSize: returns the workspace sizes, in bytes, for Handle.Xsytrf.
- Handle.Xsytrs: solves a system of linear equations using the generic API interface.
- Handle.XsytrsBufferSize: returns the workspace sizes, in bytes, for Handle.Xsytrs.
- Handle.Xtrtri: computes the inverse of a triangular matrix using the generic API interface.
- Handle.XtrtriBufferSize: returns the workspace sizes, in bytes, for Handle.Xtrtri.
Complex Double-Precision Dense Solvers ¶
- Handle.ZCgels: These functions compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
- Handle.ZCgelsBufferSize: returns the workspace size, in bytes, for Handle.ZCgels.
- Handle.ZCgesv: These functions are modelled after functions DSGESV and ZCGESV from LAPACK.
- Handle.ZCgesvBufferSize: returns the workspace size, in bytes, for Handle.ZCgesv.
- Handle.ZEgels: These functions compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
- Handle.ZEgelsBufferSize: returns the workspace size, in bytes, for Handle.ZEgels.
- Handle.ZEgesv: These functions are modelled after functions DSGESV and ZCGESV from LAPACK.
- Handle.ZEgesvBufferSize: returns the workspace size, in bytes, for Handle.ZEgesv.
- Handle.ZKgels: These functions compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
- Handle.ZKgelsBufferSize: returns the workspace size, in bytes, for Handle.ZKgels.
- Handle.ZKgesv: These functions are modelled after functions DSGESV and ZCGESV from LAPACK.
- Handle.ZKgesvBufferSize: returns the workspace size, in bytes, for Handle.ZKgesv.
- Handle.ZYgels: These functions compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
- Handle.ZYgelsBufferSize: returns the workspace size, in bytes, for Handle.ZYgels.
- Handle.ZYgesv: These functions are modelled after functions DSGESV and ZCGESV from LAPACK.
- Handle.ZYgesvBufferSize: returns the workspace size, in bytes, for Handle.ZYgesv.
- Handle.ZZgels: These functions compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
- Handle.ZZgelsBufferSize: returns the workspace size, in bytes, for Handle.ZZgels.
- Handle.ZZgesv: These functions are modelled after functions DSGESV and ZCGESV from LAPACK.
- Handle.ZZgesvBufferSize: returns the workspace size, in bytes, for Handle.ZZgesv.
- Handle.Zgebrd: reduces a general m×n matrix A to a real upper or lower bidiagonal form B by an orthogonal transformation: Qᴴ*A*P=B.
- Handle.ZgebrdBufferSize: returns the workspace size, in elements of complex128, for Handle.Zgebrd.
- Handle.Zgeqrf: computes the QR factorization of an m×n matrix.
- Handle.ZgeqrfBufferSize: returns the workspace size, in elements of complex128, for Handle.Zgeqrf.
- Handle.Zgesvd: computes the singular value decomposition (SVD) of an m×n matrix A and corresponding the left and/or right singular vectors.
- Handle.ZgesvdBufferSize: returns the workspace size, in elements of complex128, for Handle.Zgesvd.
- Handle.ZgesvdaStridedBatched: gesvda ( a stands for approximate) approximates the singular value decomposition of a tall skinny m×n matrix A and corresponding the left and right singular vectors.
- Handle.ZgesvdaStridedBatchedBufferSize: returns the workspace size, in elements of complex128, for Handle.ZgesvdaStridedBatched.
- Handle.Zgesvdj: computes the singular value decomposition (SVD) of an m×n matrix A and corresponding the left and/or right singular vectors.
- Handle.ZgesvdjBatched: computes singular values and singular vectors of a sequence of general m×n matrices.
- Handle.ZgesvdjBatchedBufferSize: returns the workspace size, in elements of complex128, for Handle.ZgesvdjBatched.
- Handle.ZgesvdjBufferSize: returns the workspace size, in elements of complex128, for Handle.Zgesvdj.
- Handle.Zgetrf: computes the LU factorization of an m×n matrix.
- Handle.ZgetrfBufferSize: returns the workspace size, in elements of complex128, for Handle.Zgetrf.
- Handle.Zgetrs: solves a linear system of multiple right-hand sides.
- Handle.Zheevd: computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix A.
- Handle.ZheevdBufferSize: returns the workspace size, in elements of complex128, for Handle.Zheevd.
- Handle.Zheevdx: computes all or selection of the eigenvalues and optionally eigenvectors of a symmetric (Hermitian) n×n matrix A.
- Handle.ZheevdxBufferSize: returns the workspace size, in elements of complex128, for Handle.Zheevdx.
- Handle.Zheevj: computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix A.
- Handle.ZheevjBatched: computes eigenvalues and eigenvectors of a sequence of symmetric (Hermitian) n×n matrices.
- Handle.ZheevjBatchedBufferSize: returns the workspace size, in elements of complex128, for Handle.ZheevjBatched.
- Handle.ZheevjBufferSize: returns the workspace size, in elements of complex128, for Handle.Zheevj.
- Handle.Zhegvd: computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix-pair ( A, B).
- Handle.ZhegvdBufferSize: returns the workspace size, in elements of complex128, for Handle.Zhegvd.
- Handle.Zhegvdx: computes all or selection of the eigenvalues and optionally eigenvectors of a symmetric (Hermitian) n×n matrix-pair ( A, B).
- Handle.ZhegvdxBufferSize: returns the workspace size, in elements of complex128, for Handle.Zhegvdx.
- Handle.Zhegvj: computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix-pair ( A, B).
- Handle.ZhegvjBufferSize: returns the workspace size, in elements of complex128, for Handle.Zhegvj.
- Handle.Zhetrd: reduces a general symmetric (Hermitian) n×n matrix A to real symmetric tridiagonal form T by an orthogonal transformation: Qᴴ*A*Q=T.
- Handle.ZhetrdBufferSize: returns the workspace size, in elements of complex128, for Handle.Zhetrd.
- Handle.Zlaswp.
- Handle.Zlauum.
- Handle.ZlauumBufferSize.
- Handle.Zpotrf: computes the Cholesky factorization of a Hermitian positive-definite matrix.
- Handle.ZpotrfBatched: computes the Cholesky factorization of a sequence of Hermitian positive-definite matrices.
- Handle.ZpotrfBufferSize: returns the workspace size, in elements of complex128, for Handle.Zpotrf.
- Handle.Zpotri: computes the inverse of a positive-definite matrix A using the Cholesky factorization.
- Handle.ZpotriBufferSize: returns the workspace size, in elements of complex128, for Handle.Zpotri.
- Handle.Zpotrs: solves a system of linear equations.
- Handle.ZpotrsBatched: solves a sequence of linear systems.
- Handle.Zsytrf: computes the factorization of a symmetric indefinite matrix using the Bunch-Kaufman diagonal pivoting.
- Handle.ZsytrfBufferSize: returns the workspace size, in elements of complex128, for Handle.Zsytrf.
- Handle.Zsytri.
- Handle.ZsytriBufferSize.
- Handle.Zungbr: generates one of the unitary matrices Q or P**H determined by gebrd when reducing a matrix A to bidiagonal form: Qᴴ*A*P=B.
- Handle.ZungbrBufferSize: returns the workspace size, in elements of complex128, for Handle.Zungbr.
- Handle.Zungqr: overwrites m×n matrix A.
- Handle.ZungqrBufferSize: returns the workspace size, in elements of complex128, for Handle.Zungqr.
- Handle.Zungtr: generates a unitary matrix Q which is defined as the product of n-1 elementary reflectors of order n, as returned by sytrd:
- Handle.ZungtrBufferSize: returns the workspace size, in elements of complex128, for Handle.Zungtr.
- Handle.Zunmqr: overwrites m×n matrix C.
- Handle.ZunmqrBufferSize: returns the workspace size, in elements of complex128, for Handle.Zunmqr.
- Handle.Zunmtr: overwrites m×n matrix C.
- Handle.ZunmtrBufferSize: returns the workspace size, in elements of complex128, for Handle.Zunmtr.
Example ¶
Example creates a cuSOLVER dense handle and queries the library version. It returns early when the cuSOLVER library is not available.
package main
import (
"fmt"
"github.com/tmc/lib/nvidia/cusolver"
)
func main() {
version, err := cusolver.GetVersion()
if err != nil {
fmt.Println("cuSOLVER unavailable:", err)
return
}
fmt.Println("cuSOLVER version:", version)
h, err := cusolver.Create()
if err != nil {
fmt.Println("create:", err)
return
}
defer h.Close()
fmt.Println("dense handle ready")
}
Output:
Index ¶
- Constants
- func Close() error
- func GetProperty(type_ LibraryPropertyType) (int32, error)
- func GetVersion() (int32, error)
- func Has(symbol string) bool
- func HasCCgels() bool
- func HasCCgelsBufferSize() bool
- func HasCCgesv() bool
- func HasCCgesvBufferSize() bool
- func HasCEgels() bool
- func HasCEgelsBufferSize() bool
- func HasCEgesv() bool
- func HasCEgesvBufferSize() bool
- func HasCKgels() bool
- func HasCKgelsBufferSize() bool
- func HasCKgesv() bool
- func HasCKgesvBufferSize() bool
- func HasCYgels() bool
- func HasCYgelsBufferSize() bool
- func HasCYgesv() bool
- func HasCYgesvBufferSize() bool
- func HasCgebrd() bool
- func HasCgebrdBufferSize() bool
- func HasCgeqrf() bool
- func HasCgeqrfBufferSize() bool
- func HasCgesvd() bool
- func HasCgesvdBufferSize() bool
- func HasCgesvdaStridedBatched() bool
- func HasCgesvdaStridedBatchedBufferSize() bool
- func HasCgesvdj() bool
- func HasCgesvdjBatched() bool
- func HasCgesvdjBatchedBufferSize() bool
- func HasCgesvdjBufferSize() bool
- func HasCgetrf() bool
- func HasCgetrfBufferSize() bool
- func HasCgetrs() bool
- func HasCheevd() bool
- func HasCheevdBufferSize() bool
- func HasCheevdx() bool
- func HasCheevdxBufferSize() bool
- func HasCheevj() bool
- func HasCheevjBatched() bool
- func HasCheevjBatchedBufferSize() bool
- func HasCheevjBufferSize() bool
- func HasChegvd() bool
- func HasChegvdBufferSize() bool
- func HasChegvdx() bool
- func HasChegvdxBufferSize() bool
- func HasChegvj() bool
- func HasChegvjBufferSize() bool
- func HasChetrd() bool
- func HasChetrdBufferSize() bool
- func HasClaswp() bool
- func HasClauum() bool
- func HasClauumBufferSize() bool
- func HasCpotrf() bool
- func HasCpotrfBatched() bool
- func HasCpotrfBufferSize() bool
- func HasCpotri() bool
- func HasCpotriBufferSize() bool
- func HasCpotrs() bool
- func HasCpotrsBatched() bool
- func HasCreate() bool
- func HasCreateGesvdjInfo() bool
- func HasCreateParams() bool
- func HasCreateSyevjInfo() bool
- func HasCsytrf() bool
- func HasCsytrfBufferSize() bool
- func HasCsytri() bool
- func HasCsytriBufferSize() bool
- func HasCungbr() bool
- func HasCungbrBufferSize() bool
- func HasCungqr() bool
- func HasCungqrBufferSize() bool
- func HasCungtr() bool
- func HasCungtrBufferSize() bool
- func HasCunmqr() bool
- func HasCunmqrBufferSize() bool
- func HasCunmtr() bool
- func HasCunmtrBufferSize() bool
- func HasDBgels() bool
- func HasDBgelsBufferSize() bool
- func HasDBgesv() bool
- func HasDBgesvBufferSize() bool
- func HasDDgels() bool
- func HasDDgelsBufferSize() bool
- func HasDDgesv() bool
- func HasDDgesvBufferSize() bool
- func HasDHgels() bool
- func HasDHgelsBufferSize() bool
- func HasDHgesv() bool
- func HasDHgesvBufferSize() bool
- func HasDSgels() bool
- func HasDSgelsBufferSize() bool
- func HasDSgesv() bool
- func HasDSgesvBufferSize() bool
- func HasDXgels() bool
- func HasDXgelsBufferSize() bool
- func HasDXgesv() bool
- func HasDXgesvBufferSize() bool
- func HasDestroy() bool
- func HasDestroyGesvdjInfo() bool
- func HasDestroyParams() bool
- func HasDestroySyevjInfo() bool
- func HasDgebrd() bool
- func HasDgebrdBufferSize() bool
- func HasDgeqrf() bool
- func HasDgeqrfBufferSize() bool
- func HasDgesvd() bool
- func HasDgesvdBufferSize() bool
- func HasDgesvdaStridedBatched() bool
- func HasDgesvdaStridedBatchedBufferSize() bool
- func HasDgesvdj() bool
- func HasDgesvdjBatched() bool
- func HasDgesvdjBatchedBufferSize() bool
- func HasDgesvdjBufferSize() bool
- func HasDgetrf() bool
- func HasDgetrfBufferSize() bool
- func HasDgetrs() bool
- func HasDlaswp() bool
- func HasDlauum() bool
- func HasDlauumBufferSize() bool
- func HasDorgbr() bool
- func HasDorgbrBufferSize() bool
- func HasDorgqr() bool
- func HasDorgqrBufferSize() bool
- func HasDorgtr() bool
- func HasDorgtrBufferSize() bool
- func HasDormqr() bool
- func HasDormqrBufferSize() bool
- func HasDormtr() bool
- func HasDormtrBufferSize() bool
- func HasDpotrf() bool
- func HasDpotrfBatched() bool
- func HasDpotrfBufferSize() bool
- func HasDpotri() bool
- func HasDpotriBufferSize() bool
- func HasDpotrs() bool
- func HasDpotrsBatched() bool
- func HasDsyevd() bool
- func HasDsyevdBufferSize() bool
- func HasDsyevdx() bool
- func HasDsyevdxBufferSize() bool
- func HasDsyevj() bool
- func HasDsyevjBatched() bool
- func HasDsyevjBatchedBufferSize() bool
- func HasDsyevjBufferSize() bool
- func HasDsygvd() bool
- func HasDsygvdBufferSize() bool
- func HasDsygvdx() bool
- func HasDsygvdxBufferSize() bool
- func HasDsygvj() bool
- func HasDsygvjBufferSize() bool
- func HasDsytrd() bool
- func HasDsytrdBufferSize() bool
- func HasDsytrf() bool
- func HasDsytrfBufferSize() bool
- func HasDsytri() bool
- func HasDsytriBufferSize() bool
- func HasGetDeterministicMode() bool
- func HasGetEmulationSpecialValuesSupport() bool
- func HasGetEmulationStrategy() bool
- func HasGetFixedPointEmulationMantissaBitOffset() bool
- func HasGetFixedPointEmulationMantissaControl() bool
- func HasGetFixedPointEmulationMaxMantissaBitCount() bool
- func HasGetMathMode() bool
- func HasGetProperty() bool
- func HasGetStream() bool
- func HasGetVersion() bool
- func HasIRSInfosCreate() bool
- func HasIRSInfosDestroy() bool
- func HasIRSInfosGetMaxIters() bool
- func HasIRSInfosGetNiters() bool
- func HasIRSInfosGetOuterNiters() bool
- func HasIRSInfosGetResidualHistory() bool
- func HasIRSInfosRequestResidual() bool
- func HasIRSParamsCreate() bool
- func HasIRSParamsDestroy() bool
- func HasIRSParamsDisableFallback() bool
- func HasIRSParamsEnableFallback() bool
- func HasIRSParamsGetMaxIters() bool
- func HasIRSParamsSetMaxIters() bool
- func HasIRSParamsSetMaxItersInner() bool
- func HasIRSParamsSetRefinementSolver() bool
- func HasIRSParamsSetSolverLowestPrecision() bool
- func HasIRSParamsSetSolverMainPrecision() bool
- func HasIRSParamsSetSolverPrecisions() bool
- func HasIRSParamsSetTol() bool
- func HasIRSParamsSetTolInner() bool
- func HasIRSXgels() bool
- func HasIRSXgelsBufferSize() bool
- func HasIRSXgesv() bool
- func HasIRSXgesvBufferSize() bool
- func HasLoggerForceDisable() bool
- func HasLoggerOpenFile() bool
- func HasLoggerSetCallback() bool
- func HasLoggerSetFile() bool
- func HasLoggerSetLevel() bool
- func HasLoggerSetMask() bool
- func HasSBgels() bool
- func HasSBgelsBufferSize() bool
- func HasSBgesv() bool
- func HasSBgesvBufferSize() bool
- func HasSHgels() bool
- func HasSHgelsBufferSize() bool
- func HasSHgesv() bool
- func HasSHgesvBufferSize() bool
- func HasSSgels() bool
- func HasSSgelsBufferSize() bool
- func HasSSgesv() bool
- func HasSSgesvBufferSize() bool
- func HasSXgels() bool
- func HasSXgelsBufferSize() bool
- func HasSXgesv() bool
- func HasSXgesvBufferSize() bool
- func HasSetAdvOptions() bool
- func HasSetDeterministicMode() bool
- func HasSetEmulationSpecialValuesSupport() bool
- func HasSetEmulationStrategy() bool
- func HasSetFixedPointEmulationMantissaBitOffset() bool
- func HasSetFixedPointEmulationMantissaControl() bool
- func HasSetFixedPointEmulationMaxMantissaBitCount() bool
- func HasSetMathMode() bool
- func HasSetStream() bool
- func HasSgebrd() bool
- func HasSgebrdBufferSize() bool
- func HasSgeqrf() bool
- func HasSgeqrfBufferSize() bool
- func HasSgesvd() bool
- func HasSgesvdBufferSize() bool
- func HasSgesvdaStridedBatched() bool
- func HasSgesvdaStridedBatchedBufferSize() bool
- func HasSgesvdj() bool
- func HasSgesvdjBatched() bool
- func HasSgesvdjBatchedBufferSize() bool
- func HasSgesvdjBufferSize() bool
- func HasSgetrf() bool
- func HasSgetrfBufferSize() bool
- func HasSgetrs() bool
- func HasSlaswp() bool
- func HasSlauum() bool
- func HasSlauumBufferSize() bool
- func HasSorgbr() bool
- func HasSorgbrBufferSize() bool
- func HasSorgqr() bool
- func HasSorgqrBufferSize() bool
- func HasSorgtr() bool
- func HasSorgtrBufferSize() bool
- func HasSormqr() bool
- func HasSormqrBufferSize() bool
- func HasSormtr() bool
- func HasSormtrBufferSize() bool
- func HasSpotrf() bool
- func HasSpotrfBatched() bool
- func HasSpotrfBufferSize() bool
- func HasSpotri() bool
- func HasSpotriBufferSize() bool
- func HasSpotrs() bool
- func HasSpotrsBatched() bool
- func HasSsyevd() bool
- func HasSsyevdBufferSize() bool
- func HasSsyevdx() bool
- func HasSsyevdxBufferSize() bool
- func HasSsyevj() bool
- func HasSsyevjBatched() bool
- func HasSsyevjBatchedBufferSize() bool
- func HasSsyevjBufferSize() bool
- func HasSsygvd() bool
- func HasSsygvdBufferSize() bool
- func HasSsygvdx() bool
- func HasSsygvdxBufferSize() bool
- func HasSsygvj() bool
- func HasSsygvjBufferSize() bool
- func HasSsytrd() bool
- func HasSsytrdBufferSize() bool
- func HasSsytrf() bool
- func HasSsytrfBufferSize() bool
- func HasSsytri() bool
- func HasSsytriBufferSize() bool
- func HasXgeev() bool
- func HasXgeevBufferSize() bool
- func HasXgeqrf() bool
- func HasXgeqrfBufferSize() bool
- func HasXgesvd() bool
- func HasXgesvdBufferSize() bool
- func HasXgesvdjGetResidual() bool
- func HasXgesvdjGetSweeps() bool
- func HasXgesvdjSetMaxSweeps() bool
- func HasXgesvdjSetSortEig() bool
- func HasXgesvdjSetTolerance() bool
- func HasXgesvdp() bool
- func HasXgesvdpBufferSize() bool
- func HasXgesvdr() bool
- func HasXgesvdrBufferSize() bool
- func HasXgetrf() bool
- func HasXgetrfBufferSize() bool
- func HasXgetrs() bool
- func HasXhetrf() bool
- func HasXhetrfBufferSize() bool
- func HasXhetrs() bool
- func HasXhetrsBufferSize() bool
- func HasXlarft() bool
- func HasXlarftBufferSize() bool
- func HasXpolar() bool
- func HasXpolarBufferSize() bool
- func HasXpotrf() bool
- func HasXpotrfBufferSize() bool
- func HasXpotrs() bool
- func HasXstedc() bool
- func HasXstedcBufferSize() bool
- func HasXsyevBatched() bool
- func HasXsyevBatchedBufferSize() bool
- func HasXsyevd() bool
- func HasXsyevdBufferSize() bool
- func HasXsyevdx() bool
- func HasXsyevdxBufferSize() bool
- func HasXsyevjGetResidual() bool
- func HasXsyevjGetSweeps() bool
- func HasXsyevjSetMaxSweeps() bool
- func HasXsyevjSetSortEig() bool
- func HasXsyevjSetTolerance() bool
- func HasXsygvStridedBatched() bool
- func HasXsygvStridedBatchedBufferSize() bool
- func HasXsygvd() bool
- func HasXsygvdBufferSize() bool
- func HasXsygvdx() bool
- func HasXsygvdxBufferSize() bool
- func HasXsytrf() bool
- func HasXsytrfBufferSize() bool
- func HasXsytrs() bool
- func HasXsytrsBufferSize() bool
- func HasXtrtri() bool
- func HasXtrtriBufferSize() bool
- func HasZCgels() bool
- func HasZCgelsBufferSize() bool
- func HasZCgesv() bool
- func HasZCgesvBufferSize() bool
- func HasZEgels() bool
- func HasZEgelsBufferSize() bool
- func HasZEgesv() bool
- func HasZEgesvBufferSize() bool
- func HasZKgels() bool
- func HasZKgelsBufferSize() bool
- func HasZKgesv() bool
- func HasZKgesvBufferSize() bool
- func HasZYgels() bool
- func HasZYgelsBufferSize() bool
- func HasZYgesv() bool
- func HasZYgesvBufferSize() bool
- func HasZZgels() bool
- func HasZZgelsBufferSize() bool
- func HasZZgesv() bool
- func HasZZgesvBufferSize() bool
- func HasZgebrd() bool
- func HasZgebrdBufferSize() bool
- func HasZgeqrf() bool
- func HasZgeqrfBufferSize() bool
- func HasZgesvd() bool
- func HasZgesvdBufferSize() bool
- func HasZgesvdaStridedBatched() bool
- func HasZgesvdaStridedBatchedBufferSize() bool
- func HasZgesvdj() bool
- func HasZgesvdjBatched() bool
- func HasZgesvdjBatchedBufferSize() bool
- func HasZgesvdjBufferSize() bool
- func HasZgetrf() bool
- func HasZgetrfBufferSize() bool
- func HasZgetrs() bool
- func HasZheevd() bool
- func HasZheevdBufferSize() bool
- func HasZheevdx() bool
- func HasZheevdxBufferSize() bool
- func HasZheevj() bool
- func HasZheevjBatched() bool
- func HasZheevjBatchedBufferSize() bool
- func HasZheevjBufferSize() bool
- func HasZhegvd() bool
- func HasZhegvdBufferSize() bool
- func HasZhegvdx() bool
- func HasZhegvdxBufferSize() bool
- func HasZhegvj() bool
- func HasZhegvjBufferSize() bool
- func HasZhetrd() bool
- func HasZhetrdBufferSize() bool
- func HasZlaswp() bool
- func HasZlauum() bool
- func HasZlauumBufferSize() bool
- func HasZpotrf() bool
- func HasZpotrfBatched() bool
- func HasZpotrfBufferSize() bool
- func HasZpotri() bool
- func HasZpotriBufferSize() bool
- func HasZpotrs() bool
- func HasZpotrsBatched() bool
- func HasZsytrf() bool
- func HasZsytrfBufferSize() bool
- func HasZsytri() bool
- func HasZsytriBufferSize() bool
- func HasZungbr() bool
- func HasZungbrBufferSize() bool
- func HasZungqr() bool
- func HasZungqrBufferSize() bool
- func HasZungtr() bool
- func HasZungtrBufferSize() bool
- func HasZunmqr() bool
- func HasZunmqrBufferSize() bool
- func HasZunmtr() bool
- func HasZunmtrBufferSize() bool
- func Load(path string) error
- func Loaded() bool
- func LoggerForceDisable() error
- func LoggerOpenFile(logFile *byte) error
- func LoggerSetCallback(callback LoggerCallback) error
- func LoggerSetFile(file *FILE) error
- func LoggerSetLevel(level int32) error
- func LoggerSetMask(mask int32) error
- func Path() string
- type AlgMode
- type BindFailure
- type CallError
- type Complex64
- type Complex128
- type CusolverInt
- type DataType
- type DeterministicMode
- type DiagType
- type DirectMode
- type EigComp
- type EigMode
- type EigRange
- type EigType
- type EmulationMantissaControl
- type EmulationSpecialValuesSupport
- type EmulationStrategy
- type FILE
- type FillMode
- type Function
- type GesvdjInfo
- type Handle
- func (h Handle) CCgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) error
- func (h Handle) CCgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) (uint, error)
- func (h Handle) CCgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) error
- func (h Handle) CCgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) (uint, error)
- func (h Handle) CEgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) error
- func (h Handle) CEgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) (uint, error)
- func (h Handle) CEgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) error
- func (h Handle) CEgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) (uint, error)
- func (h Handle) CKgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) error
- func (h Handle) CKgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) (uint, error)
- func (h Handle) CKgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) error
- func (h Handle) CKgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) (uint, error)
- func (h Handle) CYgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) error
- func (h Handle) CYgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) (uint, error)
- func (h Handle) CYgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) error
- func (h Handle) CYgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) (uint, error)
- func (h Handle) Cgebrd(m int32, n int32, a driver.DevicePtr, lda int32, d driver.DevicePtr, ...) error
- func (h Handle) CgebrdBufferSize(m int32, n int32) (int32, error)
- func (h Handle) Cgeqrf(m int32, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, ...) error
- func (h Handle) CgeqrfBufferSize(m int32, n int32, a driver.DevicePtr, lda int32) (int32, error)
- func (h Handle) Cgesvd(jobu int8, jobvt int8, m int32, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) CgesvdBufferSize(m int32, n int32) (int32, error)
- func (h Handle) CgesvdaStridedBatched(jobz EigMode, rank int32, m int32, n int32, dA driver.DevicePtr, lda int32, ...) error
- func (h Handle) CgesvdaStridedBatchedBufferSize(jobz EigMode, rank int32, m int32, n int32, dA driver.DevicePtr, lda int32, ...) error
- func (h Handle) Cgesvdj(jobz EigMode, econ int32, m int32, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) CgesvdjBatched(jobz EigMode, m int32, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) CgesvdjBatchedBufferSize(jobz EigMode, m int32, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) CgesvdjBufferSize(jobz EigMode, econ int32, m int32, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) Cgetrf(m int32, n int32, a driver.DevicePtr, lda int32, workspace driver.DevicePtr, ...) error
- func (h Handle) CgetrfBufferSize(m int32, n int32, a driver.DevicePtr, lda int32) (int32, error)
- func (h Handle) Cgetrs(trans Operation, n int32, nrhs int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) Cheevd(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) CheevdBufferSize(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, ...) (int32, error)
- func (h Handle) Cheevdx(jobz EigMode, range_ EigRange, uplo FillMode, n int32, a driver.DevicePtr, ...) error
- func (h Handle) CheevdxBufferSize(jobz EigMode, range_ EigRange, uplo FillMode, n int32, a driver.DevicePtr, ...) (meig int32, lwork int32, err error)
- func (h Handle) Cheevj(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) CheevjBatched(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) CheevjBatchedBufferSize(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) CheevjBufferSize(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) Chegvd(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, ...) error
- func (h Handle) ChegvdBufferSize(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, ...) (int32, error)
- func (h Handle) Chegvdx(itype EigType, jobz EigMode, range_ EigRange, uplo FillMode, n int32, ...) error
- func (h Handle) ChegvdxBufferSize(itype EigType, jobz EigMode, range_ EigRange, uplo FillMode, n int32, ...) (meig int32, lwork int32, err error)
- func (h Handle) Chegvj(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, ...) error
- func (h Handle) ChegvjBufferSize(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, ...) error
- func (h Handle) Chetrd(uplo FillMode, n int32, a driver.DevicePtr, lda int32, d driver.DevicePtr, ...) error
- func (h Handle) ChetrdBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32, d driver.DevicePtr, ...) (int32, error)
- func (h Handle) Claswp(n int32, a driver.DevicePtr, lda int32, k1 int32, k2 int32, ...) error
- func (h Handle) Clauum(uplo FillMode, n int32, a driver.DevicePtr, lda int32, work driver.DevicePtr, ...) error
- func (h Handle) ClauumBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32) (int32, error)
- func (h *Handle) Close() error
- func (h Handle) Cpotrf(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) CpotrfBatched(uplo FillMode, n int32, aarray driver.DevicePtr, lda int32, ...) error
- func (h Handle) CpotrfBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32) (int32, error)
- func (h Handle) Cpotri(uplo FillMode, n int32, a driver.DevicePtr, lda int32, work driver.DevicePtr, ...) error
- func (h Handle) CpotriBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32) (int32, error)
- func (h Handle) Cpotrs(uplo FillMode, n int32, nrhs int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) CpotrsBatched(uplo FillMode, n int32, nrhs int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) Csytrf(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ipiv driver.DevicePtr, ...) error
- func (h Handle) CsytrfBufferSize(n int32, a driver.DevicePtr, lda int32) (int32, error)
- func (h Handle) Csytri(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ipiv driver.DevicePtr, ...) error
- func (h Handle) CsytriBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ipiv driver.DevicePtr) (int32, error)
- func (h Handle) Cungbr(side SideMode, m int32, n int32, k int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) CungbrBufferSize(side SideMode, m int32, n int32, k int32, a driver.DevicePtr, lda int32, ...) (int32, error)
- func (h Handle) Cungqr(m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, ...) error
- func (h Handle) CungqrBufferSize(m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr) (int32, error)
- func (h Handle) Cungtr(uplo FillMode, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, ...) error
- func (h Handle) CungtrBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr) (int32, error)
- func (h Handle) Cunmqr(side SideMode, trans Operation, m int32, n int32, k int32, a driver.DevicePtr, ...) error
- func (h Handle) CunmqrBufferSize(side SideMode, trans Operation, m int32, n int32, k int32, a driver.DevicePtr, ...) (int32, error)
- func (h Handle) Cunmtr(side SideMode, uplo FillMode, trans Operation, m int32, n int32, ...) error
- func (h Handle) CunmtrBufferSize(side SideMode, uplo FillMode, trans Operation, m int32, n int32, ...) (int32, error)
- func (h Handle) DBgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) error
- func (h Handle) DBgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) (uint, error)
- func (h Handle) DBgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) error
- func (h Handle) DBgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) (uint, error)
- func (h Handle) DDgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) error
- func (h Handle) DDgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) (uint, error)
- func (h Handle) DDgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) error
- func (h Handle) DDgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) (uint, error)
- func (h Handle) DHgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) error
- func (h Handle) DHgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) (uint, error)
- func (h Handle) DHgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) error
- func (h Handle) DHgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) (uint, error)
- func (h Handle) DSgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) error
- func (h Handle) DSgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) (uint, error)
- func (h Handle) DSgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) error
- func (h Handle) DSgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) (uint, error)
- func (h Handle) DXgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) error
- func (h Handle) DXgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) (uint, error)
- func (h Handle) DXgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) error
- func (h Handle) DXgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) (uint, error)
- func (h Handle) DeterministicMode() (DeterministicMode, error)
- func (h Handle) Dgebrd(m int32, n int32, a driver.DevicePtr, lda int32, d driver.DevicePtr, ...) error
- func (h Handle) DgebrdBufferSize(m int32, n int32) (int32, error)
- func (h Handle) Dgeqrf(m int32, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, ...) error
- func (h Handle) DgeqrfBufferSize(m int32, n int32, a driver.DevicePtr, lda int32) (int32, error)
- func (h Handle) Dgesvd(jobu int8, jobvt int8, m int32, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) DgesvdBufferSize(m int32, n int32) (int32, error)
- func (h Handle) DgesvdaStridedBatched(jobz EigMode, rank int32, m int32, n int32, dA driver.DevicePtr, lda int32, ...) error
- func (h Handle) DgesvdaStridedBatchedBufferSize(jobz EigMode, rank int32, m int32, n int32, dA driver.DevicePtr, lda int32, ...) error
- func (h Handle) Dgesvdj(jobz EigMode, econ int32, m int32, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) DgesvdjBatched(jobz EigMode, m int32, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) DgesvdjBatchedBufferSize(jobz EigMode, m int32, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) DgesvdjBufferSize(jobz EigMode, econ int32, m int32, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) Dgetrf(m int32, n int32, a driver.DevicePtr, lda int32, workspace driver.DevicePtr, ...) error
- func (h Handle) DgetrfBufferSize(m int32, n int32, a driver.DevicePtr, lda int32) (int32, error)
- func (h Handle) Dgetrs(trans Operation, n int32, nrhs int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) Dlaswp(n int32, a driver.DevicePtr, lda int32, k1 int32, k2 int32, ...) error
- func (h Handle) Dlauum(uplo FillMode, n int32, a driver.DevicePtr, lda int32, work driver.DevicePtr, ...) error
- func (h Handle) DlauumBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32) (int32, error)
- func (h Handle) Dorgbr(side SideMode, m int32, n int32, k int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) DorgbrBufferSize(side SideMode, m int32, n int32, k int32, a driver.DevicePtr, lda int32, ...) (int32, error)
- func (h Handle) Dorgqr(m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, ...) error
- func (h Handle) DorgqrBufferSize(m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr) (int32, error)
- func (h Handle) Dorgtr(uplo FillMode, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, ...) error
- func (h Handle) DorgtrBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr) (int32, error)
- func (h Handle) Dormqr(side SideMode, trans Operation, m int32, n int32, k int32, a driver.DevicePtr, ...) error
- func (h Handle) DormqrBufferSize(side SideMode, trans Operation, m int32, n int32, k int32, a driver.DevicePtr, ...) (int32, error)
- func (h Handle) Dormtr(side SideMode, uplo FillMode, trans Operation, m int32, n int32, ...) error
- func (h Handle) DormtrBufferSize(side SideMode, uplo FillMode, trans Operation, m int32, n int32, ...) (int32, error)
- func (h Handle) Dpotrf(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) DpotrfBatched(uplo FillMode, n int32, aarray driver.DevicePtr, lda int32, ...) error
- func (h Handle) DpotrfBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32) (int32, error)
- func (h Handle) Dpotri(uplo FillMode, n int32, a driver.DevicePtr, lda int32, work driver.DevicePtr, ...) error
- func (h Handle) DpotriBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32) (int32, error)
- func (h Handle) Dpotrs(uplo FillMode, n int32, nrhs int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) DpotrsBatched(uplo FillMode, n int32, nrhs int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) Dsyevd(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) DsyevdBufferSize(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, ...) (int32, error)
- func (h Handle) Dsyevdx(jobz EigMode, range_ EigRange, uplo FillMode, n int32, a driver.DevicePtr, ...) error
- func (h Handle) DsyevdxBufferSize(jobz EigMode, range_ EigRange, uplo FillMode, n int32, a driver.DevicePtr, ...) (meig int32, lwork int32, err error)
- func (h Handle) Dsyevj(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) DsyevjBatched(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) DsyevjBatchedBufferSize(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) DsyevjBufferSize(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) Dsygvd(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, ...) error
- func (h Handle) DsygvdBufferSize(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, ...) (int32, error)
- func (h Handle) Dsygvdx(itype EigType, jobz EigMode, range_ EigRange, uplo FillMode, n int32, ...) error
- func (h Handle) DsygvdxBufferSize(itype EigType, jobz EigMode, range_ EigRange, uplo FillMode, n int32, ...) (meig int32, lwork int32, err error)
- func (h Handle) Dsygvj(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, ...) error
- func (h Handle) DsygvjBufferSize(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, ...) error
- func (h Handle) Dsytrd(uplo FillMode, n int32, a driver.DevicePtr, lda int32, d driver.DevicePtr, ...) error
- func (h Handle) DsytrdBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32, d driver.DevicePtr, ...) (int32, error)
- func (h Handle) Dsytrf(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ipiv driver.DevicePtr, ...) error
- func (h Handle) DsytrfBufferSize(n int32, a driver.DevicePtr, lda int32) (int32, error)
- func (h Handle) Dsytri(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ipiv driver.DevicePtr, ...) error
- func (h Handle) DsytriBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ipiv driver.DevicePtr) (int32, error)
- func (h Handle) EmulationSpecialValuesSupport() (EmulationSpecialValuesSupport, error)
- func (h Handle) EmulationStrategy() (EmulationStrategy, error)
- func (h Handle) FixedPointEmulationMantissaBitOffset() (int32, error)
- func (h Handle) FixedPointEmulationMantissaControl() (EmulationMantissaControl, error)
- func (h Handle) FixedPointEmulationMaxMantissaBitCount() (int32, error)
- func (h Handle) IRSXgels(gelsIrsParams IRSParams, gelsIrsInfos IRSInfos, m CusolverInt, n CusolverInt, ...) error
- func (h Handle) IRSXgelsBufferSize(params IRSParams, m CusolverInt, n CusolverInt, nrhs CusolverInt) (uint, error)
- func (h Handle) IRSXgesv(gesvIrsParams IRSParams, gesvIrsInfos IRSInfos, n CusolverInt, ...) error
- func (h Handle) IRSXgesvBufferSize(params IRSParams, n CusolverInt, nrhs CusolverInt) (uint, error)
- func (h Handle) MathMode() (MathMode, error)
- func (h Handle) SBgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) error
- func (h Handle) SBgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) (uint, error)
- func (h Handle) SBgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) error
- func (h Handle) SBgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) (uint, error)
- func (h Handle) SHgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) error
- func (h Handle) SHgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) (uint, error)
- func (h Handle) SHgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) error
- func (h Handle) SHgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) (uint, error)
- func (h Handle) SSgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) error
- func (h Handle) SSgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) (uint, error)
- func (h Handle) SSgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) error
- func (h Handle) SSgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) (uint, error)
- func (h Handle) SXgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) error
- func (h Handle) SXgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) (uint, error)
- func (h Handle) SXgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) error
- func (h Handle) SXgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) (uint, error)
- func (h Handle) SetDeterministicMode(mode DeterministicMode) error
- func (h Handle) SetEmulationSpecialValuesSupport(mask EmulationSpecialValuesSupport) error
- func (h Handle) SetEmulationStrategy(strategy EmulationStrategy) error
- func (h Handle) SetFixedPointEmulationMantissaBitOffset(mantissaBitOffset int32) error
- func (h Handle) SetFixedPointEmulationMantissaControl(control EmulationMantissaControl) error
- func (h Handle) SetFixedPointEmulationMaxMantissaBitCount(mantissaBitCount int32) error
- func (h Handle) SetMathMode(mode MathMode) error
- func (h Handle) SetStream(streamId driver.Stream) error
- func (h Handle) Sgebrd(m int32, n int32, a driver.DevicePtr, lda int32, d driver.DevicePtr, ...) error
- func (h Handle) SgebrdBufferSize(m int32, n int32) (int32, error)
- func (h Handle) Sgeqrf(m int32, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, ...) error
- func (h Handle) SgeqrfBufferSize(m int32, n int32, a driver.DevicePtr, lda int32) (int32, error)
- func (h Handle) Sgesvd(jobu int8, jobvt int8, m int32, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) SgesvdBufferSize(m int32, n int32) (int32, error)
- func (h Handle) SgesvdaStridedBatched(jobz EigMode, rank int32, m int32, n int32, dA driver.DevicePtr, lda int32, ...) error
- func (h Handle) SgesvdaStridedBatchedBufferSize(jobz EigMode, rank int32, m int32, n int32, dA driver.DevicePtr, lda int32, ...) error
- func (h Handle) Sgesvdj(jobz EigMode, econ int32, m int32, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) SgesvdjBatched(jobz EigMode, m int32, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) SgesvdjBatchedBufferSize(jobz EigMode, m int32, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) SgesvdjBufferSize(jobz EigMode, econ int32, m int32, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) Sgetrf(m int32, n int32, a driver.DevicePtr, lda int32, workspace driver.DevicePtr, ...) error
- func (h Handle) SgetrfBufferSize(m int32, n int32, a driver.DevicePtr, lda int32) (int32, error)
- func (h Handle) Sgetrs(trans Operation, n int32, nrhs int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) Slaswp(n int32, a driver.DevicePtr, lda int32, k1 int32, k2 int32, ...) error
- func (h Handle) Slauum(uplo FillMode, n int32, a driver.DevicePtr, lda int32, work driver.DevicePtr, ...) error
- func (h Handle) SlauumBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32) (int32, error)
- func (h Handle) Sorgbr(side SideMode, m int32, n int32, k int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) SorgbrBufferSize(side SideMode, m int32, n int32, k int32, a driver.DevicePtr, lda int32, ...) (int32, error)
- func (h Handle) Sorgqr(m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, ...) error
- func (h Handle) SorgqrBufferSize(m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr) (int32, error)
- func (h Handle) Sorgtr(uplo FillMode, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, ...) error
- func (h Handle) SorgtrBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr) (int32, error)
- func (h Handle) Sormqr(side SideMode, trans Operation, m int32, n int32, k int32, a driver.DevicePtr, ...) error
- func (h Handle) SormqrBufferSize(side SideMode, trans Operation, m int32, n int32, k int32, a driver.DevicePtr, ...) (int32, error)
- func (h Handle) Sormtr(side SideMode, uplo FillMode, trans Operation, m int32, n int32, ...) error
- func (h Handle) SormtrBufferSize(side SideMode, uplo FillMode, trans Operation, m int32, n int32, ...) (int32, error)
- func (h Handle) Spotrf(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) SpotrfBatched(uplo FillMode, n int32, aarray driver.DevicePtr, lda int32, ...) error
- func (h Handle) SpotrfBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32) (int32, error)
- func (h Handle) Spotri(uplo FillMode, n int32, a driver.DevicePtr, lda int32, work driver.DevicePtr, ...) error
- func (h Handle) SpotriBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32) (int32, error)
- func (h Handle) Spotrs(uplo FillMode, n int32, nrhs int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) SpotrsBatched(uplo FillMode, n int32, nrhs int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) Ssyevd(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) SsyevdBufferSize(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, ...) (int32, error)
- func (h Handle) Ssyevdx(jobz EigMode, range_ EigRange, uplo FillMode, n int32, a driver.DevicePtr, ...) error
- func (h Handle) SsyevdxBufferSize(jobz EigMode, range_ EigRange, uplo FillMode, n int32, a driver.DevicePtr, ...) (meig int32, lwork int32, err error)
- func (h Handle) Ssyevj(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) SsyevjBatched(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) SsyevjBatchedBufferSize(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) SsyevjBufferSize(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) Ssygvd(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, ...) error
- func (h Handle) SsygvdBufferSize(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, ...) (int32, error)
- func (h Handle) Ssygvdx(itype EigType, jobz EigMode, range_ EigRange, uplo FillMode, n int32, ...) error
- func (h Handle) SsygvdxBufferSize(itype EigType, jobz EigMode, range_ EigRange, uplo FillMode, n int32, ...) (meig int32, lwork int32, err error)
- func (h Handle) Ssygvj(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, ...) error
- func (h Handle) SsygvjBufferSize(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, ...) error
- func (h Handle) Ssytrd(uplo FillMode, n int32, a driver.DevicePtr, lda int32, d driver.DevicePtr, ...) error
- func (h Handle) SsytrdBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32, d driver.DevicePtr, ...) (int32, error)
- func (h Handle) Ssytrf(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ipiv driver.DevicePtr, ...) error
- func (h Handle) SsytrfBufferSize(n int32, a driver.DevicePtr, lda int32) (int32, error)
- func (h Handle) Ssytri(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ipiv driver.DevicePtr, ...) error
- func (h Handle) SsytriBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ipiv driver.DevicePtr) (int32, error)
- func (h Handle) Stream() (driver.Stream, error)
- func (h Handle) Xgeev(params Params, jobvl EigMode, jobvr EigMode, n int64, dataTypeA DataType, ...) error
- func (h Handle) XgeevBufferSize(params Params, jobvl EigMode, jobvr EigMode, n int64, dataTypeA DataType, ...) (workspaceInBytesOnDevice uint, workspaceInBytesOnHost uint, err error)
- func (h Handle) Xgeqrf(params Params, m int64, n int64, dataTypeA DataType, a driver.DevicePtr, ...) error
- func (h Handle) XgeqrfBufferSize(params Params, m int64, n int64, dataTypeA DataType, a driver.DevicePtr, ...) (workspaceInBytesOnDevice uint, workspaceInBytesOnHost uint, err error)
- func (h Handle) Xgesvd(params Params, jobu int8, jobvt int8, m int64, n int64, dataTypeA DataType, ...) error
- func (h Handle) XgesvdBufferSize(params Params, jobu int8, jobvt int8, m int64, n int64, dataTypeA DataType, ...) (workspaceInBytesOnDevice uint, workspaceInBytesOnHost uint, err error)
- func (h Handle) XgesvdjGetResidual(info GesvdjInfo) (float64, error)
- func (h Handle) XgesvdjGetSweeps(info GesvdjInfo) (int32, error)
- func (h Handle) Xgesvdp(params Params, jobz EigMode, econ int32, m int64, n int64, dataTypeA DataType, ...) error
- func (h Handle) XgesvdpBufferSize(params Params, jobz EigMode, econ int32, m int64, n int64, dataTypeA DataType, ...) (workspaceInBytesOnDevice uint, workspaceInBytesOnHost uint, err error)
- func (h Handle) Xgesvdr(params Params, jobu int8, jobv int8, m int64, n int64, k int64, p int64, ...) error
- func (h Handle) XgesvdrBufferSize(params Params, jobu int8, jobv int8, m int64, n int64, k int64, p int64, ...) (workspaceInBytesOnDevice uint, workspaceInBytesOnHost uint, err error)
- func (h Handle) Xgetrf(params Params, m int64, n int64, dataTypeA DataType, a driver.DevicePtr, ...) error
- func (h Handle) XgetrfBufferSize(params Params, m int64, n int64, dataTypeA DataType, a driver.DevicePtr, ...) (workspaceInBytesOnDevice uint, workspaceInBytesOnHost uint, err error)
- func (h Handle) Xgetrs(params Params, trans Operation, n int64, nrhs int64, dataTypeA DataType, ...) error
- func (h Handle) Xhetrf(params Params, uplo FillMode, n int64, dataTypeA DataType, a driver.DevicePtr, ...) error
- func (h Handle) XhetrfBufferSize(params Params, uplo FillMode, n int64, dataTypeA DataType, a driver.DevicePtr, ...) error
- func (h Handle) Xhetrs(params Params, uplo FillMode, n int64, nrhs int64, dataTypeA DataType, ...) error
- func (h Handle) XhetrsBufferSize(params Params, uplo FillMode, n int64, nrhs int64, dataTypeA DataType, ...) error
- func (h Handle) Xlarft(params Params, direct DirectMode, storev StorevMode, n int64, k int64, ...) error
- func (h Handle) XlarftBufferSize(params Params, direct DirectMode, storev StorevMode, n int64, k int64, ...) (workspaceInBytesOnDevice uint, workspaceInBytesOnHost uint, err error)
- func (ha Handle) Xpolar(params Params, uplo FillMode, m int64, n int64, dataTypeA DataType, ...) error
- func (ha Handle) XpolarBufferSize(params Params, uplo FillMode, m int64, n int64, dataTypeA DataType, ...) error
- func (h Handle) Xpotrf(params Params, uplo FillMode, n int64, dataTypeA DataType, a driver.DevicePtr, ...) error
- func (h Handle) XpotrfBufferSize(params Params, uplo FillMode, n int64, dataTypeA DataType, a driver.DevicePtr, ...) (workspaceInBytesOnDevice uint, workspaceInBytesOnHost uint, err error)
- func (h Handle) Xpotrs(params Params, uplo FillMode, n int64, nrhs int64, dataTypeA DataType, ...) error
- func (h Handle) Xstedc(params Params, compz EigComp, n int64, dataTypeDE DataType, d driver.DevicePtr, ...) error
- func (h Handle) XstedcBufferSize(params Params, compz EigComp, n int64, dataTypeDE DataType, d driver.DevicePtr, ...) error
- func (h Handle) XsyevBatched(params Params, jobz EigMode, uplo FillMode, n int64, dataTypeA DataType, ...) error
- func (h Handle) XsyevBatchedBufferSize(params Params, jobz EigMode, uplo FillMode, n int64, dataTypeA DataType, ...) error
- func (h Handle) Xsyevd(params Params, jobz EigMode, uplo FillMode, n int64, dataTypeA DataType, ...) error
- func (h Handle) XsyevdBufferSize(params Params, jobz EigMode, uplo FillMode, n int64, dataTypeA DataType, ...) (workspaceInBytesOnDevice uint, workspaceInBytesOnHost uint, err error)
- func (h Handle) Xsyevdx(params Params, jobz EigMode, range_ EigRange, uplo FillMode, n int64, ...) error
- func (h Handle) XsyevdxBufferSize(params Params, jobz EigMode, range_ EigRange, uplo FillMode, n int64, ...) (hMeig int64, workspaceInBytesOnDevice uint, workspaceInBytesOnHost uint, ...)
- func (h Handle) XsyevjGetResidual(info SyevjInfo) (float64, error)
- func (h Handle) XsyevjGetSweeps(info SyevjInfo) (int32, error)
- func (h Handle) XsygvStridedBatched(params Params, itype EigType, jobz EigMode, uplo FillMode, n int64, ...) error
- func (h Handle) XsygvStridedBatchedBufferSize(params Params, itype EigType, jobz EigMode, uplo FillMode, n int64, ...) error
- func (h Handle) Xsygvd(params Params, itype EigType, jobz EigMode, uplo FillMode, n int64, ...) error
- func (h Handle) XsygvdBufferSize(params Params, itype EigType, jobz EigMode, uplo FillMode, n int64, ...) (workspaceInBytesOnDevice uint, workspaceInBytesOnHost uint, err error)
- func (h Handle) Xsygvdx(params Params, itype EigType, jobz EigMode, range_ EigRange, uplo FillMode, ...) error
- func (h Handle) XsygvdxBufferSize(params Params, itype EigType, jobz EigMode, uplo FillMode, n int64, ...) (meig int64, workspaceInBytesOnDevice uint, workspaceInBytesOnHost uint, ...)
- func (h Handle) Xsytrf(params Params, uplo FillMode, n int64, dataTypeA DataType, a driver.DevicePtr, ...) error
- func (h Handle) XsytrfBufferSize(params Params, uplo FillMode, n int64, dataTypeA DataType, a driver.DevicePtr, ...) error
- func (h Handle) Xsytrs(uplo FillMode, n int64, nrhs int64, dataTypeA DataType, a driver.DevicePtr, ...) error
- func (h Handle) XsytrsBufferSize(uplo FillMode, n int64, nrhs int64, dataTypeA DataType, a driver.DevicePtr, ...) (workspaceInBytesOnDevice uint, workspaceInBytesOnHost uint, err error)
- func (h Handle) Xtrtri(uplo FillMode, diag DiagType, n int64, dataTypeA DataType, a driver.DevicePtr, ...) error
- func (h Handle) XtrtriBufferSize(uplo FillMode, diag DiagType, n int64, dataTypeA DataType, a driver.DevicePtr, ...) (workspaceInBytesOnDevice uint, workspaceInBytesOnHost uint, err error)
- func (h Handle) ZCgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) error
- func (h Handle) ZCgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) (uint, error)
- func (h Handle) ZCgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) error
- func (h Handle) ZCgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) (uint, error)
- func (h Handle) ZEgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) error
- func (h Handle) ZEgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) (uint, error)
- func (h Handle) ZEgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) error
- func (h Handle) ZEgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) (uint, error)
- func (h Handle) ZKgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) error
- func (h Handle) ZKgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) (uint, error)
- func (h Handle) ZKgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) error
- func (h Handle) ZKgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) (uint, error)
- func (h Handle) ZYgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) error
- func (h Handle) ZYgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) (uint, error)
- func (h Handle) ZYgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) error
- func (h Handle) ZYgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) (uint, error)
- func (h Handle) ZZgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) error
- func (h Handle) ZZgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ...) (uint, error)
- func (h Handle) ZZgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) error
- func (h Handle) ZZgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, ...) (uint, error)
- func (h Handle) Zgebrd(m int32, n int32, a driver.DevicePtr, lda int32, d driver.DevicePtr, ...) error
- func (h Handle) ZgebrdBufferSize(m int32, n int32) (int32, error)
- func (h Handle) Zgeqrf(m int32, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, ...) error
- func (h Handle) ZgeqrfBufferSize(m int32, n int32, a driver.DevicePtr, lda int32) (int32, error)
- func (h Handle) Zgesvd(jobu int8, jobvt int8, m int32, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) ZgesvdBufferSize(m int32, n int32) (int32, error)
- func (h Handle) ZgesvdaStridedBatched(jobz EigMode, rank int32, m int32, n int32, dA driver.DevicePtr, lda int32, ...) error
- func (h Handle) ZgesvdaStridedBatchedBufferSize(jobz EigMode, rank int32, m int32, n int32, dA driver.DevicePtr, lda int32, ...) error
- func (h Handle) Zgesvdj(jobz EigMode, econ int32, m int32, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) ZgesvdjBatched(jobz EigMode, m int32, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) ZgesvdjBatchedBufferSize(jobz EigMode, m int32, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) ZgesvdjBufferSize(jobz EigMode, econ int32, m int32, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) Zgetrf(m int32, n int32, a driver.DevicePtr, lda int32, workspace driver.DevicePtr, ...) error
- func (h Handle) ZgetrfBufferSize(m int32, n int32, a driver.DevicePtr, lda int32) (int32, error)
- func (h Handle) Zgetrs(trans Operation, n int32, nrhs int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) Zheevd(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) ZheevdBufferSize(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, ...) (int32, error)
- func (h Handle) Zheevdx(jobz EigMode, range_ EigRange, uplo FillMode, n int32, a driver.DevicePtr, ...) error
- func (h Handle) ZheevdxBufferSize(jobz EigMode, range_ EigRange, uplo FillMode, n int32, a driver.DevicePtr, ...) (meig int32, lwork int32, err error)
- func (h Handle) Zheevj(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) ZheevjBatched(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) ZheevjBatchedBufferSize(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) ZheevjBufferSize(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) Zhegvd(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, ...) error
- func (h Handle) ZhegvdBufferSize(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, ...) (int32, error)
- func (h Handle) Zhegvdx(itype EigType, jobz EigMode, range_ EigRange, uplo FillMode, n int32, ...) error
- func (h Handle) ZhegvdxBufferSize(itype EigType, jobz EigMode, range_ EigRange, uplo FillMode, n int32, ...) (meig int32, lwork int32, err error)
- func (h Handle) Zhegvj(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, ...) error
- func (h Handle) ZhegvjBufferSize(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, ...) error
- func (h Handle) Zhetrd(uplo FillMode, n int32, a driver.DevicePtr, lda int32, d driver.DevicePtr, ...) error
- func (h Handle) ZhetrdBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32, d driver.DevicePtr, ...) (int32, error)
- func (h Handle) Zlaswp(n int32, a driver.DevicePtr, lda int32, k1 int32, k2 int32, ...) error
- func (h Handle) Zlauum(uplo FillMode, n int32, a driver.DevicePtr, lda int32, work driver.DevicePtr, ...) error
- func (h Handle) ZlauumBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32) (int32, error)
- func (h Handle) Zpotrf(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) ZpotrfBatched(uplo FillMode, n int32, aarray driver.DevicePtr, lda int32, ...) error
- func (h Handle) ZpotrfBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32) (int32, error)
- func (h Handle) Zpotri(uplo FillMode, n int32, a driver.DevicePtr, lda int32, work driver.DevicePtr, ...) error
- func (h Handle) ZpotriBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32) (int32, error)
- func (h Handle) Zpotrs(uplo FillMode, n int32, nrhs int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) ZpotrsBatched(uplo FillMode, n int32, nrhs int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) Zsytrf(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ipiv driver.DevicePtr, ...) error
- func (h Handle) ZsytrfBufferSize(n int32, a driver.DevicePtr, lda int32) (int32, error)
- func (h Handle) Zsytri(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ipiv driver.DevicePtr, ...) error
- func (h Handle) ZsytriBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ipiv driver.DevicePtr) (int32, error)
- func (h Handle) Zungbr(side SideMode, m int32, n int32, k int32, a driver.DevicePtr, lda int32, ...) error
- func (h Handle) ZungbrBufferSize(side SideMode, m int32, n int32, k int32, a driver.DevicePtr, lda int32, ...) (int32, error)
- func (h Handle) Zungqr(m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, ...) error
- func (h Handle) ZungqrBufferSize(m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr) (int32, error)
- func (h Handle) Zungtr(uplo FillMode, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, ...) error
- func (h Handle) ZungtrBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr) (int32, error)
- func (h Handle) Zunmqr(side SideMode, trans Operation, m int32, n int32, k int32, a driver.DevicePtr, ...) error
- func (h Handle) ZunmqrBufferSize(side SideMode, trans Operation, m int32, n int32, k int32, a driver.DevicePtr, ...) (int32, error)
- func (h Handle) Zunmtr(side SideMode, uplo FillMode, trans Operation, m int32, n int32, ...) error
- func (h Handle) ZunmtrBufferSize(side SideMode, uplo FillMode, trans Operation, m int32, n int32, ...) (int32, error)
- type IRSInfos
- type IRSParams
- func (i *IRSParams) Close() error
- func (i IRSParams) DisableFallback() error
- func (i IRSParams) EnableFallback() error
- func (i IRSParams) MaxIters() (CusolverInt, error)
- func (i IRSParams) SetMaxIters(maxiters CusolverInt) error
- func (i IRSParams) SetMaxItersInner(maxitersInner CusolverInt) error
- func (i IRSParams) SetRefinementSolver(refinementSolver IRSRefinement) error
- func (i IRSParams) SetSolverLowestPrecision(solverLowestPrecision PrecType) error
- func (i IRSParams) SetSolverMainPrecision(solverMainPrecision PrecType) error
- func (i IRSParams) SetSolverPrecisions(solverMainPrecision PrecType, solverLowestPrecision PrecType) error
- func (i IRSParams) SetTol(val float64) error
- func (i IRSParams) SetTolInner(val float64) error
- type IRSRefinement
- type LibraryAttempt
- type LibraryConflictError
- type LibraryError
- type LibraryPropertyType
- type LoggerCallback
- type MathMode
- type Norm
- type Operation
- type Params
- type PrecType
- type Result
- type SideMode
- type StorevMode
- type SyevjInfo
- type SymbolError
- type VersionMismatchError
Examples ¶
Constants ¶
const ( // Version is CUSOLVER_VERSION. This is the version of the headers the bindings were generated from, not of the library loaded at run time. [GetVersion] reports that. Version = 12401 // VerBuild is CUSOLVER_VER_BUILD. This is the version of the headers the bindings were generated from, not of the library loaded at run time. [GetVersion] reports that. VerBuild = 2 // VerMajor is CUSOLVER_VER_MAJOR. This is the version of the headers the bindings were generated from, not of the library loaded at run time. [GetVersion] reports that. VerMajor = 12 // VerMinor is CUSOLVER_VER_MINOR. This is the version of the headers the bindings were generated from, not of the library loaded at run time. [GetVersion] reports that. VerMinor = 4 // VerPatch is CUSOLVER_VER_PATCH. This is the version of the headers the bindings were generated from, not of the library loaded at run time. [GetVersion] reports that. VerPatch = 1 )
Variables ¶
This section is empty.
Functions ¶
func Close ¶
func Close() error
Close unloads the library and clears all bound function pointers.
The function pointers are package-level state, so Close must not be called concurrently with any other call into this package: doing so is a use-after-free. It is intended for test teardown, not for reclaiming a live library.
func GetProperty ¶
func GetProperty(type_ LibraryPropertyType) (int32, error)
GetProperty wraps cusolverDnGetProperty.
Wraps cusolverDnGetProperty, bound as cusolverGetProperty.
func GetVersion ¶
GetVersion wraps cusolverDnGetVersion.
Wraps cusolverDnGetVersion, bound as cusolverGetVersion.
func Has ¶
Has reports whether the named C symbol resolved in the loaded library, loading it first if necessary. It returns false if the library failed to load. Use it to gate on capabilities before calling into them.
func HasCCgels ¶
func HasCCgels() bool
HasCCgels reports whether cusolverDnCCgels resolved in the loaded library.
func HasCCgelsBufferSize ¶
func HasCCgelsBufferSize() bool
HasCCgelsBufferSize reports whether cusolverDnCCgels_bufferSize resolved in the loaded library.
func HasCCgesv ¶
func HasCCgesv() bool
HasCCgesv reports whether cusolverDnCCgesv resolved in the loaded library.
func HasCCgesvBufferSize ¶
func HasCCgesvBufferSize() bool
HasCCgesvBufferSize reports whether cusolverDnCCgesv_bufferSize resolved in the loaded library.
func HasCEgels ¶
func HasCEgels() bool
HasCEgels reports whether cusolverDnCEgels resolved in the loaded library.
func HasCEgelsBufferSize ¶
func HasCEgelsBufferSize() bool
HasCEgelsBufferSize reports whether cusolverDnCEgels_bufferSize resolved in the loaded library.
func HasCEgesv ¶
func HasCEgesv() bool
HasCEgesv reports whether cusolverDnCEgesv resolved in the loaded library.
func HasCEgesvBufferSize ¶
func HasCEgesvBufferSize() bool
HasCEgesvBufferSize reports whether cusolverDnCEgesv_bufferSize resolved in the loaded library.
func HasCKgels ¶
func HasCKgels() bool
HasCKgels reports whether cusolverDnCKgels resolved in the loaded library.
func HasCKgelsBufferSize ¶
func HasCKgelsBufferSize() bool
HasCKgelsBufferSize reports whether cusolverDnCKgels_bufferSize resolved in the loaded library.
func HasCKgesv ¶
func HasCKgesv() bool
HasCKgesv reports whether cusolverDnCKgesv resolved in the loaded library.
func HasCKgesvBufferSize ¶
func HasCKgesvBufferSize() bool
HasCKgesvBufferSize reports whether cusolverDnCKgesv_bufferSize resolved in the loaded library.
func HasCYgels ¶
func HasCYgels() bool
HasCYgels reports whether cusolverDnCYgels resolved in the loaded library.
func HasCYgelsBufferSize ¶
func HasCYgelsBufferSize() bool
HasCYgelsBufferSize reports whether cusolverDnCYgels_bufferSize resolved in the loaded library.
func HasCYgesv ¶
func HasCYgesv() bool
HasCYgesv reports whether cusolverDnCYgesv resolved in the loaded library.
func HasCYgesvBufferSize ¶
func HasCYgesvBufferSize() bool
HasCYgesvBufferSize reports whether cusolverDnCYgesv_bufferSize resolved in the loaded library.
func HasCgebrd ¶
func HasCgebrd() bool
HasCgebrd reports whether cusolverDnCgebrd resolved in the loaded library.
func HasCgebrdBufferSize ¶
func HasCgebrdBufferSize() bool
HasCgebrdBufferSize reports whether cusolverDnCgebrd_bufferSize resolved in the loaded library.
func HasCgeqrf ¶
func HasCgeqrf() bool
HasCgeqrf reports whether cusolverDnCgeqrf resolved in the loaded library.
func HasCgeqrfBufferSize ¶
func HasCgeqrfBufferSize() bool
HasCgeqrfBufferSize reports whether cusolverDnCgeqrf_bufferSize resolved in the loaded library.
func HasCgesvd ¶
func HasCgesvd() bool
HasCgesvd reports whether cusolverDnCgesvd resolved in the loaded library.
func HasCgesvdBufferSize ¶
func HasCgesvdBufferSize() bool
HasCgesvdBufferSize reports whether cusolverDnCgesvd_bufferSize resolved in the loaded library.
func HasCgesvdaStridedBatched ¶
func HasCgesvdaStridedBatched() bool
HasCgesvdaStridedBatched reports whether cusolverDnCgesvdaStridedBatched resolved in the loaded library.
func HasCgesvdaStridedBatchedBufferSize ¶
func HasCgesvdaStridedBatchedBufferSize() bool
HasCgesvdaStridedBatchedBufferSize reports whether cusolverDnCgesvdaStridedBatched_bufferSize resolved in the loaded library.
func HasCgesvdj ¶
func HasCgesvdj() bool
HasCgesvdj reports whether cusolverDnCgesvdj resolved in the loaded library.
func HasCgesvdjBatched ¶
func HasCgesvdjBatched() bool
HasCgesvdjBatched reports whether cusolverDnCgesvdjBatched resolved in the loaded library.
func HasCgesvdjBatchedBufferSize ¶
func HasCgesvdjBatchedBufferSize() bool
HasCgesvdjBatchedBufferSize reports whether cusolverDnCgesvdjBatched_bufferSize resolved in the loaded library.
func HasCgesvdjBufferSize ¶
func HasCgesvdjBufferSize() bool
HasCgesvdjBufferSize reports whether cusolverDnCgesvdj_bufferSize resolved in the loaded library.
func HasCgetrf ¶
func HasCgetrf() bool
HasCgetrf reports whether cusolverDnCgetrf resolved in the loaded library.
func HasCgetrfBufferSize ¶
func HasCgetrfBufferSize() bool
HasCgetrfBufferSize reports whether cusolverDnCgetrf_bufferSize resolved in the loaded library.
func HasCgetrs ¶
func HasCgetrs() bool
HasCgetrs reports whether cusolverDnCgetrs resolved in the loaded library.
func HasCheevd ¶
func HasCheevd() bool
HasCheevd reports whether cusolverDnCheevd resolved in the loaded library.
func HasCheevdBufferSize ¶
func HasCheevdBufferSize() bool
HasCheevdBufferSize reports whether cusolverDnCheevd_bufferSize resolved in the loaded library.
func HasCheevdx ¶
func HasCheevdx() bool
HasCheevdx reports whether cusolverDnCheevdx resolved in the loaded library.
func HasCheevdxBufferSize ¶
func HasCheevdxBufferSize() bool
HasCheevdxBufferSize reports whether cusolverDnCheevdx_bufferSize resolved in the loaded library.
func HasCheevj ¶
func HasCheevj() bool
HasCheevj reports whether cusolverDnCheevj resolved in the loaded library.
func HasCheevjBatched ¶
func HasCheevjBatched() bool
HasCheevjBatched reports whether cusolverDnCheevjBatched resolved in the loaded library.
func HasCheevjBatchedBufferSize ¶
func HasCheevjBatchedBufferSize() bool
HasCheevjBatchedBufferSize reports whether cusolverDnCheevjBatched_bufferSize resolved in the loaded library.
func HasCheevjBufferSize ¶
func HasCheevjBufferSize() bool
HasCheevjBufferSize reports whether cusolverDnCheevj_bufferSize resolved in the loaded library.
func HasChegvd ¶
func HasChegvd() bool
HasChegvd reports whether cusolverDnChegvd resolved in the loaded library.
func HasChegvdBufferSize ¶
func HasChegvdBufferSize() bool
HasChegvdBufferSize reports whether cusolverDnChegvd_bufferSize resolved in the loaded library.
func HasChegvdx ¶
func HasChegvdx() bool
HasChegvdx reports whether cusolverDnChegvdx resolved in the loaded library.
func HasChegvdxBufferSize ¶
func HasChegvdxBufferSize() bool
HasChegvdxBufferSize reports whether cusolverDnChegvdx_bufferSize resolved in the loaded library.
func HasChegvj ¶
func HasChegvj() bool
HasChegvj reports whether cusolverDnChegvj resolved in the loaded library.
func HasChegvjBufferSize ¶
func HasChegvjBufferSize() bool
HasChegvjBufferSize reports whether cusolverDnChegvj_bufferSize resolved in the loaded library.
func HasChetrd ¶
func HasChetrd() bool
HasChetrd reports whether cusolverDnChetrd resolved in the loaded library.
func HasChetrdBufferSize ¶
func HasChetrdBufferSize() bool
HasChetrdBufferSize reports whether cusolverDnChetrd_bufferSize resolved in the loaded library.
func HasClaswp ¶
func HasClaswp() bool
HasClaswp reports whether cusolverDnClaswp resolved in the loaded library.
func HasClauum ¶
func HasClauum() bool
HasClauum reports whether cusolverDnClauum resolved in the loaded library.
func HasClauumBufferSize ¶
func HasClauumBufferSize() bool
HasClauumBufferSize reports whether cusolverDnClauum_bufferSize resolved in the loaded library.
func HasCpotrf ¶
func HasCpotrf() bool
HasCpotrf reports whether cusolverDnCpotrf resolved in the loaded library.
func HasCpotrfBatched ¶
func HasCpotrfBatched() bool
HasCpotrfBatched reports whether cusolverDnCpotrfBatched resolved in the loaded library.
func HasCpotrfBufferSize ¶
func HasCpotrfBufferSize() bool
HasCpotrfBufferSize reports whether cusolverDnCpotrf_bufferSize resolved in the loaded library.
func HasCpotri ¶
func HasCpotri() bool
HasCpotri reports whether cusolverDnCpotri resolved in the loaded library.
func HasCpotriBufferSize ¶
func HasCpotriBufferSize() bool
HasCpotriBufferSize reports whether cusolverDnCpotri_bufferSize resolved in the loaded library.
func HasCpotrs ¶
func HasCpotrs() bool
HasCpotrs reports whether cusolverDnCpotrs resolved in the loaded library.
func HasCpotrsBatched ¶
func HasCpotrsBatched() bool
HasCpotrsBatched reports whether cusolverDnCpotrsBatched resolved in the loaded library.
func HasCreate ¶
func HasCreate() bool
HasCreate reports whether cusolverDnCreate resolved in the loaded library.
func HasCreateGesvdjInfo ¶
func HasCreateGesvdjInfo() bool
HasCreateGesvdjInfo reports whether cusolverDnCreateGesvdjInfo resolved in the loaded library.
func HasCreateParams ¶
func HasCreateParams() bool
HasCreateParams reports whether cusolverDnCreateParams resolved in the loaded library.
func HasCreateSyevjInfo ¶
func HasCreateSyevjInfo() bool
HasCreateSyevjInfo reports whether cusolverDnCreateSyevjInfo resolved in the loaded library.
func HasCsytrf ¶
func HasCsytrf() bool
HasCsytrf reports whether cusolverDnCsytrf resolved in the loaded library.
func HasCsytrfBufferSize ¶
func HasCsytrfBufferSize() bool
HasCsytrfBufferSize reports whether cusolverDnCsytrf_bufferSize resolved in the loaded library.
func HasCsytri ¶
func HasCsytri() bool
HasCsytri reports whether cusolverDnCsytri resolved in the loaded library.
func HasCsytriBufferSize ¶
func HasCsytriBufferSize() bool
HasCsytriBufferSize reports whether cusolverDnCsytri_bufferSize resolved in the loaded library.
func HasCungbr ¶
func HasCungbr() bool
HasCungbr reports whether cusolverDnCungbr resolved in the loaded library.
func HasCungbrBufferSize ¶
func HasCungbrBufferSize() bool
HasCungbrBufferSize reports whether cusolverDnCungbr_bufferSize resolved in the loaded library.
func HasCungqr ¶
func HasCungqr() bool
HasCungqr reports whether cusolverDnCungqr resolved in the loaded library.
func HasCungqrBufferSize ¶
func HasCungqrBufferSize() bool
HasCungqrBufferSize reports whether cusolverDnCungqr_bufferSize resolved in the loaded library.
func HasCungtr ¶
func HasCungtr() bool
HasCungtr reports whether cusolverDnCungtr resolved in the loaded library.
func HasCungtrBufferSize ¶
func HasCungtrBufferSize() bool
HasCungtrBufferSize reports whether cusolverDnCungtr_bufferSize resolved in the loaded library.
func HasCunmqr ¶
func HasCunmqr() bool
HasCunmqr reports whether cusolverDnCunmqr resolved in the loaded library.
func HasCunmqrBufferSize ¶
func HasCunmqrBufferSize() bool
HasCunmqrBufferSize reports whether cusolverDnCunmqr_bufferSize resolved in the loaded library.
func HasCunmtr ¶
func HasCunmtr() bool
HasCunmtr reports whether cusolverDnCunmtr resolved in the loaded library.
func HasCunmtrBufferSize ¶
func HasCunmtrBufferSize() bool
HasCunmtrBufferSize reports whether cusolverDnCunmtr_bufferSize resolved in the loaded library.
func HasDBgels ¶
func HasDBgels() bool
HasDBgels reports whether cusolverDnDBgels resolved in the loaded library.
func HasDBgelsBufferSize ¶
func HasDBgelsBufferSize() bool
HasDBgelsBufferSize reports whether cusolverDnDBgels_bufferSize resolved in the loaded library.
func HasDBgesv ¶
func HasDBgesv() bool
HasDBgesv reports whether cusolverDnDBgesv resolved in the loaded library.
func HasDBgesvBufferSize ¶
func HasDBgesvBufferSize() bool
HasDBgesvBufferSize reports whether cusolverDnDBgesv_bufferSize resolved in the loaded library.
func HasDDgels ¶
func HasDDgels() bool
HasDDgels reports whether cusolverDnDDgels resolved in the loaded library.
func HasDDgelsBufferSize ¶
func HasDDgelsBufferSize() bool
HasDDgelsBufferSize reports whether cusolverDnDDgels_bufferSize resolved in the loaded library.
func HasDDgesv ¶
func HasDDgesv() bool
HasDDgesv reports whether cusolverDnDDgesv resolved in the loaded library.
func HasDDgesvBufferSize ¶
func HasDDgesvBufferSize() bool
HasDDgesvBufferSize reports whether cusolverDnDDgesv_bufferSize resolved in the loaded library.
func HasDHgels ¶
func HasDHgels() bool
HasDHgels reports whether cusolverDnDHgels resolved in the loaded library.
func HasDHgelsBufferSize ¶
func HasDHgelsBufferSize() bool
HasDHgelsBufferSize reports whether cusolverDnDHgels_bufferSize resolved in the loaded library.
func HasDHgesv ¶
func HasDHgesv() bool
HasDHgesv reports whether cusolverDnDHgesv resolved in the loaded library.
func HasDHgesvBufferSize ¶
func HasDHgesvBufferSize() bool
HasDHgesvBufferSize reports whether cusolverDnDHgesv_bufferSize resolved in the loaded library.
func HasDSgels ¶
func HasDSgels() bool
HasDSgels reports whether cusolverDnDSgels resolved in the loaded library.
func HasDSgelsBufferSize ¶
func HasDSgelsBufferSize() bool
HasDSgelsBufferSize reports whether cusolverDnDSgels_bufferSize resolved in the loaded library.
func HasDSgesv ¶
func HasDSgesv() bool
HasDSgesv reports whether cusolverDnDSgesv resolved in the loaded library.
func HasDSgesvBufferSize ¶
func HasDSgesvBufferSize() bool
HasDSgesvBufferSize reports whether cusolverDnDSgesv_bufferSize resolved in the loaded library.
func HasDXgels ¶
func HasDXgels() bool
HasDXgels reports whether cusolverDnDXgels resolved in the loaded library.
func HasDXgelsBufferSize ¶
func HasDXgelsBufferSize() bool
HasDXgelsBufferSize reports whether cusolverDnDXgels_bufferSize resolved in the loaded library.
func HasDXgesv ¶
func HasDXgesv() bool
HasDXgesv reports whether cusolverDnDXgesv resolved in the loaded library.
func HasDXgesvBufferSize ¶
func HasDXgesvBufferSize() bool
HasDXgesvBufferSize reports whether cusolverDnDXgesv_bufferSize resolved in the loaded library.
func HasDestroy ¶
func HasDestroy() bool
HasDestroy reports whether cusolverDnDestroy resolved in the loaded library.
func HasDestroyGesvdjInfo ¶
func HasDestroyGesvdjInfo() bool
HasDestroyGesvdjInfo reports whether cusolverDnDestroyGesvdjInfo resolved in the loaded library.
func HasDestroyParams ¶
func HasDestroyParams() bool
HasDestroyParams reports whether cusolverDnDestroyParams resolved in the loaded library.
func HasDestroySyevjInfo ¶
func HasDestroySyevjInfo() bool
HasDestroySyevjInfo reports whether cusolverDnDestroySyevjInfo resolved in the loaded library.
func HasDgebrd ¶
func HasDgebrd() bool
HasDgebrd reports whether cusolverDnDgebrd resolved in the loaded library.
func HasDgebrdBufferSize ¶
func HasDgebrdBufferSize() bool
HasDgebrdBufferSize reports whether cusolverDnDgebrd_bufferSize resolved in the loaded library.
func HasDgeqrf ¶
func HasDgeqrf() bool
HasDgeqrf reports whether cusolverDnDgeqrf resolved in the loaded library.
func HasDgeqrfBufferSize ¶
func HasDgeqrfBufferSize() bool
HasDgeqrfBufferSize reports whether cusolverDnDgeqrf_bufferSize resolved in the loaded library.
func HasDgesvd ¶
func HasDgesvd() bool
HasDgesvd reports whether cusolverDnDgesvd resolved in the loaded library.
func HasDgesvdBufferSize ¶
func HasDgesvdBufferSize() bool
HasDgesvdBufferSize reports whether cusolverDnDgesvd_bufferSize resolved in the loaded library.
func HasDgesvdaStridedBatched ¶
func HasDgesvdaStridedBatched() bool
HasDgesvdaStridedBatched reports whether cusolverDnDgesvdaStridedBatched resolved in the loaded library.
func HasDgesvdaStridedBatchedBufferSize ¶
func HasDgesvdaStridedBatchedBufferSize() bool
HasDgesvdaStridedBatchedBufferSize reports whether cusolverDnDgesvdaStridedBatched_bufferSize resolved in the loaded library.
func HasDgesvdj ¶
func HasDgesvdj() bool
HasDgesvdj reports whether cusolverDnDgesvdj resolved in the loaded library.
func HasDgesvdjBatched ¶
func HasDgesvdjBatched() bool
HasDgesvdjBatched reports whether cusolverDnDgesvdjBatched resolved in the loaded library.
func HasDgesvdjBatchedBufferSize ¶
func HasDgesvdjBatchedBufferSize() bool
HasDgesvdjBatchedBufferSize reports whether cusolverDnDgesvdjBatched_bufferSize resolved in the loaded library.
func HasDgesvdjBufferSize ¶
func HasDgesvdjBufferSize() bool
HasDgesvdjBufferSize reports whether cusolverDnDgesvdj_bufferSize resolved in the loaded library.
func HasDgetrf ¶
func HasDgetrf() bool
HasDgetrf reports whether cusolverDnDgetrf resolved in the loaded library.
func HasDgetrfBufferSize ¶
func HasDgetrfBufferSize() bool
HasDgetrfBufferSize reports whether cusolverDnDgetrf_bufferSize resolved in the loaded library.
func HasDgetrs ¶
func HasDgetrs() bool
HasDgetrs reports whether cusolverDnDgetrs resolved in the loaded library.
func HasDlaswp ¶
func HasDlaswp() bool
HasDlaswp reports whether cusolverDnDlaswp resolved in the loaded library.
func HasDlauum ¶
func HasDlauum() bool
HasDlauum reports whether cusolverDnDlauum resolved in the loaded library.
func HasDlauumBufferSize ¶
func HasDlauumBufferSize() bool
HasDlauumBufferSize reports whether cusolverDnDlauum_bufferSize resolved in the loaded library.
func HasDorgbr ¶
func HasDorgbr() bool
HasDorgbr reports whether cusolverDnDorgbr resolved in the loaded library.
func HasDorgbrBufferSize ¶
func HasDorgbrBufferSize() bool
HasDorgbrBufferSize reports whether cusolverDnDorgbr_bufferSize resolved in the loaded library.
func HasDorgqr ¶
func HasDorgqr() bool
HasDorgqr reports whether cusolverDnDorgqr resolved in the loaded library.
func HasDorgqrBufferSize ¶
func HasDorgqrBufferSize() bool
HasDorgqrBufferSize reports whether cusolverDnDorgqr_bufferSize resolved in the loaded library.
func HasDorgtr ¶
func HasDorgtr() bool
HasDorgtr reports whether cusolverDnDorgtr resolved in the loaded library.
func HasDorgtrBufferSize ¶
func HasDorgtrBufferSize() bool
HasDorgtrBufferSize reports whether cusolverDnDorgtr_bufferSize resolved in the loaded library.
func HasDormqr ¶
func HasDormqr() bool
HasDormqr reports whether cusolverDnDormqr resolved in the loaded library.
func HasDormqrBufferSize ¶
func HasDormqrBufferSize() bool
HasDormqrBufferSize reports whether cusolverDnDormqr_bufferSize resolved in the loaded library.
func HasDormtr ¶
func HasDormtr() bool
HasDormtr reports whether cusolverDnDormtr resolved in the loaded library.
func HasDormtrBufferSize ¶
func HasDormtrBufferSize() bool
HasDormtrBufferSize reports whether cusolverDnDormtr_bufferSize resolved in the loaded library.
func HasDpotrf ¶
func HasDpotrf() bool
HasDpotrf reports whether cusolverDnDpotrf resolved in the loaded library.
func HasDpotrfBatched ¶
func HasDpotrfBatched() bool
HasDpotrfBatched reports whether cusolverDnDpotrfBatched resolved in the loaded library.
func HasDpotrfBufferSize ¶
func HasDpotrfBufferSize() bool
HasDpotrfBufferSize reports whether cusolverDnDpotrf_bufferSize resolved in the loaded library.
func HasDpotri ¶
func HasDpotri() bool
HasDpotri reports whether cusolverDnDpotri resolved in the loaded library.
func HasDpotriBufferSize ¶
func HasDpotriBufferSize() bool
HasDpotriBufferSize reports whether cusolverDnDpotri_bufferSize resolved in the loaded library.
func HasDpotrs ¶
func HasDpotrs() bool
HasDpotrs reports whether cusolverDnDpotrs resolved in the loaded library.
func HasDpotrsBatched ¶
func HasDpotrsBatched() bool
HasDpotrsBatched reports whether cusolverDnDpotrsBatched resolved in the loaded library.
func HasDsyevd ¶
func HasDsyevd() bool
HasDsyevd reports whether cusolverDnDsyevd resolved in the loaded library.
func HasDsyevdBufferSize ¶
func HasDsyevdBufferSize() bool
HasDsyevdBufferSize reports whether cusolverDnDsyevd_bufferSize resolved in the loaded library.
func HasDsyevdx ¶
func HasDsyevdx() bool
HasDsyevdx reports whether cusolverDnDsyevdx resolved in the loaded library.
func HasDsyevdxBufferSize ¶
func HasDsyevdxBufferSize() bool
HasDsyevdxBufferSize reports whether cusolverDnDsyevdx_bufferSize resolved in the loaded library.
func HasDsyevj ¶
func HasDsyevj() bool
HasDsyevj reports whether cusolverDnDsyevj resolved in the loaded library.
func HasDsyevjBatched ¶
func HasDsyevjBatched() bool
HasDsyevjBatched reports whether cusolverDnDsyevjBatched resolved in the loaded library.
func HasDsyevjBatchedBufferSize ¶
func HasDsyevjBatchedBufferSize() bool
HasDsyevjBatchedBufferSize reports whether cusolverDnDsyevjBatched_bufferSize resolved in the loaded library.
func HasDsyevjBufferSize ¶
func HasDsyevjBufferSize() bool
HasDsyevjBufferSize reports whether cusolverDnDsyevj_bufferSize resolved in the loaded library.
func HasDsygvd ¶
func HasDsygvd() bool
HasDsygvd reports whether cusolverDnDsygvd resolved in the loaded library.
func HasDsygvdBufferSize ¶
func HasDsygvdBufferSize() bool
HasDsygvdBufferSize reports whether cusolverDnDsygvd_bufferSize resolved in the loaded library.
func HasDsygvdx ¶
func HasDsygvdx() bool
HasDsygvdx reports whether cusolverDnDsygvdx resolved in the loaded library.
func HasDsygvdxBufferSize ¶
func HasDsygvdxBufferSize() bool
HasDsygvdxBufferSize reports whether cusolverDnDsygvdx_bufferSize resolved in the loaded library.
func HasDsygvj ¶
func HasDsygvj() bool
HasDsygvj reports whether cusolverDnDsygvj resolved in the loaded library.
func HasDsygvjBufferSize ¶
func HasDsygvjBufferSize() bool
HasDsygvjBufferSize reports whether cusolverDnDsygvj_bufferSize resolved in the loaded library.
func HasDsytrd ¶
func HasDsytrd() bool
HasDsytrd reports whether cusolverDnDsytrd resolved in the loaded library.
func HasDsytrdBufferSize ¶
func HasDsytrdBufferSize() bool
HasDsytrdBufferSize reports whether cusolverDnDsytrd_bufferSize resolved in the loaded library.
func HasDsytrf ¶
func HasDsytrf() bool
HasDsytrf reports whether cusolverDnDsytrf resolved in the loaded library.
func HasDsytrfBufferSize ¶
func HasDsytrfBufferSize() bool
HasDsytrfBufferSize reports whether cusolverDnDsytrf_bufferSize resolved in the loaded library.
func HasDsytri ¶
func HasDsytri() bool
HasDsytri reports whether cusolverDnDsytri resolved in the loaded library.
func HasDsytriBufferSize ¶
func HasDsytriBufferSize() bool
HasDsytriBufferSize reports whether cusolverDnDsytri_bufferSize resolved in the loaded library.
func HasGetDeterministicMode ¶
func HasGetDeterministicMode() bool
HasGetDeterministicMode reports whether cusolverDnGetDeterministicMode resolved in the loaded library.
func HasGetEmulationSpecialValuesSupport ¶
func HasGetEmulationSpecialValuesSupport() bool
HasGetEmulationSpecialValuesSupport reports whether cusolverDnGetEmulationSpecialValuesSupport resolved in the loaded library.
func HasGetEmulationStrategy ¶
func HasGetEmulationStrategy() bool
HasGetEmulationStrategy reports whether cusolverDnGetEmulationStrategy resolved in the loaded library.
func HasGetFixedPointEmulationMantissaBitOffset ¶
func HasGetFixedPointEmulationMantissaBitOffset() bool
HasGetFixedPointEmulationMantissaBitOffset reports whether cusolverDnGetFixedPointEmulationMantissaBitOffset resolved in the loaded library.
func HasGetFixedPointEmulationMantissaControl ¶
func HasGetFixedPointEmulationMantissaControl() bool
HasGetFixedPointEmulationMantissaControl reports whether cusolverDnGetFixedPointEmulationMantissaControl resolved in the loaded library.
func HasGetFixedPointEmulationMaxMantissaBitCount ¶
func HasGetFixedPointEmulationMaxMantissaBitCount() bool
HasGetFixedPointEmulationMaxMantissaBitCount reports whether cusolverDnGetFixedPointEmulationMaxMantissaBitCount resolved in the loaded library.
func HasGetMathMode ¶
func HasGetMathMode() bool
HasGetMathMode reports whether cusolverDnGetMathMode resolved in the loaded library.
func HasGetProperty ¶
func HasGetProperty() bool
HasGetProperty reports whether cusolverGetProperty resolved in the loaded library.
func HasGetStream ¶
func HasGetStream() bool
HasGetStream reports whether cusolverDnGetStream resolved in the loaded library.
func HasGetVersion ¶
func HasGetVersion() bool
HasGetVersion reports whether cusolverGetVersion resolved in the loaded library.
func HasIRSInfosCreate ¶
func HasIRSInfosCreate() bool
HasIRSInfosCreate reports whether cusolverDnIRSInfosCreate resolved in the loaded library.
func HasIRSInfosDestroy ¶
func HasIRSInfosDestroy() bool
HasIRSInfosDestroy reports whether cusolverDnIRSInfosDestroy resolved in the loaded library.
func HasIRSInfosGetMaxIters ¶
func HasIRSInfosGetMaxIters() bool
HasIRSInfosGetMaxIters reports whether cusolverDnIRSInfosGetMaxIters resolved in the loaded library.
func HasIRSInfosGetNiters ¶
func HasIRSInfosGetNiters() bool
HasIRSInfosGetNiters reports whether cusolverDnIRSInfosGetNiters resolved in the loaded library.
func HasIRSInfosGetOuterNiters ¶
func HasIRSInfosGetOuterNiters() bool
HasIRSInfosGetOuterNiters reports whether cusolverDnIRSInfosGetOuterNiters resolved in the loaded library.
func HasIRSInfosGetResidualHistory ¶
func HasIRSInfosGetResidualHistory() bool
HasIRSInfosGetResidualHistory reports whether cusolverDnIRSInfosGetResidualHistory resolved in the loaded library.
func HasIRSInfosRequestResidual ¶
func HasIRSInfosRequestResidual() bool
HasIRSInfosRequestResidual reports whether cusolverDnIRSInfosRequestResidual resolved in the loaded library.
func HasIRSParamsCreate ¶
func HasIRSParamsCreate() bool
HasIRSParamsCreate reports whether cusolverDnIRSParamsCreate resolved in the loaded library.
func HasIRSParamsDestroy ¶
func HasIRSParamsDestroy() bool
HasIRSParamsDestroy reports whether cusolverDnIRSParamsDestroy resolved in the loaded library.
func HasIRSParamsDisableFallback ¶
func HasIRSParamsDisableFallback() bool
HasIRSParamsDisableFallback reports whether cusolverDnIRSParamsDisableFallback resolved in the loaded library.
func HasIRSParamsEnableFallback ¶
func HasIRSParamsEnableFallback() bool
HasIRSParamsEnableFallback reports whether cusolverDnIRSParamsEnableFallback resolved in the loaded library.
func HasIRSParamsGetMaxIters ¶
func HasIRSParamsGetMaxIters() bool
HasIRSParamsGetMaxIters reports whether cusolverDnIRSParamsGetMaxIters resolved in the loaded library.
func HasIRSParamsSetMaxIters ¶
func HasIRSParamsSetMaxIters() bool
HasIRSParamsSetMaxIters reports whether cusolverDnIRSParamsSetMaxIters resolved in the loaded library.
func HasIRSParamsSetMaxItersInner ¶
func HasIRSParamsSetMaxItersInner() bool
HasIRSParamsSetMaxItersInner reports whether cusolverDnIRSParamsSetMaxItersInner resolved in the loaded library.
func HasIRSParamsSetRefinementSolver ¶
func HasIRSParamsSetRefinementSolver() bool
HasIRSParamsSetRefinementSolver reports whether cusolverDnIRSParamsSetRefinementSolver resolved in the loaded library.
func HasIRSParamsSetSolverLowestPrecision ¶
func HasIRSParamsSetSolverLowestPrecision() bool
HasIRSParamsSetSolverLowestPrecision reports whether cusolverDnIRSParamsSetSolverLowestPrecision resolved in the loaded library.
func HasIRSParamsSetSolverMainPrecision ¶
func HasIRSParamsSetSolverMainPrecision() bool
HasIRSParamsSetSolverMainPrecision reports whether cusolverDnIRSParamsSetSolverMainPrecision resolved in the loaded library.
func HasIRSParamsSetSolverPrecisions ¶
func HasIRSParamsSetSolverPrecisions() bool
HasIRSParamsSetSolverPrecisions reports whether cusolverDnIRSParamsSetSolverPrecisions resolved in the loaded library.
func HasIRSParamsSetTol ¶
func HasIRSParamsSetTol() bool
HasIRSParamsSetTol reports whether cusolverDnIRSParamsSetTol resolved in the loaded library.
func HasIRSParamsSetTolInner ¶
func HasIRSParamsSetTolInner() bool
HasIRSParamsSetTolInner reports whether cusolverDnIRSParamsSetTolInner resolved in the loaded library.
func HasIRSXgels ¶
func HasIRSXgels() bool
HasIRSXgels reports whether cusolverDnIRSXgels resolved in the loaded library.
func HasIRSXgelsBufferSize ¶
func HasIRSXgelsBufferSize() bool
HasIRSXgelsBufferSize reports whether cusolverDnIRSXgels_bufferSize resolved in the loaded library.
func HasIRSXgesv ¶
func HasIRSXgesv() bool
HasIRSXgesv reports whether cusolverDnIRSXgesv resolved in the loaded library.
func HasIRSXgesvBufferSize ¶
func HasIRSXgesvBufferSize() bool
HasIRSXgesvBufferSize reports whether cusolverDnIRSXgesv_bufferSize resolved in the loaded library.
func HasLoggerForceDisable ¶
func HasLoggerForceDisable() bool
HasLoggerForceDisable reports whether cusolverDnLoggerForceDisable resolved in the loaded library.
func HasLoggerOpenFile ¶
func HasLoggerOpenFile() bool
HasLoggerOpenFile reports whether cusolverDnLoggerOpenFile resolved in the loaded library.
func HasLoggerSetCallback ¶
func HasLoggerSetCallback() bool
HasLoggerSetCallback reports whether cusolverDnLoggerSetCallback resolved in the loaded library.
func HasLoggerSetFile ¶
func HasLoggerSetFile() bool
HasLoggerSetFile reports whether cusolverDnLoggerSetFile resolved in the loaded library.
func HasLoggerSetLevel ¶
func HasLoggerSetLevel() bool
HasLoggerSetLevel reports whether cusolverDnLoggerSetLevel resolved in the loaded library.
func HasLoggerSetMask ¶
func HasLoggerSetMask() bool
HasLoggerSetMask reports whether cusolverDnLoggerSetMask resolved in the loaded library.
func HasSBgels ¶
func HasSBgels() bool
HasSBgels reports whether cusolverDnSBgels resolved in the loaded library.
func HasSBgelsBufferSize ¶
func HasSBgelsBufferSize() bool
HasSBgelsBufferSize reports whether cusolverDnSBgels_bufferSize resolved in the loaded library.
func HasSBgesv ¶
func HasSBgesv() bool
HasSBgesv reports whether cusolverDnSBgesv resolved in the loaded library.
func HasSBgesvBufferSize ¶
func HasSBgesvBufferSize() bool
HasSBgesvBufferSize reports whether cusolverDnSBgesv_bufferSize resolved in the loaded library.
func HasSHgels ¶
func HasSHgels() bool
HasSHgels reports whether cusolverDnSHgels resolved in the loaded library.
func HasSHgelsBufferSize ¶
func HasSHgelsBufferSize() bool
HasSHgelsBufferSize reports whether cusolverDnSHgels_bufferSize resolved in the loaded library.
func HasSHgesv ¶
func HasSHgesv() bool
HasSHgesv reports whether cusolverDnSHgesv resolved in the loaded library.
func HasSHgesvBufferSize ¶
func HasSHgesvBufferSize() bool
HasSHgesvBufferSize reports whether cusolverDnSHgesv_bufferSize resolved in the loaded library.
func HasSSgels ¶
func HasSSgels() bool
HasSSgels reports whether cusolverDnSSgels resolved in the loaded library.
func HasSSgelsBufferSize ¶
func HasSSgelsBufferSize() bool
HasSSgelsBufferSize reports whether cusolverDnSSgels_bufferSize resolved in the loaded library.
func HasSSgesv ¶
func HasSSgesv() bool
HasSSgesv reports whether cusolverDnSSgesv resolved in the loaded library.
func HasSSgesvBufferSize ¶
func HasSSgesvBufferSize() bool
HasSSgesvBufferSize reports whether cusolverDnSSgesv_bufferSize resolved in the loaded library.
func HasSXgels ¶
func HasSXgels() bool
HasSXgels reports whether cusolverDnSXgels resolved in the loaded library.
func HasSXgelsBufferSize ¶
func HasSXgelsBufferSize() bool
HasSXgelsBufferSize reports whether cusolverDnSXgels_bufferSize resolved in the loaded library.
func HasSXgesv ¶
func HasSXgesv() bool
HasSXgesv reports whether cusolverDnSXgesv resolved in the loaded library.
func HasSXgesvBufferSize ¶
func HasSXgesvBufferSize() bool
HasSXgesvBufferSize reports whether cusolverDnSXgesv_bufferSize resolved in the loaded library.
func HasSetAdvOptions ¶
func HasSetAdvOptions() bool
HasSetAdvOptions reports whether cusolverDnSetAdvOptions resolved in the loaded library.
func HasSetDeterministicMode ¶
func HasSetDeterministicMode() bool
HasSetDeterministicMode reports whether cusolverDnSetDeterministicMode resolved in the loaded library.
func HasSetEmulationSpecialValuesSupport ¶
func HasSetEmulationSpecialValuesSupport() bool
HasSetEmulationSpecialValuesSupport reports whether cusolverDnSetEmulationSpecialValuesSupport resolved in the loaded library.
func HasSetEmulationStrategy ¶
func HasSetEmulationStrategy() bool
HasSetEmulationStrategy reports whether cusolverDnSetEmulationStrategy resolved in the loaded library.
func HasSetFixedPointEmulationMantissaBitOffset ¶
func HasSetFixedPointEmulationMantissaBitOffset() bool
HasSetFixedPointEmulationMantissaBitOffset reports whether cusolverDnSetFixedPointEmulationMantissaBitOffset resolved in the loaded library.
func HasSetFixedPointEmulationMantissaControl ¶
func HasSetFixedPointEmulationMantissaControl() bool
HasSetFixedPointEmulationMantissaControl reports whether cusolverDnSetFixedPointEmulationMantissaControl resolved in the loaded library.
func HasSetFixedPointEmulationMaxMantissaBitCount ¶
func HasSetFixedPointEmulationMaxMantissaBitCount() bool
HasSetFixedPointEmulationMaxMantissaBitCount reports whether cusolverDnSetFixedPointEmulationMaxMantissaBitCount resolved in the loaded library.
func HasSetMathMode ¶
func HasSetMathMode() bool
HasSetMathMode reports whether cusolverDnSetMathMode resolved in the loaded library.
func HasSetStream ¶
func HasSetStream() bool
HasSetStream reports whether cusolverDnSetStream resolved in the loaded library.
func HasSgebrd ¶
func HasSgebrd() bool
HasSgebrd reports whether cusolverDnSgebrd resolved in the loaded library.
func HasSgebrdBufferSize ¶
func HasSgebrdBufferSize() bool
HasSgebrdBufferSize reports whether cusolverDnSgebrd_bufferSize resolved in the loaded library.
func HasSgeqrf ¶
func HasSgeqrf() bool
HasSgeqrf reports whether cusolverDnSgeqrf resolved in the loaded library.
func HasSgeqrfBufferSize ¶
func HasSgeqrfBufferSize() bool
HasSgeqrfBufferSize reports whether cusolverDnSgeqrf_bufferSize resolved in the loaded library.
func HasSgesvd ¶
func HasSgesvd() bool
HasSgesvd reports whether cusolverDnSgesvd resolved in the loaded library.
func HasSgesvdBufferSize ¶
func HasSgesvdBufferSize() bool
HasSgesvdBufferSize reports whether cusolverDnSgesvd_bufferSize resolved in the loaded library.
func HasSgesvdaStridedBatched ¶
func HasSgesvdaStridedBatched() bool
HasSgesvdaStridedBatched reports whether cusolverDnSgesvdaStridedBatched resolved in the loaded library.
func HasSgesvdaStridedBatchedBufferSize ¶
func HasSgesvdaStridedBatchedBufferSize() bool
HasSgesvdaStridedBatchedBufferSize reports whether cusolverDnSgesvdaStridedBatched_bufferSize resolved in the loaded library.
func HasSgesvdj ¶
func HasSgesvdj() bool
HasSgesvdj reports whether cusolverDnSgesvdj resolved in the loaded library.
func HasSgesvdjBatched ¶
func HasSgesvdjBatched() bool
HasSgesvdjBatched reports whether cusolverDnSgesvdjBatched resolved in the loaded library.
func HasSgesvdjBatchedBufferSize ¶
func HasSgesvdjBatchedBufferSize() bool
HasSgesvdjBatchedBufferSize reports whether cusolverDnSgesvdjBatched_bufferSize resolved in the loaded library.
func HasSgesvdjBufferSize ¶
func HasSgesvdjBufferSize() bool
HasSgesvdjBufferSize reports whether cusolverDnSgesvdj_bufferSize resolved in the loaded library.
func HasSgetrf ¶
func HasSgetrf() bool
HasSgetrf reports whether cusolverDnSgetrf resolved in the loaded library.
func HasSgetrfBufferSize ¶
func HasSgetrfBufferSize() bool
HasSgetrfBufferSize reports whether cusolverDnSgetrf_bufferSize resolved in the loaded library.
func HasSgetrs ¶
func HasSgetrs() bool
HasSgetrs reports whether cusolverDnSgetrs resolved in the loaded library.
func HasSlaswp ¶
func HasSlaswp() bool
HasSlaswp reports whether cusolverDnSlaswp resolved in the loaded library.
func HasSlauum ¶
func HasSlauum() bool
HasSlauum reports whether cusolverDnSlauum resolved in the loaded library.
func HasSlauumBufferSize ¶
func HasSlauumBufferSize() bool
HasSlauumBufferSize reports whether cusolverDnSlauum_bufferSize resolved in the loaded library.
func HasSorgbr ¶
func HasSorgbr() bool
HasSorgbr reports whether cusolverDnSorgbr resolved in the loaded library.
func HasSorgbrBufferSize ¶
func HasSorgbrBufferSize() bool
HasSorgbrBufferSize reports whether cusolverDnSorgbr_bufferSize resolved in the loaded library.
func HasSorgqr ¶
func HasSorgqr() bool
HasSorgqr reports whether cusolverDnSorgqr resolved in the loaded library.
func HasSorgqrBufferSize ¶
func HasSorgqrBufferSize() bool
HasSorgqrBufferSize reports whether cusolverDnSorgqr_bufferSize resolved in the loaded library.
func HasSorgtr ¶
func HasSorgtr() bool
HasSorgtr reports whether cusolverDnSorgtr resolved in the loaded library.
func HasSorgtrBufferSize ¶
func HasSorgtrBufferSize() bool
HasSorgtrBufferSize reports whether cusolverDnSorgtr_bufferSize resolved in the loaded library.
func HasSormqr ¶
func HasSormqr() bool
HasSormqr reports whether cusolverDnSormqr resolved in the loaded library.
func HasSormqrBufferSize ¶
func HasSormqrBufferSize() bool
HasSormqrBufferSize reports whether cusolverDnSormqr_bufferSize resolved in the loaded library.
func HasSormtr ¶
func HasSormtr() bool
HasSormtr reports whether cusolverDnSormtr resolved in the loaded library.
func HasSormtrBufferSize ¶
func HasSormtrBufferSize() bool
HasSormtrBufferSize reports whether cusolverDnSormtr_bufferSize resolved in the loaded library.
func HasSpotrf ¶
func HasSpotrf() bool
HasSpotrf reports whether cusolverDnSpotrf resolved in the loaded library.
func HasSpotrfBatched ¶
func HasSpotrfBatched() bool
HasSpotrfBatched reports whether cusolverDnSpotrfBatched resolved in the loaded library.
func HasSpotrfBufferSize ¶
func HasSpotrfBufferSize() bool
HasSpotrfBufferSize reports whether cusolverDnSpotrf_bufferSize resolved in the loaded library.
func HasSpotri ¶
func HasSpotri() bool
HasSpotri reports whether cusolverDnSpotri resolved in the loaded library.
func HasSpotriBufferSize ¶
func HasSpotriBufferSize() bool
HasSpotriBufferSize reports whether cusolverDnSpotri_bufferSize resolved in the loaded library.
func HasSpotrs ¶
func HasSpotrs() bool
HasSpotrs reports whether cusolverDnSpotrs resolved in the loaded library.
func HasSpotrsBatched ¶
func HasSpotrsBatched() bool
HasSpotrsBatched reports whether cusolverDnSpotrsBatched resolved in the loaded library.
func HasSsyevd ¶
func HasSsyevd() bool
HasSsyevd reports whether cusolverDnSsyevd resolved in the loaded library.
func HasSsyevdBufferSize ¶
func HasSsyevdBufferSize() bool
HasSsyevdBufferSize reports whether cusolverDnSsyevd_bufferSize resolved in the loaded library.
func HasSsyevdx ¶
func HasSsyevdx() bool
HasSsyevdx reports whether cusolverDnSsyevdx resolved in the loaded library.
func HasSsyevdxBufferSize ¶
func HasSsyevdxBufferSize() bool
HasSsyevdxBufferSize reports whether cusolverDnSsyevdx_bufferSize resolved in the loaded library.
func HasSsyevj ¶
func HasSsyevj() bool
HasSsyevj reports whether cusolverDnSsyevj resolved in the loaded library.
func HasSsyevjBatched ¶
func HasSsyevjBatched() bool
HasSsyevjBatched reports whether cusolverDnSsyevjBatched resolved in the loaded library.
func HasSsyevjBatchedBufferSize ¶
func HasSsyevjBatchedBufferSize() bool
HasSsyevjBatchedBufferSize reports whether cusolverDnSsyevjBatched_bufferSize resolved in the loaded library.
func HasSsyevjBufferSize ¶
func HasSsyevjBufferSize() bool
HasSsyevjBufferSize reports whether cusolverDnSsyevj_bufferSize resolved in the loaded library.
func HasSsygvd ¶
func HasSsygvd() bool
HasSsygvd reports whether cusolverDnSsygvd resolved in the loaded library.
func HasSsygvdBufferSize ¶
func HasSsygvdBufferSize() bool
HasSsygvdBufferSize reports whether cusolverDnSsygvd_bufferSize resolved in the loaded library.
func HasSsygvdx ¶
func HasSsygvdx() bool
HasSsygvdx reports whether cusolverDnSsygvdx resolved in the loaded library.
func HasSsygvdxBufferSize ¶
func HasSsygvdxBufferSize() bool
HasSsygvdxBufferSize reports whether cusolverDnSsygvdx_bufferSize resolved in the loaded library.
func HasSsygvj ¶
func HasSsygvj() bool
HasSsygvj reports whether cusolverDnSsygvj resolved in the loaded library.
func HasSsygvjBufferSize ¶
func HasSsygvjBufferSize() bool
HasSsygvjBufferSize reports whether cusolverDnSsygvj_bufferSize resolved in the loaded library.
func HasSsytrd ¶
func HasSsytrd() bool
HasSsytrd reports whether cusolverDnSsytrd resolved in the loaded library.
func HasSsytrdBufferSize ¶
func HasSsytrdBufferSize() bool
HasSsytrdBufferSize reports whether cusolverDnSsytrd_bufferSize resolved in the loaded library.
func HasSsytrf ¶
func HasSsytrf() bool
HasSsytrf reports whether cusolverDnSsytrf resolved in the loaded library.
func HasSsytrfBufferSize ¶
func HasSsytrfBufferSize() bool
HasSsytrfBufferSize reports whether cusolverDnSsytrf_bufferSize resolved in the loaded library.
func HasSsytri ¶
func HasSsytri() bool
HasSsytri reports whether cusolverDnSsytri resolved in the loaded library.
func HasSsytriBufferSize ¶
func HasSsytriBufferSize() bool
HasSsytriBufferSize reports whether cusolverDnSsytri_bufferSize resolved in the loaded library.
func HasXgeev ¶
func HasXgeev() bool
HasXgeev reports whether cusolverDnXgeev resolved in the loaded library.
func HasXgeevBufferSize ¶
func HasXgeevBufferSize() bool
HasXgeevBufferSize reports whether cusolverDnXgeev_bufferSize resolved in the loaded library.
func HasXgeqrf ¶
func HasXgeqrf() bool
HasXgeqrf reports whether cusolverDnXgeqrf resolved in the loaded library.
func HasXgeqrfBufferSize ¶
func HasXgeqrfBufferSize() bool
HasXgeqrfBufferSize reports whether cusolverDnXgeqrf_bufferSize resolved in the loaded library.
func HasXgesvd ¶
func HasXgesvd() bool
HasXgesvd reports whether cusolverDnXgesvd resolved in the loaded library.
func HasXgesvdBufferSize ¶
func HasXgesvdBufferSize() bool
HasXgesvdBufferSize reports whether cusolverDnXgesvd_bufferSize resolved in the loaded library.
func HasXgesvdjGetResidual ¶
func HasXgesvdjGetResidual() bool
HasXgesvdjGetResidual reports whether cusolverDnXgesvdjGetResidual resolved in the loaded library.
func HasXgesvdjGetSweeps ¶
func HasXgesvdjGetSweeps() bool
HasXgesvdjGetSweeps reports whether cusolverDnXgesvdjGetSweeps resolved in the loaded library.
func HasXgesvdjSetMaxSweeps ¶
func HasXgesvdjSetMaxSweeps() bool
HasXgesvdjSetMaxSweeps reports whether cusolverDnXgesvdjSetMaxSweeps resolved in the loaded library.
func HasXgesvdjSetSortEig ¶
func HasXgesvdjSetSortEig() bool
HasXgesvdjSetSortEig reports whether cusolverDnXgesvdjSetSortEig resolved in the loaded library.
func HasXgesvdjSetTolerance ¶
func HasXgesvdjSetTolerance() bool
HasXgesvdjSetTolerance reports whether cusolverDnXgesvdjSetTolerance resolved in the loaded library.
func HasXgesvdp ¶
func HasXgesvdp() bool
HasXgesvdp reports whether cusolverDnXgesvdp resolved in the loaded library.
func HasXgesvdpBufferSize ¶
func HasXgesvdpBufferSize() bool
HasXgesvdpBufferSize reports whether cusolverDnXgesvdp_bufferSize resolved in the loaded library.
func HasXgesvdr ¶
func HasXgesvdr() bool
HasXgesvdr reports whether cusolverDnXgesvdr resolved in the loaded library.
func HasXgesvdrBufferSize ¶
func HasXgesvdrBufferSize() bool
HasXgesvdrBufferSize reports whether cusolverDnXgesvdr_bufferSize resolved in the loaded library.
func HasXgetrf ¶
func HasXgetrf() bool
HasXgetrf reports whether cusolverDnXgetrf resolved in the loaded library.
func HasXgetrfBufferSize ¶
func HasXgetrfBufferSize() bool
HasXgetrfBufferSize reports whether cusolverDnXgetrf_bufferSize resolved in the loaded library.
func HasXgetrs ¶
func HasXgetrs() bool
HasXgetrs reports whether cusolverDnXgetrs resolved in the loaded library.
func HasXhetrf ¶
func HasXhetrf() bool
HasXhetrf reports whether cusolverDnXhetrf resolved in the loaded library.
func HasXhetrfBufferSize ¶
func HasXhetrfBufferSize() bool
HasXhetrfBufferSize reports whether cusolverDnXhetrf_bufferSize resolved in the loaded library.
func HasXhetrs ¶
func HasXhetrs() bool
HasXhetrs reports whether cusolverDnXhetrs resolved in the loaded library.
func HasXhetrsBufferSize ¶
func HasXhetrsBufferSize() bool
HasXhetrsBufferSize reports whether cusolverDnXhetrs_bufferSize resolved in the loaded library.
func HasXlarft ¶
func HasXlarft() bool
HasXlarft reports whether cusolverDnXlarft resolved in the loaded library.
func HasXlarftBufferSize ¶
func HasXlarftBufferSize() bool
HasXlarftBufferSize reports whether cusolverDnXlarft_bufferSize resolved in the loaded library.
func HasXpolar ¶
func HasXpolar() bool
HasXpolar reports whether cusolverDnXpolar resolved in the loaded library.
func HasXpolarBufferSize ¶
func HasXpolarBufferSize() bool
HasXpolarBufferSize reports whether cusolverDnXpolar_bufferSize resolved in the loaded library.
func HasXpotrf ¶
func HasXpotrf() bool
HasXpotrf reports whether cusolverDnXpotrf resolved in the loaded library.
func HasXpotrfBufferSize ¶
func HasXpotrfBufferSize() bool
HasXpotrfBufferSize reports whether cusolverDnXpotrf_bufferSize resolved in the loaded library.
func HasXpotrs ¶
func HasXpotrs() bool
HasXpotrs reports whether cusolverDnXpotrs resolved in the loaded library.
func HasXstedc ¶
func HasXstedc() bool
HasXstedc reports whether cusolverDnXstedc resolved in the loaded library.
func HasXstedcBufferSize ¶
func HasXstedcBufferSize() bool
HasXstedcBufferSize reports whether cusolverDnXstedc_bufferSize resolved in the loaded library.
func HasXsyevBatched ¶
func HasXsyevBatched() bool
HasXsyevBatched reports whether cusolverDnXsyevBatched resolved in the loaded library.
func HasXsyevBatchedBufferSize ¶
func HasXsyevBatchedBufferSize() bool
HasXsyevBatchedBufferSize reports whether cusolverDnXsyevBatched_bufferSize resolved in the loaded library.
func HasXsyevd ¶
func HasXsyevd() bool
HasXsyevd reports whether cusolverDnXsyevd resolved in the loaded library.
func HasXsyevdBufferSize ¶
func HasXsyevdBufferSize() bool
HasXsyevdBufferSize reports whether cusolverDnXsyevd_bufferSize resolved in the loaded library.
func HasXsyevdx ¶
func HasXsyevdx() bool
HasXsyevdx reports whether cusolverDnXsyevdx resolved in the loaded library.
func HasXsyevdxBufferSize ¶
func HasXsyevdxBufferSize() bool
HasXsyevdxBufferSize reports whether cusolverDnXsyevdx_bufferSize resolved in the loaded library.
func HasXsyevjGetResidual ¶
func HasXsyevjGetResidual() bool
HasXsyevjGetResidual reports whether cusolverDnXsyevjGetResidual resolved in the loaded library.
func HasXsyevjGetSweeps ¶
func HasXsyevjGetSweeps() bool
HasXsyevjGetSweeps reports whether cusolverDnXsyevjGetSweeps resolved in the loaded library.
func HasXsyevjSetMaxSweeps ¶
func HasXsyevjSetMaxSweeps() bool
HasXsyevjSetMaxSweeps reports whether cusolverDnXsyevjSetMaxSweeps resolved in the loaded library.
func HasXsyevjSetSortEig ¶
func HasXsyevjSetSortEig() bool
HasXsyevjSetSortEig reports whether cusolverDnXsyevjSetSortEig resolved in the loaded library.
func HasXsyevjSetTolerance ¶
func HasXsyevjSetTolerance() bool
HasXsyevjSetTolerance reports whether cusolverDnXsyevjSetTolerance resolved in the loaded library.
func HasXsygvStridedBatched ¶
func HasXsygvStridedBatched() bool
HasXsygvStridedBatched reports whether cusolverDnXsygvStridedBatched resolved in the loaded library.
func HasXsygvStridedBatchedBufferSize ¶
func HasXsygvStridedBatchedBufferSize() bool
HasXsygvStridedBatchedBufferSize reports whether cusolverDnXsygvStridedBatched_bufferSize resolved in the loaded library.
func HasXsygvd ¶
func HasXsygvd() bool
HasXsygvd reports whether cusolverDnXsygvd resolved in the loaded library.
func HasXsygvdBufferSize ¶
func HasXsygvdBufferSize() bool
HasXsygvdBufferSize reports whether cusolverDnXsygvd_bufferSize resolved in the loaded library.
func HasXsygvdx ¶
func HasXsygvdx() bool
HasXsygvdx reports whether cusolverDnXsygvdx resolved in the loaded library.
func HasXsygvdxBufferSize ¶
func HasXsygvdxBufferSize() bool
HasXsygvdxBufferSize reports whether cusolverDnXsygvdx_bufferSize resolved in the loaded library.
func HasXsytrf ¶
func HasXsytrf() bool
HasXsytrf reports whether cusolverDnXsytrf resolved in the loaded library.
func HasXsytrfBufferSize ¶
func HasXsytrfBufferSize() bool
HasXsytrfBufferSize reports whether cusolverDnXsytrf_bufferSize resolved in the loaded library.
func HasXsytrs ¶
func HasXsytrs() bool
HasXsytrs reports whether cusolverDnXsytrs resolved in the loaded library.
func HasXsytrsBufferSize ¶
func HasXsytrsBufferSize() bool
HasXsytrsBufferSize reports whether cusolverDnXsytrs_bufferSize resolved in the loaded library.
func HasXtrtri ¶
func HasXtrtri() bool
HasXtrtri reports whether cusolverDnXtrtri resolved in the loaded library.
func HasXtrtriBufferSize ¶
func HasXtrtriBufferSize() bool
HasXtrtriBufferSize reports whether cusolverDnXtrtri_bufferSize resolved in the loaded library.
func HasZCgels ¶
func HasZCgels() bool
HasZCgels reports whether cusolverDnZCgels resolved in the loaded library.
func HasZCgelsBufferSize ¶
func HasZCgelsBufferSize() bool
HasZCgelsBufferSize reports whether cusolverDnZCgels_bufferSize resolved in the loaded library.
func HasZCgesv ¶
func HasZCgesv() bool
HasZCgesv reports whether cusolverDnZCgesv resolved in the loaded library.
func HasZCgesvBufferSize ¶
func HasZCgesvBufferSize() bool
HasZCgesvBufferSize reports whether cusolverDnZCgesv_bufferSize resolved in the loaded library.
func HasZEgels ¶
func HasZEgels() bool
HasZEgels reports whether cusolverDnZEgels resolved in the loaded library.
func HasZEgelsBufferSize ¶
func HasZEgelsBufferSize() bool
HasZEgelsBufferSize reports whether cusolverDnZEgels_bufferSize resolved in the loaded library.
func HasZEgesv ¶
func HasZEgesv() bool
HasZEgesv reports whether cusolverDnZEgesv resolved in the loaded library.
func HasZEgesvBufferSize ¶
func HasZEgesvBufferSize() bool
HasZEgesvBufferSize reports whether cusolverDnZEgesv_bufferSize resolved in the loaded library.
func HasZKgels ¶
func HasZKgels() bool
HasZKgels reports whether cusolverDnZKgels resolved in the loaded library.
func HasZKgelsBufferSize ¶
func HasZKgelsBufferSize() bool
HasZKgelsBufferSize reports whether cusolverDnZKgels_bufferSize resolved in the loaded library.
func HasZKgesv ¶
func HasZKgesv() bool
HasZKgesv reports whether cusolverDnZKgesv resolved in the loaded library.
func HasZKgesvBufferSize ¶
func HasZKgesvBufferSize() bool
HasZKgesvBufferSize reports whether cusolverDnZKgesv_bufferSize resolved in the loaded library.
func HasZYgels ¶
func HasZYgels() bool
HasZYgels reports whether cusolverDnZYgels resolved in the loaded library.
func HasZYgelsBufferSize ¶
func HasZYgelsBufferSize() bool
HasZYgelsBufferSize reports whether cusolverDnZYgels_bufferSize resolved in the loaded library.
func HasZYgesv ¶
func HasZYgesv() bool
HasZYgesv reports whether cusolverDnZYgesv resolved in the loaded library.
func HasZYgesvBufferSize ¶
func HasZYgesvBufferSize() bool
HasZYgesvBufferSize reports whether cusolverDnZYgesv_bufferSize resolved in the loaded library.
func HasZZgels ¶
func HasZZgels() bool
HasZZgels reports whether cusolverDnZZgels resolved in the loaded library.
func HasZZgelsBufferSize ¶
func HasZZgelsBufferSize() bool
HasZZgelsBufferSize reports whether cusolverDnZZgels_bufferSize resolved in the loaded library.
func HasZZgesv ¶
func HasZZgesv() bool
HasZZgesv reports whether cusolverDnZZgesv resolved in the loaded library.
func HasZZgesvBufferSize ¶
func HasZZgesvBufferSize() bool
HasZZgesvBufferSize reports whether cusolverDnZZgesv_bufferSize resolved in the loaded library.
func HasZgebrd ¶
func HasZgebrd() bool
HasZgebrd reports whether cusolverDnZgebrd resolved in the loaded library.
func HasZgebrdBufferSize ¶
func HasZgebrdBufferSize() bool
HasZgebrdBufferSize reports whether cusolverDnZgebrd_bufferSize resolved in the loaded library.
func HasZgeqrf ¶
func HasZgeqrf() bool
HasZgeqrf reports whether cusolverDnZgeqrf resolved in the loaded library.
func HasZgeqrfBufferSize ¶
func HasZgeqrfBufferSize() bool
HasZgeqrfBufferSize reports whether cusolverDnZgeqrf_bufferSize resolved in the loaded library.
func HasZgesvd ¶
func HasZgesvd() bool
HasZgesvd reports whether cusolverDnZgesvd resolved in the loaded library.
func HasZgesvdBufferSize ¶
func HasZgesvdBufferSize() bool
HasZgesvdBufferSize reports whether cusolverDnZgesvd_bufferSize resolved in the loaded library.
func HasZgesvdaStridedBatched ¶
func HasZgesvdaStridedBatched() bool
HasZgesvdaStridedBatched reports whether cusolverDnZgesvdaStridedBatched resolved in the loaded library.
func HasZgesvdaStridedBatchedBufferSize ¶
func HasZgesvdaStridedBatchedBufferSize() bool
HasZgesvdaStridedBatchedBufferSize reports whether cusolverDnZgesvdaStridedBatched_bufferSize resolved in the loaded library.
func HasZgesvdj ¶
func HasZgesvdj() bool
HasZgesvdj reports whether cusolverDnZgesvdj resolved in the loaded library.
func HasZgesvdjBatched ¶
func HasZgesvdjBatched() bool
HasZgesvdjBatched reports whether cusolverDnZgesvdjBatched resolved in the loaded library.
func HasZgesvdjBatchedBufferSize ¶
func HasZgesvdjBatchedBufferSize() bool
HasZgesvdjBatchedBufferSize reports whether cusolverDnZgesvdjBatched_bufferSize resolved in the loaded library.
func HasZgesvdjBufferSize ¶
func HasZgesvdjBufferSize() bool
HasZgesvdjBufferSize reports whether cusolverDnZgesvdj_bufferSize resolved in the loaded library.
func HasZgetrf ¶
func HasZgetrf() bool
HasZgetrf reports whether cusolverDnZgetrf resolved in the loaded library.
func HasZgetrfBufferSize ¶
func HasZgetrfBufferSize() bool
HasZgetrfBufferSize reports whether cusolverDnZgetrf_bufferSize resolved in the loaded library.
func HasZgetrs ¶
func HasZgetrs() bool
HasZgetrs reports whether cusolverDnZgetrs resolved in the loaded library.
func HasZheevd ¶
func HasZheevd() bool
HasZheevd reports whether cusolverDnZheevd resolved in the loaded library.
func HasZheevdBufferSize ¶
func HasZheevdBufferSize() bool
HasZheevdBufferSize reports whether cusolverDnZheevd_bufferSize resolved in the loaded library.
func HasZheevdx ¶
func HasZheevdx() bool
HasZheevdx reports whether cusolverDnZheevdx resolved in the loaded library.
func HasZheevdxBufferSize ¶
func HasZheevdxBufferSize() bool
HasZheevdxBufferSize reports whether cusolverDnZheevdx_bufferSize resolved in the loaded library.
func HasZheevj ¶
func HasZheevj() bool
HasZheevj reports whether cusolverDnZheevj resolved in the loaded library.
func HasZheevjBatched ¶
func HasZheevjBatched() bool
HasZheevjBatched reports whether cusolverDnZheevjBatched resolved in the loaded library.
func HasZheevjBatchedBufferSize ¶
func HasZheevjBatchedBufferSize() bool
HasZheevjBatchedBufferSize reports whether cusolverDnZheevjBatched_bufferSize resolved in the loaded library.
func HasZheevjBufferSize ¶
func HasZheevjBufferSize() bool
HasZheevjBufferSize reports whether cusolverDnZheevj_bufferSize resolved in the loaded library.
func HasZhegvd ¶
func HasZhegvd() bool
HasZhegvd reports whether cusolverDnZhegvd resolved in the loaded library.
func HasZhegvdBufferSize ¶
func HasZhegvdBufferSize() bool
HasZhegvdBufferSize reports whether cusolverDnZhegvd_bufferSize resolved in the loaded library.
func HasZhegvdx ¶
func HasZhegvdx() bool
HasZhegvdx reports whether cusolverDnZhegvdx resolved in the loaded library.
func HasZhegvdxBufferSize ¶
func HasZhegvdxBufferSize() bool
HasZhegvdxBufferSize reports whether cusolverDnZhegvdx_bufferSize resolved in the loaded library.
func HasZhegvj ¶
func HasZhegvj() bool
HasZhegvj reports whether cusolverDnZhegvj resolved in the loaded library.
func HasZhegvjBufferSize ¶
func HasZhegvjBufferSize() bool
HasZhegvjBufferSize reports whether cusolverDnZhegvj_bufferSize resolved in the loaded library.
func HasZhetrd ¶
func HasZhetrd() bool
HasZhetrd reports whether cusolverDnZhetrd resolved in the loaded library.
func HasZhetrdBufferSize ¶
func HasZhetrdBufferSize() bool
HasZhetrdBufferSize reports whether cusolverDnZhetrd_bufferSize resolved in the loaded library.
func HasZlaswp ¶
func HasZlaswp() bool
HasZlaswp reports whether cusolverDnZlaswp resolved in the loaded library.
func HasZlauum ¶
func HasZlauum() bool
HasZlauum reports whether cusolverDnZlauum resolved in the loaded library.
func HasZlauumBufferSize ¶
func HasZlauumBufferSize() bool
HasZlauumBufferSize reports whether cusolverDnZlauum_bufferSize resolved in the loaded library.
func HasZpotrf ¶
func HasZpotrf() bool
HasZpotrf reports whether cusolverDnZpotrf resolved in the loaded library.
func HasZpotrfBatched ¶
func HasZpotrfBatched() bool
HasZpotrfBatched reports whether cusolverDnZpotrfBatched resolved in the loaded library.
func HasZpotrfBufferSize ¶
func HasZpotrfBufferSize() bool
HasZpotrfBufferSize reports whether cusolverDnZpotrf_bufferSize resolved in the loaded library.
func HasZpotri ¶
func HasZpotri() bool
HasZpotri reports whether cusolverDnZpotri resolved in the loaded library.
func HasZpotriBufferSize ¶
func HasZpotriBufferSize() bool
HasZpotriBufferSize reports whether cusolverDnZpotri_bufferSize resolved in the loaded library.
func HasZpotrs ¶
func HasZpotrs() bool
HasZpotrs reports whether cusolverDnZpotrs resolved in the loaded library.
func HasZpotrsBatched ¶
func HasZpotrsBatched() bool
HasZpotrsBatched reports whether cusolverDnZpotrsBatched resolved in the loaded library.
func HasZsytrf ¶
func HasZsytrf() bool
HasZsytrf reports whether cusolverDnZsytrf resolved in the loaded library.
func HasZsytrfBufferSize ¶
func HasZsytrfBufferSize() bool
HasZsytrfBufferSize reports whether cusolverDnZsytrf_bufferSize resolved in the loaded library.
func HasZsytri ¶
func HasZsytri() bool
HasZsytri reports whether cusolverDnZsytri resolved in the loaded library.
func HasZsytriBufferSize ¶
func HasZsytriBufferSize() bool
HasZsytriBufferSize reports whether cusolverDnZsytri_bufferSize resolved in the loaded library.
func HasZungbr ¶
func HasZungbr() bool
HasZungbr reports whether cusolverDnZungbr resolved in the loaded library.
func HasZungbrBufferSize ¶
func HasZungbrBufferSize() bool
HasZungbrBufferSize reports whether cusolverDnZungbr_bufferSize resolved in the loaded library.
func HasZungqr ¶
func HasZungqr() bool
HasZungqr reports whether cusolverDnZungqr resolved in the loaded library.
func HasZungqrBufferSize ¶
func HasZungqrBufferSize() bool
HasZungqrBufferSize reports whether cusolverDnZungqr_bufferSize resolved in the loaded library.
func HasZungtr ¶
func HasZungtr() bool
HasZungtr reports whether cusolverDnZungtr resolved in the loaded library.
func HasZungtrBufferSize ¶
func HasZungtrBufferSize() bool
HasZungtrBufferSize reports whether cusolverDnZungtr_bufferSize resolved in the loaded library.
func HasZunmqr ¶
func HasZunmqr() bool
HasZunmqr reports whether cusolverDnZunmqr resolved in the loaded library.
func HasZunmqrBufferSize ¶
func HasZunmqrBufferSize() bool
HasZunmqrBufferSize reports whether cusolverDnZunmqr_bufferSize resolved in the loaded library.
func HasZunmtr ¶
func HasZunmtr() bool
HasZunmtr reports whether cusolverDnZunmtr resolved in the loaded library.
func HasZunmtrBufferSize ¶
func HasZunmtrBufferSize() bool
HasZunmtrBufferSize reports whether cusolverDnZunmtr_bufferSize resolved in the loaded library.
func Load ¶
Load opens the shared library from path, or from the default search list when path is empty, and binds all symbols. Callers that need to direct loading should call Load before any other function; otherwise the first call loads from the default search list.
Load is idempotent: calling it again with the same path, or with an empty path, returns nil. Calling it with a different path after a successful load returns *LibraryConflictError rather than replacing the library. After a failed load, Load retries.
func Loaded ¶
func Loaded() bool
Loaded reports whether the library is currently loaded. It does not trigger a load.
func LoggerForceDisable ¶
func LoggerForceDisable() error
LoggerForceDisable disables logging for the entire run.
A nil error means logging was successfully disabled. See Result for a complete list of valid return codes.
Wraps cusolverDnLoggerForceDisable.
func LoggerOpenFile ¶
LoggerOpenFile opens a logging output file in the given path.
- logFile: Path of the logging output file
A nil error means the logging file was successfully opened. See Result for a complete list of valid return codes.
Wraps cusolverDnLoggerOpenFile.
func LoggerSetCallback ¶
func LoggerSetCallback(callback LoggerCallback) error
LoggerSetCallback sets the logging callback function.
- callback: Pointer to a callback function. See cusolverDnLoggerCallback_t (see LoggerCallback)
A nil error means the callback function was successfully set. See Result for a complete list of valid return codes.
Wraps cusolverDnLoggerSetCallback.
func LoggerSetFile ¶
LoggerSetFile sets the logging output file.
Note: once registered using this function call, the provided file handle must not be closed unless the function is called again to switch to a different file handle.
- file: Pointer to an open file. File should have write permission
A nil error means logging file was successfully set. See Result for a complete list of valid return codes.
Wraps cusolverDnLoggerSetFile.
func LoggerSetLevel ¶
LoggerSetLevel sets the value of the logging level.
- level: Value of the logging level. See cuSOLVERDn Logging
A nil error means the logging level was successfully set. See Result for a complete list of valid return codes.
Errors:
- ErrInvalidValue: If the value was not a valid logging level. See cuSOLVERDn Logging.
Wraps cusolverDnLoggerSetLevel.
func LoggerSetMask ¶
LoggerSetMask sets the value of the logging mask.
- mask: Value of the logging mask. See cuSOLVERDn Logging
A nil error means the logging mask was successfully set. See Result for a complete list of valid return codes.
Wraps cusolverDnLoggerSetMask.
Types ¶
type AlgMode ¶
type AlgMode int32
AlgMode indicates which algorithm is selected by Params.SetAdvOptions.
The set of algorithms supported for each routine is described in detail along with the routine’s documentation. The default algorithm is Alg0. The user can also provide NULL to use the default algorithm.
type BindFailure ¶
BindFailure names a symbol the loaded library exports but that could not be bound, and why.
func BindFailures ¶
func BindFailures() []BindFailure
BindFailures returns the symbols the loaded library exports that could not be bound, sorted by symbol name, or nil if every exported symbol bound. Calling one of these reports *SymbolError with the same Err.
A load that reports no error can still leave symbols unbound: the library is fine and the signatures are not representable here. Call this after Load to find that out at once rather than one call site at a time. It does not trigger a load, and returns nil if none has happened.
type CallError ¶
CallError reports that a library call returned a failure result.
Unwrap returns Result, so errors.Is(err, c) reports whether the call returned the Result constant c, and errors.As(err, &r) with r of type Result recovers the code.
type Complex128 ¶
Complex128 represents a double-precision complex number.
type DeterministicMode ¶
type DeterministicMode int32
DeterministicMode indicates whether multiple cuSolver function executions with the same input have the same bitwise equal result (deterministic) or might have bitwise different results (non-deterministic). In comparison to cublasAtomicsMode_t, which only includes the usage of atomic functions, DeterministicMode includes all non-deterministic programming patterns. The deterministic mode can be set and queried using Handle.SetDeterministicMode and Handle.DeterministicMode routines, respectively.
const ( DeterministicResults DeterministicMode = 1 AllowNonDeterministicResults DeterministicMode = 2 )
func (DeterministicMode) String ¶
func (e DeterministicMode) String() string
String returns the constant name, or a numeric representation for unknown values.
type DirectMode ¶
type DirectMode int32
DirectMode specifies the order in which the elementary reflectors are multiplied to form the block reflector.
const ( CublasDirectForward DirectMode = 0 CublasDirectBackward DirectMode = 1 )
func (DirectMode) String ¶
func (e DirectMode) String() string
String returns the constant name, or a numeric representation for unknown values.
type EigComp ¶
type EigComp int32
EigComp indicates the computational mode for eigen routines that compute eigenvalues and optionally eigenvectors, analogous to the compz argument in LAPACK. The values of EigComp correspond directly to the LAPACK compz argument. In LAPACK, compz is specified as a single character: 'N' means no eigenvectors are computed (eigenvalues only); 'I' means the eigenvector matrix is initialized to the identity and then updated by the routine; 'V' means the routine uses the matrix provided on entry and overwrites it with the product of that matrix and the orthogonal (or unitary) transformations accumulated during the computation. The cuSolver enumerants EigCompN, EigCompI, and EigCompV map to LAPACK 'N', 'I', and 'V' respectively.
type EigMode ¶
type EigMode int32
EigMode indicates whether or not eigenvectors are computed.
Notice that LAPACK implementations often use Fortran character 'N' (only eigenvalues are computed), 'V' (both eigenvalues and eigenvectors are computed) to indicate whether or not eigenvectors are computed.
type EigType ¶
type EigType int32
EigType indicates which type of eigenvalue the solver is.
Notice that LAPACK implementations often use Fortran integer 1 (A*x = lambda*B*x), 2 (A*B*x = lambda*x), 3 (B*A*x = lambda*x) to indicate which type of eigenvalue the solver is.
type EmulationMantissaControl ¶
type EmulationMantissaControl int32
EmulationMantissaControl controls emulated mantissa precision.
const ( EmulationMantissaControlDynamic EmulationMantissaControl = 0 EmulationMantissaControlFixed EmulationMantissaControl = 1 )
func (EmulationMantissaControl) String ¶
func (e EmulationMantissaControl) String() string
String returns the constant name, or a numeric representation for unknown values.
type EmulationSpecialValuesSupport ¶
type EmulationSpecialValuesSupport int32
EmulationSpecialValuesSupport controls special-value emulation.
const ( EmulationSpecialValuesSupportDefault EmulationSpecialValuesSupport = 0xFFFF EmulationSpecialValuesSupportNone EmulationSpecialValuesSupport = 0 EmulationSpecialValuesSupportInfinity EmulationSpecialValuesSupport = 1 EmulationSpecialValuesSupportNan EmulationSpecialValuesSupport = 2 )
func (EmulationSpecialValuesSupport) String ¶
func (e EmulationSpecialValuesSupport) String() string
String returns the constant name, or a numeric representation for unknown values.
type EmulationStrategy ¶
type EmulationStrategy int32
EmulationStrategy selects CUDA floating-point emulation.
const ( EmulationStrategyDefault EmulationStrategy = 0 EmulationStrategyPerformant EmulationStrategy = 1 EmulationStrategyEager EmulationStrategy = 2 )
func (EmulationStrategy) String ¶
func (e EmulationStrategy) String() string
String returns the constant name, or a numeric representation for unknown values.
type Function ¶
type Function int32
Function indicates which routine needs to be configured by Params.SetAdvOptions.
The value CUSOLVERDN_GETRF corresponds to the routine Getrf.
type GesvdjInfo ¶
type GesvdjInfo uintptr
GesvdjInfo is an opaque handle for gesvdjInfo_t.
func CreateGesvdjInfo ¶
func CreateGesvdjInfo() (GesvdjInfo, error)
CreateGesvdjInfo creates and initializes the structure of gesvdj and gesvdjBatched to default values.
- info: The pointer to the structure of gesvdj
Errors:
- ErrAllocFailed: The resources could not be allocated.
Wraps cusolverDnCreateGesvdjInfo.
func (*GesvdjInfo) Close ¶
func (g *GesvdjInfo) Close() error
Close destroys and releases any memory required by the structure.
If g is zero, Close returns nil. Otherwise Close sets g to zero when the call succeeds and leaves it unchanged when it fails. Only g is zeroed: a copy of it still refers to the released object.
Wraps cusolverDnDestroyGesvdjInfo.
func (GesvdjInfo) XgesvdjSetMaxSweeps ¶
func (g GesvdjInfo) XgesvdjSetMaxSweeps(maxSweeps int32) error
XgesvdjSetMaxSweeps configures the maximum number of sweeps in gesvdj.
The default value is 100.
- maxSweeps: Maximum number of sweeps
Wraps cusolverDnXgesvdjSetMaxSweeps.
func (GesvdjInfo) XgesvdjSetSortEig ¶
func (g GesvdjInfo) XgesvdjSetSortEig(sortSvd int32) error
XgesvdjSetSortEig sets whether the batched Jacobi SVD sorts the singular values it computes.
If sortSvd is zero, the singular values are not sorted.
This function only works for gesvdjBatched. gesvdj always sorts singular values in descending order. By default, singular values are always sorted in descending order.
- sortSvd: If sortSvd is zero, the singular values are not sorted
Wraps cusolverDnXgesvdjSetSortEig.
func (GesvdjInfo) XgesvdjSetTolerance ¶
func (g GesvdjInfo) XgesvdjSetTolerance(tolerance float64) error
XgesvdjSetTolerance configures tolerance of gesvdj.
- tolerance: Accuracy of numerical singular values
Wraps cusolverDnXgesvdjSetTolerance.
type Handle ¶
type Handle uintptr
Handle is an opaque handle for cusolverDnHandle_t.
func Create ¶
Create 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. This function allocates 4 MiB or 32 MiB of memory (for GPUs with Compute Capability of 9.0 and higher), which will be used as the cuBLAS workspace for the first user-defined stream on which Handle.SetStream is called. For the default stream and in all the other cases, cuBLAS will manage its own workspace.
- handle: The pointer to the handle to the cuSolverDN context
A nil error means the initialization succeeded.
Errors:
- ErrAllocFailed: The resources could not be allocated.
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrNotInitialized: The CUDA Runtime initialization failed.
Wraps cusolverDnCreate.
func (Handle) CCgels ¶
func (h Handle) CCgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
CCgels computes the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
These functions are similar in term of functionalities to the full precision LAPACK QR (least squares) solver (Xgels, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an QR factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is m-by-n matrix and X is n-by-nrhs and B is m-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Description of these functions is given below. <t1><t2>gels() functions are designated by two floating point precisions The <t1> corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the <t2> represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gels() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision <t1>. If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgels) such a way that there is always a good solution at the output of these functions. If <t2> is equal to <t1>, then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if: ITER > ITERMAX or for all the RHS we have: RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK<t1>LAMCH('Epsilon')
The values ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gels_bufferSize(). We provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (e.g., main and lowest precision are equal <t2> is equal to <t1>). The following table specifies which precisions will be used for which interface function: Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gels for the FP64 case).
- Interface function: Handle.ZZgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
cusolverDn<t1><t2>gels_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gels() function.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can’t be NULL. On return - unchanged if the lowest precision is not equal to the main precision and the iterative refinement solver converged, - garbage otherwise
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gels_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCCgels.
func (Handle) CCgelsBufferSize ¶
func (h Handle) CCgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
CCgelsBufferSize returns the workspace size, in bytes, for Handle.CCgels.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCCgelsBufferSize, bound as cusolverDnCCgels_bufferSize.
func (Handle) CCgesv ¶
func (h Handle) CCgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
CCgesv is modelled after functions DSGESV and ZCGESV from LAPACK.
They compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the LU factorization Xgesv. These functions are similar in term of functionalities to the full precision LU solver ( Xgesv, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an LU factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is n-by-n matrix and X and B are n-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Parameters and behavior are mostly the same as LAPACK counterparts. Description of these functions and differences from LAPACK is given below. <t1><t2>gesv() functions are designated by two floating point precisions The corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gesv() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision . If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgesv) such a way that there is always a good solution at the output of these functions. If is equal to , then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if or for all the RHS we have: where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK LAMCH(‘Epsilon’)
The value ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gesv_bufferSize(). Note that in addition to the two mixed precision functions available in LAPACK (for example, dsgesv and zcgesv), we provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (, main and lowest precision are equal is equal to ). The following table specifies which precisions will be used for which interface function. Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gesv for the FP64 case).
- Interface function: Handle.ZZgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgesv*; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgesv*; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
* Has LAPACK counterparts cusolverDn<t1><t2>gesv_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gesv() function.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can’t be NULL. On return - unchanged if the iterative refinement process converged. If not - will contains the factorization of the matrix A in the main precision ( A = P * L * U, where P - permutation matrix defined by vector ipiv, L and U - lower and upper triangular matrices)
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Vector that defines permutation for the factorization - row i was interchanged with row ipiv[i]
- dB: Set of right hand sides B of size n-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gesv_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid. If dinfo = i, then U(i,i) computed in main precision is exactly zero. The factorization has been completed, but the factor U is exactly singular, so the solution could not be computed
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCCgesv.
func (Handle) CCgesvBufferSize ¶
func (h Handle) CCgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
CCgesvBufferSize returns the workspace size, in bytes, for Handle.CCgesv.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Pivoting sequence. Not used and can be NULL
- dB: Set of right hand sides B of size n-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCCgesvBufferSize, bound as cusolverDnCCgesv_bufferSize.
func (Handle) CEgels ¶
func (h Handle) CEgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
CEgels computes the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
These functions are similar in term of functionalities to the full precision LAPACK QR (least squares) solver (Xgels, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an QR factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is m-by-n matrix and X is n-by-nrhs and B is m-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Description of these functions is given below. <t1><t2>gels() functions are designated by two floating point precisions The <t1> corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the <t2> represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gels() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision <t1>. If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgels) such a way that there is always a good solution at the output of these functions. If <t2> is equal to <t1>, then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if: ITER > ITERMAX or for all the RHS we have: RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK<t1>LAMCH('Epsilon')
The values ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gels_bufferSize(). We provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (e.g., main and lowest precision are equal <t2> is equal to <t1>). The following table specifies which precisions will be used for which interface function: Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gels for the FP64 case).
- Interface function: Handle.ZZgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
cusolverDn<t1><t2>gels_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gels() function.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can’t be NULL. On return - unchanged if the lowest precision is not equal to the main precision and the iterative refinement solver converged, - garbage otherwise
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gels_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCEgels.
func (Handle) CEgelsBufferSize ¶
func (h Handle) CEgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
CEgelsBufferSize returns the workspace size, in bytes, for Handle.CEgels.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCEgelsBufferSize, bound as cusolverDnCEgels_bufferSize.
func (Handle) CEgesv ¶
func (h Handle) CEgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
CEgesv is modelled after functions DSGESV and ZCGESV from LAPACK.
They compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the LU factorization Xgesv. These functions are similar in term of functionalities to the full precision LU solver ( Xgesv, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an LU factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is n-by-n matrix and X and B are n-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Parameters and behavior are mostly the same as LAPACK counterparts. Description of these functions and differences from LAPACK is given below. <t1><t2>gesv() functions are designated by two floating point precisions The corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gesv() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision . If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgesv) such a way that there is always a good solution at the output of these functions. If is equal to , then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if or for all the RHS we have: where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK LAMCH(‘Epsilon’)
The value ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gesv_bufferSize(). Note that in addition to the two mixed precision functions available in LAPACK (for example, dsgesv and zcgesv), we provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (, main and lowest precision are equal is equal to ). The following table specifies which precisions will be used for which interface function. Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gesv for the FP64 case).
- Interface function: Handle.ZZgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgesv*; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgesv*; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
* Has LAPACK counterparts cusolverDn<t1><t2>gesv_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gesv() function.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can’t be NULL. On return - unchanged if the iterative refinement process converged. If not - will contains the factorization of the matrix A in the main precision ( A = P * L * U, where P - permutation matrix defined by vector ipiv, L and U - lower and upper triangular matrices)
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Vector that defines permutation for the factorization - row i was interchanged with row ipiv[i]
- dB: Set of right hand sides B of size n-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gesv_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid. If dinfo = i, then U(i,i) computed in main precision is exactly zero. The factorization has been completed, but the factor U is exactly singular, so the solution could not be computed
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCEgesv.
func (Handle) CEgesvBufferSize ¶
func (h Handle) CEgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
CEgesvBufferSize returns the workspace size, in bytes, for Handle.CEgesv.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Pivoting sequence. Not used and can be NULL
- dB: Set of right hand sides B of size n-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCEgesvBufferSize, bound as cusolverDnCEgesv_bufferSize.
func (Handle) CKgels ¶
func (h Handle) CKgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
CKgels computes the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
These functions are similar in term of functionalities to the full precision LAPACK QR (least squares) solver (Xgels, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an QR factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is m-by-n matrix and X is n-by-nrhs and B is m-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Description of these functions is given below. <t1><t2>gels() functions are designated by two floating point precisions The <t1> corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the <t2> represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gels() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision <t1>. If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgels) such a way that there is always a good solution at the output of these functions. If <t2> is equal to <t1>, then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if: ITER > ITERMAX or for all the RHS we have: RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK<t1>LAMCH('Epsilon')
The values ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gels_bufferSize(). We provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (e.g., main and lowest precision are equal <t2> is equal to <t1>). The following table specifies which precisions will be used for which interface function: Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gels for the FP64 case).
- Interface function: Handle.ZZgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
cusolverDn<t1><t2>gels_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gels() function.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can’t be NULL. On return - unchanged if the lowest precision is not equal to the main precision and the iterative refinement solver converged, - garbage otherwise
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gels_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCKgels.
func (Handle) CKgelsBufferSize ¶
func (h Handle) CKgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
CKgelsBufferSize returns the workspace size, in bytes, for Handle.CKgels.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCKgelsBufferSize, bound as cusolverDnCKgels_bufferSize.
func (Handle) CKgesv ¶
func (h Handle) CKgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
CKgesv is modelled after functions DSGESV and ZCGESV from LAPACK.
They compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the LU factorization Xgesv. These functions are similar in term of functionalities to the full precision LU solver ( Xgesv, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an LU factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is n-by-n matrix and X and B are n-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Parameters and behavior are mostly the same as LAPACK counterparts. Description of these functions and differences from LAPACK is given below. <t1><t2>gesv() functions are designated by two floating point precisions The corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gesv() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision . If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgesv) such a way that there is always a good solution at the output of these functions. If is equal to , then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if or for all the RHS we have: where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK LAMCH(‘Epsilon’)
The value ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gesv_bufferSize(). Note that in addition to the two mixed precision functions available in LAPACK (for example, dsgesv and zcgesv), we provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (, main and lowest precision are equal is equal to ). The following table specifies which precisions will be used for which interface function. Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gesv for the FP64 case).
- Interface function: Handle.ZZgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgesv*; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgesv*; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
* Has LAPACK counterparts cusolverDn<t1><t2>gesv_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gesv() function.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can’t be NULL. On return - unchanged if the iterative refinement process converged. If not - will contains the factorization of the matrix A in the main precision ( A = P * L * U, where P - permutation matrix defined by vector ipiv, L and U - lower and upper triangular matrices)
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Vector that defines permutation for the factorization - row i was interchanged with row ipiv[i]
- dB: Set of right hand sides B of size n-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gesv_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid. If dinfo = i, then U(i,i) computed in main precision is exactly zero. The factorization has been completed, but the factor U is exactly singular, so the solution could not be computed
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCKgesv.
func (Handle) CKgesvBufferSize ¶
func (h Handle) CKgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
CKgesvBufferSize returns the workspace size, in bytes, for Handle.CKgesv.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Pivoting sequence. Not used and can be NULL
- dB: Set of right hand sides B of size n-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCKgesvBufferSize, bound as cusolverDnCKgesv_bufferSize.
func (Handle) CYgels ¶
func (h Handle) CYgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
CYgels computes the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
These functions are similar in term of functionalities to the full precision LAPACK QR (least squares) solver (Xgels, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an QR factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is m-by-n matrix and X is n-by-nrhs and B is m-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Description of these functions is given below. <t1><t2>gels() functions are designated by two floating point precisions The <t1> corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the <t2> represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gels() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision <t1>. If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgels) such a way that there is always a good solution at the output of these functions. If <t2> is equal to <t1>, then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if: ITER > ITERMAX or for all the RHS we have: RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK<t1>LAMCH('Epsilon')
The values ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gels_bufferSize(). We provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (e.g., main and lowest precision are equal <t2> is equal to <t1>). The following table specifies which precisions will be used for which interface function: Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gels for the FP64 case).
- Interface function: Handle.ZZgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
cusolverDn<t1><t2>gels_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gels() function.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can’t be NULL. On return - unchanged if the lowest precision is not equal to the main precision and the iterative refinement solver converged, - garbage otherwise
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gels_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCYgels.
func (Handle) CYgelsBufferSize ¶
func (h Handle) CYgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
CYgelsBufferSize returns the workspace size, in bytes, for Handle.CYgels.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCYgelsBufferSize, bound as cusolverDnCYgels_bufferSize.
func (Handle) CYgesv ¶
func (h Handle) CYgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
CYgesv is modelled after functions DSGESV and ZCGESV from LAPACK.
They compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the LU factorization Xgesv. These functions are similar in term of functionalities to the full precision LU solver ( Xgesv, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an LU factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is n-by-n matrix and X and B are n-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Parameters and behavior are mostly the same as LAPACK counterparts. Description of these functions and differences from LAPACK is given below. <t1><t2>gesv() functions are designated by two floating point precisions The corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gesv() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision . If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgesv) such a way that there is always a good solution at the output of these functions. If is equal to , then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if or for all the RHS we have: where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK LAMCH(‘Epsilon’)
The value ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gesv_bufferSize(). Note that in addition to the two mixed precision functions available in LAPACK (for example, dsgesv and zcgesv), we provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (, main and lowest precision are equal is equal to ). The following table specifies which precisions will be used for which interface function. Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gesv for the FP64 case).
- Interface function: Handle.ZZgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgesv*; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgesv*; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
* Has LAPACK counterparts cusolverDn<t1><t2>gesv_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gesv() function.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can’t be NULL. On return - unchanged if the iterative refinement process converged. If not - will contains the factorization of the matrix A in the main precision ( A = P * L * U, where P - permutation matrix defined by vector ipiv, L and U - lower and upper triangular matrices)
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Vector that defines permutation for the factorization - row i was interchanged with row ipiv[i]
- dB: Set of right hand sides B of size n-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gesv_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid. If dinfo = i, then U(i,i) computed in main precision is exactly zero. The factorization has been completed, but the factor U is exactly singular, so the solution could not be computed
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCYgesv.
func (Handle) CYgesvBufferSize ¶
func (h Handle) CYgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
CYgesvBufferSize returns the workspace size, in bytes, for Handle.CYgesv.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Pivoting sequence. Not used and can be NULL
- dB: Set of right hand sides B of size n-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCYgesvBufferSize, bound as cusolverDnCYgesv_bufferSize.
func (Handle) Cgebrd ¶
func (h Handle) Cgebrd(m int32, n int32, a driver.DevicePtr, lda int32, d driver.DevicePtr, e driver.DevicePtr, tauq driver.DevicePtr, taup driver.DevicePtr, work driver.DevicePtr, lwork int32, devInfo driver.DevicePtr) error
Cgebrd reduces a general m×n matrix A to a real upper or lower bidiagonal form B by an orthogonal transformation: Qᴴ*A*P=B.
If m>=n, B is upper bidiagonal; if m<n, B is lower bidiagonal. The matrix Q and P are overwritten into matrix A in the following sense:
- if m>=n, the diagonal and the first superdiagonal are overwritten with the upper bidiagonal matrix B; the elements below the diagonal, with the array TAUQ, represent the orthogonal matrix Q as a product of elementary reflectors, and the elements above the first superdiagonal, with the array TAUP, represent the orthogonal matrix P as a product of elementary reflectors.
- if m<n, the diagonal and the first subdiagonal are overwritten with the lower bidiagonal matrix B; the elements below the first subdiagonal, with the array TAUQ, represent the orthogonal matrix Q as a product of elementary reflectors, and the elements above the diagonal, with the array TAUP, represent the orthogonal matrix P as a product of elementary reflectors.
The input parameter Lwork is size of the working space, and it is returned by gebrd_bufferSize(). Remark: gebrd only supports m>=n.
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- d: Real array of dimension min(m,n). The diagonal elements of the bidiagonal matrix B: D(i) = A(i,i)
- e: Real 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
- tauq: array of dimension min(m,n). The scalar factors of the elementary reflectors which represent the orthogonal matrix Q
- taup: array of dimension min(m,n). The scalar factors of the elementary reflectors which represent the orthogonal matrix P
- work: Working space, array of size Lwork
- lwork: Size of Work, returned by gebrd_bufferSize
- devInfo: If devInfo = 0, the operation is successful. if devInfo = -i, the i-th parameter is wrong (not counting handle)
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0, or lda<max(1,m)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCgebrd.
func (Handle) CgebrdBufferSize ¶
CgebrdBufferSize returns the workspace size, in elements of complex64, for Handle.Cgebrd.
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- lwork: Size of Work, in elements of complex64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0, or lda<max(1,m)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCgebrdBufferSize, bound as cusolverDnCgebrd_bufferSize.
func (Handle) Cgeqrf ¶
func (h Handle) Cgeqrf(m int32, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, workspace driver.DevicePtr, lwork int32, devInfo driver.DevicePtr) error
Cgeqrf computes the QR factorization of an m×n matrix.
A=Q*R, where A is an m×n matrix, Q is an m×n matrix, and R is a n×n upper triangular matrix. The input parameter Lwork is size of the working space, and it is returned by geqrf_bufferSize(). The matrix R is overwritten in upper triangular part of A, including diagonal elements. The matrix Q is not formed explicitly, instead, a sequence of householder vectors are stored in lower triangular part of A. The leading nonzero element of householder vector is assumed to be 1 such that output parameter TAU contains the scaling factor τ. If v is original householder vector, q is the new householder vector corresponding to τ, satisfying the following relation I−2*v*vᴴ=I−τ*q*qᴴ
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,m)
- lda: Leading dimension of two-dimensional array used to store matrix A
- tau: array of dimension at least min(m,n)
- workspace: Working space, array of size Lwork
- lwork: Size of working array Workspace
- devInfo: If devInfo = 0, the LU factorization is successful. if devInfo = -i, the i-th parameter is wrong (not counting handle)
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCgeqrf.
func (Handle) CgeqrfBufferSize ¶
CgeqrfBufferSize returns the workspace size, in elements of complex64, for Handle.Cgeqrf.
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,m)
- lda: Leading dimension of two-dimensional array used to store matrix A
- lwork: Size of Workspace, in elements of complex64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCgeqrfBufferSize, bound as cusolverDnCgeqrf_bufferSize.
func (Handle) Cgesvd ¶
func (h Handle) Cgesvd(jobu int8, jobvt int8, m int32, n int32, a driver.DevicePtr, lda int32, s driver.DevicePtr, u driver.DevicePtr, ldu int32, vt driver.DevicePtr, ldvt int32, work driver.DevicePtr, lwork int32, rwork driver.DevicePtr, info driver.DevicePtr) error
Cgesvd computes the singular value decomposition (SVD) of an m×n matrix A and corresponding the left and/or right singular vectors.
The SVD is written A=U*Σ*Vᴴ, where Σ is an m×n matrix which is zero except for its min(m,n) diagonal elements, U is an m×m unitary matrix, and V is an n×n unitary matrix. The diagonal elements of Σ are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A. The input parameter lwork is size of the working space, and it is returned by gesvd_bufferSize(). if bdsqr did not converge, devInfo specifies how many superdiagonals of an intermediate bidiagonal form did not converge to zero. The rwork is real array of dimension (min(m,n)-1). If devInfo >0 and rwork is not NULL, rwork contains the unconverged superdiagonal elements of an upper bidiagonal matrix. This is slightly different from LAPACK which puts unconverged superdiagonal elements in work if type is real; in rwork if type is complex. rwork can be a NULL pointer if the user does not want the information from superdiagonal. Please visit cuSOLVER Library Samples - gesvd for a code example. Remark 1: gesvd only supports m>=n. Remark 2: the routine returns Vᴴ , not V.
- 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
- jobvt: Specifies options for computing all or part of the matrix V**T: = ‘A’: all N rows of V**T are returned in the array VT; = ‘S’: the first min(m,n) rows of V**T (the right singular vectors) are returned in the array VT; = ‘O’: the first min(m,n) rows of V**T (the right singular vectors) are overwritten on the array A; = ‘N’: no rows of V**T (no right singular vectors) are computed
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,m). On exit, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- s: Real array of dimension min(m,n). The singular values of A, sorted so that S(i) >= S(i+1)
- u: array of dimension ldu * m with ldu is not less than max(1,m). U contains the m×m unitary matrix U
- ldu: Leading dimension of two-dimensional array used to store matrix U
- vt: array of dimension ldvt * n with ldvt is not less than max(1,n). VT contains the n×n unitary matrix V**T
- ldvt: Leading dimension of two-dimensional array used to store matrix Vt
- work: Working space, array of size lwork
- lwork: Size of work, returned by gesvd_bufferSize
- rwork: Real array of dimension min(m,n)-1. It contains the unconverged superdiagonal elements of an upper bidiagonal matrix if devInfo > 0
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m) or ldu<max(1,m) or ldvt<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCgesvd.
func (Handle) CgesvdBufferSize ¶
CgesvdBufferSize returns the workspace size, in elements of complex64, for Handle.Cgesvd.
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- lwork: Size of work, in elements of complex64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m) or ldu<max(1,m) or ldvt<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCgesvdBufferSize, bound as cusolverDnCgesvd_bufferSize.
func (Handle) CgesvdaStridedBatched ¶
func (h Handle) CgesvdaStridedBatched(jobz EigMode, rank int32, m int32, n int32, dA driver.DevicePtr, lda int32, strideA int64, dS driver.DevicePtr, strideS int64, dU driver.DevicePtr, ldu int32, strideU int64, dV driver.DevicePtr, ldv int32, strideV int64, dWork driver.DevicePtr, lwork int32, dInfo driver.DevicePtr, hRNrmF *float64, batchSize int32) error
CgesvdaStridedBatched gesvda ( a stands for approximate) approximates the singular value decomposition of a tall skinny m×n matrix A and corresponding the left and right singular vectors.
The economy form of SVD is written by A=U*Σ*Vᴴ, where Σ is an n×n matrix. U is an m×n unitary matrix, and V is an n×n unitary matrix. The diagonal elements of Σ are the singular values of A; they are real and non-negative, and are returned in descending order. U and V are the left and right singular vectors of A. gesvda computes eigenvalues of A**T*A, or A**H*A (if A is complex), to approximate singular values and singular vectors. It generates matrices U and V and transforms the matrix A to the following form Uᴴ*A*V=S+E where S is diagonal and E depends on rounding errors. To certain conditions, U, V and S approximate singular values and singular vectors up to machine zero of single precision. In general, V is unitary, S is more accurate than U. If singular value is far from zero, then left singular vector U is accurate. In other words, the accuracy of singular values and left singular vectors depend on the distance between singular value and zero. Since the computation of A**T*A, or A**H*A can greatly amplify errors, it is recommended to use gesvda only with well-conditioned data. The input parameter rank decides the number of singular values and singular vectors are computed in parameter S, U and V. The output parameter h_RnrmF computes Frobenius norm of residual. To compute h_RnrmF, info != NULL is required. A−U*S*Vᴴ if the parameter rank is equal n. Otherwise, h_RnrmF reports ‖U*S*Vᴴ‖−‖S‖ in Frobenius norm sense, that is, how far U is from unitary. gesvdaStridedBatched performs gesvda on each matrix. It requires that all matrices are of the same size m,n and are packed in a contiguous way, A=(A0A1⋯) Each matrix is column-major with leading dimension lda, so the formula for random access is Aₖ(i,j)=A[i+lda*j+strideA*k] . Similarly, the formula for random access of S is Sₖ(j)=S[j+StrideS*k] , the formula for random access of U is Uₖ(i,j)=U[i+ldu*j+strideU*k] and the formula for random access of V is Vₖ(i,j)=V[i+ldv*j+strideV*k] . The input parameter lwork is the size of the working space, and it is returned by gesvdaStridedBatched_bufferSize(). The output parameter info is an integer array of size batchSize. If the function returns ErrInvalidValue, the first element info[0] = -i (less than zero) indicates i-th parameter is wrong (not counting handle). Otherwise, if info[i] = min(m,n)+1, gesvdaStridedBatched did not converge on the i-th matrix. If 0 < info[i] < min(m,n)+1, gesvdaStridedBatched could not compute an SVD of the i-th matrix fully; the leading singular values Si[k], 0 <= k <= info[i]-1, and corresponding singular vectors may still be useful. In this case, if h_RnrmF is requested, h_RnrmF reports the residual as if rank was set to info[i]-1. Note that the problem size is limited by the condition batchSize*stride{A/S/U/V}<=INT32_MAX primarily due to the current implementation constraints. Please visit cuSOLVER Library Samples - gesvdaStridedBatched for a code example. Remark 1: The routine returns V, not Vᴴ . This is different from gesvd. Remark 2: The routine only supports m >=n. Remark 3: It is recommended to use an FP64 data type, that is Handle.DgesvdaStridedBatched or Handle.ZgesvdaStridedBatched. Remark 4: If the user is confident on the accuracy of singular values and singular vectors, for example, certain conditions hold (required singular value is far from zero), then the performance can be improved by passing a null pointer to h_RnrmF, i.e. no computation of the residual norm.
- jobz: Specifies options to either compute singular value only or singular vectors as well: jobz = EigModeNovector : Compute singular values only; jobz = EigModeVector : Compute singular values and singular vectors
- rank: Number of singular values (from largest to smallest)
- m: Number of rows of matrix Aj
- n: Number of columns of matrix Aj
- lda: Leading dimension of two-dimensional array used to store matrix Aj
- strideA: Value of type long long int that gives the address offset between A[i] and A[i+1]. strideA is not less than lda*n
- strideS: Value of type long long int that gives the address offset between S[i] and S[i+1]. strideS is not less than rank
- ldu: Leading dimension of two-dimensional array used to store matrix Uj. ldu is not less than max(1,m)
- strideU: Value of type long long int that gives the address offset between U[i] and U[i+1]. strideU is not less than ldu*rank
- ldv: Leading dimension of two-dimensional array used to store matrix Vj. ldv is not less than max(1,n)
- strideV: Value of type long long int that gives the address offset between V[i] and V[i+1]. strideV is not less than ldv*rank
- lwork: Size of work, returned by gesvdaStridedBatched_bufferSize
- hRNrmF: array of size batchSize. h_RnrmF[i] is norm of residual of i-th matrix. If 0 < info[i] < min(m,n)+1, h_RnrmF[i] reports the residual as if rank of the i-th matrix had been set to info[i]-1
- batchSize: Number of matrices. batchSize is not less than 1
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or batchSize*stride{A/S/U/V}>INT32_MAX or lda<max(1,m) or ldu<max(1,m) or ldv<max(1,n) or strideA<lda*n or strideS<rank or strideU<ldu*rank or strideV<ldv*rank or batchSize<1 or jobz is not EigModeNovector or EigModeVector).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCgesvdaStridedBatched.
func (Handle) CgesvdaStridedBatchedBufferSize ¶
func (h Handle) CgesvdaStridedBatchedBufferSize(jobz EigMode, rank int32, m int32, n int32, dA driver.DevicePtr, lda int32, strideA int64, dS driver.DevicePtr, strideS int64, dU driver.DevicePtr, ldu int32, strideU int64, dV driver.DevicePtr, ldv int32, strideV int64, lwork *int32, batchSize int32) error
CgesvdaStridedBatchedBufferSize returns the workspace size, in elements of complex64, for Handle.CgesvdaStridedBatched.
- jobz: Specifies options to either compute singular value only or singular vectors as well: jobz = EigModeNovector : Compute singular values only; jobz = EigModeVector : Compute singular values and singular vectors
- rank: Number of singular values (from largest to smallest)
- m: Number of rows of matrix Aj
- n: Number of columns of matrix Aj
- lda: Leading dimension of two-dimensional array used to store matrix Aj
- strideA: Value of type long long int that gives the address offset between A[i] and A[i+1]. strideA is not less than lda*n
- strideS: Value of type long long int that gives the address offset between S[i] and S[i+1]. strideS is not less than rank
- ldu: Leading dimension of two-dimensional array used to store matrix Uj. ldu is not less than max(1,m)
- strideU: Value of type long long int that gives the address offset between U[i] and U[i+1]. strideU is not less than ldu*rank
- ldv: Leading dimension of two-dimensional array used to store matrix Vj. ldv is not less than max(1,n)
- strideV: Value of type long long int that gives the address offset between V[i] and V[i+1]. strideV is not less than ldv*rank
- lwork: Size of work, in elements of complex64
- batchSize: Number of matrices. batchSize is not less than 1
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or batchSize*stride{A/S/U/V}>INT32_MAX or lda<max(1,m) or ldu<max(1,m) or ldv<max(1,n) or strideA<lda*n or strideS<rank or strideU<ldu*rank or strideV<ldv*rank or batchSize<1 or jobz is not EigModeNovector or EigModeVector).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCgesvdaStridedBatchedBufferSize, bound as cusolverDnCgesvdaStridedBatched_bufferSize.
func (Handle) Cgesvdj ¶
func (h Handle) Cgesvdj(jobz EigMode, econ int32, m int32, n int32, a driver.DevicePtr, lda int32, s driver.DevicePtr, u driver.DevicePtr, ldu int32, v driver.DevicePtr, ldv int32, work driver.DevicePtr, lwork int32, info driver.DevicePtr, params GesvdjInfo) error
Cgesvdj computes the singular value decomposition (SVD) of an m×n matrix A and corresponding the left and/or right singular vectors.
The SVD is written: A=U*Σ*Vᴴ where Σ is an m×n matrix which is zero except for its min(m,n) diagonal elements, U is an m×m unitary matrix, and V is an n×n unitary matrix. The diagonal elements of Σ are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A. gesvdj has the same functionality as gesvd. The difference is that gesvd uses QR algorithm and gesvdj uses Jacobi method. The parallelism of Jacobi method gives GPU better performance on small and medium size matrices. Moreover the user can configure gesvdj to perform approximation up to certain accuracy. gesvdj iteratively generates a sequence of unitary matrices to transform matrix A to the following form Uᴴ*A*V=S+E where S is diagonal and diagonal of E is zero. During the iterations, the Frobenius norm of E decreases monotonically. As E goes down to zero, S is the set of singular values. In practice, Jacobi method stops if ‖E‖_(F)≤eps*‖A‖_(F) where eps is given tolerance. Note that if the real residual norm ‖S−Uᴴ*A*V‖_(F) is computed, it will differ from ‖E‖_(F) up to roundoff errors of order N=max(m,n), to still have the standard SVD accuracy expectation ‖S−Uᴴ*A*V‖_(F)O(N)*‖A‖_(F)≤‖E‖_(F)‖A‖_(F)≤eps O(N) is typically N, but the constant depends on the number of sweeps, which gives an upper roundoff error bound of sweeps*N. gesvdj has two parameters to control the accuracy. First parameter is tolerance ( eps). The default value is machine accuracy but The user can use function GesvdjInfo.XgesvdjSetTolerance to set a priori tolerance. The second parameter is maximum number of sweeps which controls number of iterations of Jacobi method. The default value is 100 but the user can use function GesvdjInfo.XgesvdjSetMaxSweeps to set a proper bound. The experiments show 15 sweeps are good enough to converge to machine accuracy. gesvdj stops either tolerance is met or maximum number of sweeps is met. Jacobi method has quadratic convergence, so the accuracy is not proportional to number of sweeps. To guarantee certain accuracy, the user should configure tolerance only. The input parameter lwork is the size of the working space, and it is returned by gesvdj_bufferSize(). If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). If info = min(m,n)+1, gesvdj does not converge under given tolerance and maximum sweeps. If the user sets an improper tolerance, gesvdj may not converge. For example, tolerance should not be smaller than machine accuracy. Please visit cuSOLVER Library Samples - gesvdj for a code example. Remark 1: gesvdj supports any combination of m and n. Remark 2: the routine returns V, not Vᴴ . This is different from gesvd.
- jobz: Specifies options to either compute singular value only or singular vectors as well: jobz = EigModeNovector : Compute singular values only; jobz = EigModeVector : Compute singular values and singular vectors
- econ: econ = 1 for economy size for U and V
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,m). On exit, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- s: Real array of dimension min(m,n). The singular values of A, sorted so that S(i) >= S(i+1)
- u: array of dimension ldu * m if econ is zero. If econ is nonzero, the dimension is ldu * min(m,n). U contains the left singular vectors
- ldu: Leading dimension of two-dimensional array used to store matrix U. ldu is not less than max(1,m)
- v: array of dimension ldv * n if econ is zero. If econ is nonzero, the dimension is ldv * min(m,n). V contains the right singular vectors
- ldv: Leading dimension of two-dimensional array used to store matrix V. ldv is not less than max(1,n)
- work: array of size lwork, working space
- lwork: Size of work, returned by gesvdj_bufferSize
- info: If info = 0, the operation is successful. if info = -i, the i-th parameter is wrong (not counting handle). if info = min(m,n)+1, gesvdj dose not converge under given tolerance and maximum sweeps
- params: Structure filled with parameters of Jacobi algorithm and results of gesvdj. params can be destroyed after the host thread exits the routine
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m) or ldu<max(1,m) or ldv<max(1,n) or jobz is not EigModeNovector or EigModeVector ).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCgesvdj.
func (Handle) CgesvdjBatched ¶
func (h Handle) CgesvdjBatched(jobz EigMode, m int32, n int32, a driver.DevicePtr, lda int32, s driver.DevicePtr, u driver.DevicePtr, ldu int32, v driver.DevicePtr, ldv int32, work driver.DevicePtr, lwork int32, info driver.DevicePtr, params GesvdjInfo, batchSize int32) error
CgesvdjBatched computes singular values and singular vectors of a sequence of general m×n matrices.
Aⱼ=Uⱼ*Σⱼ*Vⱼᴴ, where Σⱼ is a real m×n diagonal matrix which is zero except for its min(m,n) diagonal elements. Uⱼ (left singular vectors) is an m×m unitary matrix and Vⱼ (right singular vectors) is a n×n unitary matrix. The diagonal elements of Σⱼ are the singular values of Aⱼ in either descending order or non-sorting order. gesvdjBatched performs gesvdj on each matrix. It requires that all matrices are of the same size m,n no greater than 32 and are packed in contiguous way, A=(A0A1⋯) Each matrix is column-major with leading dimension lda, so the formula for random access is Aₖ(i,j)=A[i+lda*j+lda*n*k] . The parameter S also contains singular values of each matrix in contiguous way, S=(S0S1⋯) The formula for random access of S is Sₖ(j)=S[j+min(m,n)*k] . Except for tolerance and maximum sweeps, gesvdjBatched can either sort the singular values in descending order (default) or chose as-is (without sorting) by the function GesvdjInfo.XgesvdjSetSortEig. If the user packs several tiny matrices into diagonal blocks of one matrix, non-sorting option can separate singular values of those tiny matrices. gesvdjBatched cannot report residual and executed sweeps by function Handle.XgesvdjGetResidual and Handle.XgesvdjGetSweeps. Any call of the above two returns ErrNotSupported. The user needs to compute residual explicitly. The input parameter lwork is the size of the working space, and it is returned by gesvdjBatched_bufferSize(). The output parameter info is an integer array of size batchSize. If the function returns ErrInvalidValue, the first element info[0] = -i (less than zero) indicates i-th parameter is wrong (not counting handle). Otherwise, if info[i] = min(m,n)+1, gesvdjBatched does not converge on i-th matrix under given tolerance and maximum sweeps. Please visit cuSOLVER Library Samples - gesvdjBatched for a code example.
- jobz: Specifies options to either compute singular value only or singular vectors as well: jobz = EigModeNovector : Compute singular values only; jobz = EigModeVector : Compute singular values and singular vectors
- m: Number of rows of matrix Aj. m is no greater than 32
- n: Number of columns of matrix Aj. n is no greater than 32
- a: array of dimension lda * n * batchSize with lda is not less than max(1,n). on Exit: the contents of Aj are destroyed
- lda: Lading dimension of two-dimensional array used to store matrix Aj
- s: Areal array of dimension min(m,n)*batchSize. It stores the singular values of Aj in descending order or non-sorting order
- u: array of dimension ldu * m * batchSize. Uj contains the left singular vectors of Aj
- ldu: Leading dimension of two-dimensional array used to store matrix Uj. ldu is not less than max(1,m)
- v: array of dimension ldv * n * batchSize. Vj contains the right singular vectors of Aj
- ldv: Leading dimension of two-dimensional array used to store matrix Vj. ldv is not less than max(1,n)
- work: array of size lwork, working space
- lwork: Size of work, returned by gesvdjBatched_bufferSize
- info: An integer array of dimension batchSize. If ErrInvalidValue is returned, info[0] = -i (less than zero) indicates i-th parameter is wrong (not counting handle). Otherwise, if info[i] = 0, the operation is successful. if info[i] = min(m,n)+1, gesvdjBatched dose not converge on i-th matrix under given tolerance and maximum sweeps
- params: Structure filled with parameters of Jacobi algorithm. params can be destroyed after the host thread exits the routine
- batchSize: Number of matrices
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m) or ldu<max(1,m) or ldv<max(1,n) or jobz is not EigModeNovector or EigModeVector , or batchSize<0).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCgesvdjBatched.
func (Handle) CgesvdjBatchedBufferSize ¶
func (h Handle) CgesvdjBatchedBufferSize(jobz EigMode, m int32, n int32, a driver.DevicePtr, lda int32, s driver.DevicePtr, u driver.DevicePtr, ldu int32, v driver.DevicePtr, ldv int32, lwork *int32, params GesvdjInfo, batchSize int32) error
CgesvdjBatchedBufferSize returns the workspace size, in elements of complex64, for Handle.CgesvdjBatched.
- jobz: Specifies options to either compute singular value only or singular vectors as well: jobz = EigModeNovector : Compute singular values only; jobz = EigModeVector : Compute singular values and singular vectors
- m: Number of rows of matrix Aj. m is no greater than 32
- n: Number of columns of matrix Aj. n is no greater than 32
- a: array of dimension lda * n * batchSize with lda is not less than max(1,n). on Exit: the contents of Aj are destroyed
- lda: Lading dimension of two-dimensional array used to store matrix Aj
- s: Areal array of dimension min(m,n)*batchSize. It stores the singular values of Aj in descending order or non-sorting order
- u: array of dimension ldu * m * batchSize. Uj contains the left singular vectors of Aj
- ldu: Leading dimension of two-dimensional array used to store matrix Uj. ldu is not less than max(1,m)
- v: array of dimension ldv * n * batchSize. Vj contains the right singular vectors of Aj
- ldv: Leading dimension of two-dimensional array used to store matrix Vj. ldv is not less than max(1,n)
- lwork: Size of work, in elements of complex64
- params: Structure filled with parameters of Jacobi algorithm. params can be destroyed after the host thread exits the routine
- batchSize: Number of matrices
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m) or ldu<max(1,m) or ldv<max(1,n) or jobz is not EigModeNovector or EigModeVector , or batchSize<0).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCgesvdjBatchedBufferSize, bound as cusolverDnCgesvdjBatched_bufferSize.
func (Handle) CgesvdjBufferSize ¶
func (h Handle) CgesvdjBufferSize(jobz EigMode, econ int32, m int32, n int32, a driver.DevicePtr, lda int32, s driver.DevicePtr, u driver.DevicePtr, ldu int32, v driver.DevicePtr, ldv int32, lwork *int32, params GesvdjInfo) error
CgesvdjBufferSize returns the workspace size, in elements of complex64, for Handle.Cgesvdj.
- jobz: Specifies options to either compute singular value only or singular vectors as well: jobz = EigModeNovector : Compute singular values only; jobz = EigModeVector : Compute singular values and singular vectors
- econ: econ = 1 for economy size for U and V
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,m). On exit, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- s: Real array of dimension min(m,n). The singular values of A, sorted so that S(i) >= S(i+1)
- u: array of dimension ldu * m if econ is zero. If econ is nonzero, the dimension is ldu * min(m,n). U contains the left singular vectors
- ldu: Leading dimension of two-dimensional array used to store matrix U. ldu is not less than max(1,m)
- v: array of dimension ldv * n if econ is zero. If econ is nonzero, the dimension is ldv * min(m,n). V contains the right singular vectors
- ldv: Leading dimension of two-dimensional array used to store matrix V. ldv is not less than max(1,n)
- lwork: Size of work, in elements of complex64
- params: Structure filled with parameters of Jacobi algorithm and results of gesvdj. params can be destroyed after the host thread exits the routine
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m) or ldu<max(1,m) or ldv<max(1,n) or jobz is not EigModeNovector or EigModeVector ).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCgesvdjBufferSize, bound as cusolverDnCgesvdj_bufferSize.
func (Handle) Cgetrf ¶
func (h Handle) Cgetrf(m int32, n int32, a driver.DevicePtr, lda int32, workspace driver.DevicePtr, devIpiv driver.DevicePtr, devInfo driver.DevicePtr) error
Cgetrf computes the LU factorization of an m×n matrix.
P*A=L*U, where A is an m×n matrix, P is a permutation matrix, L is a lower triangular matrix with unit diagonal, and U is an upper triangular matrix. The input parameter Lwork is size of the working space, and it is returned by getrf_bufferSize(). If LU factorization failed, i.e. matrix A ( U) is singular, The output parameter devInfo=i indicates U(i,i) = 0. If devIpiv is null, no pivoting is performed. The factorization is A=L*U, which is not numerically stable. No matter LU factorization failed or not, the output parameter devIpiv contains pivoting sequence, row i is interchanged with row devIpiv(i). The user can combine getrf and getrs to complete a linear solver. Remark: getrf uses fastest implementation with large workspace of size m*n. The user can choose the legacy implementation with minimal workspace by Getrf and Params.SetAdvOptions(params, CUSOLVERDN_GETRF, Alg1).
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,m)
- lda: Leading dimension of two-dimensional array used to store matrix A
- workspace: Working space, array of size Lwork
- devIpiv: Array of size at least min(m,n), containing pivot indices
- devInfo: If devInfo = 0, the LU factorization is successful. if devInfo = -i, the i-th parameter is wrong (not counting handle). if devInfo = i, the U(i,i) = 0
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCgetrf.
func (Handle) CgetrfBufferSize ¶
CgetrfBufferSize returns the workspace size, in elements of complex64, for Handle.Cgetrf.
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,m)
- lda: Leading dimension of two-dimensional array used to store matrix A
- lwork: Size of Workspace, in elements of complex64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCgetrfBufferSize, bound as cusolverDnCgetrf_bufferSize.
func (Handle) Cgetrs ¶
func (h Handle) Cgetrs(trans Operation, n int32, nrhs int32, a driver.DevicePtr, lda int32, devIpiv driver.DevicePtr, b driver.DevicePtr, ldb int32, devInfo driver.DevicePtr) error
Cgetrs solves a linear system of multiple right-hand sides.
op(A)*X=B, where A is an n×n matrix, and was LU-factored by getrf, that is, lower triangular part of A is L, and upper triangular part (including diagonal elements) of A is U. B is an n×nrhs right-hand side matrix. The input parameter trans is defined by op(A) = A if trans == CUBLAS_OP_N, op(A) = Aᵀ if trans == CUBLAS_OP_T, and op(A) = Aᴴ if trans == CUBLAS_OP_C. The input parameter devIpiv is an output of getrf. It contains pivot indices, which are used to permutate right-hand sides. The user can combine getrf and getrs to complete a linear solver.
- trans: Operation op(A) that is non- or (conj.) transpose
- n: Number of rows and columns of matrix A
- nrhs: Number of right-hand sides
- a: array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- devIpiv: Array of size at least n, containing pivot indices
- b: array of dimension ldb * nrhs with ldb is not less than max(1,n)
- ldb: Leading dimension of two-dimensional array used to store matrix B
- devInfo: If devInfo = 0, the operation is successful. if devInfo = -i, the i-th parameter is wrong (not counting handle)
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n) or ldb<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCgetrs.
func (Handle) Cheevd ¶
func (h Handle) Cheevd(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, w driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Cheevd computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix A.
The standard symmetric eigenvalue problem is A*V=V*Λ, where Λ is a real n×n diagonal matrix. V is an n×n unitary matrix. The diagonal elements of Λ are the eigenvalues of A in ascending order. The input parameter lwork is size of the working space, and it is returned by syevd_bufferSize(). If devInfo = i (greater than zero), i off-diagonal elements of an intermediate tridiagonal form did not converge to zero. If jobz = EigModeVector, A contains the orthonormal eigenvectors of the matrix A. The eigenvectors are computed by a divide and conquer algorithm. Please visit cuSOLVER Library Samples - syevd for a code example.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- w: A real array of dimension n. The eigenvalue values of A, in ascending order ie, sorted so that W(i) <= W(i+1)
- work: Working space, array of size lwork
- lwork: Size of work, returned by syevd_bufferSize
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCheevd.
func (Handle) CheevdBufferSize ¶
func (h Handle) CheevdBufferSize(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, w driver.DevicePtr) (int32, error)
CheevdBufferSize returns the workspace size, in elements of complex64, for Handle.Cheevd.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- w: A real array of dimension n. The eigenvalue values of A, in ascending order ie, sorted so that W(i) <= W(i+1)
- lwork: Size of work, in elements of complex64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCheevdBufferSize, bound as cusolverDnCheevd_bufferSize.
func (Handle) Cheevdx ¶
func (h Handle) Cheevdx(jobz EigMode, range_ EigRange, uplo FillMode, n int32, a driver.DevicePtr, lda int32, vl float32, vu float32, il int32, iu int32, meig *int32, w driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Cheevdx computes all or selection of the eigenvalues and optionally eigenvectors of a symmetric (Hermitian) n×n matrix A.
The standard symmetric eigenvalue problem is: A*V=V*Λ where Λ is a real n×h_meig diagonal matrix. V is an n×h_meig unitary matrix. h_meig is the number of eigenvalues/eigenvectors computed by the routine, h_meig is equal to n when the whole spectrum (e.g., range = EigRangeAll) is requested. The diagonal elements of Λ are the eigenvalues of A in ascending order. The input parameter lwork is size of the working space, and it is returned by syevdx_bufferSize(). If devInfo = i (greater than zero), i off-diagonal elements of an intermediate tridiagonal form did not converge to zero. If jobz = EigModeVector, A contains the orthonormal eigenvectors of the matrix A. The eigenvectors are computed by a divide and conquer algorithm. Please visit cuSOLVER Library Samples - syevdx for a code example.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- range_: Specifies options to which selection of eigenvalues and optionally eigenvectors that need to be computed: range = EigRangeAll : all eigenvalues/eigenvectors will be found, will becomes the classical syevd/heevd routine; range = EigRangeV : all eigenvalues/eigenvectors in the half-open interval (vl,vu] will be found; range = EigRangeI : the il-th through iu-th eigenvalues/eigenvectors will be found
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- vl: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user wants to be sure not to miss any eigenvalue within the interval bound, we suggest that the user subtract/add epsilon (machine precision) to the interval bound such as (vl=vl-eps, vu=vu+eps]. This suggestion is valid for any selective routine from cuSolver or LAPACK
- vu: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user wants to be sure not to miss any eigenvalue within the interval bound, we suggest that the user subtract/add epsilon (machine precision) to the interval bound such as (vl=vl-eps, vu=vu+eps]. This suggestion is valid for any selective routine from cuSolver or LAPACK
- il: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- iu: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- w: A real array of dimension n. The eigenvalue values of A, in ascending order ie, sorted so that W(i) <= W(i+1)
- work: Working space, array of size lwork
- lwork: Size of work, returned by syevdx_bufferSize
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or range is not EigRangeAll or EigRangeV or EigRangeI, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCheevdx.
func (Handle) CheevdxBufferSize ¶
func (h Handle) CheevdxBufferSize(jobz EigMode, range_ EigRange, uplo FillMode, n int32, a driver.DevicePtr, lda int32, vl float32, vu float32, il int32, iu int32, w driver.DevicePtr) (meig int32, lwork int32, err error)
CheevdxBufferSize returns the workspace size, in elements of complex64, for Handle.Cheevdx.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- range_: Specifies options to which selection of eigenvalues and optionally eigenvectors that need to be computed: range = EigRangeAll : all eigenvalues/eigenvectors will be found, will becomes the classical syevd/heevd routine; range = EigRangeV : all eigenvalues/eigenvectors in the half-open interval (vl,vu] will be found; range = EigRangeI : the il-th through iu-th eigenvalues/eigenvectors will be found
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- vl: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user wants to be sure not to miss any eigenvalue within the interval bound, we suggest that the user subtract/add epsilon (machine precision) to the interval bound such as (vl=vl-eps, vu=vu+eps]. This suggestion is valid for any selective routine from cuSolver or LAPACK
- vu: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user wants to be sure not to miss any eigenvalue within the interval bound, we suggest that the user subtract/add epsilon (machine precision) to the interval bound such as (vl=vl-eps, vu=vu+eps]. This suggestion is valid for any selective routine from cuSolver or LAPACK
- il: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- iu: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- w: A real array of dimension n. The eigenvalue values of A, in ascending order ie, sorted so that W(i) <= W(i+1)
- lwork: Size of work, in elements of complex64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or range is not EigRangeAll or EigRangeV or EigRangeI, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCheevdxBufferSize, bound as cusolverDnCheevdx_bufferSize.
func (Handle) Cheevj ¶
func (h Handle) Cheevj(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, w driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr, params SyevjInfo) error
Cheevj computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix A.
The standard symmetric eigenvalue problem is A*Q=Q*Λ, where Λ is a real n×n diagonal matrix. Q is an n×n unitary matrix. The diagonal elements of Λ are the eigenvalues of A in ascending order. syevj has the same functionality as syevd. The difference is that syevd uses QR algorithm and syevj uses Jacobi method. The parallelism of Jacobi method gives GPU better performance on small and medium size matrices. Moreover the user can configure syevj to perform approximation up to certain accuracy. How does it work? syevj iteratively generates a sequence of unitary matrices to transform matrix A to the following form Vᴴ*A*V=W+E where W is diagonal and E is symmetric without diagonal. During the iterations, the Frobenius norm of E decreases monotonically. As E goes down to zero, W is the set of eigenvalues. In practice, Jacobi method stops if ‖E‖_(F)≤eps*‖A‖_(F) where eps is the given tolerance. syevj has two parameters to control the accuracy. First parameter is tolerance ( eps). The default value is machine accuracy but The user can use function SyevjInfo.XsyevjSetTolerance to set a priori tolerance. The second parameter is maximum number of sweeps which controls number of iterations of Jacobi method. The default value is 100 but the user can use function SyevjInfo.XsyevjSetMaxSweeps to set a proper bound. The experiments show 15 sweeps are good enough to converge to machine accuracy. syevj stops either tolerance is met or maximum number of sweeps is met. The Jacobi method has quadratic convergence, so the accuracy is not proportional to number of sweeps. To guarantee certain accuracy, the user should configure tolerance only. After syevj, the user can query residual by function Handle.XsyevjGetResidual and number of executed sweeps by function Handle.XsyevjGetSweeps. However the user needs to be aware that residual is the Frobenius norm of E, not accuracy of individual eigenvalue, i.e. residual=‖E‖_(F)=‖Λ−W‖_(F) The input parameter lwork is the size of the working space, and it is returned by syevj_bufferSize(). If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). If info = n+1, syevj does not converge under given tolerance and maximum sweeps. If the user sets an improper tolerance, syevj may not converge. For example, tolerance should not be smaller than machine accuracy. If jobz = EigModeVector, A contains the orthonormal eigenvectors V. Please visit cuSOLVER Library Samples - syevj for a code example.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and info = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- w: A real array of dimension n. The eigenvalue values of A, in ascending order ie, sorted so that W(i) <= W(i+1)
- work: Working space, array of size lwork
- lwork: Size of work, returned by syevj_bufferSize
- info: If info = 0, the operation is successful. If info = -i, the i-th parameter is wrong (not counting handle). If info = n+1, syevj does not converge under given tolerance and maximum sweeps
- params: Structure filled with parameters of Jacobi algorithm and results of syevj
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCheevj.
func (Handle) CheevjBatched ¶
func (h Handle) CheevjBatched(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, w driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr, params SyevjInfo, batchSize int32) error
CheevjBatched computes eigenvalues and eigenvectors of a sequence of symmetric (Hermitian) n×n matrices.
Aⱼ*Qⱼ=Qⱼ*Λⱼ, where Λⱼ is a real n×n diagonal matrix. Qⱼ is an n×n unitary matrix. The diagonal elements of Λⱼ are the eigenvalues of Aⱼ in either ascending order or non-sorting order. syevjBatched performs syevj on each matrix. It requires that all matrices are of the same size n and are packed in contiguous way, A=(A0A1⋯) Each matrix is column-major with leading dimension lda, so the formula for random access is Aₖ(i,j)=A[i+lda*j+lda*n*k] . The parameter W also contains eigenvalues of each matrix in contiguous way, W=(W0W1⋯) The formula for random access of W is Wₖ(j)=W[j+n*k] . Except for tolerance and maximum sweeps, syevjBatched can either sort the eigenvalues in ascending order (default) or chose as-is (without sorting) by the function SyevjInfo.XsyevjSetSortEig. If the user packs several tiny matrices into diagonal blocks of one matrix, non-sorting option can separate spectrum of those tiny matrices. syevjBatched cannot report residual and executed sweeps by function Handle.XsyevjGetResidual and Handle.XsyevjGetSweeps. Any call of the above two returns ErrNotSupported. The user needs to compute residual explicitly. The input parameter lwork is the size of the working space, and it is returned by syevjBatched_bufferSize(). The output parameter info is an integer array of size batchSize. If the function returns ErrInvalidValue, the first element info[0] = -i (less than zero) indicates i-th parameter is wrong (not counting handle). Otherwise, if info[i] = n+1, syevjBatched does not converge on i-th matrix under given tolerance and maximum sweeps. If jobz = EigModeVector, Aⱼ contains the orthonormal eigenvectors Vⱼ. Please visit cuSOLVER Library Samples - syevjBatched for a code example.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of Aj is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of Aj is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of Aj is stored
- n: Number of rows (or columns) of matrix each Aj
- a: array of dimension lda * n * batchSize with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of Aj contains the upper triangular part of the matrix Aj. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of Aj contains the lower triangular part of the matrix Aj. On exit, if jobz = EigModeVector, and info[j] = 0, Aj contains the orthonormal eigenvectors of the matrix Aj. If jobz = EigModeNovector, the contents of Aj are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix Aj
- w: A real array of dimension n*batchSize. It stores the eigenvalues of Aj in ascending order or non-sorting order
- work: array of size lwork, workspace
- lwork: Size of work, returned by syevjBatched_bufferSize
- info: An integer array of dimension batchSize. If ErrInvalidValue is returned, info[0] = -i (less than zero) indicates i-th parameter is wrong (not counting handle). Otherwise, if info[i] = 0, the operation is successful. If info[i] = n+1, syevjBatched does not converge on i-th matrix under given tolerance and maximum sweeps
- params: Structure filled with parameters of Jacobi algorithm
- batchSize: Number of matrices
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER), or batchSize<0.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCheevjBatched.
func (Handle) CheevjBatchedBufferSize ¶
func (h Handle) CheevjBatchedBufferSize(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, w driver.DevicePtr, lwork *int32, params SyevjInfo, batchSize int32) error
CheevjBatchedBufferSize returns the workspace size, in elements of complex64, for Handle.CheevjBatched.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of Aj is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of Aj is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of Aj is stored
- n: Number of rows (or columns) of matrix each Aj
- a: array of dimension lda * n * batchSize with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of Aj contains the upper triangular part of the matrix Aj. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of Aj contains the lower triangular part of the matrix Aj. On exit, if jobz = EigModeVector, and info[j] = 0, Aj contains the orthonormal eigenvectors of the matrix Aj. If jobz = EigModeNovector, the contents of Aj are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix Aj
- w: A real array of dimension n*batchSize. It stores the eigenvalues of Aj in ascending order or non-sorting order
- lwork: Size of work, in elements of complex64
- params: Structure filled with parameters of Jacobi algorithm
- batchSize: Number of matrices
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER), or batchSize<0.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCheevjBatchedBufferSize, bound as cusolverDnCheevjBatched_bufferSize.
func (Handle) CheevjBufferSize ¶
func (h Handle) CheevjBufferSize(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, w driver.DevicePtr, lwork *int32, params SyevjInfo) error
CheevjBufferSize returns the workspace size, in elements of complex64, for Handle.Cheevj.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and info = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- w: A real array of dimension n. The eigenvalue values of A, in ascending order ie, sorted so that W(i) <= W(i+1)
- lwork: Size of work, in elements of complex64
- params: Structure filled with parameters of Jacobi algorithm and results of syevj
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCheevjBufferSize, bound as cusolverDnCheevj_bufferSize.
func (Handle) Chegvd ¶
func (h Handle) Chegvd(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, w driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Chegvd computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix-pair ( A, B).
The generalized symmetric-definite eigenvalue problem is A*V = B*V*Λ if itype == EigType1, A*B*V = V*Λ if itype == EigType2, and B*A*V = V*Λ if itype == EigType3, where the matrix B is positive definite. Λ is a real n×n diagonal matrix. The diagonal elements of Λ are the eigenvalues of ( A, B) in ascending order. V is an n×n orthogonal matrix. The eigenvectors are normalized as follows: Vᴴ*B*V = I if itype == EigType1 or EigType2, and Vᴴ*inv(B)*V = I if itype == EigType3. The input parameter lwork is size of the working space, and it is returned by sygvd_bufferSize(). If devInfo = i (i > 0 and i<=n) and jobz = EigModeNovector, i off-diagonal elements of an intermediate tridiagonal form did not converge to zero. If devInfo = N + i (i > 0), then the leading minor of order i of B is not positive definite. The factorization of B could not be completed and no eigenvalues or eigenvectors were computed. if jobz = EigModeVector, A contains the orthogonal eigenvectors of the matrix A. The eigenvectors are computed by divide and conquer algorithm. Please visit cuSOLVER Library Samples - sygvd for a code example.
- itype: Specifies the problem type to be solved: itype =[EigType1]: A*x = (lambda)*B*x. itype =[EigType2]: A*B*x = (lambda)*x. itype =[EigType3]: B*A*x = (lambda)*x
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A and B are stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A and B are stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A and B are stored
- n: Number of rows (or columns) of matrix A and B
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- b: array of dimension ldb * n. If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of B contains the upper triangular part of the matrix B. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of B contains the lower triangular part of the matrix B. On exit, if devInfo is less than n, B is overwritten by triangular factor U or L from the Cholesky factorization of B
- ldb: Leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n)
- w: A real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1)
- work: Working space, array of size lwork
- lwork: Size of work, returned by sygvd_bufferSize
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or ldb<max(1,n), or itype is not 1, 2 or 3, or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnChegvd.
func (Handle) ChegvdBufferSize ¶
func (h Handle) ChegvdBufferSize(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, w driver.DevicePtr) (int32, error)
ChegvdBufferSize returns the workspace size, in elements of complex64, for Handle.Chegvd.
- itype: Specifies the problem type to be solved: itype =[EigType1]: A*x = (lambda)*B*x. itype =[EigType2]: A*B*x = (lambda)*x. itype =[EigType3]: B*A*x = (lambda)*x
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A and B are stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A and B are stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A and B are stored
- n: Number of rows (or columns) of matrix A and B
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- b: array of dimension ldb * n. If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of B contains the upper triangular part of the matrix B. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of B contains the lower triangular part of the matrix B. On exit, if devInfo is less than n, B is overwritten by triangular factor U or L from the Cholesky factorization of B
- ldb: Leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n)
- w: A real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1)
- lwork: Size of work, in elements of complex64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or ldb<max(1,n), or itype is not 1, 2 or 3, or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnChegvdBufferSize, bound as cusolverDnChegvd_bufferSize.
func (Handle) Chegvdx ¶
func (h Handle) Chegvdx(itype EigType, jobz EigMode, range_ EigRange, uplo FillMode, n int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, vl float32, vu float32, il int32, iu int32, meig *int32, w driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Chegvdx computes all or selection of the eigenvalues and optionally eigenvectors of a symmetric (Hermitian) n×n matrix-pair ( A, B).
The generalized symmetric-definite eigenvalue problem is A*V = B*V*Λ if itype == EigType1, A*B*V = V*Λ if itype == EigType2, and B*A*V = V*Λ if itype == EigType3, where the matrix B is positive definite. Λ is a real n×h_meig diagonal matrix. The diagonal elements of Λ are the eigenvalues of ( A, B) in ascending order. V is an n×h_meig orthogonal matrix. h_meig is the number of eigenvalues/eigenvectors computed by the routine, h_meig is equal to n when the whole spectrum (for example, range = EigRangeAll) is requested. The eigenvectors are normalized as follows: Vᴴ*B*V = I if itype == EigType1 or EigType2, and Vᴴ*inv(B)*V = I if itype == EigType3. The input parameter lwork is size of the working space, and it is returned by sygvdx_bufferSize(). If devInfo = i (i > 0 and i<=n) and jobz = EigModeNovector, i off-diagonal elements of an intermediate tridiagonal form did not converge to zero. If devInfo = n + i (i > 0), then the leading minor of order i of B is not positive definite. The factorization of B could not be completed and no eigenvalues or eigenvectors were computed. If jobz = EigModeVector, A contains the orthogonal eigenvectors of the matrix A. The eigenvectors are computed by divide and conquer algorithm. Please visit cuSOLVER Library Samples - sygvdx for a code example.
- itype: Specifies the problem type to be solved: itype =[EigType1]: A*x = (lambda)*B*x; itype =[EigType2]: A*B*x = (lambda)*x; itype =[EigType3]: B*A*x = (lambda)*x
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- range_: Specifies options to which selection of eigenvalues and optionally eigenvectors that need to be computed: range = EigRangeAll : all eigenvalues/eigenvectors will be found, will becomes the classical syevd/heevd routine; range = EigRangeV : all eigenvalues/eigenvectors in the half-open interval (vl,vu] will be found; range = EigRangeI : the il-th through iu-th eigenvalues/eigenvectors will be found
- uplo: Specifies which part of A and B are stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A and B are stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A and B are stored
- n: Number of rows (or columns) of matrix A and B
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- b: array of dimension ldb * n. If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of B contains the upper triangular part of the matrix B. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of B contains the lower triangular part of the matrix B. On exit, if devInfo is less than n, B is overwritten by triangular factor U or L from the Cholesky factorization of B
- ldb: Leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n)
- vl: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user want to be sure not to miss any eigenvalue within the interval bound, we suggest that, the user subtract/add epsilon (machine precision) to the interval bound such as ( vl = vl- eps, vu = vu + eps]. this suggestion is valid for any selective routine from cuSolver or LAPACK
- vu: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user want to be sure not to miss any eigenvalue within the interval bound, we suggest that, the user subtract/add epsilon (machine precision) to the interval bound such as ( vl = vl- eps, vu = vu + eps]. this suggestion is valid for any selective routine from cuSolver or LAPACK
- il: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- iu: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- w: A real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1)
- work: Working space, array of size lwork
- lwork: Size of work, returned by sygvdx_bufferSize
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or ldb<max(1,n), or itype is not EigType1 or EigType2 or EigType3 or jobz is not EigModeNovector or CUSOLVER_EIG_MODE_VECTORL, or range is not EigRangeAll or EigRangeV or EigRangeI, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnChegvdx.
func (Handle) ChegvdxBufferSize ¶
func (h Handle) ChegvdxBufferSize(itype EigType, jobz EigMode, range_ EigRange, uplo FillMode, n int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, vl float32, vu float32, il int32, iu int32, w driver.DevicePtr) (meig int32, lwork int32, err error)
ChegvdxBufferSize returns the workspace size, in elements of complex64, for Handle.Chegvdx.
- itype: Specifies the problem type to be solved: itype =[EigType1]: A*x = (lambda)*B*x; itype =[EigType2]: A*B*x = (lambda)*x; itype =[EigType3]: B*A*x = (lambda)*x
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- range_: Specifies options to which selection of eigenvalues and optionally eigenvectors that need to be computed: range = EigRangeAll : all eigenvalues/eigenvectors will be found, will becomes the classical syevd/heevd routine; range = EigRangeV : all eigenvalues/eigenvectors in the half-open interval (vl,vu] will be found; range = EigRangeI : the il-th through iu-th eigenvalues/eigenvectors will be found
- uplo: Specifies which part of A and B are stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A and B are stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A and B are stored
- n: Number of rows (or columns) of matrix A and B
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- b: array of dimension ldb * n. If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of B contains the upper triangular part of the matrix B. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of B contains the lower triangular part of the matrix B. On exit, if devInfo is less than n, B is overwritten by triangular factor U or L from the Cholesky factorization of B
- ldb: Leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n)
- vl: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user want to be sure not to miss any eigenvalue within the interval bound, we suggest that, the user subtract/add epsilon (machine precision) to the interval bound such as ( vl = vl- eps, vu = vu + eps]. this suggestion is valid for any selective routine from cuSolver or LAPACK
- vu: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user want to be sure not to miss any eigenvalue within the interval bound, we suggest that, the user subtract/add epsilon (machine precision) to the interval bound such as ( vl = vl- eps, vu = vu + eps]. this suggestion is valid for any selective routine from cuSolver or LAPACK
- il: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- iu: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- w: A real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1)
- lwork: Size of work, in elements of complex64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or ldb<max(1,n), or itype is not EigType1 or EigType2 or EigType3 or jobz is not EigModeNovector or CUSOLVER_EIG_MODE_VECTORL, or range is not EigRangeAll or EigRangeV or EigRangeI, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnChegvdxBufferSize, bound as cusolverDnChegvdx_bufferSize.
func (Handle) Chegvj ¶
func (h Handle) Chegvj(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, w driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr, params SyevjInfo) error
Chegvj computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix-pair ( A, B).
The generalized symmetric-definite eigenvalue problem is A*V = B*V*Λ if itype == EigType1, A*B*V = V*Λ if itype == EigType2, and B*A*V = V*Λ if itype == EigType3, where the matrix B is positive definite. Λ is a real n×n diagonal matrix. The diagonal elements of Λ are the eigenvalues of ( A, B) in ascending order. V is an n×n orthogonal matrix. The eigenvectors are normalized as follows: Vᴴ*B*V = I if itype == EigType1 or EigType2, and Vᴴ*inv(B)*V = I if itype == EigType3. This function has the same functionality as sygvd except that syevd in sygvd is replaced by syevj in sygvj. Therefore, sygvj inherits properties of syevj, the user can use SyevjInfo.XsyevjSetTolerance and SyevjInfo.XsyevjSetMaxSweeps to configure tolerance and maximum sweeps. However the meaning of residual is different from syevj. sygvj first computes Cholesky factorization of matrix B, B=L*Lᴴ transform the problem to standard eigenvalue problem, then calls syevj. For example, the standard eigenvalue problem of type I is M*Q=Q*Λ where matrix M is symmetric M=L⁻¹*A*L⁻ᴴ The residual is the result of syevj on matrix M, not A. The input parameter lwork is the size of the working space, and it is returned by sygvj_bufferSize(). If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). If info = i (i > 0 and i<=n), B is not positive definite, the factorization of B could not be completed and no eigenvalues or eigenvectors were computed. If info = n+1, syevj does not converge under given tolerance and maximum sweeps. In this case, the eigenvalues and eigenvectors are still computed because non-convergence comes from improper tolerance of maximum sweeps. if jobz = EigModeVector, A contains the orthogonal eigenvectors V. Please visit cuSOLVER Library Samples - sygvj for a code example.
- itype: Specifies the problem type to be solved: itype =[EigType1]: A*x = (lambda)*B*x. itype =[EigType2]: A*B*x = (lambda)*x. itype =[EigType3]: B*A*x = (lambda)*x
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A and B are stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A and B are stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A and B are stored
- n: Number of rows (or columns) of matrix A and B
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and info = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- b: array of dimension ldb * n. If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of B contains the upper triangular part of the matrix B. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of B contains the lower triangular part of the matrix B. On exit, if info is less than n, B is overwritten by triangular factor U or L from the Cholesky factorization of B
- ldb: Leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n)
- w: A real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1)
- work: Working space, array of size lwork
- lwork: Size of work, returned by sygvj_bufferSize
- info: If info = 0, the operation is successful. if info = -i, the i-th parameter is wrong (not counting handle). If info = i (> 0), info indicates either B is not positive definite or syevj (called by sygvj) does not converge
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or ldb<max(1,n), or itype is not 1, 2 or 3, or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnChegvj.
func (Handle) ChegvjBufferSize ¶
func (h Handle) ChegvjBufferSize(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, w driver.DevicePtr, lwork *int32, params SyevjInfo) error
ChegvjBufferSize returns the workspace size, in elements of complex64, for Handle.Chegvj.
- itype: Specifies the problem type to be solved: itype =[EigType1]: A*x = (lambda)*B*x. itype =[EigType2]: A*B*x = (lambda)*x. itype =[EigType3]: B*A*x = (lambda)*x
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A and B are stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A and B are stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A and B are stored
- n: Number of rows (or columns) of matrix A and B
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and info = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- b: array of dimension ldb * n. If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of B contains the upper triangular part of the matrix B. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of B contains the lower triangular part of the matrix B. On exit, if info is less than n, B is overwritten by triangular factor U or L from the Cholesky factorization of B
- ldb: Leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n)
- w: A real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1)
- lwork: Size of work, in elements of complex64
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or ldb<max(1,n), or itype is not 1, 2 or 3, or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnChegvjBufferSize, bound as cusolverDnChegvj_bufferSize.
func (Handle) Chetrd ¶
func (h Handle) Chetrd(uplo FillMode, n int32, a driver.DevicePtr, lda int32, d driver.DevicePtr, e driver.DevicePtr, tau driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Chetrd reduces a general symmetric (Hermitian) n×n matrix A to real symmetric tridiagonal form T by an orthogonal transformation: Qᴴ*A*Q=T.
As an output, A contains T and householder reflection vectors. If uplo = CUBLAS_FILL_MODE_UPPER, the diagonal and first superdiagonal of A are overwritten by the corresponding elements of the tridiagonal matrix T, and the elements above the first superdiagonal, with the array tau, represent the orthogonal matrix Q as a product of elementary reflectors; If uplo = CUBLAS_FILL_MODE_LOWER, the diagonal and first subdiagonal of A are overwritten by the corresponding elements of the tridiagonal matrix T, and the elements below the first subdiagonal, with the array tau, represent the orthogonal matrix Q as a product of elementary reflectors. The input parameter lwork is size of the working space, and it is returned by sytrd_bufferSize(). Note that the problem size n is limited by a condition n*lda < INT32_MAX primarily due to the current implementation constraints.
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. On exit, A is overwritten by T and householder reflection vectors
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,n)
- d: Real array of dimension n. The diagonal elements of the tridiagonal matrix T: D(i) = A(i,i)
- e: Real array of dimension (n-1). The off-diagonal elements of the tridiagonal matrix T: if uplo = CUBLAS_FILL_MODE_UPPER, E(i) = A(i,i+1). if uplo = CUBLAS_FILL_MODE_LOWER E(i) = A(i+1,i)
- tau: array of dimension (n-1). The scalar factors of the elementary reflectors which represent the orthogonal matrix Q
- work: Working space, array of size lwork
- lwork: Size of work, returned by sytrd_bufferSize
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnChetrd.
func (Handle) ChetrdBufferSize ¶
func (h Handle) ChetrdBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32, d driver.DevicePtr, e driver.DevicePtr, tau driver.DevicePtr) (int32, error)
ChetrdBufferSize returns the workspace size, in elements of complex64, for Handle.Chetrd.
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. On exit, A is overwritten by T and householder reflection vectors
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,n)
- tau: array of dimension (n-1). The scalar factors of the elementary reflectors which represent the orthogonal matrix Q
- lwork: Size of work, in elements of complex64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnChetrdBufferSize, bound as cusolverDnChetrd_bufferSize.
func (Handle) Claswp ¶
func (h Handle) Claswp(n int32, a driver.DevicePtr, lda int32, k1 int32, k2 int32, devIpiv driver.DevicePtr, incx int32) error
Claswp wraps cusolverDnClaswp.
func (Handle) Clauum ¶
func (h Handle) Clauum(uplo FillMode, n int32, a driver.DevicePtr, lda int32, work driver.DevicePtr, lwork int32, devInfo driver.DevicePtr) error
Clauum wraps cusolverDnClauum.
func (Handle) ClauumBufferSize ¶
func (h Handle) ClauumBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32) (int32, error)
ClauumBufferSize wraps cusolverDnClauumBufferSize.
Wraps cusolverDnClauumBufferSize, bound as cusolverDnClauum_bufferSize.
func (*Handle) Close ¶
Close releases CPU-side resources used by the cuSolverDN library.
A nil error means the shutdown succeeded.
Errors:
- ErrNotInitialized: The library was not initialized.
If h is zero, Close returns nil. Otherwise Close sets h to zero when the call succeeds and leaves it unchanged when it fails. Only h is zeroed: a copy of it still refers to the released object.
Wraps cusolverDnDestroy.
func (Handle) Cpotrf ¶
func (h Handle) Cpotrf(uplo FillMode, n int32, a driver.DevicePtr, lda int32, workspace driver.DevicePtr, lwork int32, devInfo driver.DevicePtr) error
Cpotrf computes the Cholesky factorization of a Hermitian positive-definite matrix.
A is an n×n Hermitian matrix, only the lower or upper part is meaningful. The input parameter uplo indicates which part of the matrix is used. The function will leave the other part untouched. If input parameter uplo is CUBLAS_FILL_MODE_LOWER, only the lower triangular part of A is processed, and replaced by the lower triangular Cholesky factor L. A=L*Lᴴ If input parameter uplo is CUBLAS_FILL_MODE_UPPER, only upper triangular part of A is processed, and replaced by upper triangular Cholesky factor U. A=Uᴴ*U The input parameter Lwork is size of the working space, and it is returned by potrf_bufferSize(). If Cholesky factorization failed, i.e. some leading minor of A is not positive definite, or equivalently some diagonal elements of L or U is not a real number. The output parameter devInfo would indicate smallest leading minor of A which is not positive definite.
- uplo: Indicates if matrix A lower or upper part is stored; the other part is not referenced
- n: Number of rows and columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- workspace: Working space, array of size Lwork
- lwork: Size of Workspace, returned by potrf_bufferSize
- devInfo: If devInfo = 0, the Cholesky factorization is successful. if devInfo = -i, the i-th parameter is wrong (not counting handle). if devInfo = i, the leading minor of order i is not positive definite
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCpotrf.
func (Handle) CpotrfBatched ¶
func (h Handle) CpotrfBatched(uplo FillMode, n int32, aarray driver.DevicePtr, lda int32, infoArray driver.DevicePtr, batchSize int32) error
CpotrfBatched computes the Cholesky factorization of a sequence of Hermitian positive-definite matrices.
Each Aarray[i] for i=0,1,..., batchSize-1 is a n×n Hermitian matrix, only lower or upper part is meaningful. The input parameter uplo indicates which part of the matrix is used. If input parameter uplo is CUBLAS_FILL_MODE_LOWER, only lower triangular part of A is processed, and replaced by lower triangular Cholesky factor L. A=L*Lᴴ If input parameter uplo is CUBLAS_FILL_MODE_UPPER, only upper triangular part of A is processed, and replaced by upper triangular Cholesky factor U. A=Uᴴ*U If Cholesky factorization failed, i.e. some leading minor of A is not positive definite, or equivalently some diagonal elements of L or U is not a real number. The output parameter infoArray would indicate smallest leading minor of A which is not positive definite. infoArray is an integer array of size batchsize. If potrfBatched returns ErrInvalidValue, infoArray[0] = -i (less than zero), meaning that the i-th parameter is wrong (not counting handle). If potrfBatched returns Success but infoArray[i] = k is positive, then i-th matrix is not positive definite and the Cholesky factorization failed at row k. Remark: the other part of A is used as a workspace. For example, if uplo is CUBLAS_FILL_MODE_UPPER, upper triangle of A contains Cholesky factor U and lower triangle of A is destroyed after potrfBatched.
- uplo: Indicates if lower or upper part is stored; the other part is used as a workspace
- n: Number of rows and columns of matrix A
- aarray: Array of pointers to array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store each matrix Aarray[i]
- infoArray: Array of size batchSize. infoArray[i] contains information of factorization of Aarray[i]. if potrfBatched returns ErrInvalidValue, infoArray[0] = -i (less than zero) means the i-th parameter is wrong (not counting handle). if potrfBatched returns Success, infoArray[i] = 0 means the Cholesky factorization of i-th matrix is successful, and infoArray[i] = k means the leading submatrix of order k of i-th matrix is not positive definite
- batchSize: Number of pointers in Aarray
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n) or batchSize<1).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCpotrfBatched.
func (Handle) CpotrfBufferSize ¶
func (h Handle) CpotrfBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32) (int32, error)
CpotrfBufferSize returns the workspace size, in elements of complex64, for Handle.Cpotrf.
- uplo: Indicates if matrix A lower or upper part is stored; the other part is not referenced
- n: Number of rows and columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- lwork: Size of Workspace, in elements of complex64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCpotrfBufferSize, bound as cusolverDnCpotrf_bufferSize.
func (Handle) Cpotri ¶
func (h Handle) Cpotri(uplo FillMode, n int32, a driver.DevicePtr, lda int32, work driver.DevicePtr, lwork int32, devInfo driver.DevicePtr) error
Cpotri computes the inverse of a positive-definite matrix A using the Cholesky factorization.
A=L*Lᴴ=Uᴴ*U, computed by potrf(). A is an n×n matrix containing the triangular factor L or U computed by the Cholesky factorization. Only lower or upper part is meaningful and the input parameter uplo indicates which part of the matrix is used. The function would leave the other part untouched. If the input parameter uplo is CUBLAS_FILL_MODE_LOWER, only lower triangular part of A is processed, and replaced the by lower triangular part of the inverse of A. If the input parameter uplo is CUBLAS_FILL_MODE_UPPER, only upper triangular part of A is processed, and replaced by the upper triangular part of the inverse of A. The input parameter Lwork is the size of the working space, returned by potri_bufferSize(). If the computation of the inverse fails, i.e. some leading minor of L or U, is null, the output parameter devInfo would indicate the smallest leading minor of L or U which is not positive definite.
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- n: Number of rows and columns of matrix A
- a: array of dimension lda * n where lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- lwork: Size of Workspace, returned by potri_bufferSize
- devInfo: If devInfo = 0, the computation of the inverse is successful. if devInfo = -i, the i-th parameter is wrong (not counting handle). if devInfo = i, the leading minor of order i is zero
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCpotri.
func (Handle) CpotriBufferSize ¶
func (h Handle) CpotriBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32) (int32, error)
CpotriBufferSize returns the workspace size, in elements of complex64, for Handle.Cpotri.
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- n: Number of rows and columns of matrix A
- a: array of dimension lda * n where lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- lwork: Size of Workspace, in elements of complex64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCpotriBufferSize, bound as cusolverDnCpotri_bufferSize.
func (Handle) Cpotrs ¶
func (h Handle) Cpotrs(uplo FillMode, n int32, nrhs int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, devInfo driver.DevicePtr) error
Cpotrs solves a system of linear equations.
A*X=B, where A is an n×n Hermitian matrix, only lower or upper part is meaningful. The input parameter uplo indicates which part of the matrix is used. The function will leave the other part untouched. The user has to call potrf first to factorize matrix A. If input parameter uplo is CUBLAS_FILL_MODE_LOWER, A is lower triangular Cholesky factor L corresponding to A=L*Lᴴ . If input parameter uplo is CUBLAS_FILL_MODE_UPPER, A is upper triangular Cholesky factor U corresponding to A=Uᴴ*U . The operation is in-place, i.e. matrix X overwrites matrix B with the same leading dimension ldb.
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- n: Number of rows and columns of matrix A
- nrhs: Number of columns of matrix X and B
- 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
- lda: Leading dimension of two-dimensional array used to store matrix A
- 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
- devInfo: If devInfo = 0, the Cholesky factorization is successful. if devInfo = -i, the i-th parameter is wrong (not counting handle)
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, nrhs<0, lda<max(1,n) or ldb<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCpotrs.
func (Handle) CpotrsBatched ¶
func (h Handle) CpotrsBatched(uplo FillMode, n int32, nrhs int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, dInfo driver.DevicePtr, batchSize int32) error
CpotrsBatched solves a sequence of linear systems.
A[i]*X[i]=B[i], where each Aarray[i] for i=0,1,..., batchSize-1 is a n×n Hermitian matrix, only lower or upper part is meaningful. The input parameter uplo indicates which part of the matrix is used. The user has to call potrfBatched first to factorize matrix Aarray[i]. If input parameter uplo is CUBLAS_FILL_MODE_LOWER, A is lower triangular Cholesky factor L corresponding to A=L*Lᴴ . If input parameter uplo is CUBLAS_FILL_MODE_UPPER, A is upper triangular Cholesky factor U corresponding to A=Uᴴ*U . The operation is in-place, i.e. matrix X overwrites matrix B with the same leading dimension ldb. The output parameter info is a scalar. If info = -i (less than zero), the i-th parameter is wrong (not counting handle). Remark 1: only nrhs=1 is supported. Remark 2: infoArray from potrfBatched indicates if the matrix is positive definite. info from potrsBatched only shows which input parameter is wrong (not counting handle). Remark 3: the other part of A is used as a workspace. For example, if uplo is CUBLAS_FILL_MODE_UPPER, upper triangle of A contains Cholesky factor U and lower triangle of A is destroyed after potrsBatched. Please visit cuSOLVER Library Samples - potrfBatched for a code example.
- uplo: Indicates if matrix A lower or upper part is stored
- n: Number of rows and columns of matrix A
- nrhs: Number of columns of matrix X and B
- lda: Leading dimension of two-dimensional array used to store each matrix Aarray[i]
- ldb: Leading dimension of two-dimensional array used to store each matrix Barray[i]
- batchSize: Number of pointers in Aarray
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, nrhs<0, lda<max(1,n), ldb<max(1,n) or batchSize<0).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCpotrsBatched.
func (Handle) Csytrf ¶
func (h Handle) Csytrf(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ipiv driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Csytrf computes the factorization of a symmetric indefinite matrix using the Bunch-Kaufman diagonal pivoting.
A is a n×n symmetric matrix, only lower or upper part is meaningful. The input parameter uplo indicates which part of the matrix is used. If devIpiv is null, no pivoting is performed, which is not numerically stable. If input parameter uplo is CUBLAS_FILL_MODE_LOWER, only lower triangular part of A is processed, and replaced by lower triangular factor L and block diagonal matrix D. Each block of D is either 1x1 or 2x2 block, depending on pivoting. P*A*Pᵀ=L*D*Lᵀ If input parameter uplo is CUBLAS_FILL_MODE_UPPER, only upper triangular part of A is processed, and replaced by upper triangular factor U and block diagonal matrix D. P*A*Pᵀ=U*D*Uᵀ The input parameter lwork is size of the working space, and it is returned by sytrf_bufferSize(). When no pivoting is performed, the other triangular part of the input matrix A is used as workspace. If Bunch-Kaufman factorization failed, i.e. A is singular. The output parameter devInfo = i would indicate D(i,i)=0. The output parameter devIpiv contains pivoting sequence. If devIpiv(i) = k > 0, D(i,i) is 1x1 block, and i-th row/column of A is interchanged with k-th row/column of A. If uplo is CUBLAS_FILL_MODE_UPPER and devIpiv(i-1) = devIpiv(i) = -m < 0, D(i-1:i,i-1:i) is a 2x2 block, and (i-1)-th row/column is interchanged with m-th row/column. If uplo is CUBLAS_FILL_MODE_LOWER and devIpiv(i+1) = devIpiv(i) = -m < 0, D(i:i+1,i:i+1) is a 2x2 block, and (i+1)-th row/column is interchanged with m-th row/column.
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- n: Number of rows and columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- work: Working space, array of size lwork
- lwork: Size of working space work
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCsytrf.
func (Handle) CsytrfBufferSize ¶
CsytrfBufferSize returns the workspace size, in elements of complex64, for Handle.Csytrf.
- n: Number of rows and columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- lwork: Size of work, in elements of complex64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCsytrfBufferSize, bound as cusolverDnCsytrf_bufferSize.
func (Handle) Csytri ¶
func (h Handle) Csytri(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ipiv driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Csytri wraps cusolverDnCsytri.
func (Handle) CsytriBufferSize ¶
func (h Handle) CsytriBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ipiv driver.DevicePtr) (int32, error)
CsytriBufferSize wraps cusolverDnCsytriBufferSize.
Wraps cusolverDnCsytriBufferSize, bound as cusolverDnCsytri_bufferSize.
func (Handle) Cungbr ¶
func (h Handle) Cungbr(side SideMode, m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Cungbr generates one of the unitary matrices Q or P**H determined by gebrd when reducing a matrix A to bidiagonal form: Qᴴ*A*P=B.
Q and P**H are defined as products of elementary reflectors H(i) or G(i) respectively. The input parameter lwork is size of the working space, and it is returned by orgbr_bufferSize().
- side: If side = CUBLAS_SIDE_LEFT, generate Q. if side = CUBLAS_SIDE_RIGHT, generate P**T
- m: Number of rows of matrix Q or P**T
- n: If side = CUBLAS_SIDE_LEFT, m>= n>= min(m,k). if side = CUBLAS_SIDE_RIGHT, n>= m>= min(n,k)
- k: If side = CUBLAS_SIDE_LEFT, the number of columns in the original m-by-k matrix reduced by gebrd. if side = CUBLAS_SIDE_RIGHT, the number of rows in the original k-by-n matrix reduced by gebrd
- 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
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m)
- 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
- work: Working space, array of size lwork
- lwork: Size of working array work
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or wrong lda ).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCungbr.
func (Handle) CungbrBufferSize ¶
func (h Handle) CungbrBufferSize(side SideMode, m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr) (int32, error)
CungbrBufferSize returns the workspace size, in elements of complex64, for Handle.Cungbr.
- side: If side = CUBLAS_SIDE_LEFT, generate Q. if side = CUBLAS_SIDE_RIGHT, generate P**T
- m: Number of rows of matrix Q or P**T
- n: If side = CUBLAS_SIDE_LEFT, m>= n>= min(m,k). if side = CUBLAS_SIDE_RIGHT, n>= m>= min(n,k)
- k: If side = CUBLAS_SIDE_LEFT, the number of columns in the original m-by-k matrix reduced by gebrd. if side = CUBLAS_SIDE_RIGHT, the number of rows in the original k-by-n matrix reduced by gebrd
- 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
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m)
- 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
- lwork: Size of work, in elements of complex64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or wrong lda ).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCungbrBufferSize, bound as cusolverDnCungbr_bufferSize.
func (Handle) Cungqr ¶
func (h Handle) Cungqr(m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Cungqr overwrites m×n matrix A.
Q=H(1)*H(2)*...*H(k), where Q is a unitary matrix formed by a sequence of elementary reflection vectors stored in A. The input parameter lwork is size of the working space, and it is returned by orgqr_bufferSize(). The user can combine geqrf, orgqr to complete orthogonalization.
- m: Number of rows of matrix Q. m >= 0
- n: Number of columns of matrix Q. m >= n >= 0
- k: Number of elementary reflections whose product defines the matrix Q. n >= k >= 0
- a: array of dimension lda * n with lda is not less than max(1,m). i-th column of A contains elementary reflection vector
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m)
- tau: array of dimension k. tau(i) is the scalar of i-th elementary reflection vector
- work: Working space, array of size lwork
- lwork: Size of working array work
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n,k<0, n>m, k>n or lda<m).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCungqr.
func (Handle) CungqrBufferSize ¶
func (h Handle) CungqrBufferSize(m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr) (int32, error)
CungqrBufferSize returns the workspace size, in elements of complex64, for Handle.Cungqr.
- m: Number of rows of matrix Q. m >= 0
- n: Number of columns of matrix Q. m >= n >= 0
- k: Number of elementary reflections whose product defines the matrix Q. n >= k >= 0
- a: array of dimension lda * n with lda is not less than max(1,m). i-th column of A contains elementary reflection vector
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m)
- tau: array of dimension k. tau(i) is the scalar of i-th elementary reflection vector
- lwork: Size of work, in elements of complex64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n,k<0, n>m, k>n or lda<m).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCungqrBufferSize, bound as cusolverDnCungqr_bufferSize.
func (Handle) Cungtr ¶
func (h Handle) Cungtr(uplo FillMode, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Cungtr generates a unitary matrix Q which is defined as the product of n-1 elementary reflectors of order n, as returned by sytrd:
The input parameter lwork is size of the working space, and it is returned by orgtr_bufferSize().
- 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
- n: Number of rows (columns) of matrix Q
- 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
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,n)
- tau: array of dimension (n-1) tau(i) is the scalar of i-th elementary reflection vector
- work: Working space, array of size lwork
- lwork: Size of working array work
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or wrong lda).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCungtr.
func (Handle) CungtrBufferSize ¶
func (h Handle) CungtrBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr) (int32, error)
CungtrBufferSize returns the workspace size, in elements of complex64, for Handle.Cungtr.
- 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
- n: Number of rows (columns) of matrix Q
- 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
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,n)
- tau: array of dimension (n-1) tau(i) is the scalar of i-th elementary reflection vector
- lwork: Size of work, in elements of complex64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or wrong lda).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCungtrBufferSize, bound as cusolverDnCungtr_bufferSize.
func (Handle) Cunmqr ¶
func (h Handle) Cunmqr(side SideMode, trans Operation, m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, c driver.DevicePtr, ldc int32, work driver.DevicePtr, lwork int32, devInfo driver.DevicePtr) error
Cunmqr overwrites m×n matrix C.
C = op(Q)*C if side == CUBLAS_SIDE_LEFT, and C = C*op(Q) if side == CUBLAS_SIDE_RIGHT. The operation of Q is defined by op(Q) = Q if trans == CUBLAS_OP_N, op(Q) = Qᵀ if trans == CUBLAS_OP_T, and op(Q) = Qᴴ if trans == CUBLAS_OP_C. Q is a unitary matrix formed by a sequence of elementary reflection vectors from QR factorization ( geqrf) of A. Q = H(1) H(2) … H(k) Q is of order m if side = CUBLAS_SIDE_LEFT and of order n if side = CUBLAS_SIDE_RIGHT. The input parameter lwork is size of the working space, and it is returned by geqrf_bufferSize() or ormqr_bufferSize(). The user can combine geqrf, ormqr and trsm to complete a linear solver or a least-square solver.
- side: Indicates if matrix Q is on the left or right of C
- trans: Operation op(Q) that is non- or (conj.) transpose
- m: Number of rows of matrix C
- n: Number of columns of matrix C
- k: Number of elementary reflections whose product defines the matrix Q. If side is CUBLAS_SIDE_LEFT, m >= k >= 0; if side is CUBLAS_SIDE_RIGHT, n >= k >= 0
- a: array of dimension lda * k with lda is not less than max(1,m). The matrix A is from geqrf, so i-th column contains elementary reflection vector
- 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)
- tau: array of dimension k. The vector tau is from geqrf, so tau(i) is the scalar of the i-th elementary reflection vector
- c: array of size ldc * n. On exit, C is overwritten by op(Q)*C or C*op(Q)
- ldc: Leading dimension of two-dimensional array of matrix C. ldc >= max(1,m)
- work: Working space, array of size lwork
- lwork: Size of working array work
- devInfo: If devInfo = 0, the ormqr is successful. If devInfo = -i, the i-th parameter is wrong (not counting handle)
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n,k<0, k > m if CUBLAS_SIDE_LEFT, k > n if CUBLAS_SIDE_RIGHT, wrong lda or ldc or invalid trans).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCunmqr.
func (Handle) CunmqrBufferSize ¶
func (h Handle) CunmqrBufferSize(side SideMode, trans Operation, m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, c driver.DevicePtr, ldc int32) (int32, error)
CunmqrBufferSize returns the workspace size, in elements of complex64, for Handle.Cunmqr.
- side: Indicates if matrix Q is on the left or right of C
- trans: Operation op(Q) that is non- or (conj.) transpose
- m: Number of rows of matrix C
- n: Number of columns of matrix C
- k: Number of elementary reflections whose product defines the matrix Q. If side is CUBLAS_SIDE_LEFT, m >= k >= 0; if side is CUBLAS_SIDE_RIGHT, n >= k >= 0
- a: array of dimension lda * k with lda is not less than max(1,m). The matrix A is from geqrf, so i-th column contains elementary reflection vector
- 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)
- tau: array of dimension k. The vector tau is from geqrf, so tau(i) is the scalar of the i-th elementary reflection vector
- c: array of size ldc * n. On exit, C is overwritten by op(Q)*C or C*op(Q)
- ldc: Leading dimension of two-dimensional array of matrix C. ldc >= max(1,m)
- lwork: Size of work, in elements of complex64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n,k<0, k > m if CUBLAS_SIDE_LEFT, k > n if CUBLAS_SIDE_RIGHT, wrong lda or ldc or invalid trans).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCunmqrBufferSize, bound as cusolverDnCunmqr_bufferSize.
func (Handle) Cunmtr ¶
func (h Handle) Cunmtr(side SideMode, uplo FillMode, trans Operation, m int32, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, c driver.DevicePtr, ldc int32, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Cunmtr overwrites m×n matrix C.
C = op(Q)*C if side == CUBLAS_SIDE_LEFT, and C = C*op(Q) if side == CUBLAS_SIDE_RIGHT, where Q is a unitary matrix formed by a sequence of elementary reflection vectors from sytrd. The operation on Q is defined by op(Q) = Q if trans == CUBLAS_OP_N, op(Q) = Qᵀ if trans == CUBLAS_OP_T, and op(Q) = Qᴴ if trans == CUBLAS_OP_C. The input parameter lwork is size of the working space, and it is returned by ormtr_bufferSize().
- side: side = CUBLAS_SIDE_LEFT, apply Q or Q**T from the Left; side = CUBLAS_SIDE_RIGHT, apply Q or Q**T from the Right
- 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
- trans: Operation op(Q) that is non- or (conj.) transpose
- m: Number of rows of matrix C
- n: Number of columns of matrix C
- 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
- 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)
- 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
- c: array of size ldc * n. On exit, C is overwritten by op(Q)*C or C*op(Q)
- ldc: Leading dimension of two-dimensional array of matrix C. ldc >= max(1,m)
- work: Working space, array of size lwork
- lwork: Size of working array work
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or wrong lda or ldc).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCunmtr.
func (Handle) CunmtrBufferSize ¶
func (h Handle) CunmtrBufferSize(side SideMode, uplo FillMode, trans Operation, m int32, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, c driver.DevicePtr, ldc int32) (int32, error)
CunmtrBufferSize returns the workspace size, in elements of complex64, for Handle.Cunmtr.
- side: side = CUBLAS_SIDE_LEFT, apply Q or Q**T from the Left; side = CUBLAS_SIDE_RIGHT, apply Q or Q**T from the Right
- 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
- trans: Operation op(Q) that is non- or (conj.) transpose
- m: Number of rows of matrix C
- n: Number of columns of matrix C
- 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
- 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)
- 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
- c: array of size ldc * n. On exit, C is overwritten by op(Q)*C or C*op(Q)
- ldc: Leading dimension of two-dimensional array of matrix C. ldc >= max(1,m)
- lwork: Size of work, in elements of complex64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or wrong lda or ldc).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnCunmtrBufferSize, bound as cusolverDnCunmtr_bufferSize.
func (Handle) DBgels ¶
func (h Handle) DBgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
DBgels computes the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
These functions are similar in term of functionalities to the full precision LAPACK QR (least squares) solver (Xgels, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an QR factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is m-by-n matrix and X is n-by-nrhs and B is m-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Description of these functions is given below. <t1><t2>gels() functions are designated by two floating point precisions The <t1> corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the <t2> represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gels() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision <t1>. If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgels) such a way that there is always a good solution at the output of these functions. If <t2> is equal to <t1>, then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if: ITER > ITERMAX or for all the RHS we have: RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK<t1>LAMCH('Epsilon')
The values ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gels_bufferSize(). We provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (e.g., main and lowest precision are equal <t2> is equal to <t1>). The following table specifies which precisions will be used for which interface function: Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gels for the FP64 case).
- Interface function: Handle.ZZgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
cusolverDn<t1><t2>gels_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gels() function.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can’t be NULL. On return - unchanged if the lowest precision is not equal to the main precision and the iterative refinement solver converged, - garbage otherwise
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gels_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDBgels.
func (Handle) DBgelsBufferSize ¶
func (h Handle) DBgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
DBgelsBufferSize returns the workspace size, in bytes, for Handle.DBgels.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDBgelsBufferSize, bound as cusolverDnDBgels_bufferSize.
func (Handle) DBgesv ¶
func (h Handle) DBgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
DBgesv is modelled after functions DSGESV and ZCGESV from LAPACK.
They compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the LU factorization Xgesv. These functions are similar in term of functionalities to the full precision LU solver ( Xgesv, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an LU factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is n-by-n matrix and X and B are n-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Parameters and behavior are mostly the same as LAPACK counterparts. Description of these functions and differences from LAPACK is given below. <t1><t2>gesv() functions are designated by two floating point precisions The corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gesv() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision . If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgesv) such a way that there is always a good solution at the output of these functions. If is equal to , then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if or for all the RHS we have: where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK LAMCH(‘Epsilon’)
The value ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gesv_bufferSize(). Note that in addition to the two mixed precision functions available in LAPACK (for example, dsgesv and zcgesv), we provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (, main and lowest precision are equal is equal to ). The following table specifies which precisions will be used for which interface function. Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gesv for the FP64 case).
- Interface function: Handle.ZZgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgesv*; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgesv*; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
* Has LAPACK counterparts cusolverDn<t1><t2>gesv_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gesv() function.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can’t be NULL. On return - unchanged if the iterative refinement process converged. If not - will contains the factorization of the matrix A in the main precision ( A = P * L * U, where P - permutation matrix defined by vector ipiv, L and U - lower and upper triangular matrices)
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Vector that defines permutation for the factorization - row i was interchanged with row ipiv[i]
- dB: Set of right hand sides B of size n-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gesv_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid. If dinfo = i, then U(i,i) computed in main precision is exactly zero. The factorization has been completed, but the factor U is exactly singular, so the solution could not be computed
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDBgesv.
func (Handle) DBgesvBufferSize ¶
func (h Handle) DBgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
DBgesvBufferSize returns the workspace size, in bytes, for Handle.DBgesv.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Pivoting sequence. Not used and can be NULL
- dB: Set of right hand sides B of size n-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDBgesvBufferSize, bound as cusolverDnDBgesv_bufferSize.
func (Handle) DDgels ¶
func (h Handle) DDgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
DDgels computes the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
These functions are similar in term of functionalities to the full precision LAPACK QR (least squares) solver (Xgels, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an QR factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is m-by-n matrix and X is n-by-nrhs and B is m-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Description of these functions is given below. <t1><t2>gels() functions are designated by two floating point precisions The <t1> corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the <t2> represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gels() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision <t1>. If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgels) such a way that there is always a good solution at the output of these functions. If <t2> is equal to <t1>, then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if: ITER > ITERMAX or for all the RHS we have: RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK<t1>LAMCH('Epsilon')
The values ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gels_bufferSize(). We provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (e.g., main and lowest precision are equal <t2> is equal to <t1>). The following table specifies which precisions will be used for which interface function: Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gels for the FP64 case).
- Interface function: Handle.ZZgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
cusolverDn<t1><t2>gels_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gels() function.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can’t be NULL. On return - unchanged if the lowest precision is not equal to the main precision and the iterative refinement solver converged, - garbage otherwise
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gels_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDDgels.
func (Handle) DDgelsBufferSize ¶
func (h Handle) DDgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
DDgelsBufferSize returns the workspace size, in bytes, for Handle.DDgels.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDDgelsBufferSize, bound as cusolverDnDDgels_bufferSize.
func (Handle) DDgesv ¶
func (h Handle) DDgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
DDgesv is modelled after functions DSGESV and ZCGESV from LAPACK.
They compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the LU factorization Xgesv. These functions are similar in term of functionalities to the full precision LU solver ( Xgesv, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an LU factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is n-by-n matrix and X and B are n-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Parameters and behavior are mostly the same as LAPACK counterparts. Description of these functions and differences from LAPACK is given below. <t1><t2>gesv() functions are designated by two floating point precisions The corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gesv() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision . If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgesv) such a way that there is always a good solution at the output of these functions. If is equal to , then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if or for all the RHS we have: where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK LAMCH(‘Epsilon’)
The value ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gesv_bufferSize(). Note that in addition to the two mixed precision functions available in LAPACK (for example, dsgesv and zcgesv), we provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (, main and lowest precision are equal is equal to ). The following table specifies which precisions will be used for which interface function. Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gesv for the FP64 case).
- Interface function: Handle.ZZgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgesv*; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgesv*; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
* Has LAPACK counterparts cusolverDn<t1><t2>gesv_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gesv() function.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can’t be NULL. On return - unchanged if the iterative refinement process converged. If not - will contains the factorization of the matrix A in the main precision ( A = P * L * U, where P - permutation matrix defined by vector ipiv, L and U - lower and upper triangular matrices)
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Vector that defines permutation for the factorization - row i was interchanged with row ipiv[i]
- dB: Set of right hand sides B of size n-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gesv_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid. If dinfo = i, then U(i,i) computed in main precision is exactly zero. The factorization has been completed, but the factor U is exactly singular, so the solution could not be computed
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDDgesv.
func (Handle) DDgesvBufferSize ¶
func (h Handle) DDgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
DDgesvBufferSize returns the workspace size, in bytes, for Handle.DDgesv.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Pivoting sequence. Not used and can be NULL
- dB: Set of right hand sides B of size n-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDDgesvBufferSize, bound as cusolverDnDDgesv_bufferSize.
func (Handle) DHgels ¶
func (h Handle) DHgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
DHgels computes the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
These functions are similar in term of functionalities to the full precision LAPACK QR (least squares) solver (Xgels, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an QR factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is m-by-n matrix and X is n-by-nrhs and B is m-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Description of these functions is given below. <t1><t2>gels() functions are designated by two floating point precisions The <t1> corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the <t2> represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gels() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision <t1>. If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgels) such a way that there is always a good solution at the output of these functions. If <t2> is equal to <t1>, then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if: ITER > ITERMAX or for all the RHS we have: RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK<t1>LAMCH('Epsilon')
The values ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gels_bufferSize(). We provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (e.g., main and lowest precision are equal <t2> is equal to <t1>). The following table specifies which precisions will be used for which interface function: Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gels for the FP64 case).
- Interface function: Handle.ZZgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
cusolverDn<t1><t2>gels_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gels() function.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can’t be NULL. On return - unchanged if the lowest precision is not equal to the main precision and the iterative refinement solver converged, - garbage otherwise
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gels_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDHgels.
func (Handle) DHgelsBufferSize ¶
func (h Handle) DHgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
DHgelsBufferSize returns the workspace size, in bytes, for Handle.DHgels.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDHgelsBufferSize, bound as cusolverDnDHgels_bufferSize.
func (Handle) DHgesv ¶
func (h Handle) DHgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
DHgesv is modelled after functions DSGESV and ZCGESV from LAPACK.
They compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the LU factorization Xgesv. These functions are similar in term of functionalities to the full precision LU solver ( Xgesv, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an LU factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is n-by-n matrix and X and B are n-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Parameters and behavior are mostly the same as LAPACK counterparts. Description of these functions and differences from LAPACK is given below. <t1><t2>gesv() functions are designated by two floating point precisions The corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gesv() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision . If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgesv) such a way that there is always a good solution at the output of these functions. If is equal to , then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if or for all the RHS we have: where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK LAMCH(‘Epsilon’)
The value ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gesv_bufferSize(). Note that in addition to the two mixed precision functions available in LAPACK (for example, dsgesv and zcgesv), we provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (, main and lowest precision are equal is equal to ). The following table specifies which precisions will be used for which interface function. Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gesv for the FP64 case).
- Interface function: Handle.ZZgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgesv*; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgesv*; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
* Has LAPACK counterparts cusolverDn<t1><t2>gesv_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gesv() function.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can’t be NULL. On return - unchanged if the iterative refinement process converged. If not - will contains the factorization of the matrix A in the main precision ( A = P * L * U, where P - permutation matrix defined by vector ipiv, L and U - lower and upper triangular matrices)
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Vector that defines permutation for the factorization - row i was interchanged with row ipiv[i]
- dB: Set of right hand sides B of size n-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gesv_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid. If dinfo = i, then U(i,i) computed in main precision is exactly zero. The factorization has been completed, but the factor U is exactly singular, so the solution could not be computed
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDHgesv.
func (Handle) DHgesvBufferSize ¶
func (h Handle) DHgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
DHgesvBufferSize returns the workspace size, in bytes, for Handle.DHgesv.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Pivoting sequence. Not used and can be NULL
- dB: Set of right hand sides B of size n-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDHgesvBufferSize, bound as cusolverDnDHgesv_bufferSize.
func (Handle) DSgels ¶
func (h Handle) DSgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
DSgels computes the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
These functions are similar in term of functionalities to the full precision LAPACK QR (least squares) solver (Xgels, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an QR factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is m-by-n matrix and X is n-by-nrhs and B is m-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Description of these functions is given below. <t1><t2>gels() functions are designated by two floating point precisions The <t1> corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the <t2> represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gels() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision <t1>. If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgels) such a way that there is always a good solution at the output of these functions. If <t2> is equal to <t1>, then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if: ITER > ITERMAX or for all the RHS we have: RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK<t1>LAMCH('Epsilon')
The values ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gels_bufferSize(). We provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (e.g., main and lowest precision are equal <t2> is equal to <t1>). The following table specifies which precisions will be used for which interface function: Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gels for the FP64 case).
- Interface function: Handle.ZZgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
cusolverDn<t1><t2>gels_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gels() function.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can’t be NULL. On return - unchanged if the lowest precision is not equal to the main precision and the iterative refinement solver converged, - garbage otherwise
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gels_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDSgels.
func (Handle) DSgelsBufferSize ¶
func (h Handle) DSgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
DSgelsBufferSize returns the workspace size, in bytes, for Handle.DSgels.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDSgelsBufferSize, bound as cusolverDnDSgels_bufferSize.
func (Handle) DSgesv ¶
func (h Handle) DSgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
DSgesv is modelled after functions DSGESV and ZCGESV from LAPACK.
They compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the LU factorization Xgesv. These functions are similar in term of functionalities to the full precision LU solver ( Xgesv, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an LU factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is n-by-n matrix and X and B are n-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Parameters and behavior are mostly the same as LAPACK counterparts. Description of these functions and differences from LAPACK is given below. <t1><t2>gesv() functions are designated by two floating point precisions The corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gesv() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision . If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgesv) such a way that there is always a good solution at the output of these functions. If is equal to , then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if or for all the RHS we have: where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK LAMCH(‘Epsilon’)
The value ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gesv_bufferSize(). Note that in addition to the two mixed precision functions available in LAPACK (for example, dsgesv and zcgesv), we provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (, main and lowest precision are equal is equal to ). The following table specifies which precisions will be used for which interface function. Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gesv for the FP64 case).
- Interface function: Handle.ZZgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgesv*; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgesv*; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
* Has LAPACK counterparts cusolverDn<t1><t2>gesv_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gesv() function.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can’t be NULL. On return - unchanged if the iterative refinement process converged. If not - will contains the factorization of the matrix A in the main precision ( A = P * L * U, where P - permutation matrix defined by vector ipiv, L and U - lower and upper triangular matrices)
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Vector that defines permutation for the factorization - row i was interchanged with row ipiv[i]
- dB: Set of right hand sides B of size n-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gesv_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid. If dinfo = i, then U(i,i) computed in main precision is exactly zero. The factorization has been completed, but the factor U is exactly singular, so the solution could not be computed
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDSgesv.
func (Handle) DSgesvBufferSize ¶
func (h Handle) DSgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
DSgesvBufferSize returns the workspace size, in bytes, for Handle.DSgesv.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Pivoting sequence. Not used and can be NULL
- dB: Set of right hand sides B of size n-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDSgesvBufferSize, bound as cusolverDnDSgesv_bufferSize.
func (Handle) DXgels ¶
func (h Handle) DXgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
DXgels computes the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
These functions are similar in term of functionalities to the full precision LAPACK QR (least squares) solver (Xgels, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an QR factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is m-by-n matrix and X is n-by-nrhs and B is m-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Description of these functions is given below. <t1><t2>gels() functions are designated by two floating point precisions The <t1> corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the <t2> represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gels() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision <t1>. If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgels) such a way that there is always a good solution at the output of these functions. If <t2> is equal to <t1>, then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if: ITER > ITERMAX or for all the RHS we have: RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK<t1>LAMCH('Epsilon')
The values ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gels_bufferSize(). We provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (e.g., main and lowest precision are equal <t2> is equal to <t1>). The following table specifies which precisions will be used for which interface function: Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gels for the FP64 case).
- Interface function: Handle.ZZgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
cusolverDn<t1><t2>gels_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gels() function.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can’t be NULL. On return - unchanged if the lowest precision is not equal to the main precision and the iterative refinement solver converged, - garbage otherwise
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gels_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDXgels.
func (Handle) DXgelsBufferSize ¶
func (h Handle) DXgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
DXgelsBufferSize returns the workspace size, in bytes, for Handle.DXgels.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDXgelsBufferSize, bound as cusolverDnDXgels_bufferSize.
func (Handle) DXgesv ¶
func (h Handle) DXgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
DXgesv is modelled after functions DSGESV and ZCGESV from LAPACK.
They compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the LU factorization Xgesv. These functions are similar in term of functionalities to the full precision LU solver ( Xgesv, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an LU factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is n-by-n matrix and X and B are n-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Parameters and behavior are mostly the same as LAPACK counterparts. Description of these functions and differences from LAPACK is given below. <t1><t2>gesv() functions are designated by two floating point precisions The corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gesv() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision . If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgesv) such a way that there is always a good solution at the output of these functions. If is equal to , then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if or for all the RHS we have: where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK LAMCH(‘Epsilon’)
The value ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gesv_bufferSize(). Note that in addition to the two mixed precision functions available in LAPACK (for example, dsgesv and zcgesv), we provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (, main and lowest precision are equal is equal to ). The following table specifies which precisions will be used for which interface function. Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gesv for the FP64 case).
- Interface function: Handle.ZZgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgesv*; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgesv*; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
* Has LAPACK counterparts cusolverDn<t1><t2>gesv_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gesv() function.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can’t be NULL. On return - unchanged if the iterative refinement process converged. If not - will contains the factorization of the matrix A in the main precision ( A = P * L * U, where P - permutation matrix defined by vector ipiv, L and U - lower and upper triangular matrices)
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Vector that defines permutation for the factorization - row i was interchanged with row ipiv[i]
- dB: Set of right hand sides B of size n-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gesv_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid. If dinfo = i, then U(i,i) computed in main precision is exactly zero. The factorization has been completed, but the factor U is exactly singular, so the solution could not be computed
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDXgesv.
func (Handle) DXgesvBufferSize ¶
func (h Handle) DXgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
DXgesvBufferSize returns the workspace size, in bytes, for Handle.DXgesv.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Pivoting sequence. Not used and can be NULL
- dB: Set of right hand sides B of size n-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDXgesvBufferSize, bound as cusolverDnDXgesv_bufferSize.
func (Handle) DeterministicMode ¶
func (h Handle) DeterministicMode() (DeterministicMode, error)
DeterministicMode queries the deterministic mode which is set for handle.
- mode: The deterministic mode of handle
A nil error means the modes were queried successfully.
Errors:
- ErrInvalidValue: mode is a NULL pointer.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnGetDeterministicMode.
func (Handle) Dgebrd ¶
func (h Handle) Dgebrd(m int32, n int32, a driver.DevicePtr, lda int32, d driver.DevicePtr, e driver.DevicePtr, tauq driver.DevicePtr, taup driver.DevicePtr, work driver.DevicePtr, lwork int32, devInfo driver.DevicePtr) error
Dgebrd reduces a general m×n matrix A to a real upper or lower bidiagonal form B by an orthogonal transformation: Qᴴ*A*P=B.
If m>=n, B is upper bidiagonal; if m<n, B is lower bidiagonal. The matrix Q and P are overwritten into matrix A in the following sense:
- if m>=n, the diagonal and the first superdiagonal are overwritten with the upper bidiagonal matrix B; the elements below the diagonal, with the array TAUQ, represent the orthogonal matrix Q as a product of elementary reflectors, and the elements above the first superdiagonal, with the array TAUP, represent the orthogonal matrix P as a product of elementary reflectors.
- if m<n, the diagonal and the first subdiagonal are overwritten with the lower bidiagonal matrix B; the elements below the first subdiagonal, with the array TAUQ, represent the orthogonal matrix Q as a product of elementary reflectors, and the elements above the diagonal, with the array TAUP, represent the orthogonal matrix P as a product of elementary reflectors.
The input parameter Lwork is size of the working space, and it is returned by gebrd_bufferSize(). Remark: gebrd only supports m>=n.
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- d: Real array of dimension min(m,n). The diagonal elements of the bidiagonal matrix B: D(i) = A(i,i)
- e: Real 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
- tauq: array of dimension min(m,n). The scalar factors of the elementary reflectors which represent the orthogonal matrix Q
- taup: array of dimension min(m,n). The scalar factors of the elementary reflectors which represent the orthogonal matrix P
- work: Working space, array of size Lwork
- lwork: Size of Work, returned by gebrd_bufferSize
- devInfo: If devInfo = 0, the operation is successful. if devInfo = -i, the i-th parameter is wrong (not counting handle)
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0, or lda<max(1,m)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDgebrd.
func (Handle) DgebrdBufferSize ¶
DgebrdBufferSize returns the workspace size, in elements of float64, for Handle.Dgebrd.
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- lwork: Size of Work, in elements of float64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0, or lda<max(1,m)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDgebrdBufferSize, bound as cusolverDnDgebrd_bufferSize.
func (Handle) Dgeqrf ¶
func (h Handle) Dgeqrf(m int32, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, workspace driver.DevicePtr, lwork int32, devInfo driver.DevicePtr) error
Dgeqrf computes the QR factorization of an m×n matrix.
A=Q*R, where A is an m×n matrix, Q is an m×n matrix, and R is a n×n upper triangular matrix. The input parameter Lwork is size of the working space, and it is returned by geqrf_bufferSize(). The matrix R is overwritten in upper triangular part of A, including diagonal elements. The matrix Q is not formed explicitly, instead, a sequence of householder vectors are stored in lower triangular part of A. The leading nonzero element of householder vector is assumed to be 1 such that output parameter TAU contains the scaling factor τ. If v is original householder vector, q is the new householder vector corresponding to τ, satisfying the following relation I−2*v*vᴴ=I−τ*q*qᴴ
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,m)
- lda: Leading dimension of two-dimensional array used to store matrix A
- tau: array of dimension at least min(m,n)
- workspace: Working space, array of size Lwork
- lwork: Size of working array Workspace
- devInfo: If devInfo = 0, the LU factorization is successful. if devInfo = -i, the i-th parameter is wrong (not counting handle)
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDgeqrf.
func (Handle) DgeqrfBufferSize ¶
DgeqrfBufferSize returns the workspace size, in elements of float64, for Handle.Dgeqrf.
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,m)
- lda: Leading dimension of two-dimensional array used to store matrix A
- lwork: Size of Workspace, in elements of float64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDgeqrfBufferSize, bound as cusolverDnDgeqrf_bufferSize.
func (Handle) Dgesvd ¶
func (h Handle) Dgesvd(jobu int8, jobvt int8, m int32, n int32, a driver.DevicePtr, lda int32, s driver.DevicePtr, u driver.DevicePtr, ldu int32, vt driver.DevicePtr, ldvt int32, work driver.DevicePtr, lwork int32, rwork driver.DevicePtr, info driver.DevicePtr) error
Dgesvd computes the singular value decomposition (SVD) of an m×n matrix A and corresponding the left and/or right singular vectors.
The SVD is written A=U*Σ*Vᴴ, where Σ is an m×n matrix which is zero except for its min(m,n) diagonal elements, U is an m×m unitary matrix, and V is an n×n unitary matrix. The diagonal elements of Σ are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A. The input parameter lwork is size of the working space, and it is returned by gesvd_bufferSize(). if bdsqr did not converge, devInfo specifies how many superdiagonals of an intermediate bidiagonal form did not converge to zero. The rwork is real array of dimension (min(m,n)-1). If devInfo >0 and rwork is not NULL, rwork contains the unconverged superdiagonal elements of an upper bidiagonal matrix. This is slightly different from LAPACK which puts unconverged superdiagonal elements in work if type is real; in rwork if type is complex. rwork can be a NULL pointer if the user does not want the information from superdiagonal. Please visit cuSOLVER Library Samples - gesvd for a code example. Remark 1: gesvd only supports m>=n. Remark 2: the routine returns Vᴴ , not V.
- 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
- jobvt: Specifies options for computing all or part of the matrix V**T: = ‘A’: all N rows of V**T are returned in the array VT; = ‘S’: the first min(m,n) rows of V**T (the right singular vectors) are returned in the array VT; = ‘O’: the first min(m,n) rows of V**T (the right singular vectors) are overwritten on the array A; = ‘N’: no rows of V**T (no right singular vectors) are computed
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,m). On exit, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- s: Real array of dimension min(m,n). The singular values of A, sorted so that S(i) >= S(i+1)
- u: array of dimension ldu * m with ldu is not less than max(1,m). U contains the m×m unitary matrix U
- ldu: Leading dimension of two-dimensional array used to store matrix U
- vt: array of dimension ldvt * n with ldvt is not less than max(1,n). VT contains the n×n unitary matrix V**T
- ldvt: Leading dimension of two-dimensional array used to store matrix Vt
- work: Working space, array of size lwork
- lwork: Size of work, returned by gesvd_bufferSize
- rwork: Real array of dimension min(m,n)-1. It contains the unconverged superdiagonal elements of an upper bidiagonal matrix if devInfo > 0
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m) or ldu<max(1,m) or ldvt<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDgesvd.
func (Handle) DgesvdBufferSize ¶
DgesvdBufferSize returns the workspace size, in elements of float64, for Handle.Dgesvd.
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- lwork: Size of work, in elements of float64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m) or ldu<max(1,m) or ldvt<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDgesvdBufferSize, bound as cusolverDnDgesvd_bufferSize.
func (Handle) DgesvdaStridedBatched ¶
func (h Handle) DgesvdaStridedBatched(jobz EigMode, rank int32, m int32, n int32, dA driver.DevicePtr, lda int32, strideA int64, dS driver.DevicePtr, strideS int64, dU driver.DevicePtr, ldu int32, strideU int64, dV driver.DevicePtr, ldv int32, strideV int64, dWork driver.DevicePtr, lwork int32, dInfo driver.DevicePtr, hRNrmF *float64, batchSize int32) error
DgesvdaStridedBatched gesvda ( a stands for approximate) approximates the singular value decomposition of a tall skinny m×n matrix A and corresponding the left and right singular vectors.
The economy form of SVD is written by A=U*Σ*Vᴴ, where Σ is an n×n matrix. U is an m×n unitary matrix, and V is an n×n unitary matrix. The diagonal elements of Σ are the singular values of A; they are real and non-negative, and are returned in descending order. U and V are the left and right singular vectors of A. gesvda computes eigenvalues of A**T*A, or A**H*A (if A is complex), to approximate singular values and singular vectors. It generates matrices U and V and transforms the matrix A to the following form Uᴴ*A*V=S+E where S is diagonal and E depends on rounding errors. To certain conditions, U, V and S approximate singular values and singular vectors up to machine zero of single precision. In general, V is unitary, S is more accurate than U. If singular value is far from zero, then left singular vector U is accurate. In other words, the accuracy of singular values and left singular vectors depend on the distance between singular value and zero. Since the computation of A**T*A, or A**H*A can greatly amplify errors, it is recommended to use gesvda only with well-conditioned data. The input parameter rank decides the number of singular values and singular vectors are computed in parameter S, U and V. The output parameter h_RnrmF computes Frobenius norm of residual. To compute h_RnrmF, info != NULL is required. A−U*S*Vᴴ if the parameter rank is equal n. Otherwise, h_RnrmF reports ‖U*S*Vᴴ‖−‖S‖ in Frobenius norm sense, that is, how far U is from unitary. gesvdaStridedBatched performs gesvda on each matrix. It requires that all matrices are of the same size m,n and are packed in a contiguous way, A=(A0A1⋯) Each matrix is column-major with leading dimension lda, so the formula for random access is Aₖ(i,j)=A[i+lda*j+strideA*k] . Similarly, the formula for random access of S is Sₖ(j)=S[j+StrideS*k] , the formula for random access of U is Uₖ(i,j)=U[i+ldu*j+strideU*k] and the formula for random access of V is Vₖ(i,j)=V[i+ldv*j+strideV*k] . The input parameter lwork is the size of the working space, and it is returned by gesvdaStridedBatched_bufferSize(). The output parameter info is an integer array of size batchSize. If the function returns ErrInvalidValue, the first element info[0] = -i (less than zero) indicates i-th parameter is wrong (not counting handle). Otherwise, if info[i] = min(m,n)+1, gesvdaStridedBatched did not converge on the i-th matrix. If 0 < info[i] < min(m,n)+1, gesvdaStridedBatched could not compute an SVD of the i-th matrix fully; the leading singular values Si[k], 0 <= k <= info[i]-1, and corresponding singular vectors may still be useful. In this case, if h_RnrmF is requested, h_RnrmF reports the residual as if rank was set to info[i]-1. Note that the problem size is limited by the condition batchSize*stride{A/S/U/V}<=INT32_MAX primarily due to the current implementation constraints. Please visit cuSOLVER Library Samples - gesvdaStridedBatched for a code example. Remark 1: The routine returns V, not Vᴴ . This is different from gesvd. Remark 2: The routine only supports m >=n. Remark 3: It is recommended to use an FP64 data type, that is Handle.DgesvdaStridedBatched or Handle.ZgesvdaStridedBatched. Remark 4: If the user is confident on the accuracy of singular values and singular vectors, for example, certain conditions hold (required singular value is far from zero), then the performance can be improved by passing a null pointer to h_RnrmF, i.e. no computation of the residual norm.
- jobz: Specifies options to either compute singular value only or singular vectors as well: jobz = EigModeNovector : Compute singular values only; jobz = EigModeVector : Compute singular values and singular vectors
- rank: Number of singular values (from largest to smallest)
- m: Number of rows of matrix Aj
- n: Number of columns of matrix Aj
- lda: Leading dimension of two-dimensional array used to store matrix Aj
- strideA: Value of type long long int that gives the address offset between A[i] and A[i+1]. strideA is not less than lda*n
- strideS: Value of type long long int that gives the address offset between S[i] and S[i+1]. strideS is not less than rank
- ldu: Leading dimension of two-dimensional array used to store matrix Uj. ldu is not less than max(1,m)
- strideU: Value of type long long int that gives the address offset between U[i] and U[i+1]. strideU is not less than ldu*rank
- ldv: Leading dimension of two-dimensional array used to store matrix Vj. ldv is not less than max(1,n)
- strideV: Value of type long long int that gives the address offset between V[i] and V[i+1]. strideV is not less than ldv*rank
- lwork: Size of work, returned by gesvdaStridedBatched_bufferSize
- hRNrmF: array of size batchSize. h_RnrmF[i] is norm of residual of i-th matrix. If 0 < info[i] < min(m,n)+1, h_RnrmF[i] reports the residual as if rank of the i-th matrix had been set to info[i]-1
- batchSize: Number of matrices. batchSize is not less than 1
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or batchSize*stride{A/S/U/V}>INT32_MAX or lda<max(1,m) or ldu<max(1,m) or ldv<max(1,n) or strideA<lda*n or strideS<rank or strideU<ldu*rank or strideV<ldv*rank or batchSize<1 or jobz is not EigModeNovector or EigModeVector).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDgesvdaStridedBatched.
func (Handle) DgesvdaStridedBatchedBufferSize ¶
func (h Handle) DgesvdaStridedBatchedBufferSize(jobz EigMode, rank int32, m int32, n int32, dA driver.DevicePtr, lda int32, strideA int64, dS driver.DevicePtr, strideS int64, dU driver.DevicePtr, ldu int32, strideU int64, dV driver.DevicePtr, ldv int32, strideV int64, lwork *int32, batchSize int32) error
DgesvdaStridedBatchedBufferSize returns the workspace size, in elements of float64, for Handle.DgesvdaStridedBatched.
- jobz: Specifies options to either compute singular value only or singular vectors as well: jobz = EigModeNovector : Compute singular values only; jobz = EigModeVector : Compute singular values and singular vectors
- rank: Number of singular values (from largest to smallest)
- m: Number of rows of matrix Aj
- n: Number of columns of matrix Aj
- lda: Leading dimension of two-dimensional array used to store matrix Aj
- strideA: Value of type long long int that gives the address offset between A[i] and A[i+1]. strideA is not less than lda*n
- strideS: Value of type long long int that gives the address offset between S[i] and S[i+1]. strideS is not less than rank
- ldu: Leading dimension of two-dimensional array used to store matrix Uj. ldu is not less than max(1,m)
- strideU: Value of type long long int that gives the address offset between U[i] and U[i+1]. strideU is not less than ldu*rank
- ldv: Leading dimension of two-dimensional array used to store matrix Vj. ldv is not less than max(1,n)
- strideV: Value of type long long int that gives the address offset between V[i] and V[i+1]. strideV is not less than ldv*rank
- lwork: Size of work, in elements of float64
- batchSize: Number of matrices. batchSize is not less than 1
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or batchSize*stride{A/S/U/V}>INT32_MAX or lda<max(1,m) or ldu<max(1,m) or ldv<max(1,n) or strideA<lda*n or strideS<rank or strideU<ldu*rank or strideV<ldv*rank or batchSize<1 or jobz is not EigModeNovector or EigModeVector).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDgesvdaStridedBatchedBufferSize, bound as cusolverDnDgesvdaStridedBatched_bufferSize.
func (Handle) Dgesvdj ¶
func (h Handle) Dgesvdj(jobz EigMode, econ int32, m int32, n int32, a driver.DevicePtr, lda int32, s driver.DevicePtr, u driver.DevicePtr, ldu int32, v driver.DevicePtr, ldv int32, work driver.DevicePtr, lwork int32, info driver.DevicePtr, params GesvdjInfo) error
Dgesvdj computes the singular value decomposition (SVD) of an m×n matrix A and corresponding the left and/or right singular vectors.
The SVD is written: A=U*Σ*Vᴴ where Σ is an m×n matrix which is zero except for its min(m,n) diagonal elements, U is an m×m unitary matrix, and V is an n×n unitary matrix. The diagonal elements of Σ are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A. gesvdj has the same functionality as gesvd. The difference is that gesvd uses QR algorithm and gesvdj uses Jacobi method. The parallelism of Jacobi method gives GPU better performance on small and medium size matrices. Moreover the user can configure gesvdj to perform approximation up to certain accuracy. gesvdj iteratively generates a sequence of unitary matrices to transform matrix A to the following form Uᴴ*A*V=S+E where S is diagonal and diagonal of E is zero. During the iterations, the Frobenius norm of E decreases monotonically. As E goes down to zero, S is the set of singular values. In practice, Jacobi method stops if ‖E‖_(F)≤eps*‖A‖_(F) where eps is given tolerance. Note that if the real residual norm ‖S−Uᴴ*A*V‖_(F) is computed, it will differ from ‖E‖_(F) up to roundoff errors of order N=max(m,n), to still have the standard SVD accuracy expectation ‖S−Uᴴ*A*V‖_(F)O(N)*‖A‖_(F)≤‖E‖_(F)‖A‖_(F)≤eps O(N) is typically N, but the constant depends on the number of sweeps, which gives an upper roundoff error bound of sweeps*N. gesvdj has two parameters to control the accuracy. First parameter is tolerance ( eps). The default value is machine accuracy but The user can use function GesvdjInfo.XgesvdjSetTolerance to set a priori tolerance. The second parameter is maximum number of sweeps which controls number of iterations of Jacobi method. The default value is 100 but the user can use function GesvdjInfo.XgesvdjSetMaxSweeps to set a proper bound. The experiments show 15 sweeps are good enough to converge to machine accuracy. gesvdj stops either tolerance is met or maximum number of sweeps is met. Jacobi method has quadratic convergence, so the accuracy is not proportional to number of sweeps. To guarantee certain accuracy, the user should configure tolerance only. The input parameter lwork is the size of the working space, and it is returned by gesvdj_bufferSize(). If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). If info = min(m,n)+1, gesvdj does not converge under given tolerance and maximum sweeps. If the user sets an improper tolerance, gesvdj may not converge. For example, tolerance should not be smaller than machine accuracy. Please visit cuSOLVER Library Samples - gesvdj for a code example. Remark 1: gesvdj supports any combination of m and n. Remark 2: the routine returns V, not Vᴴ . This is different from gesvd.
- jobz: Specifies options to either compute singular value only or singular vectors as well: jobz = EigModeNovector : Compute singular values only; jobz = EigModeVector : Compute singular values and singular vectors
- econ: econ = 1 for economy size for U and V
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,m). On exit, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- s: Real array of dimension min(m,n). The singular values of A, sorted so that S(i) >= S(i+1)
- u: array of dimension ldu * m if econ is zero. If econ is nonzero, the dimension is ldu * min(m,n). U contains the left singular vectors
- ldu: Leading dimension of two-dimensional array used to store matrix U. ldu is not less than max(1,m)
- v: array of dimension ldv * n if econ is zero. If econ is nonzero, the dimension is ldv * min(m,n). V contains the right singular vectors
- ldv: Leading dimension of two-dimensional array used to store matrix V. ldv is not less than max(1,n)
- work: array of size lwork, working space
- lwork: Size of work, returned by gesvdj_bufferSize
- info: If info = 0, the operation is successful. if info = -i, the i-th parameter is wrong (not counting handle). if info = min(m,n)+1, gesvdj dose not converge under given tolerance and maximum sweeps
- params: Structure filled with parameters of Jacobi algorithm and results of gesvdj. params can be destroyed after the host thread exits the routine
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m) or ldu<max(1,m) or ldv<max(1,n) or jobz is not EigModeNovector or EigModeVector ).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDgesvdj.
func (Handle) DgesvdjBatched ¶
func (h Handle) DgesvdjBatched(jobz EigMode, m int32, n int32, a driver.DevicePtr, lda int32, s driver.DevicePtr, u driver.DevicePtr, ldu int32, v driver.DevicePtr, ldv int32, work driver.DevicePtr, lwork int32, info driver.DevicePtr, params GesvdjInfo, batchSize int32) error
DgesvdjBatched computes singular values and singular vectors of a sequence of general m×n matrices.
Aⱼ=Uⱼ*Σⱼ*Vⱼᴴ, where Σⱼ is a real m×n diagonal matrix which is zero except for its min(m,n) diagonal elements. Uⱼ (left singular vectors) is an m×m unitary matrix and Vⱼ (right singular vectors) is a n×n unitary matrix. The diagonal elements of Σⱼ are the singular values of Aⱼ in either descending order or non-sorting order. gesvdjBatched performs gesvdj on each matrix. It requires that all matrices are of the same size m,n no greater than 32 and are packed in contiguous way, A=(A0A1⋯) Each matrix is column-major with leading dimension lda, so the formula for random access is Aₖ(i,j)=A[i+lda*j+lda*n*k] . The parameter S also contains singular values of each matrix in contiguous way, S=(S0S1⋯) The formula for random access of S is Sₖ(j)=S[j+min(m,n)*k] . Except for tolerance and maximum sweeps, gesvdjBatched can either sort the singular values in descending order (default) or chose as-is (without sorting) by the function GesvdjInfo.XgesvdjSetSortEig. If the user packs several tiny matrices into diagonal blocks of one matrix, non-sorting option can separate singular values of those tiny matrices. gesvdjBatched cannot report residual and executed sweeps by function Handle.XgesvdjGetResidual and Handle.XgesvdjGetSweeps. Any call of the above two returns ErrNotSupported. The user needs to compute residual explicitly. The input parameter lwork is the size of the working space, and it is returned by gesvdjBatched_bufferSize(). The output parameter info is an integer array of size batchSize. If the function returns ErrInvalidValue, the first element info[0] = -i (less than zero) indicates i-th parameter is wrong (not counting handle). Otherwise, if info[i] = min(m,n)+1, gesvdjBatched does not converge on i-th matrix under given tolerance and maximum sweeps. Please visit cuSOLVER Library Samples - gesvdjBatched for a code example.
- jobz: Specifies options to either compute singular value only or singular vectors as well: jobz = EigModeNovector : Compute singular values only; jobz = EigModeVector : Compute singular values and singular vectors
- m: Number of rows of matrix Aj. m is no greater than 32
- n: Number of columns of matrix Aj. n is no greater than 32
- a: array of dimension lda * n * batchSize with lda is not less than max(1,n). on Exit: the contents of Aj are destroyed
- lda: Lading dimension of two-dimensional array used to store matrix Aj
- s: Areal array of dimension min(m,n)*batchSize. It stores the singular values of Aj in descending order or non-sorting order
- u: array of dimension ldu * m * batchSize. Uj contains the left singular vectors of Aj
- ldu: Leading dimension of two-dimensional array used to store matrix Uj. ldu is not less than max(1,m)
- v: array of dimension ldv * n * batchSize. Vj contains the right singular vectors of Aj
- ldv: Leading dimension of two-dimensional array used to store matrix Vj. ldv is not less than max(1,n)
- work: array of size lwork, working space
- lwork: Size of work, returned by gesvdjBatched_bufferSize
- info: An integer array of dimension batchSize. If ErrInvalidValue is returned, info[0] = -i (less than zero) indicates i-th parameter is wrong (not counting handle). Otherwise, if info[i] = 0, the operation is successful. if info[i] = min(m,n)+1, gesvdjBatched dose not converge on i-th matrix under given tolerance and maximum sweeps
- params: Structure filled with parameters of Jacobi algorithm. params can be destroyed after the host thread exits the routine
- batchSize: Number of matrices
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m) or ldu<max(1,m) or ldv<max(1,n) or jobz is not EigModeNovector or EigModeVector , or batchSize<0).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDgesvdjBatched.
func (Handle) DgesvdjBatchedBufferSize ¶
func (h Handle) DgesvdjBatchedBufferSize(jobz EigMode, m int32, n int32, a driver.DevicePtr, lda int32, s driver.DevicePtr, u driver.DevicePtr, ldu int32, v driver.DevicePtr, ldv int32, lwork *int32, params GesvdjInfo, batchSize int32) error
DgesvdjBatchedBufferSize returns the workspace size, in elements of float64, for Handle.DgesvdjBatched.
- jobz: Specifies options to either compute singular value only or singular vectors as well: jobz = EigModeNovector : Compute singular values only; jobz = EigModeVector : Compute singular values and singular vectors
- m: Number of rows of matrix Aj. m is no greater than 32
- n: Number of columns of matrix Aj. n is no greater than 32
- a: array of dimension lda * n * batchSize with lda is not less than max(1,n). on Exit: the contents of Aj are destroyed
- lda: Lading dimension of two-dimensional array used to store matrix Aj
- s: Areal array of dimension min(m,n)*batchSize. It stores the singular values of Aj in descending order or non-sorting order
- u: array of dimension ldu * m * batchSize. Uj contains the left singular vectors of Aj
- ldu: Leading dimension of two-dimensional array used to store matrix Uj. ldu is not less than max(1,m)
- v: array of dimension ldv * n * batchSize. Vj contains the right singular vectors of Aj
- ldv: Leading dimension of two-dimensional array used to store matrix Vj. ldv is not less than max(1,n)
- lwork: Size of work, in elements of float64
- params: Structure filled with parameters of Jacobi algorithm. params can be destroyed after the host thread exits the routine
- batchSize: Number of matrices
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m) or ldu<max(1,m) or ldv<max(1,n) or jobz is not EigModeNovector or EigModeVector , or batchSize<0).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDgesvdjBatchedBufferSize, bound as cusolverDnDgesvdjBatched_bufferSize.
func (Handle) DgesvdjBufferSize ¶
func (h Handle) DgesvdjBufferSize(jobz EigMode, econ int32, m int32, n int32, a driver.DevicePtr, lda int32, s driver.DevicePtr, u driver.DevicePtr, ldu int32, v driver.DevicePtr, ldv int32, lwork *int32, params GesvdjInfo) error
DgesvdjBufferSize returns the workspace size, in elements of float64, for Handle.Dgesvdj.
- jobz: Specifies options to either compute singular value only or singular vectors as well: jobz = EigModeNovector : Compute singular values only; jobz = EigModeVector : Compute singular values and singular vectors
- econ: econ = 1 for economy size for U and V
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,m). On exit, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- s: Real array of dimension min(m,n). The singular values of A, sorted so that S(i) >= S(i+1)
- u: array of dimension ldu * m if econ is zero. If econ is nonzero, the dimension is ldu * min(m,n). U contains the left singular vectors
- ldu: Leading dimension of two-dimensional array used to store matrix U. ldu is not less than max(1,m)
- v: array of dimension ldv * n if econ is zero. If econ is nonzero, the dimension is ldv * min(m,n). V contains the right singular vectors
- ldv: Leading dimension of two-dimensional array used to store matrix V. ldv is not less than max(1,n)
- lwork: Size of work, in elements of float64
- params: Structure filled with parameters of Jacobi algorithm and results of gesvdj. params can be destroyed after the host thread exits the routine
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m) or ldu<max(1,m) or ldv<max(1,n) or jobz is not EigModeNovector or EigModeVector ).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDgesvdjBufferSize, bound as cusolverDnDgesvdj_bufferSize.
func (Handle) Dgetrf ¶
func (h Handle) Dgetrf(m int32, n int32, a driver.DevicePtr, lda int32, workspace driver.DevicePtr, devIpiv driver.DevicePtr, devInfo driver.DevicePtr) error
Dgetrf computes the LU factorization of an m×n matrix.
P*A=L*U, where A is an m×n matrix, P is a permutation matrix, L is a lower triangular matrix with unit diagonal, and U is an upper triangular matrix. The input parameter Lwork is size of the working space, and it is returned by getrf_bufferSize(). If LU factorization failed, i.e. matrix A ( U) is singular, The output parameter devInfo=i indicates U(i,i) = 0. If devIpiv is null, no pivoting is performed. The factorization is A=L*U, which is not numerically stable. No matter LU factorization failed or not, the output parameter devIpiv contains pivoting sequence, row i is interchanged with row devIpiv(i). The user can combine getrf and getrs to complete a linear solver. Remark: getrf uses fastest implementation with large workspace of size m*n. The user can choose the legacy implementation with minimal workspace by Getrf and Params.SetAdvOptions(params, CUSOLVERDN_GETRF, Alg1).
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,m)
- lda: Leading dimension of two-dimensional array used to store matrix A
- workspace: Working space, array of size Lwork
- devIpiv: Array of size at least min(m,n), containing pivot indices
- devInfo: If devInfo = 0, the LU factorization is successful. if devInfo = -i, the i-th parameter is wrong (not counting handle). if devInfo = i, the U(i,i) = 0
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDgetrf.
func (Handle) DgetrfBufferSize ¶
DgetrfBufferSize returns the workspace size, in elements of float64, for Handle.Dgetrf.
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,m)
- lda: Leading dimension of two-dimensional array used to store matrix A
- lwork: Size of Workspace, in elements of float64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDgetrfBufferSize, bound as cusolverDnDgetrf_bufferSize.
func (Handle) Dgetrs ¶
func (h Handle) Dgetrs(trans Operation, n int32, nrhs int32, a driver.DevicePtr, lda int32, devIpiv driver.DevicePtr, b driver.DevicePtr, ldb int32, devInfo driver.DevicePtr) error
Dgetrs solves a linear system of multiple right-hand sides.
op(A)*X=B, where A is an n×n matrix, and was LU-factored by getrf, that is, lower triangular part of A is L, and upper triangular part (including diagonal elements) of A is U. B is an n×nrhs right-hand side matrix. The input parameter trans is defined by op(A) = A if trans == CUBLAS_OP_N, op(A) = Aᵀ if trans == CUBLAS_OP_T, and op(A) = Aᴴ if trans == CUBLAS_OP_C. The input parameter devIpiv is an output of getrf. It contains pivot indices, which are used to permutate right-hand sides. The user can combine getrf and getrs to complete a linear solver.
- trans: Operation op(A) that is non- or (conj.) transpose
- n: Number of rows and columns of matrix A
- nrhs: Number of right-hand sides
- a: array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- devIpiv: Array of size at least n, containing pivot indices
- b: array of dimension ldb * nrhs with ldb is not less than max(1,n)
- ldb: Leading dimension of two-dimensional array used to store matrix B
- devInfo: If devInfo = 0, the operation is successful. if devInfo = -i, the i-th parameter is wrong (not counting handle)
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n) or ldb<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDgetrs.
func (Handle) Dlaswp ¶
func (h Handle) Dlaswp(n int32, a driver.DevicePtr, lda int32, k1 int32, k2 int32, devIpiv driver.DevicePtr, incx int32) error
Dlaswp wraps cusolverDnDlaswp.
func (Handle) Dlauum ¶
func (h Handle) Dlauum(uplo FillMode, n int32, a driver.DevicePtr, lda int32, work driver.DevicePtr, lwork int32, devInfo driver.DevicePtr) error
Dlauum wraps cusolverDnDlauum.
func (Handle) DlauumBufferSize ¶
func (h Handle) DlauumBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32) (int32, error)
DlauumBufferSize wraps cusolverDnDlauumBufferSize.
Wraps cusolverDnDlauumBufferSize, bound as cusolverDnDlauum_bufferSize.
func (Handle) Dorgbr ¶
func (h Handle) Dorgbr(side SideMode, m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Dorgbr generates one of the unitary matrices Q or P**H determined by gebrd when reducing a matrix A to bidiagonal form: Qᴴ*A*P=B.
Q and P**H are defined as products of elementary reflectors H(i) or G(i) respectively. The input parameter lwork is size of the working space, and it is returned by orgbr_bufferSize().
- side: If side = CUBLAS_SIDE_LEFT, generate Q. if side = CUBLAS_SIDE_RIGHT, generate P**T
- m: Number of rows of matrix Q or P**T
- n: If side = CUBLAS_SIDE_LEFT, m>= n>= min(m,k). if side = CUBLAS_SIDE_RIGHT, n>= m>= min(n,k)
- k: If side = CUBLAS_SIDE_LEFT, the number of columns in the original m-by-k matrix reduced by gebrd. if side = CUBLAS_SIDE_RIGHT, the number of rows in the original k-by-n matrix reduced by gebrd
- 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
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m)
- 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
- work: Working space, array of size lwork
- lwork: Size of working array work
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or wrong lda ).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDorgbr.
func (Handle) DorgbrBufferSize ¶
func (h Handle) DorgbrBufferSize(side SideMode, m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr) (int32, error)
DorgbrBufferSize returns the workspace size, in elements of float64, for Handle.Dorgbr.
- side: If side = CUBLAS_SIDE_LEFT, generate Q. if side = CUBLAS_SIDE_RIGHT, generate P**T
- m: Number of rows of matrix Q or P**T
- n: If side = CUBLAS_SIDE_LEFT, m>= n>= min(m,k). if side = CUBLAS_SIDE_RIGHT, n>= m>= min(n,k)
- k: If side = CUBLAS_SIDE_LEFT, the number of columns in the original m-by-k matrix reduced by gebrd. if side = CUBLAS_SIDE_RIGHT, the number of rows in the original k-by-n matrix reduced by gebrd
- 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
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m)
- 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
- lwork: Size of work, in elements of float64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or wrong lda ).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDorgbrBufferSize, bound as cusolverDnDorgbr_bufferSize.
func (Handle) Dorgqr ¶
func (h Handle) Dorgqr(m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Dorgqr overwrites m×n matrix A.
Q=H(1)*H(2)*...*H(k), where Q is a unitary matrix formed by a sequence of elementary reflection vectors stored in A. The input parameter lwork is size of the working space, and it is returned by orgqr_bufferSize(). The user can combine geqrf, orgqr to complete orthogonalization.
- m: Number of rows of matrix Q. m >= 0
- n: Number of columns of matrix Q. m >= n >= 0
- k: Number of elementary reflections whose product defines the matrix Q. n >= k >= 0
- a: array of dimension lda * n with lda is not less than max(1,m). i-th column of A contains elementary reflection vector
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m)
- tau: array of dimension k. tau(i) is the scalar of i-th elementary reflection vector
- work: Working space, array of size lwork
- lwork: Size of working array work
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n,k<0, n>m, k>n or lda<m).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDorgqr.
func (Handle) DorgqrBufferSize ¶
func (h Handle) DorgqrBufferSize(m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr) (int32, error)
DorgqrBufferSize returns the workspace size, in elements of float64, for Handle.Dorgqr.
- m: Number of rows of matrix Q. m >= 0
- n: Number of columns of matrix Q. m >= n >= 0
- k: Number of elementary reflections whose product defines the matrix Q. n >= k >= 0
- a: array of dimension lda * n with lda is not less than max(1,m). i-th column of A contains elementary reflection vector
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m)
- tau: array of dimension k. tau(i) is the scalar of i-th elementary reflection vector
- lwork: Size of work, in elements of float64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n,k<0, n>m, k>n or lda<m).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDorgqrBufferSize, bound as cusolverDnDorgqr_bufferSize.
func (Handle) Dorgtr ¶
func (h Handle) Dorgtr(uplo FillMode, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Dorgtr generates a unitary matrix Q which is defined as the product of n-1 elementary reflectors of order n, as returned by sytrd:
The input parameter lwork is size of the working space, and it is returned by orgtr_bufferSize().
- 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
- n: Number of rows (columns) of matrix Q
- 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
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,n)
- tau: array of dimension (n-1) tau(i) is the scalar of i-th elementary reflection vector
- work: Working space, array of size lwork
- lwork: Size of working array work
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or wrong lda).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDorgtr.
func (Handle) DorgtrBufferSize ¶
func (h Handle) DorgtrBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr) (int32, error)
DorgtrBufferSize returns the workspace size, in elements of float64, for Handle.Dorgtr.
- 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
- n: Number of rows (columns) of matrix Q
- 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
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,n)
- tau: array of dimension (n-1) tau(i) is the scalar of i-th elementary reflection vector
- lwork: Size of work, in elements of float64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or wrong lda).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDorgtrBufferSize, bound as cusolverDnDorgtr_bufferSize.
func (Handle) Dormqr ¶
func (h Handle) Dormqr(side SideMode, trans Operation, m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, c driver.DevicePtr, ldc int32, work driver.DevicePtr, lwork int32, devInfo driver.DevicePtr) error
Dormqr overwrites m×n matrix C.
C = op(Q)*C if side == CUBLAS_SIDE_LEFT, and C = C*op(Q) if side == CUBLAS_SIDE_RIGHT. The operation of Q is defined by op(Q) = Q if trans == CUBLAS_OP_N, op(Q) = Qᵀ if trans == CUBLAS_OP_T, and op(Q) = Qᴴ if trans == CUBLAS_OP_C. Q is a unitary matrix formed by a sequence of elementary reflection vectors from QR factorization ( geqrf) of A. Q = H(1) H(2) … H(k) Q is of order m if side = CUBLAS_SIDE_LEFT and of order n if side = CUBLAS_SIDE_RIGHT. The input parameter lwork is size of the working space, and it is returned by geqrf_bufferSize() or ormqr_bufferSize(). The user can combine geqrf, ormqr and trsm to complete a linear solver or a least-square solver.
- side: Indicates if matrix Q is on the left or right of C
- trans: Operation op(Q) that is non- or (conj.) transpose
- m: Number of rows of matrix C
- n: Number of columns of matrix C
- k: Number of elementary reflections whose product defines the matrix Q. If side is CUBLAS_SIDE_LEFT, m >= k >= 0; if side is CUBLAS_SIDE_RIGHT, n >= k >= 0
- a: array of dimension lda * k with lda is not less than max(1,m). The matrix A is from geqrf, so i-th column contains elementary reflection vector
- 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)
- tau: array of dimension k. The vector tau is from geqrf, so tau(i) is the scalar of the i-th elementary reflection vector
- c: array of size ldc * n. On exit, C is overwritten by op(Q)*C or C*op(Q)
- ldc: Leading dimension of two-dimensional array of matrix C. ldc >= max(1,m)
- work: Working space, array of size lwork
- lwork: Size of working array work
- devInfo: If devInfo = 0, the ormqr is successful. If devInfo = -i, the i-th parameter is wrong (not counting handle)
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n,k<0, k > m if CUBLAS_SIDE_LEFT, k > n if CUBLAS_SIDE_RIGHT, wrong lda or ldc or invalid trans).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDormqr.
func (Handle) DormqrBufferSize ¶
func (h Handle) DormqrBufferSize(side SideMode, trans Operation, m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, c driver.DevicePtr, ldc int32) (int32, error)
DormqrBufferSize returns the workspace size, in elements of float64, for Handle.Dormqr.
- side: Indicates if matrix Q is on the left or right of C
- trans: Operation op(Q) that is non- or (conj.) transpose
- m: Number of rows of matrix C
- n: Number of columns of matrix C
- k: Number of elementary reflections whose product defines the matrix Q. If side is CUBLAS_SIDE_LEFT, m >= k >= 0; if side is CUBLAS_SIDE_RIGHT, n >= k >= 0
- a: array of dimension lda * k with lda is not less than max(1,m). The matrix A is from geqrf, so i-th column contains elementary reflection vector
- 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)
- tau: array of dimension k. The vector tau is from geqrf, so tau(i) is the scalar of the i-th elementary reflection vector
- c: array of size ldc * n. On exit, C is overwritten by op(Q)*C or C*op(Q)
- ldc: Leading dimension of two-dimensional array of matrix C. ldc >= max(1,m)
- lwork: Size of work, in elements of float64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n,k<0, k > m if CUBLAS_SIDE_LEFT, k > n if CUBLAS_SIDE_RIGHT, wrong lda or ldc or invalid trans).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDormqrBufferSize, bound as cusolverDnDormqr_bufferSize.
func (Handle) Dormtr ¶
func (h Handle) Dormtr(side SideMode, uplo FillMode, trans Operation, m int32, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, c driver.DevicePtr, ldc int32, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Dormtr overwrites m×n matrix C.
C = op(Q)*C if side == CUBLAS_SIDE_LEFT, and C = C*op(Q) if side == CUBLAS_SIDE_RIGHT, where Q is a unitary matrix formed by a sequence of elementary reflection vectors from sytrd. The operation on Q is defined by op(Q) = Q if trans == CUBLAS_OP_N, op(Q) = Qᵀ if trans == CUBLAS_OP_T, and op(Q) = Qᴴ if trans == CUBLAS_OP_C. The input parameter lwork is size of the working space, and it is returned by ormtr_bufferSize().
- side: side = CUBLAS_SIDE_LEFT, apply Q or Q**T from the Left; side = CUBLAS_SIDE_RIGHT, apply Q or Q**T from the Right
- 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
- trans: Operation op(Q) that is non- or (conj.) transpose
- m: Number of rows of matrix C
- n: Number of columns of matrix C
- 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
- 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)
- 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
- c: array of size ldc * n. On exit, C is overwritten by op(Q)*C or C*op(Q)
- ldc: Leading dimension of two-dimensional array of matrix C. ldc >= max(1,m)
- work: Working space, array of size lwork
- lwork: Size of working array work
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or wrong lda or ldc).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDormtr.
func (Handle) DormtrBufferSize ¶
func (h Handle) DormtrBufferSize(side SideMode, uplo FillMode, trans Operation, m int32, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, c driver.DevicePtr, ldc int32) (int32, error)
DormtrBufferSize returns the workspace size, in elements of float64, for Handle.Dormtr.
- side: side = CUBLAS_SIDE_LEFT, apply Q or Q**T from the Left; side = CUBLAS_SIDE_RIGHT, apply Q or Q**T from the Right
- 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
- trans: Operation op(Q) that is non- or (conj.) transpose
- m: Number of rows of matrix C
- n: Number of columns of matrix C
- 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
- 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)
- 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
- c: array of size ldc * n. On exit, C is overwritten by op(Q)*C or C*op(Q)
- ldc: Leading dimension of two-dimensional array of matrix C. ldc >= max(1,m)
- lwork: Size of work, in elements of float64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or wrong lda or ldc).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDormtrBufferSize, bound as cusolverDnDormtr_bufferSize.
func (Handle) Dpotrf ¶
func (h Handle) Dpotrf(uplo FillMode, n int32, a driver.DevicePtr, lda int32, workspace driver.DevicePtr, lwork int32, devInfo driver.DevicePtr) error
Dpotrf computes the Cholesky factorization of a Hermitian positive-definite matrix.
A is an n×n Hermitian matrix, only the lower or upper part is meaningful. The input parameter uplo indicates which part of the matrix is used. The function will leave the other part untouched. If input parameter uplo is CUBLAS_FILL_MODE_LOWER, only the lower triangular part of A is processed, and replaced by the lower triangular Cholesky factor L. A=L*Lᴴ If input parameter uplo is CUBLAS_FILL_MODE_UPPER, only upper triangular part of A is processed, and replaced by upper triangular Cholesky factor U. A=Uᴴ*U The input parameter Lwork is size of the working space, and it is returned by potrf_bufferSize(). If Cholesky factorization failed, i.e. some leading minor of A is not positive definite, or equivalently some diagonal elements of L or U is not a real number. The output parameter devInfo would indicate smallest leading minor of A which is not positive definite.
- uplo: Indicates if matrix A lower or upper part is stored; the other part is not referenced
- n: Number of rows and columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- workspace: Working space, array of size Lwork
- lwork: Size of Workspace, returned by potrf_bufferSize
- devInfo: If devInfo = 0, the Cholesky factorization is successful. if devInfo = -i, the i-th parameter is wrong (not counting handle). if devInfo = i, the leading minor of order i is not positive definite
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDpotrf.
func (Handle) DpotrfBatched ¶
func (h Handle) DpotrfBatched(uplo FillMode, n int32, aarray driver.DevicePtr, lda int32, infoArray driver.DevicePtr, batchSize int32) error
DpotrfBatched computes the Cholesky factorization of a sequence of Hermitian positive-definite matrices.
Each Aarray[i] for i=0,1,..., batchSize-1 is a n×n Hermitian matrix, only lower or upper part is meaningful. The input parameter uplo indicates which part of the matrix is used. If input parameter uplo is CUBLAS_FILL_MODE_LOWER, only lower triangular part of A is processed, and replaced by lower triangular Cholesky factor L. A=L*Lᴴ If input parameter uplo is CUBLAS_FILL_MODE_UPPER, only upper triangular part of A is processed, and replaced by upper triangular Cholesky factor U. A=Uᴴ*U If Cholesky factorization failed, i.e. some leading minor of A is not positive definite, or equivalently some diagonal elements of L or U is not a real number. The output parameter infoArray would indicate smallest leading minor of A which is not positive definite. infoArray is an integer array of size batchsize. If potrfBatched returns ErrInvalidValue, infoArray[0] = -i (less than zero), meaning that the i-th parameter is wrong (not counting handle). If potrfBatched returns Success but infoArray[i] = k is positive, then i-th matrix is not positive definite and the Cholesky factorization failed at row k. Remark: the other part of A is used as a workspace. For example, if uplo is CUBLAS_FILL_MODE_UPPER, upper triangle of A contains Cholesky factor U and lower triangle of A is destroyed after potrfBatched.
- uplo: Indicates if lower or upper part is stored; the other part is used as a workspace
- n: Number of rows and columns of matrix A
- aarray: Array of pointers to array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store each matrix Aarray[i]
- infoArray: Array of size batchSize. infoArray[i] contains information of factorization of Aarray[i]. if potrfBatched returns ErrInvalidValue, infoArray[0] = -i (less than zero) means the i-th parameter is wrong (not counting handle). if potrfBatched returns Success, infoArray[i] = 0 means the Cholesky factorization of i-th matrix is successful, and infoArray[i] = k means the leading submatrix of order k of i-th matrix is not positive definite
- batchSize: Number of pointers in Aarray
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n) or batchSize<1).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDpotrfBatched.
func (Handle) DpotrfBufferSize ¶
func (h Handle) DpotrfBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32) (int32, error)
DpotrfBufferSize returns the workspace size, in elements of float64, for Handle.Dpotrf.
- uplo: Indicates if matrix A lower or upper part is stored; the other part is not referenced
- n: Number of rows and columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- lwork: Size of Workspace, in elements of float64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDpotrfBufferSize, bound as cusolverDnDpotrf_bufferSize.
func (Handle) Dpotri ¶
func (h Handle) Dpotri(uplo FillMode, n int32, a driver.DevicePtr, lda int32, work driver.DevicePtr, lwork int32, devInfo driver.DevicePtr) error
Dpotri computes the inverse of a positive-definite matrix A using the Cholesky factorization.
A=L*Lᴴ=Uᴴ*U, computed by potrf(). A is an n×n matrix containing the triangular factor L or U computed by the Cholesky factorization. Only lower or upper part is meaningful and the input parameter uplo indicates which part of the matrix is used. The function would leave the other part untouched. If the input parameter uplo is CUBLAS_FILL_MODE_LOWER, only lower triangular part of A is processed, and replaced the by lower triangular part of the inverse of A. If the input parameter uplo is CUBLAS_FILL_MODE_UPPER, only upper triangular part of A is processed, and replaced by the upper triangular part of the inverse of A. The input parameter Lwork is the size of the working space, returned by potri_bufferSize(). If the computation of the inverse fails, i.e. some leading minor of L or U, is null, the output parameter devInfo would indicate the smallest leading minor of L or U which is not positive definite.
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- n: Number of rows and columns of matrix A
- a: array of dimension lda * n where lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- lwork: Size of Workspace, returned by potri_bufferSize
- devInfo: If devInfo = 0, the computation of the inverse is successful. if devInfo = -i, the i-th parameter is wrong (not counting handle). if devInfo = i, the leading minor of order i is zero
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDpotri.
func (Handle) DpotriBufferSize ¶
func (h Handle) DpotriBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32) (int32, error)
DpotriBufferSize returns the workspace size, in elements of float64, for Handle.Dpotri.
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- n: Number of rows and columns of matrix A
- a: array of dimension lda * n where lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- lwork: Size of Workspace, in elements of float64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDpotriBufferSize, bound as cusolverDnDpotri_bufferSize.
func (Handle) Dpotrs ¶
func (h Handle) Dpotrs(uplo FillMode, n int32, nrhs int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, devInfo driver.DevicePtr) error
Dpotrs solves a system of linear equations.
A*X=B, where A is an n×n Hermitian matrix, only lower or upper part is meaningful. The input parameter uplo indicates which part of the matrix is used. The function will leave the other part untouched. The user has to call potrf first to factorize matrix A. If input parameter uplo is CUBLAS_FILL_MODE_LOWER, A is lower triangular Cholesky factor L corresponding to A=L*Lᴴ . If input parameter uplo is CUBLAS_FILL_MODE_UPPER, A is upper triangular Cholesky factor U corresponding to A=Uᴴ*U . The operation is in-place, i.e. matrix X overwrites matrix B with the same leading dimension ldb.
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- n: Number of rows and columns of matrix A
- nrhs: Number of columns of matrix X and B
- 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
- lda: Leading dimension of two-dimensional array used to store matrix A
- 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
- devInfo: If devInfo = 0, the Cholesky factorization is successful. if devInfo = -i, the i-th parameter is wrong (not counting handle)
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, nrhs<0, lda<max(1,n) or ldb<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDpotrs.
func (Handle) DpotrsBatched ¶
func (h Handle) DpotrsBatched(uplo FillMode, n int32, nrhs int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, dInfo driver.DevicePtr, batchSize int32) error
DpotrsBatched solves a sequence of linear systems.
A[i]*X[i]=B[i], where each Aarray[i] for i=0,1,..., batchSize-1 is a n×n Hermitian matrix, only lower or upper part is meaningful. The input parameter uplo indicates which part of the matrix is used. The user has to call potrfBatched first to factorize matrix Aarray[i]. If input parameter uplo is CUBLAS_FILL_MODE_LOWER, A is lower triangular Cholesky factor L corresponding to A=L*Lᴴ . If input parameter uplo is CUBLAS_FILL_MODE_UPPER, A is upper triangular Cholesky factor U corresponding to A=Uᴴ*U . The operation is in-place, i.e. matrix X overwrites matrix B with the same leading dimension ldb. The output parameter info is a scalar. If info = -i (less than zero), the i-th parameter is wrong (not counting handle). Remark 1: only nrhs=1 is supported. Remark 2: infoArray from potrfBatched indicates if the matrix is positive definite. info from potrsBatched only shows which input parameter is wrong (not counting handle). Remark 3: the other part of A is used as a workspace. For example, if uplo is CUBLAS_FILL_MODE_UPPER, upper triangle of A contains Cholesky factor U and lower triangle of A is destroyed after potrsBatched. Please visit cuSOLVER Library Samples - potrfBatched for a code example.
- uplo: Indicates if matrix A lower or upper part is stored
- n: Number of rows and columns of matrix A
- nrhs: Number of columns of matrix X and B
- lda: Leading dimension of two-dimensional array used to store each matrix Aarray[i]
- ldb: Leading dimension of two-dimensional array used to store each matrix Barray[i]
- batchSize: Number of pointers in Aarray
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, nrhs<0, lda<max(1,n), ldb<max(1,n) or batchSize<0).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDpotrsBatched.
func (Handle) Dsyevd ¶
func (h Handle) Dsyevd(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, w driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Dsyevd computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix A.
The standard symmetric eigenvalue problem is A*V=V*Λ, where Λ is a real n×n diagonal matrix. V is an n×n unitary matrix. The diagonal elements of Λ are the eigenvalues of A in ascending order. The input parameter lwork is size of the working space, and it is returned by syevd_bufferSize(). If devInfo = i (greater than zero), i off-diagonal elements of an intermediate tridiagonal form did not converge to zero. If jobz = EigModeVector, A contains the orthonormal eigenvectors of the matrix A. The eigenvectors are computed by a divide and conquer algorithm. Please visit cuSOLVER Library Samples - syevd for a code example.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- w: A real array of dimension n. The eigenvalue values of A, in ascending order ie, sorted so that W(i) <= W(i+1)
- work: Working space, array of size lwork
- lwork: Size of work, returned by syevd_bufferSize
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDsyevd.
func (Handle) DsyevdBufferSize ¶
func (h Handle) DsyevdBufferSize(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, w driver.DevicePtr) (int32, error)
DsyevdBufferSize returns the workspace size, in elements of float64, for Handle.Dsyevd.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- w: A real array of dimension n. The eigenvalue values of A, in ascending order ie, sorted so that W(i) <= W(i+1)
- lwork: Size of work, in elements of float64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDsyevdBufferSize, bound as cusolverDnDsyevd_bufferSize.
func (Handle) Dsyevdx ¶
func (h Handle) Dsyevdx(jobz EigMode, range_ EigRange, uplo FillMode, n int32, a driver.DevicePtr, lda int32, vl float64, vu float64, il int32, iu int32, meig *int32, w driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Dsyevdx computes all or selection of the eigenvalues and optionally eigenvectors of a symmetric (Hermitian) n×n matrix A.
The standard symmetric eigenvalue problem is: A*V=V*Λ where Λ is a real n×h_meig diagonal matrix. V is an n×h_meig unitary matrix. h_meig is the number of eigenvalues/eigenvectors computed by the routine, h_meig is equal to n when the whole spectrum (e.g., range = EigRangeAll) is requested. The diagonal elements of Λ are the eigenvalues of A in ascending order. The input parameter lwork is size of the working space, and it is returned by syevdx_bufferSize(). If devInfo = i (greater than zero), i off-diagonal elements of an intermediate tridiagonal form did not converge to zero. If jobz = EigModeVector, A contains the orthonormal eigenvectors of the matrix A. The eigenvectors are computed by a divide and conquer algorithm. Please visit cuSOLVER Library Samples - syevdx for a code example.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- range_: Specifies options to which selection of eigenvalues and optionally eigenvectors that need to be computed: range = EigRangeAll : all eigenvalues/eigenvectors will be found, will becomes the classical syevd/heevd routine; range = EigRangeV : all eigenvalues/eigenvectors in the half-open interval (vl,vu] will be found; range = EigRangeI : the il-th through iu-th eigenvalues/eigenvectors will be found
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- vl: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user wants to be sure not to miss any eigenvalue within the interval bound, we suggest that the user subtract/add epsilon (machine precision) to the interval bound such as (vl=vl-eps, vu=vu+eps]. This suggestion is valid for any selective routine from cuSolver or LAPACK
- vu: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user wants to be sure not to miss any eigenvalue within the interval bound, we suggest that the user subtract/add epsilon (machine precision) to the interval bound such as (vl=vl-eps, vu=vu+eps]. This suggestion is valid for any selective routine from cuSolver or LAPACK
- il: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- iu: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- w: A real array of dimension n. The eigenvalue values of A, in ascending order ie, sorted so that W(i) <= W(i+1)
- work: Working space, array of size lwork
- lwork: Size of work, returned by syevdx_bufferSize
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or range is not EigRangeAll or EigRangeV or EigRangeI, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDsyevdx.
func (Handle) DsyevdxBufferSize ¶
func (h Handle) DsyevdxBufferSize(jobz EigMode, range_ EigRange, uplo FillMode, n int32, a driver.DevicePtr, lda int32, vl float64, vu float64, il int32, iu int32, w driver.DevicePtr) (meig int32, lwork int32, err error)
DsyevdxBufferSize returns the workspace size, in elements of float64, for Handle.Dsyevdx.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- range_: Specifies options to which selection of eigenvalues and optionally eigenvectors that need to be computed: range = EigRangeAll : all eigenvalues/eigenvectors will be found, will becomes the classical syevd/heevd routine; range = EigRangeV : all eigenvalues/eigenvectors in the half-open interval (vl,vu] will be found; range = EigRangeI : the il-th through iu-th eigenvalues/eigenvectors will be found
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- vl: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user wants to be sure not to miss any eigenvalue within the interval bound, we suggest that the user subtract/add epsilon (machine precision) to the interval bound such as (vl=vl-eps, vu=vu+eps]. This suggestion is valid for any selective routine from cuSolver or LAPACK
- vu: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user wants to be sure not to miss any eigenvalue within the interval bound, we suggest that the user subtract/add epsilon (machine precision) to the interval bound such as (vl=vl-eps, vu=vu+eps]. This suggestion is valid for any selective routine from cuSolver or LAPACK
- il: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- iu: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- w: A real array of dimension n. The eigenvalue values of A, in ascending order ie, sorted so that W(i) <= W(i+1)
- lwork: Size of work, in elements of float64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or range is not EigRangeAll or EigRangeV or EigRangeI, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDsyevdxBufferSize, bound as cusolverDnDsyevdx_bufferSize.
func (Handle) Dsyevj ¶
func (h Handle) Dsyevj(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, w driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr, params SyevjInfo) error
Dsyevj computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix A.
The standard symmetric eigenvalue problem is A*Q=Q*Λ, where Λ is a real n×n diagonal matrix. Q is an n×n unitary matrix. The diagonal elements of Λ are the eigenvalues of A in ascending order. syevj has the same functionality as syevd. The difference is that syevd uses QR algorithm and syevj uses Jacobi method. The parallelism of Jacobi method gives GPU better performance on small and medium size matrices. Moreover the user can configure syevj to perform approximation up to certain accuracy. How does it work? syevj iteratively generates a sequence of unitary matrices to transform matrix A to the following form Vᴴ*A*V=W+E where W is diagonal and E is symmetric without diagonal. During the iterations, the Frobenius norm of E decreases monotonically. As E goes down to zero, W is the set of eigenvalues. In practice, Jacobi method stops if ‖E‖_(F)≤eps*‖A‖_(F) where eps is the given tolerance. syevj has two parameters to control the accuracy. First parameter is tolerance ( eps). The default value is machine accuracy but The user can use function SyevjInfo.XsyevjSetTolerance to set a priori tolerance. The second parameter is maximum number of sweeps which controls number of iterations of Jacobi method. The default value is 100 but the user can use function SyevjInfo.XsyevjSetMaxSweeps to set a proper bound. The experiments show 15 sweeps are good enough to converge to machine accuracy. syevj stops either tolerance is met or maximum number of sweeps is met. The Jacobi method has quadratic convergence, so the accuracy is not proportional to number of sweeps. To guarantee certain accuracy, the user should configure tolerance only. After syevj, the user can query residual by function Handle.XsyevjGetResidual and number of executed sweeps by function Handle.XsyevjGetSweeps. However the user needs to be aware that residual is the Frobenius norm of E, not accuracy of individual eigenvalue, i.e. residual=‖E‖_(F)=‖Λ−W‖_(F) The input parameter lwork is the size of the working space, and it is returned by syevj_bufferSize(). If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). If info = n+1, syevj does not converge under given tolerance and maximum sweeps. If the user sets an improper tolerance, syevj may not converge. For example, tolerance should not be smaller than machine accuracy. If jobz = EigModeVector, A contains the orthonormal eigenvectors V. Please visit cuSOLVER Library Samples - syevj for a code example.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and info = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- w: A real array of dimension n. The eigenvalue values of A, in ascending order ie, sorted so that W(i) <= W(i+1)
- work: Working space, array of size lwork
- lwork: Size of work, returned by syevj_bufferSize
- info: If info = 0, the operation is successful. If info = -i, the i-th parameter is wrong (not counting handle). If info = n+1, syevj does not converge under given tolerance and maximum sweeps
- params: Structure filled with parameters of Jacobi algorithm and results of syevj
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDsyevj.
func (Handle) DsyevjBatched ¶
func (h Handle) DsyevjBatched(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, w driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr, params SyevjInfo, batchSize int32) error
DsyevjBatched computes eigenvalues and eigenvectors of a sequence of symmetric (Hermitian) n×n matrices.
Aⱼ*Qⱼ=Qⱼ*Λⱼ, where Λⱼ is a real n×n diagonal matrix. Qⱼ is an n×n unitary matrix. The diagonal elements of Λⱼ are the eigenvalues of Aⱼ in either ascending order or non-sorting order. syevjBatched performs syevj on each matrix. It requires that all matrices are of the same size n and are packed in contiguous way, A=(A0A1⋯) Each matrix is column-major with leading dimension lda, so the formula for random access is Aₖ(i,j)=A[i+lda*j+lda*n*k] . The parameter W also contains eigenvalues of each matrix in contiguous way, W=(W0W1⋯) The formula for random access of W is Wₖ(j)=W[j+n*k] . Except for tolerance and maximum sweeps, syevjBatched can either sort the eigenvalues in ascending order (default) or chose as-is (without sorting) by the function SyevjInfo.XsyevjSetSortEig. If the user packs several tiny matrices into diagonal blocks of one matrix, non-sorting option can separate spectrum of those tiny matrices. syevjBatched cannot report residual and executed sweeps by function Handle.XsyevjGetResidual and Handle.XsyevjGetSweeps. Any call of the above two returns ErrNotSupported. The user needs to compute residual explicitly. The input parameter lwork is the size of the working space, and it is returned by syevjBatched_bufferSize(). The output parameter info is an integer array of size batchSize. If the function returns ErrInvalidValue, the first element info[0] = -i (less than zero) indicates i-th parameter is wrong (not counting handle). Otherwise, if info[i] = n+1, syevjBatched does not converge on i-th matrix under given tolerance and maximum sweeps. If jobz = EigModeVector, Aⱼ contains the orthonormal eigenvectors Vⱼ. Please visit cuSOLVER Library Samples - syevjBatched for a code example.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of Aj is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of Aj is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of Aj is stored
- n: Number of rows (or columns) of matrix each Aj
- a: array of dimension lda * n * batchSize with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of Aj contains the upper triangular part of the matrix Aj. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of Aj contains the lower triangular part of the matrix Aj. On exit, if jobz = EigModeVector, and info[j] = 0, Aj contains the orthonormal eigenvectors of the matrix Aj. If jobz = EigModeNovector, the contents of Aj are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix Aj
- w: A real array of dimension n*batchSize. It stores the eigenvalues of Aj in ascending order or non-sorting order
- work: array of size lwork, workspace
- lwork: Size of work, returned by syevjBatched_bufferSize
- info: An integer array of dimension batchSize. If ErrInvalidValue is returned, info[0] = -i (less than zero) indicates i-th parameter is wrong (not counting handle). Otherwise, if info[i] = 0, the operation is successful. If info[i] = n+1, syevjBatched does not converge on i-th matrix under given tolerance and maximum sweeps
- params: Structure filled with parameters of Jacobi algorithm
- batchSize: Number of matrices
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER), or batchSize<0.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDsyevjBatched.
func (Handle) DsyevjBatchedBufferSize ¶
func (h Handle) DsyevjBatchedBufferSize(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, w driver.DevicePtr, lwork *int32, params SyevjInfo, batchSize int32) error
DsyevjBatchedBufferSize returns the workspace size, in elements of float64, for Handle.DsyevjBatched.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of Aj is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of Aj is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of Aj is stored
- n: Number of rows (or columns) of matrix each Aj
- a: array of dimension lda * n * batchSize with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of Aj contains the upper triangular part of the matrix Aj. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of Aj contains the lower triangular part of the matrix Aj. On exit, if jobz = EigModeVector, and info[j] = 0, Aj contains the orthonormal eigenvectors of the matrix Aj. If jobz = EigModeNovector, the contents of Aj are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix Aj
- w: A real array of dimension n*batchSize. It stores the eigenvalues of Aj in ascending order or non-sorting order
- lwork: Size of work, in elements of float64
- params: Structure filled with parameters of Jacobi algorithm
- batchSize: Number of matrices
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER), or batchSize<0.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDsyevjBatchedBufferSize, bound as cusolverDnDsyevjBatched_bufferSize.
func (Handle) DsyevjBufferSize ¶
func (h Handle) DsyevjBufferSize(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, w driver.DevicePtr, lwork *int32, params SyevjInfo) error
DsyevjBufferSize returns the workspace size, in elements of float64, for Handle.Dsyevj.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and info = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- w: A real array of dimension n. The eigenvalue values of A, in ascending order ie, sorted so that W(i) <= W(i+1)
- lwork: Size of work, in elements of float64
- params: Structure filled with parameters of Jacobi algorithm and results of syevj
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDsyevjBufferSize, bound as cusolverDnDsyevj_bufferSize.
func (Handle) Dsygvd ¶
func (h Handle) Dsygvd(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, w driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Dsygvd computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix-pair ( A, B).
The generalized symmetric-definite eigenvalue problem is A*V = B*V*Λ if itype == EigType1, A*B*V = V*Λ if itype == EigType2, and B*A*V = V*Λ if itype == EigType3, where the matrix B is positive definite. Λ is a real n×n diagonal matrix. The diagonal elements of Λ are the eigenvalues of ( A, B) in ascending order. V is an n×n orthogonal matrix. The eigenvectors are normalized as follows: Vᴴ*B*V = I if itype == EigType1 or EigType2, and Vᴴ*inv(B)*V = I if itype == EigType3. The input parameter lwork is size of the working space, and it is returned by sygvd_bufferSize(). If devInfo = i (i > 0 and i<=n) and jobz = EigModeNovector, i off-diagonal elements of an intermediate tridiagonal form did not converge to zero. If devInfo = N + i (i > 0), then the leading minor of order i of B is not positive definite. The factorization of B could not be completed and no eigenvalues or eigenvectors were computed. if jobz = EigModeVector, A contains the orthogonal eigenvectors of the matrix A. The eigenvectors are computed by divide and conquer algorithm. Please visit cuSOLVER Library Samples - sygvd for a code example.
- itype: Specifies the problem type to be solved: itype =[EigType1]: A*x = (lambda)*B*x. itype =[EigType2]: A*B*x = (lambda)*x. itype =[EigType3]: B*A*x = (lambda)*x
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A and B are stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A and B are stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A and B are stored
- n: Number of rows (or columns) of matrix A and B
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- b: array of dimension ldb * n. If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of B contains the upper triangular part of the matrix B. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of B contains the lower triangular part of the matrix B. On exit, if devInfo is less than n, B is overwritten by triangular factor U or L from the Cholesky factorization of B
- ldb: Leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n)
- w: A real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1)
- work: Working space, array of size lwork
- lwork: Size of work, returned by sygvd_bufferSize
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or ldb<max(1,n), or itype is not 1, 2 or 3, or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDsygvd.
func (Handle) DsygvdBufferSize ¶
func (h Handle) DsygvdBufferSize(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, w driver.DevicePtr) (int32, error)
DsygvdBufferSize returns the workspace size, in elements of float64, for Handle.Dsygvd.
- itype: Specifies the problem type to be solved: itype =[EigType1]: A*x = (lambda)*B*x. itype =[EigType2]: A*B*x = (lambda)*x. itype =[EigType3]: B*A*x = (lambda)*x
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A and B are stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A and B are stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A and B are stored
- n: Number of rows (or columns) of matrix A and B
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- b: array of dimension ldb * n. If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of B contains the upper triangular part of the matrix B. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of B contains the lower triangular part of the matrix B. On exit, if devInfo is less than n, B is overwritten by triangular factor U or L from the Cholesky factorization of B
- ldb: Leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n)
- w: A real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1)
- lwork: Size of work, in elements of float64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or ldb<max(1,n), or itype is not 1, 2 or 3, or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDsygvdBufferSize, bound as cusolverDnDsygvd_bufferSize.
func (Handle) Dsygvdx ¶
func (h Handle) Dsygvdx(itype EigType, jobz EigMode, range_ EigRange, uplo FillMode, n int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, vl float64, vu float64, il int32, iu int32, meig *int32, w driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Dsygvdx computes all or selection of the eigenvalues and optionally eigenvectors of a symmetric (Hermitian) n×n matrix-pair ( A, B).
The generalized symmetric-definite eigenvalue problem is A*V = B*V*Λ if itype == EigType1, A*B*V = V*Λ if itype == EigType2, and B*A*V = V*Λ if itype == EigType3, where the matrix B is positive definite. Λ is a real n×h_meig diagonal matrix. The diagonal elements of Λ are the eigenvalues of ( A, B) in ascending order. V is an n×h_meig orthogonal matrix. h_meig is the number of eigenvalues/eigenvectors computed by the routine, h_meig is equal to n when the whole spectrum (for example, range = EigRangeAll) is requested. The eigenvectors are normalized as follows: Vᴴ*B*V = I if itype == EigType1 or EigType2, and Vᴴ*inv(B)*V = I if itype == EigType3. The input parameter lwork is size of the working space, and it is returned by sygvdx_bufferSize(). If devInfo = i (i > 0 and i<=n) and jobz = EigModeNovector, i off-diagonal elements of an intermediate tridiagonal form did not converge to zero. If devInfo = n + i (i > 0), then the leading minor of order i of B is not positive definite. The factorization of B could not be completed and no eigenvalues or eigenvectors were computed. If jobz = EigModeVector, A contains the orthogonal eigenvectors of the matrix A. The eigenvectors are computed by divide and conquer algorithm. Please visit cuSOLVER Library Samples - sygvdx for a code example.
- itype: Specifies the problem type to be solved: itype =[EigType1]: A*x = (lambda)*B*x; itype =[EigType2]: A*B*x = (lambda)*x; itype =[EigType3]: B*A*x = (lambda)*x
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- range_: Specifies options to which selection of eigenvalues and optionally eigenvectors that need to be computed: range = EigRangeAll : all eigenvalues/eigenvectors will be found, will becomes the classical syevd/heevd routine; range = EigRangeV : all eigenvalues/eigenvectors in the half-open interval (vl,vu] will be found; range = EigRangeI : the il-th through iu-th eigenvalues/eigenvectors will be found
- uplo: Specifies which part of A and B are stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A and B are stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A and B are stored
- n: Number of rows (or columns) of matrix A and B
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- b: array of dimension ldb * n. If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of B contains the upper triangular part of the matrix B. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of B contains the lower triangular part of the matrix B. On exit, if devInfo is less than n, B is overwritten by triangular factor U or L from the Cholesky factorization of B
- ldb: Leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n)
- vl: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user want to be sure not to miss any eigenvalue within the interval bound, we suggest that, the user subtract/add epsilon (machine precision) to the interval bound such as ( vl = vl- eps, vu = vu + eps]. this suggestion is valid for any selective routine from cuSolver or LAPACK
- vu: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user want to be sure not to miss any eigenvalue within the interval bound, we suggest that, the user subtract/add epsilon (machine precision) to the interval bound such as ( vl = vl- eps, vu = vu + eps]. this suggestion is valid for any selective routine from cuSolver or LAPACK
- il: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- iu: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- w: A real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1)
- work: Working space, array of size lwork
- lwork: Size of work, returned by sygvdx_bufferSize
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or ldb<max(1,n), or itype is not EigType1 or EigType2 or EigType3 or jobz is not EigModeNovector or CUSOLVER_EIG_MODE_VECTORL, or range is not EigRangeAll or EigRangeV or EigRangeI, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDsygvdx.
func (Handle) DsygvdxBufferSize ¶
func (h Handle) DsygvdxBufferSize(itype EigType, jobz EigMode, range_ EigRange, uplo FillMode, n int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, vl float64, vu float64, il int32, iu int32, w driver.DevicePtr) (meig int32, lwork int32, err error)
DsygvdxBufferSize returns the workspace size, in elements of float64, for Handle.Dsygvdx.
- itype: Specifies the problem type to be solved: itype =[EigType1]: A*x = (lambda)*B*x; itype =[EigType2]: A*B*x = (lambda)*x; itype =[EigType3]: B*A*x = (lambda)*x
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- range_: Specifies options to which selection of eigenvalues and optionally eigenvectors that need to be computed: range = EigRangeAll : all eigenvalues/eigenvectors will be found, will becomes the classical syevd/heevd routine; range = EigRangeV : all eigenvalues/eigenvectors in the half-open interval (vl,vu] will be found; range = EigRangeI : the il-th through iu-th eigenvalues/eigenvectors will be found
- uplo: Specifies which part of A and B are stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A and B are stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A and B are stored
- n: Number of rows (or columns) of matrix A and B
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- b: array of dimension ldb * n. If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of B contains the upper triangular part of the matrix B. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of B contains the lower triangular part of the matrix B. On exit, if devInfo is less than n, B is overwritten by triangular factor U or L from the Cholesky factorization of B
- ldb: Leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n)
- vl: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user want to be sure not to miss any eigenvalue within the interval bound, we suggest that, the user subtract/add epsilon (machine precision) to the interval bound such as ( vl = vl- eps, vu = vu + eps]. this suggestion is valid for any selective routine from cuSolver or LAPACK
- vu: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user want to be sure not to miss any eigenvalue within the interval bound, we suggest that, the user subtract/add epsilon (machine precision) to the interval bound such as ( vl = vl- eps, vu = vu + eps]. this suggestion is valid for any selective routine from cuSolver or LAPACK
- il: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- iu: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- w: A real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1)
- lwork: Size of work, in elements of float64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or ldb<max(1,n), or itype is not EigType1 or EigType2 or EigType3 or jobz is not EigModeNovector or CUSOLVER_EIG_MODE_VECTORL, or range is not EigRangeAll or EigRangeV or EigRangeI, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDsygvdxBufferSize, bound as cusolverDnDsygvdx_bufferSize.
func (Handle) Dsygvj ¶
func (h Handle) Dsygvj(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, w driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr, params SyevjInfo) error
Dsygvj computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix-pair ( A, B).
The generalized symmetric-definite eigenvalue problem is A*V = B*V*Λ if itype == EigType1, A*B*V = V*Λ if itype == EigType2, and B*A*V = V*Λ if itype == EigType3, where the matrix B is positive definite. Λ is a real n×n diagonal matrix. The diagonal elements of Λ are the eigenvalues of ( A, B) in ascending order. V is an n×n orthogonal matrix. The eigenvectors are normalized as follows: Vᴴ*B*V = I if itype == EigType1 or EigType2, and Vᴴ*inv(B)*V = I if itype == EigType3. This function has the same functionality as sygvd except that syevd in sygvd is replaced by syevj in sygvj. Therefore, sygvj inherits properties of syevj, the user can use SyevjInfo.XsyevjSetTolerance and SyevjInfo.XsyevjSetMaxSweeps to configure tolerance and maximum sweeps. However the meaning of residual is different from syevj. sygvj first computes Cholesky factorization of matrix B, B=L*Lᴴ transform the problem to standard eigenvalue problem, then calls syevj. For example, the standard eigenvalue problem of type I is M*Q=Q*Λ where matrix M is symmetric M=L⁻¹*A*L⁻ᴴ The residual is the result of syevj on matrix M, not A. The input parameter lwork is the size of the working space, and it is returned by sygvj_bufferSize(). If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). If info = i (i > 0 and i<=n), B is not positive definite, the factorization of B could not be completed and no eigenvalues or eigenvectors were computed. If info = n+1, syevj does not converge under given tolerance and maximum sweeps. In this case, the eigenvalues and eigenvectors are still computed because non-convergence comes from improper tolerance of maximum sweeps. if jobz = EigModeVector, A contains the orthogonal eigenvectors V. Please visit cuSOLVER Library Samples - sygvj for a code example.
- itype: Specifies the problem type to be solved: itype =[EigType1]: A*x = (lambda)*B*x. itype =[EigType2]: A*B*x = (lambda)*x. itype =[EigType3]: B*A*x = (lambda)*x
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A and B are stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A and B are stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A and B are stored
- n: Number of rows (or columns) of matrix A and B
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and info = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- b: array of dimension ldb * n. If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of B contains the upper triangular part of the matrix B. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of B contains the lower triangular part of the matrix B. On exit, if info is less than n, B is overwritten by triangular factor U or L from the Cholesky factorization of B
- ldb: Leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n)
- w: A real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1)
- work: Working space, array of size lwork
- lwork: Size of work, returned by sygvj_bufferSize
- info: If info = 0, the operation is successful. if info = -i, the i-th parameter is wrong (not counting handle). If info = i (> 0), info indicates either B is not positive definite or syevj (called by sygvj) does not converge
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or ldb<max(1,n), or itype is not 1, 2 or 3, or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDsygvj.
func (Handle) DsygvjBufferSize ¶
func (h Handle) DsygvjBufferSize(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, w driver.DevicePtr, lwork *int32, params SyevjInfo) error
DsygvjBufferSize returns the workspace size, in elements of float64, for Handle.Dsygvj.
- itype: Specifies the problem type to be solved: itype =[EigType1]: A*x = (lambda)*B*x. itype =[EigType2]: A*B*x = (lambda)*x. itype =[EigType3]: B*A*x = (lambda)*x
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A and B are stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A and B are stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A and B are stored
- n: Number of rows (or columns) of matrix A and B
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and info = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- b: array of dimension ldb * n. If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of B contains the upper triangular part of the matrix B. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of B contains the lower triangular part of the matrix B. On exit, if info is less than n, B is overwritten by triangular factor U or L from the Cholesky factorization of B
- ldb: Leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n)
- w: A real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1)
- lwork: Size of work, in elements of float64
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or ldb<max(1,n), or itype is not 1, 2 or 3, or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDsygvjBufferSize, bound as cusolverDnDsygvj_bufferSize.
func (Handle) Dsytrd ¶
func (h Handle) Dsytrd(uplo FillMode, n int32, a driver.DevicePtr, lda int32, d driver.DevicePtr, e driver.DevicePtr, tau driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Dsytrd reduces a general symmetric (Hermitian) n×n matrix A to real symmetric tridiagonal form T by an orthogonal transformation: Qᴴ*A*Q=T.
As an output, A contains T and householder reflection vectors. If uplo = CUBLAS_FILL_MODE_UPPER, the diagonal and first superdiagonal of A are overwritten by the corresponding elements of the tridiagonal matrix T, and the elements above the first superdiagonal, with the array tau, represent the orthogonal matrix Q as a product of elementary reflectors; If uplo = CUBLAS_FILL_MODE_LOWER, the diagonal and first subdiagonal of A are overwritten by the corresponding elements of the tridiagonal matrix T, and the elements below the first subdiagonal, with the array tau, represent the orthogonal matrix Q as a product of elementary reflectors. The input parameter lwork is size of the working space, and it is returned by sytrd_bufferSize(). Note that the problem size n is limited by a condition n*lda < INT32_MAX primarily due to the current implementation constraints.
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. On exit, A is overwritten by T and householder reflection vectors
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,n)
- d: Real array of dimension n. The diagonal elements of the tridiagonal matrix T: D(i) = A(i,i)
- e: Real array of dimension (n-1). The off-diagonal elements of the tridiagonal matrix T: if uplo = CUBLAS_FILL_MODE_UPPER, E(i) = A(i,i+1). if uplo = CUBLAS_FILL_MODE_LOWER E(i) = A(i+1,i)
- tau: array of dimension (n-1). The scalar factors of the elementary reflectors which represent the orthogonal matrix Q
- work: Working space, array of size lwork
- lwork: Size of work, returned by sytrd_bufferSize
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDsytrd.
func (Handle) DsytrdBufferSize ¶
func (h Handle) DsytrdBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32, d driver.DevicePtr, e driver.DevicePtr, tau driver.DevicePtr) (int32, error)
DsytrdBufferSize returns the workspace size, in elements of float64, for Handle.Dsytrd.
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. On exit, A is overwritten by T and householder reflection vectors
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,n)
- tau: array of dimension (n-1). The scalar factors of the elementary reflectors which represent the orthogonal matrix Q
- lwork: Size of work, in elements of float64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDsytrdBufferSize, bound as cusolverDnDsytrd_bufferSize.
func (Handle) Dsytrf ¶
func (h Handle) Dsytrf(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ipiv driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Dsytrf computes the factorization of a symmetric indefinite matrix using the Bunch-Kaufman diagonal pivoting.
A is a n×n symmetric matrix, only lower or upper part is meaningful. The input parameter uplo indicates which part of the matrix is used. If devIpiv is null, no pivoting is performed, which is not numerically stable. If input parameter uplo is CUBLAS_FILL_MODE_LOWER, only lower triangular part of A is processed, and replaced by lower triangular factor L and block diagonal matrix D. Each block of D is either 1x1 or 2x2 block, depending on pivoting. P*A*Pᵀ=L*D*Lᵀ If input parameter uplo is CUBLAS_FILL_MODE_UPPER, only upper triangular part of A is processed, and replaced by upper triangular factor U and block diagonal matrix D. P*A*Pᵀ=U*D*Uᵀ The input parameter lwork is size of the working space, and it is returned by sytrf_bufferSize(). When no pivoting is performed, the other triangular part of the input matrix A is used as workspace. If Bunch-Kaufman factorization failed, i.e. A is singular. The output parameter devInfo = i would indicate D(i,i)=0. The output parameter devIpiv contains pivoting sequence. If devIpiv(i) = k > 0, D(i,i) is 1x1 block, and i-th row/column of A is interchanged with k-th row/column of A. If uplo is CUBLAS_FILL_MODE_UPPER and devIpiv(i-1) = devIpiv(i) = -m < 0, D(i-1:i,i-1:i) is a 2x2 block, and (i-1)-th row/column is interchanged with m-th row/column. If uplo is CUBLAS_FILL_MODE_LOWER and devIpiv(i+1) = devIpiv(i) = -m < 0, D(i:i+1,i:i+1) is a 2x2 block, and (i+1)-th row/column is interchanged with m-th row/column.
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- n: Number of rows and columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- work: Working space, array of size lwork
- lwork: Size of working space work
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDsytrf.
func (Handle) DsytrfBufferSize ¶
DsytrfBufferSize returns the workspace size, in elements of float64, for Handle.Dsytrf.
- n: Number of rows and columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- lwork: Size of work, in elements of float64
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnDsytrfBufferSize, bound as cusolverDnDsytrf_bufferSize.
func (Handle) Dsytri ¶
func (h Handle) Dsytri(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ipiv driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Dsytri wraps cusolverDnDsytri.
func (Handle) DsytriBufferSize ¶
func (h Handle) DsytriBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ipiv driver.DevicePtr) (int32, error)
DsytriBufferSize wraps cusolverDnDsytriBufferSize.
Wraps cusolverDnDsytriBufferSize, bound as cusolverDnDsytri_bufferSize.
func (Handle) EmulationSpecialValuesSupport ¶
func (h Handle) EmulationSpecialValuesSupport() (EmulationSpecialValuesSupport, error)
EmulationSpecialValuesSupport queries the special floating point value support which is set for handle if floating point emulation is allowed.
The special floating point value support returned by this API only has an effect, once one of the following math modes is enabled (see also MathMode):
Otherwise, special floating point values are handled as expected.
- mask: The special value support of handle. Please see EmulationSpecialValuesSupport for more information about the allowed values of mask
A nil error means the special value handling was queried successfully.
Errors:
- ErrInvalidValue: mask is a NULL pointer.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnGetEmulationSpecialValuesSupport.
func (Handle) EmulationStrategy ¶
func (h Handle) EmulationStrategy() (EmulationStrategy, error)
EmulationStrategy queries the emulation strategy which is set for handle.
The emulation strategy returned by this API only has an effect, once one of the following math modes is enabled (see also MathMode):
Parameters:
- strategy: The emulation strategy of handle
A nil error means the strategy was queried successfully.
Errors:
- ErrInvalidValue: emulationStrategy is a NULL pointer.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnGetEmulationStrategy.
func (Handle) FixedPointEmulationMantissaBitOffset ¶
FixedPointEmulationMantissaBitOffset queries the mantissa bit offset for fixed point FP64 emulation in case of dynamic mantissa control mode.
The mantissa bit offset, which is returned by this API only has an effect, once one of the following math modes is enabled (see also MathMode):
And the following mantissa control is enabled (see also Handle.SetFixedPointEmulationMantissaControl):
- CUDA_EMULATION_MANTISSA_CONTROL_DYNAMIC
Please note that values of mantissaBitOffset which are unequal to zero require the mantissa control to be equal to CUDA_EMULATION_MANTISSA_CONTROL_DYNAMIC. Otherwise, the computational cuSOLVER routines will return ErrInvalidValue, indicating an unsupported handle state.
- mantissaBitOffset: The mantissa bit offset used when CUDA_EMULATION_MANTISSA_CONTROL_DYNAMIC is in use
A nil error means the mantissa bit offset was queried successfully.
Errors:
- ErrInvalidValue: mantissaBitOffset is a NULL pointer.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnGetFixedPointEmulationMantissaBitOffset.
func (Handle) FixedPointEmulationMantissaControl ¶
func (h Handle) FixedPointEmulationMantissaControl() (EmulationMantissaControl, error)
FixedPointEmulationMantissaControl queries how the number of mantissa bits is determined for fixed point FP64 emulation.
The mantissa control returned by this API only has an effect, once one of the following math modes is enabled (see also MathMode):
Parameters:
- control: The mantissa control mode of handle
A nil error means the mantissa control was queried successfully.
Errors:
- ErrInvalidValue: control is a NULL pointer.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnGetFixedPointEmulationMantissaControl.
func (Handle) FixedPointEmulationMaxMantissaBitCount ¶
FixedPointEmulationMaxMantissaBitCount queries the maximum number of mantissa bits used for fixed point FP64 emulation.
The mantissa bit count returned by this API only has an effect, once one of the following math modes is enabled (see also MathMode):
Parameters:
- mantissaBitCount: The maximum number of mantissa bits used
A nil error means the mantissa bit count was queried successfully.
Errors:
- ErrInvalidValue: mantissaBitCount is a NULL pointer.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnGetFixedPointEmulationMaxMantissaBitCount.
func (Handle) IRSXgels ¶
func (h Handle) IRSXgels(gelsIrsParams IRSParams, gelsIrsInfos IRSInfos, m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, niters *CusolverInt, dInfo driver.DevicePtr) error
IRSXgels is designed to perform same functionality as cusolverDn<T1><T2>gels() functions, but wrapped in a more generic and expert interface that gives user more control to parametrize the function as well as it provides more information on output.
Handle.IRSXgels allows additional control of the solver parameters such as setting:
- the main precision (Inputs/Outputs precision) of the solver,
- the lowest precision to be used internally by the solver,
- the refinement solver type
- the maximum allowed number of iterations in the refinement phase
- the tolerance of the refinement solver
- the fallback to main precision
- and others
through the configuration parameters structure gelsIrsParams and its helper functions. For more details about what configuration can be set and its meaning please refer to all the functions in the cuSolverDN Helper Function Section that start with cusolverDnIRSParamsxxxx(). Moreover, Handle.IRSXgels provides additional information on the output such as the convergence history (e.g., the residual norms) at each iteration and the number of iterations needed to converge. For more details about what information can be retrieved and its meaning please refer to all the functions in the cuSolverDN Helper Function Section that start with cusolverDnIRSInfosxxxx(). The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the configurations of params/infos structure is incorrect or if the function did not finish with success. More details about the error can be found by checking the niters and the dinfo API parameters. See their description below for further details. Users should provide the required workspace allocated on device for the Handle.IRSXgels function. The amount of bytes required for the function can be queried by calling the respective function Handle.IRSXgelsBufferSize. Note that, if the user would like a particular configuration to be set via the params structure, it should be set before the call to Handle.IRSXgelsBufferSize to get the size of the required workspace. The following table provides all possible combinations values for the lowest precision corresponding to the Inputs/Outputs data type. Note that if the lowest precision matches the Inputs/Outputs datatype, then main precision factorization will be used Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision.
- Inputs/Outputs Data Type (e.g., main precision): C64F; Supported values for the lowest precision: C64F, C32F, C16F, C16BF, CTF32
- Inputs/Outputs Data Type (e.g., main precision): C32F; Supported values for the lowest precision: C32F, C16F, C16BF, CTF32
- Inputs/Outputs Data Type (e.g., main precision): R64F; Supported values for the lowest precision: R64F, R32F, R16F, R16BF, RTF32
- Inputs/Outputs Data Type (e.g., main precision): R32F; Supported values for the lowest precision: R32F, R16F, R16BF, RTF32
The Handle.IRSXgelsBufferSize function return the required workspace buffer size in bytes for the corresponding cusolverDnXgels() call with given gelsIrsParams configuration.
- gelsIrsParams: Configuration parameters structure, can serve one or more calls to any IRS solver
- gelsIrsInfos: Info structure, where information about a particular solve will be stored. The gelsIrsInfos structure correspond to a particular call. Thus different calls requires different gelsIrsInfos structure otherwise, it will be overwritten
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative. Note that, nrhs is limited to 1 if the selected IRS refinement solver is IrsRefineGmres, IrsRefineGmresGmres, IrsRefineClassicalGmres
- dA: Matrix A with size m-by-n. Can’t be NULL. On return - unchanged if the lowest precision is not equal to the main precision and the iterative refinement solver converged, - garbage otherwise
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by Handle.IRSXgelsBufferSize function
- niters: If iter is: <0 : iterative refinement has failed, main precision (Inputs/Outputs precision) factorization has been performed if fallback is enabled; -1 : taking into account machine parameters, n, nrhs, it is a priori not worth working in lower precision; -2 : overflow of an entry when moving from main to lower precision; -3 : failure during the factorization; -5 : overflow occurred during computation; -maxiter: solver stopped the iterative refinement after reaching maximum allowed iterations; >0 : iter is a number of iterations solver performed to reach convergence criteria
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid
Errors:
- ErrAllocFailed: CPU memory allocation failed, most likely during the allocation of the residual array that store the residual norms.
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace. Could happen if the users called Handle.IRSXgelsBufferSize function, then changed some of the configurations setting such as the lowest precision.
- ErrIrsInfosNotInitialized: The information structure gels_irs_infos was not created.
- ErrIrsNotSupported: One of the configuration parameter in the gels_irs_params structure is not supported. For example if nrhs >1, and refinement solver was set to IrsRefineGmres.
- ErrIrsOutOfRange: Numerical error related to niters <0; see niters description for more details.
- ErrIrsParamsInvalid: One of the configuration parameter in the gels_irs_params structure is not valid.
- ErrIrsParamsInvalidMaxiter: The maxiter configuration parameter in the gels_irs_params structure is not valid.
- ErrIrsParamsInvalidPrec: The main and/or the lowest precision configuration parameter in the gels_irs_params structure is not valid, check the table above for the supported combinations.
- ErrIrsParamsInvalidRefine: The refinement solver configuration parameter in the gels_irs_params structure is not valid.
- ErrIrsParamsNotInitialized: The configuration parameter gels_irs_params structure was not created.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnIRSXgels.
func (Handle) IRSXgelsBufferSize ¶
func (h Handle) IRSXgelsBufferSize(params IRSParams, m CusolverInt, n CusolverInt, nrhs CusolverInt) (uint, error)
IRSXgelsBufferSize returns the workspace size, in bytes, for Handle.IRSXgels.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative. Note that, nrhs is limited to 1 if the selected IRS refinement solver is IrsRefineGmres, IrsRefineGmresGmres, IrsRefineClassicalGmres
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrAllocFailed: CPU memory allocation failed, most likely during the allocation of the residual array that store the residual norms.
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace. Could happen if the users called Handle.IRSXgelsBufferSize function, then changed some of the configurations setting such as the lowest precision.
- ErrIrsInfosNotInitialized: The information structure gels_irs_infos was not created.
- ErrIrsNotSupported: One of the configuration parameter in the gels_irs_params structure is not supported. For example if nrhs >1, and refinement solver was set to IrsRefineGmres.
- ErrIrsOutOfRange: Numerical error related to niters <0; see niters description for more details.
- ErrIrsParamsInvalid: One of the configuration parameter in the gels_irs_params structure is not valid.
- ErrIrsParamsInvalidMaxiter: The maxiter configuration parameter in the gels_irs_params structure is not valid.
- ErrIrsParamsInvalidPrec: The main and/or the lowest precision configuration parameter in the gels_irs_params structure is not valid, check the table above for the supported combinations.
- ErrIrsParamsInvalidRefine: The refinement solver configuration parameter in the gels_irs_params structure is not valid.
- ErrIrsParamsNotInitialized: The configuration parameter gels_irs_params structure was not created.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnIRSXgelsBufferSize, bound as cusolverDnIRSXgels_bufferSize.
func (Handle) IRSXgesv ¶
func (h Handle) IRSXgesv(gesvIrsParams IRSParams, gesvIrsInfos IRSInfos, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, niters *CusolverInt, dInfo driver.DevicePtr) error
IRSXgesv is designed to perform same functionality as cusolverDn<T1><T2>gesv() functions, but wrapped in a more generic and expert interface that gives user more control to parametrize the function as well as it provides more information on output.
Handle.IRSXgesv allows additional control of the solver parameters such as setting:
- the main precision (Inputs/Outputs precision) of the solver
- the lowest precision to be used internally by the solver
- the refinement solver type
- the maximum allowed number of iterations in the refinement phase
- the tolerance of the refinement solver
- the fallback to main precision
- and more
through the configuration parameters structure gesvIrsParams and its helper functions. For more details about what configuration can be set and its meaning please refer to all the functions in the cuSolverDN Helper Function Section that start with cusolverDnIRSParamsxxxx(). Moreover, Handle.IRSXgesv provides additional information on the output such as the convergence history (e.g., the residual norms) at each iteration and the number of iterations needed to converge. For more details about what information can be retrieved and its meaning please refer to all the functions in the cuSolverDN Helper Function Section that start with cusolverDnIRSInfosxxxx() The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the configurations of params/infos structure is incorrect or if the function did not finish with success. More details about the error can be found by checking the niters and the dinfo API parameters. See their description below for further details. User should provide the required workspace allocated on device for the Handle.IRSXgesv function. The amount of bytes required for the function can be queried by calling the respective function Handle.IRSXgesvBufferSize. Note that, if the user would like a particular configuration to be set via the params structure, it should be set before the call to Handle.IRSXgesvBufferSize to get the size of the required workspace. Tensor Float (TF32), introduced with NVIDIA Ampere architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision. The following table provides all possible combinations values for the lowest precision corresponding to the Inputs/Outputs data type. Note that if the lowest precision matches the Inputs/Outputs datatype, then the main precision factorization will be used.
- Inputs/Outputs Data Type (e.g., main precision): C64F; Supported values for the lowest precision: C64F, C32F, C16F, C16BF, CTF32
- Inputs/Outputs Data Type (e.g., main precision): C32F; Supported values for the lowest precision: C32F, C16F, C16BF, CTF32
- Inputs/Outputs Data Type (e.g., main precision): R64F; Supported values for the lowest precision: R64F, R32F, R16F, R16BF, RTF32
- Inputs/Outputs Data Type (e.g., main precision): R32F; Supported values for the lowest precision: R32F, R16F, R16BF, RTF32
The Handle.IRSXgesvBufferSize function returns the required workspace buffer size in bytes for the corresponding cusolverDnXgesv() call with the given gesvIrsParams configuration.
- gesvIrsParams: Configuration parameters structure, can serve one or more calls to any IRS solver
- gesvIrsInfos: Info structure, where information about a particular solve will be stored. The gesvIrsInfos structure correspond to a particular call. Thus different calls requires different gesvIrsInfos structure otherwise, it will be overwritten
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative. Note that, nrhs is limited to 1 if the selected IRS refinement solver is IrsRefineGmres, IrsRefineGmresGmres, IrsRefineClassicalGmres
- dA: Matrix A with size n-by-n. Can’t be NULL. On return - will contain the factorization of the matrix A in the main precision ( A = P * L * U, where P - permutation matrix defined by vector ipiv, L and U - lower and upper triangular matrices) if the iterative refinement solver was set to IrsRefineNone and the lowest precision is equal to the main precision (Inputs/Outputs datatype), or if the iterative refinement solver did not converge and the fallback to main precision was enabled (fallback enabled is the default setting); unchanged otherwise
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dB: Set of right hand sides B of size n-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by Handle.IRSXgesvBufferSize function
- niters: If iter is: <0 : iterative refinement has failed, main precision (Inputs/Outputs precision) factorization has been performed if fallback is enabled. -1 : taking into account machine parameters, n, nrhs, it is a priori not worth working in lower precision; -2 : overflow of an entry when moving from main to lower precision; -3 : failure during the factorization; -5 : overflow occurred during computation; -maxiter: solver stopped the iterative refinement after reaching maximum allowed iterations. >0 : iter is a number of iterations solver performed to reach convergence criteria
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid. If dinfo = i, then U(i,i) computed in main precision is exactly zero. The factorization has been completed, but the factor U is exactly singular, so the solution could not be computed
Errors:
- ErrAllocFailed: CPU memory allocation failed, most likely during the allocation of the residual array that store the residual norms.
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace. Could happen if the users called Handle.IRSXgesvBufferSize function, then changed some of the configurations setting such as the lowest precision.
- ErrIrsInfosNotInitialized: The information structure gesv_irs_infos was not created.
- ErrIrsNotSupported: One of the configuration parameter in the gesv_irs_params structure is not supported. For example if nrhs >1, and refinement solver was set to IrsRefineGmres.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrIrsParamsInvalid: One of the configuration parameter in the gesv_irs_params structure is not valid.
- ErrIrsParamsInvalidMaxiter: The maxiter configuration parameter in the gesv_irs_params structure is not valid.
- ErrIrsParamsInvalidPrec: The main and/or the lowest precision configuration parameter in the gesv_irs_params structure is not valid, check the table above for the supported combinations.
- ErrIrsParamsInvalidRefine: The refinement solver configuration parameter in the gesv_irs_params structure is not valid.
- ErrIrsParamsNotInitialized: The configuration parameter gesv_irs_params structure was not created.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnIRSXgesv.
func (Handle) IRSXgesvBufferSize ¶
func (h Handle) IRSXgesvBufferSize(params IRSParams, n CusolverInt, nrhs CusolverInt) (uint, error)
IRSXgesvBufferSize returns the workspace size, in bytes, for Handle.IRSXgesv.
- n: Number of rows and columns of the square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative. Note that nrhs is limited to 1 if the selected IRS refinement solver is IrsRefineGmres, IrsRefineGmresGmres, IrsRefineClassicalGmres
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrAllocFailed: CPU memory allocation failed, most likely during the allocation of the residual array that store the residual norms.
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace. Could happen if the users called Handle.IRSXgesvBufferSize function, then changed some of the configurations setting such as the lowest precision.
- ErrIrsInfosNotInitialized: The information structure gesv_irs_infos was not created.
- ErrIrsNotSupported: One of the configuration parameter in the gesv_irs_params structure is not supported. For example if nrhs >1, and refinement solver was set to IrsRefineGmres.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrIrsParamsInvalid: One of the configuration parameter in the gesv_irs_params structure is not valid.
- ErrIrsParamsInvalidMaxiter: The maxiter configuration parameter in the gesv_irs_params structure is not valid.
- ErrIrsParamsInvalidPrec: The main and/or the lowest precision configuration parameter in the gesv_irs_params structure is not valid, check the table above for the supported combinations.
- ErrIrsParamsInvalidRefine: The refinement solver configuration parameter in the gesv_irs_params structure is not valid.
- ErrIrsParamsNotInitialized: The configuration parameter gesv_irs_params structure was not created.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnIRSXgesvBufferSize, bound as cusolverDnIRSXgesv_bufferSize.
func (Handle) MathMode ¶
MathMode queries the math modes which are set for handle.
Note that math modes can be combined, e.g., Handle.SetMathMode(handle, FP32EmulatedBf16x9Math | FP64EmulatedFixedpointMath). Please see MathMode for allowed combinations.
A nil error means the mode was set successfully.
Errors:
- ErrInvalidValue: modes is a NULL pointer.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnGetMathMode.
func (Handle) SBgels ¶
func (h Handle) SBgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
SBgels computes the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
These functions are similar in term of functionalities to the full precision LAPACK QR (least squares) solver (Xgels, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an QR factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is m-by-n matrix and X is n-by-nrhs and B is m-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Description of these functions is given below. <t1><t2>gels() functions are designated by two floating point precisions The <t1> corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the <t2> represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gels() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision <t1>. If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgels) such a way that there is always a good solution at the output of these functions. If <t2> is equal to <t1>, then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if: ITER > ITERMAX or for all the RHS we have: RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK<t1>LAMCH('Epsilon')
The values ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gels_bufferSize(). We provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (e.g., main and lowest precision are equal <t2> is equal to <t1>). The following table specifies which precisions will be used for which interface function: Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gels for the FP64 case).
- Interface function: Handle.ZZgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
cusolverDn<t1><t2>gels_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gels() function.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can’t be NULL. On return - unchanged if the lowest precision is not equal to the main precision and the iterative refinement solver converged, - garbage otherwise
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gels_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSBgels.
func (Handle) SBgelsBufferSize ¶
func (h Handle) SBgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
SBgelsBufferSize returns the workspace size, in bytes, for Handle.SBgels.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSBgelsBufferSize, bound as cusolverDnSBgels_bufferSize.
func (Handle) SBgesv ¶
func (h Handle) SBgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
SBgesv is modelled after functions DSGESV and ZCGESV from LAPACK.
They compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the LU factorization Xgesv. These functions are similar in term of functionalities to the full precision LU solver ( Xgesv, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an LU factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is n-by-n matrix and X and B are n-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Parameters and behavior are mostly the same as LAPACK counterparts. Description of these functions and differences from LAPACK is given below. <t1><t2>gesv() functions are designated by two floating point precisions The corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gesv() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision . If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgesv) such a way that there is always a good solution at the output of these functions. If is equal to , then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if or for all the RHS we have: where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK LAMCH(‘Epsilon’)
The value ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gesv_bufferSize(). Note that in addition to the two mixed precision functions available in LAPACK (for example, dsgesv and zcgesv), we provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (, main and lowest precision are equal is equal to ). The following table specifies which precisions will be used for which interface function. Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gesv for the FP64 case).
- Interface function: Handle.ZZgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgesv*; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgesv*; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
* Has LAPACK counterparts cusolverDn<t1><t2>gesv_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gesv() function.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can’t be NULL. On return - unchanged if the iterative refinement process converged. If not - will contains the factorization of the matrix A in the main precision ( A = P * L * U, where P - permutation matrix defined by vector ipiv, L and U - lower and upper triangular matrices)
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Vector that defines permutation for the factorization - row i was interchanged with row ipiv[i]
- dB: Set of right hand sides B of size n-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gesv_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid. If dinfo = i, then U(i,i) computed in main precision is exactly zero. The factorization has been completed, but the factor U is exactly singular, so the solution could not be computed
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSBgesv.
func (Handle) SBgesvBufferSize ¶
func (h Handle) SBgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
SBgesvBufferSize returns the workspace size, in bytes, for Handle.SBgesv.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Pivoting sequence. Not used and can be NULL
- dB: Set of right hand sides B of size n-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSBgesvBufferSize, bound as cusolverDnSBgesv_bufferSize.
func (Handle) SHgels ¶
func (h Handle) SHgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
SHgels computes the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
These functions are similar in term of functionalities to the full precision LAPACK QR (least squares) solver (Xgels, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an QR factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is m-by-n matrix and X is n-by-nrhs and B is m-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Description of these functions is given below. <t1><t2>gels() functions are designated by two floating point precisions The <t1> corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the <t2> represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gels() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision <t1>. If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgels) such a way that there is always a good solution at the output of these functions. If <t2> is equal to <t1>, then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if: ITER > ITERMAX or for all the RHS we have: RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK<t1>LAMCH('Epsilon')
The values ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gels_bufferSize(). We provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (e.g., main and lowest precision are equal <t2> is equal to <t1>). The following table specifies which precisions will be used for which interface function: Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gels for the FP64 case).
- Interface function: Handle.ZZgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
cusolverDn<t1><t2>gels_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gels() function.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can’t be NULL. On return - unchanged if the lowest precision is not equal to the main precision and the iterative refinement solver converged, - garbage otherwise
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gels_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSHgels.
func (Handle) SHgelsBufferSize ¶
func (h Handle) SHgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
SHgelsBufferSize returns the workspace size, in bytes, for Handle.SHgels.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSHgelsBufferSize, bound as cusolverDnSHgels_bufferSize.
func (Handle) SHgesv ¶
func (h Handle) SHgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
SHgesv is modelled after functions DSGESV and ZCGESV from LAPACK.
They compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the LU factorization Xgesv. These functions are similar in term of functionalities to the full precision LU solver ( Xgesv, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an LU factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is n-by-n matrix and X and B are n-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Parameters and behavior are mostly the same as LAPACK counterparts. Description of these functions and differences from LAPACK is given below. <t1><t2>gesv() functions are designated by two floating point precisions The corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gesv() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision . If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgesv) such a way that there is always a good solution at the output of these functions. If is equal to , then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if or for all the RHS we have: where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK LAMCH(‘Epsilon’)
The value ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gesv_bufferSize(). Note that in addition to the two mixed precision functions available in LAPACK (for example, dsgesv and zcgesv), we provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (, main and lowest precision are equal is equal to ). The following table specifies which precisions will be used for which interface function. Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gesv for the FP64 case).
- Interface function: Handle.ZZgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgesv*; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgesv*; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
* Has LAPACK counterparts cusolverDn<t1><t2>gesv_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gesv() function.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can’t be NULL. On return - unchanged if the iterative refinement process converged. If not - will contains the factorization of the matrix A in the main precision ( A = P * L * U, where P - permutation matrix defined by vector ipiv, L and U - lower and upper triangular matrices)
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Vector that defines permutation for the factorization - row i was interchanged with row ipiv[i]
- dB: Set of right hand sides B of size n-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gesv_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid. If dinfo = i, then U(i,i) computed in main precision is exactly zero. The factorization has been completed, but the factor U is exactly singular, so the solution could not be computed
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSHgesv.
func (Handle) SHgesvBufferSize ¶
func (h Handle) SHgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
SHgesvBufferSize returns the workspace size, in bytes, for Handle.SHgesv.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Pivoting sequence. Not used and can be NULL
- dB: Set of right hand sides B of size n-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSHgesvBufferSize, bound as cusolverDnSHgesv_bufferSize.
func (Handle) SSgels ¶
func (h Handle) SSgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
SSgels computes the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
These functions are similar in term of functionalities to the full precision LAPACK QR (least squares) solver (Xgels, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an QR factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is m-by-n matrix and X is n-by-nrhs and B is m-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Description of these functions is given below. <t1><t2>gels() functions are designated by two floating point precisions The <t1> corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the <t2> represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gels() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision <t1>. If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgels) such a way that there is always a good solution at the output of these functions. If <t2> is equal to <t1>, then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if: ITER > ITERMAX or for all the RHS we have: RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK<t1>LAMCH('Epsilon')
The values ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gels_bufferSize(). We provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (e.g., main and lowest precision are equal <t2> is equal to <t1>). The following table specifies which precisions will be used for which interface function: Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gels for the FP64 case).
- Interface function: Handle.ZZgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
cusolverDn<t1><t2>gels_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gels() function.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can’t be NULL. On return - unchanged if the lowest precision is not equal to the main precision and the iterative refinement solver converged, - garbage otherwise
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gels_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSSgels.
func (Handle) SSgelsBufferSize ¶
func (h Handle) SSgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
SSgelsBufferSize returns the workspace size, in bytes, for Handle.SSgels.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSSgelsBufferSize, bound as cusolverDnSSgels_bufferSize.
func (Handle) SSgesv ¶
func (h Handle) SSgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
SSgesv is modelled after functions DSGESV and ZCGESV from LAPACK.
They compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the LU factorization Xgesv. These functions are similar in term of functionalities to the full precision LU solver ( Xgesv, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an LU factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is n-by-n matrix and X and B are n-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Parameters and behavior are mostly the same as LAPACK counterparts. Description of these functions and differences from LAPACK is given below. <t1><t2>gesv() functions are designated by two floating point precisions The corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gesv() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision . If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgesv) such a way that there is always a good solution at the output of these functions. If is equal to , then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if or for all the RHS we have: where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK LAMCH(‘Epsilon’)
The value ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gesv_bufferSize(). Note that in addition to the two mixed precision functions available in LAPACK (for example, dsgesv and zcgesv), we provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (, main and lowest precision are equal is equal to ). The following table specifies which precisions will be used for which interface function. Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gesv for the FP64 case).
- Interface function: Handle.ZZgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgesv*; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgesv*; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
* Has LAPACK counterparts cusolverDn<t1><t2>gesv_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gesv() function.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can’t be NULL. On return - unchanged if the iterative refinement process converged. If not - will contains the factorization of the matrix A in the main precision ( A = P * L * U, where P - permutation matrix defined by vector ipiv, L and U - lower and upper triangular matrices)
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Vector that defines permutation for the factorization - row i was interchanged with row ipiv[i]
- dB: Set of right hand sides B of size n-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gesv_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid. If dinfo = i, then U(i,i) computed in main precision is exactly zero. The factorization has been completed, but the factor U is exactly singular, so the solution could not be computed
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSSgesv.
func (Handle) SSgesvBufferSize ¶
func (h Handle) SSgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
SSgesvBufferSize returns the workspace size, in bytes, for Handle.SSgesv.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Pivoting sequence. Not used and can be NULL
- dB: Set of right hand sides B of size n-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSSgesvBufferSize, bound as cusolverDnSSgesv_bufferSize.
func (Handle) SXgels ¶
func (h Handle) SXgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
SXgels computes the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
These functions are similar in term of functionalities to the full precision LAPACK QR (least squares) solver (Xgels, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an QR factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is m-by-n matrix and X is n-by-nrhs and B is m-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Description of these functions is given below. <t1><t2>gels() functions are designated by two floating point precisions The <t1> corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the <t2> represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gels() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision <t1>. If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgels) such a way that there is always a good solution at the output of these functions. If <t2> is equal to <t1>, then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if: ITER > ITERMAX or for all the RHS we have: RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK<t1>LAMCH('Epsilon')
The values ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gels_bufferSize(). We provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (e.g., main and lowest precision are equal <t2> is equal to <t1>). The following table specifies which precisions will be used for which interface function: Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gels for the FP64 case).
- Interface function: Handle.ZZgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
cusolverDn<t1><t2>gels_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gels() function.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can’t be NULL. On return - unchanged if the lowest precision is not equal to the main precision and the iterative refinement solver converged, - garbage otherwise
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gels_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSXgels.
func (Handle) SXgelsBufferSize ¶
func (h Handle) SXgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
SXgelsBufferSize returns the workspace size, in bytes, for Handle.SXgels.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSXgelsBufferSize, bound as cusolverDnSXgels_bufferSize.
func (Handle) SXgesv ¶
func (h Handle) SXgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
SXgesv is modelled after functions DSGESV and ZCGESV from LAPACK.
They compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the LU factorization Xgesv. These functions are similar in term of functionalities to the full precision LU solver ( Xgesv, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an LU factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is n-by-n matrix and X and B are n-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Parameters and behavior are mostly the same as LAPACK counterparts. Description of these functions and differences from LAPACK is given below. <t1><t2>gesv() functions are designated by two floating point precisions The corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gesv() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision . If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgesv) such a way that there is always a good solution at the output of these functions. If is equal to , then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if or for all the RHS we have: where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK LAMCH(‘Epsilon’)
The value ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gesv_bufferSize(). Note that in addition to the two mixed precision functions available in LAPACK (for example, dsgesv and zcgesv), we provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (, main and lowest precision are equal is equal to ). The following table specifies which precisions will be used for which interface function. Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gesv for the FP64 case).
- Interface function: Handle.ZZgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgesv*; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgesv*; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
* Has LAPACK counterparts cusolverDn<t1><t2>gesv_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gesv() function.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can’t be NULL. On return - unchanged if the iterative refinement process converged. If not - will contains the factorization of the matrix A in the main precision ( A = P * L * U, where P - permutation matrix defined by vector ipiv, L and U - lower and upper triangular matrices)
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Vector that defines permutation for the factorization - row i was interchanged with row ipiv[i]
- dB: Set of right hand sides B of size n-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gesv_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid. If dinfo = i, then U(i,i) computed in main precision is exactly zero. The factorization has been completed, but the factor U is exactly singular, so the solution could not be computed
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSXgesv.
func (Handle) SXgesvBufferSize ¶
func (h Handle) SXgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
SXgesvBufferSize returns the workspace size, in bytes, for Handle.SXgesv.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Pivoting sequence. Not used and can be NULL
- dB: Set of right hand sides B of size n-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSXgesvBufferSize, bound as cusolverDnSXgesv_bufferSize.
func (Handle) SetDeterministicMode ¶
func (h Handle) SetDeterministicMode(mode DeterministicMode) error
SetDeterministicMode sets the deterministic mode of all cuSolverDN functions for handle.
For improved performance, non-deterministic results can be allowed. Affected functions are cusolverDn<t>geqrf(), cusolverDn<t>syevd(), cusolverDn<t>syevdx(), cusolverDn<t>gesvd() (if m > n), cusolverDn<t>gesvdj(), Handle.Xgeqrf, Handle.Xsyevd, Handle.Xsyevdx, Handle.Xgesvd (if m > n), Handle.Xgesvdr and Handle.Xgesvdp.
- mode: The deterministic mode to be used with handle
A nil error means the modes were set successfully.
Errors:
- ErrInternalError: An internal error occurred.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSetDeterministicMode.
func (Handle) SetEmulationSpecialValuesSupport ¶
func (h Handle) SetEmulationSpecialValuesSupport(mask EmulationSpecialValuesSupport) error
SetEmulationSpecialValuesSupport sets the handling of special floating point values for handle, which is used once floating point emulation is allowed.
The special value support set by this API only has an effect, once one of the following math modes is enabled (see also MathMode):
Parameters:
- mask: If set to CUDA_EMULATION_SPECIAL_VALUE_SUPPORT_DEFAULT, values are propagated as expected. Performance of floating point emulated math may improve if set to CUDA_EMULATION_SPECIAL_VALUES_SUPPORT_NONE for which the propagation of special values is undefined
A nil error means the special value support was set successfully.
Errors:
- ErrInternalError: An internal error occurred.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSetEmulationSpecialValuesSupport.
func (Handle) SetEmulationStrategy ¶
func (h Handle) SetEmulationStrategy(strategy EmulationStrategy) error
SetEmulationStrategy sets the emulation strategy of all cuSolverDN functions for handle.
For more information about the effects of the corresponding strategies, please refer to the analogous definition of cublasEmulationStrategy_t. The emulation strategy set by this API only has an effect, once one of the following math modes is enabled (see also MathMode):
Note: Please note that the workspace sizes returned by *_bufferSize APIs may depend on the emulation strategy.
- strategy: The emulation strategy to be used with handle
A nil error means the strategy was set successfully.
Errors:
- ErrInternalError: An internal error occurred.
- ErrInvalidValue: strategy was not a supported emulation strategy
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSetEmulationStrategy.
func (Handle) SetFixedPointEmulationMantissaBitOffset ¶
SetFixedPointEmulationMantissaBitOffset sets the mantissa bit offset for fixed point FP64 emulation in case of dynamic mantissa control mode.
The mantissa bit offset, which is set by this API only has an effect, once one of the following math modes is enabled (see also MathMode):
And the following mantissa control is enabled (see also Handle.SetFixedPointEmulationMantissaControl):
- CUDA_EMULATION_MANTISSA_CONTROL_DYNAMIC
You may tune values for mantissaBitOffset based on your accuracy and performance requirements, e.g., choose negative values -8, -16, … for better performance while fewer mantissa bits may reduce accuracy. Please note that values of mantissaBitOffset which are unequal to zero require the mantissa control to be equal to CUDA_EMULATION_MANTISSA_CONTROL_DYNAMIC. Otherwise, the computational cuSOLVER routines will return ErrInvalidValue, indicating an unsupported handle state.
- mantissaBitOffset: The mantissa bit offset (default = 0) to be used when the mantissa control is CUDA_EMULATION_MANTISSA_CONTROL_DYNAMIC
A nil error means the mantissa bit offset was set successfully.
Errors:
- ErrInternalError: An internal error occurred.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSetFixedPointEmulationMantissaBitOffset.
func (Handle) SetFixedPointEmulationMantissaControl ¶
func (h Handle) SetFixedPointEmulationMantissaControl(control EmulationMantissaControl) error
SetFixedPointEmulationMantissaControl sets how the number of mantissa bits is determined for fixed point FP64 emulation.
For more information about the effects of the corresponding control modes, please refer to EmulationMantissaControl. The mantissa control set by this API only has an effect, once one of the following math modes is enabled (see also MathMode):
Parameters:
- control: The mantissa control mode to be used with handle
A nil error means the mantissa control was set successfully.
Errors:
- ErrInternalError: An internal error occurred.
- ErrInvalidValue: control is not a valid EmulationMantissaControl value.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSetFixedPointEmulationMantissaControl.
func (Handle) SetFixedPointEmulationMaxMantissaBitCount ¶
SetFixedPointEmulationMaxMantissaBitCount sets the maximum number of mantissa bits for fixed point FP64 emulation.
The maximum mantissa bit count set by this API only has an effect, once one of the following math modes is enabled (see also MathMode):
Parameters:
- mantissaBitCount: The number of mantissa bits to be used. Setting mantissaBitCount = 0 resets to the default configuration as described in cuBLAS defaults
A nil error means the mantissa bit count was set successfully.
Errors:
- ErrInternalError: An internal error occurred.
- ErrInvalidValue: mantissaBitCount is less than 0.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSetFixedPointEmulationMaxMantissaBitCount.
func (Handle) SetMathMode ¶
SetMathMode sets the math modes of all cuSolverDN functions for handle.
For more information about the effects of the corresponding math modes, please refer to MathMode. Note that math modes can be combined, e.g., Handle.SetMathMode(handle, FP32EmulatedBf16x9Math | FP64EmulatedFixedpointMath). Please see MathMode for allowed combinations.
Note: Please note that the workspace sizes returned by *_bufferSize APIs may depend on the math mode.
A nil error means the mode was set successfully.
Errors:
- ErrInternalError: An internal error occurred.
- ErrInvalidValue: An invalid mode was given.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSetMathMode.
func (Handle) SetStream ¶
SetStream sets the stream to be used by the cuSolverDN library to execute its routines.
- streamId: The stream to be used by the library
Errors:
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSetStream.
func (Handle) Sgebrd ¶
func (h Handle) Sgebrd(m int32, n int32, a driver.DevicePtr, lda int32, d driver.DevicePtr, e driver.DevicePtr, tauq driver.DevicePtr, taup driver.DevicePtr, work driver.DevicePtr, lwork int32, devInfo driver.DevicePtr) error
Sgebrd reduces a general m×n matrix A to a real upper or lower bidiagonal form B by an orthogonal transformation: Qᴴ*A*P=B.
If m>=n, B is upper bidiagonal; if m<n, B is lower bidiagonal. The matrix Q and P are overwritten into matrix A in the following sense:
- if m>=n, the diagonal and the first superdiagonal are overwritten with the upper bidiagonal matrix B; the elements below the diagonal, with the array TAUQ, represent the orthogonal matrix Q as a product of elementary reflectors, and the elements above the first superdiagonal, with the array TAUP, represent the orthogonal matrix P as a product of elementary reflectors.
- if m<n, the diagonal and the first subdiagonal are overwritten with the lower bidiagonal matrix B; the elements below the first subdiagonal, with the array TAUQ, represent the orthogonal matrix Q as a product of elementary reflectors, and the elements above the diagonal, with the array TAUP, represent the orthogonal matrix P as a product of elementary reflectors.
The input parameter Lwork is size of the working space, and it is returned by gebrd_bufferSize(). Remark: gebrd only supports m>=n.
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- d: Real array of dimension min(m,n). The diagonal elements of the bidiagonal matrix B: D(i) = A(i,i)
- e: Real 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
- tauq: array of dimension min(m,n). The scalar factors of the elementary reflectors which represent the orthogonal matrix Q
- taup: array of dimension min(m,n). The scalar factors of the elementary reflectors which represent the orthogonal matrix P
- work: Working space, array of size Lwork
- lwork: Size of Work, returned by gebrd_bufferSize
- devInfo: If devInfo = 0, the operation is successful. if devInfo = -i, the i-th parameter is wrong (not counting handle)
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0, or lda<max(1,m)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSgebrd.
func (Handle) SgebrdBufferSize ¶
SgebrdBufferSize returns the workspace size, in elements of float32, for Handle.Sgebrd.
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- lwork: Size of Work, in elements of float32
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0, or lda<max(1,m)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSgebrdBufferSize, bound as cusolverDnSgebrd_bufferSize.
func (Handle) Sgeqrf ¶
func (h Handle) Sgeqrf(m int32, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, workspace driver.DevicePtr, lwork int32, devInfo driver.DevicePtr) error
Sgeqrf computes the QR factorization of an m×n matrix.
A=Q*R, where A is an m×n matrix, Q is an m×n matrix, and R is a n×n upper triangular matrix. The input parameter Lwork is size of the working space, and it is returned by geqrf_bufferSize(). The matrix R is overwritten in upper triangular part of A, including diagonal elements. The matrix Q is not formed explicitly, instead, a sequence of householder vectors are stored in lower triangular part of A. The leading nonzero element of householder vector is assumed to be 1 such that output parameter TAU contains the scaling factor τ. If v is original householder vector, q is the new householder vector corresponding to τ, satisfying the following relation I−2*v*vᴴ=I−τ*q*qᴴ
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,m)
- lda: Leading dimension of two-dimensional array used to store matrix A
- tau: array of dimension at least min(m,n)
- workspace: Working space, array of size Lwork
- lwork: Size of working array Workspace
- devInfo: If devInfo = 0, the LU factorization is successful. if devInfo = -i, the i-th parameter is wrong (not counting handle)
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSgeqrf.
func (Handle) SgeqrfBufferSize ¶
SgeqrfBufferSize returns the workspace size, in elements of float32, for Handle.Sgeqrf.
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,m)
- lda: Leading dimension of two-dimensional array used to store matrix A
- lwork: Size of Workspace, in elements of float32
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSgeqrfBufferSize, bound as cusolverDnSgeqrf_bufferSize.
func (Handle) Sgesvd ¶
func (h Handle) Sgesvd(jobu int8, jobvt int8, m int32, n int32, a driver.DevicePtr, lda int32, s driver.DevicePtr, u driver.DevicePtr, ldu int32, vt driver.DevicePtr, ldvt int32, work driver.DevicePtr, lwork int32, rwork driver.DevicePtr, info driver.DevicePtr) error
Sgesvd computes the singular value decomposition (SVD) of an m×n matrix A and corresponding the left and/or right singular vectors.
The SVD is written A=U*Σ*Vᴴ, where Σ is an m×n matrix which is zero except for its min(m,n) diagonal elements, U is an m×m unitary matrix, and V is an n×n unitary matrix. The diagonal elements of Σ are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A. The input parameter lwork is size of the working space, and it is returned by gesvd_bufferSize(). if bdsqr did not converge, devInfo specifies how many superdiagonals of an intermediate bidiagonal form did not converge to zero. The rwork is real array of dimension (min(m,n)-1). If devInfo >0 and rwork is not NULL, rwork contains the unconverged superdiagonal elements of an upper bidiagonal matrix. This is slightly different from LAPACK which puts unconverged superdiagonal elements in work if type is real; in rwork if type is complex. rwork can be a NULL pointer if the user does not want the information from superdiagonal. Please visit cuSOLVER Library Samples - gesvd for a code example. Remark 1: gesvd only supports m>=n. Remark 2: the routine returns Vᴴ , not V.
- 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
- jobvt: Specifies options for computing all or part of the matrix V**T: = ‘A’: all N rows of V**T are returned in the array VT; = ‘S’: the first min(m,n) rows of V**T (the right singular vectors) are returned in the array VT; = ‘O’: the first min(m,n) rows of V**T (the right singular vectors) are overwritten on the array A; = ‘N’: no rows of V**T (no right singular vectors) are computed
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,m). On exit, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- s: Real array of dimension min(m,n). The singular values of A, sorted so that S(i) >= S(i+1)
- u: array of dimension ldu * m with ldu is not less than max(1,m). U contains the m×m unitary matrix U
- ldu: Leading dimension of two-dimensional array used to store matrix U
- vt: array of dimension ldvt * n with ldvt is not less than max(1,n). VT contains the n×n unitary matrix V**T
- ldvt: Leading dimension of two-dimensional array used to store matrix Vt
- work: Working space, array of size lwork
- lwork: Size of work, returned by gesvd_bufferSize
- rwork: Real array of dimension min(m,n)-1. It contains the unconverged superdiagonal elements of an upper bidiagonal matrix if devInfo > 0
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m) or ldu<max(1,m) or ldvt<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSgesvd.
func (Handle) SgesvdBufferSize ¶
SgesvdBufferSize returns the workspace size, in elements of float32, for Handle.Sgesvd.
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- lwork: Size of work, in elements of float32
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m) or ldu<max(1,m) or ldvt<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSgesvdBufferSize, bound as cusolverDnSgesvd_bufferSize.
func (Handle) SgesvdaStridedBatched ¶
func (h Handle) SgesvdaStridedBatched(jobz EigMode, rank int32, m int32, n int32, dA driver.DevicePtr, lda int32, strideA int64, dS driver.DevicePtr, strideS int64, dU driver.DevicePtr, ldu int32, strideU int64, dV driver.DevicePtr, ldv int32, strideV int64, dWork driver.DevicePtr, lwork int32, dInfo driver.DevicePtr, hRNrmF *float64, batchSize int32) error
SgesvdaStridedBatched gesvda ( a stands for approximate) approximates the singular value decomposition of a tall skinny m×n matrix A and corresponding the left and right singular vectors.
The economy form of SVD is written by A=U*Σ*Vᴴ, where Σ is an n×n matrix. U is an m×n unitary matrix, and V is an n×n unitary matrix. The diagonal elements of Σ are the singular values of A; they are real and non-negative, and are returned in descending order. U and V are the left and right singular vectors of A. gesvda computes eigenvalues of A**T*A, or A**H*A (if A is complex), to approximate singular values and singular vectors. It generates matrices U and V and transforms the matrix A to the following form Uᴴ*A*V=S+E where S is diagonal and E depends on rounding errors. To certain conditions, U, V and S approximate singular values and singular vectors up to machine zero of single precision. In general, V is unitary, S is more accurate than U. If singular value is far from zero, then left singular vector U is accurate. In other words, the accuracy of singular values and left singular vectors depend on the distance between singular value and zero. Since the computation of A**T*A, or A**H*A can greatly amplify errors, it is recommended to use gesvda only with well-conditioned data. The input parameter rank decides the number of singular values and singular vectors are computed in parameter S, U and V. The output parameter h_RnrmF computes Frobenius norm of residual. To compute h_RnrmF, info != NULL is required. A−U*S*Vᴴ if the parameter rank is equal n. Otherwise, h_RnrmF reports ‖U*S*Vᴴ‖−‖S‖ in Frobenius norm sense, that is, how far U is from unitary. gesvdaStridedBatched performs gesvda on each matrix. It requires that all matrices are of the same size m,n and are packed in a contiguous way, A=(A0A1⋯) Each matrix is column-major with leading dimension lda, so the formula for random access is Aₖ(i,j)=A[i+lda*j+strideA*k] . Similarly, the formula for random access of S is Sₖ(j)=S[j+StrideS*k] , the formula for random access of U is Uₖ(i,j)=U[i+ldu*j+strideU*k] and the formula for random access of V is Vₖ(i,j)=V[i+ldv*j+strideV*k] . The input parameter lwork is the size of the working space, and it is returned by gesvdaStridedBatched_bufferSize(). The output parameter info is an integer array of size batchSize. If the function returns ErrInvalidValue, the first element info[0] = -i (less than zero) indicates i-th parameter is wrong (not counting handle). Otherwise, if info[i] = min(m,n)+1, gesvdaStridedBatched did not converge on the i-th matrix. If 0 < info[i] < min(m,n)+1, gesvdaStridedBatched could not compute an SVD of the i-th matrix fully; the leading singular values Si[k], 0 <= k <= info[i]-1, and corresponding singular vectors may still be useful. In this case, if h_RnrmF is requested, h_RnrmF reports the residual as if rank was set to info[i]-1. Note that the problem size is limited by the condition batchSize*stride{A/S/U/V}<=INT32_MAX primarily due to the current implementation constraints. Please visit cuSOLVER Library Samples - gesvdaStridedBatched for a code example. Remark 1: The routine returns V, not Vᴴ . This is different from gesvd. Remark 2: The routine only supports m >=n. Remark 3: It is recommended to use an FP64 data type, that is Handle.DgesvdaStridedBatched or Handle.ZgesvdaStridedBatched. Remark 4: If the user is confident on the accuracy of singular values and singular vectors, for example, certain conditions hold (required singular value is far from zero), then the performance can be improved by passing a null pointer to h_RnrmF, i.e. no computation of the residual norm.
- jobz: Specifies options to either compute singular value only or singular vectors as well: jobz = EigModeNovector : Compute singular values only; jobz = EigModeVector : Compute singular values and singular vectors
- rank: Number of singular values (from largest to smallest)
- m: Number of rows of matrix Aj
- n: Number of columns of matrix Aj
- lda: Leading dimension of two-dimensional array used to store matrix Aj
- strideA: Value of type long long int that gives the address offset between A[i] and A[i+1]. strideA is not less than lda*n
- strideS: Value of type long long int that gives the address offset between S[i] and S[i+1]. strideS is not less than rank
- ldu: Leading dimension of two-dimensional array used to store matrix Uj. ldu is not less than max(1,m)
- strideU: Value of type long long int that gives the address offset between U[i] and U[i+1]. strideU is not less than ldu*rank
- ldv: Leading dimension of two-dimensional array used to store matrix Vj. ldv is not less than max(1,n)
- strideV: Value of type long long int that gives the address offset between V[i] and V[i+1]. strideV is not less than ldv*rank
- lwork: Size of work, returned by gesvdaStridedBatched_bufferSize
- hRNrmF: array of size batchSize. h_RnrmF[i] is norm of residual of i-th matrix. If 0 < info[i] < min(m,n)+1, h_RnrmF[i] reports the residual as if rank of the i-th matrix had been set to info[i]-1
- batchSize: Number of matrices. batchSize is not less than 1
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or batchSize*stride{A/S/U/V}>INT32_MAX or lda<max(1,m) or ldu<max(1,m) or ldv<max(1,n) or strideA<lda*n or strideS<rank or strideU<ldu*rank or strideV<ldv*rank or batchSize<1 or jobz is not EigModeNovector or EigModeVector).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSgesvdaStridedBatched.
func (Handle) SgesvdaStridedBatchedBufferSize ¶
func (h Handle) SgesvdaStridedBatchedBufferSize(jobz EigMode, rank int32, m int32, n int32, dA driver.DevicePtr, lda int32, strideA int64, dS driver.DevicePtr, strideS int64, dU driver.DevicePtr, ldu int32, strideU int64, dV driver.DevicePtr, ldv int32, strideV int64, lwork *int32, batchSize int32) error
SgesvdaStridedBatchedBufferSize returns the workspace size, in elements of float32, for Handle.SgesvdaStridedBatched.
- jobz: Specifies options to either compute singular value only or singular vectors as well: jobz = EigModeNovector : Compute singular values only; jobz = EigModeVector : Compute singular values and singular vectors
- rank: Number of singular values (from largest to smallest)
- m: Number of rows of matrix Aj
- n: Number of columns of matrix Aj
- lda: Leading dimension of two-dimensional array used to store matrix Aj
- strideA: Value of type long long int that gives the address offset between A[i] and A[i+1]. strideA is not less than lda*n
- strideS: Value of type long long int that gives the address offset between S[i] and S[i+1]. strideS is not less than rank
- ldu: Leading dimension of two-dimensional array used to store matrix Uj. ldu is not less than max(1,m)
- strideU: Value of type long long int that gives the address offset between U[i] and U[i+1]. strideU is not less than ldu*rank
- ldv: Leading dimension of two-dimensional array used to store matrix Vj. ldv is not less than max(1,n)
- strideV: Value of type long long int that gives the address offset between V[i] and V[i+1]. strideV is not less than ldv*rank
- lwork: Size of work, in elements of float32
- batchSize: Number of matrices. batchSize is not less than 1
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or batchSize*stride{A/S/U/V}>INT32_MAX or lda<max(1,m) or ldu<max(1,m) or ldv<max(1,n) or strideA<lda*n or strideS<rank or strideU<ldu*rank or strideV<ldv*rank or batchSize<1 or jobz is not EigModeNovector or EigModeVector).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSgesvdaStridedBatchedBufferSize, bound as cusolverDnSgesvdaStridedBatched_bufferSize.
func (Handle) Sgesvdj ¶
func (h Handle) Sgesvdj(jobz EigMode, econ int32, m int32, n int32, a driver.DevicePtr, lda int32, s driver.DevicePtr, u driver.DevicePtr, ldu int32, v driver.DevicePtr, ldv int32, work driver.DevicePtr, lwork int32, info driver.DevicePtr, params GesvdjInfo) error
Sgesvdj computes the singular value decomposition (SVD) of an m×n matrix A and corresponding the left and/or right singular vectors.
The SVD is written: A=U*Σ*Vᴴ where Σ is an m×n matrix which is zero except for its min(m,n) diagonal elements, U is an m×m unitary matrix, and V is an n×n unitary matrix. The diagonal elements of Σ are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A. gesvdj has the same functionality as gesvd. The difference is that gesvd uses QR algorithm and gesvdj uses Jacobi method. The parallelism of Jacobi method gives GPU better performance on small and medium size matrices. Moreover the user can configure gesvdj to perform approximation up to certain accuracy. gesvdj iteratively generates a sequence of unitary matrices to transform matrix A to the following form Uᴴ*A*V=S+E where S is diagonal and diagonal of E is zero. During the iterations, the Frobenius norm of E decreases monotonically. As E goes down to zero, S is the set of singular values. In practice, Jacobi method stops if ‖E‖_(F)≤eps*‖A‖_(F) where eps is given tolerance. Note that if the real residual norm ‖S−Uᴴ*A*V‖_(F) is computed, it will differ from ‖E‖_(F) up to roundoff errors of order N=max(m,n), to still have the standard SVD accuracy expectation ‖S−Uᴴ*A*V‖_(F)O(N)*‖A‖_(F)≤‖E‖_(F)‖A‖_(F)≤eps O(N) is typically N, but the constant depends on the number of sweeps, which gives an upper roundoff error bound of sweeps*N. gesvdj has two parameters to control the accuracy. First parameter is tolerance ( eps). The default value is machine accuracy but The user can use function GesvdjInfo.XgesvdjSetTolerance to set a priori tolerance. The second parameter is maximum number of sweeps which controls number of iterations of Jacobi method. The default value is 100 but the user can use function GesvdjInfo.XgesvdjSetMaxSweeps to set a proper bound. The experiments show 15 sweeps are good enough to converge to machine accuracy. gesvdj stops either tolerance is met or maximum number of sweeps is met. Jacobi method has quadratic convergence, so the accuracy is not proportional to number of sweeps. To guarantee certain accuracy, the user should configure tolerance only. The input parameter lwork is the size of the working space, and it is returned by gesvdj_bufferSize(). If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). If info = min(m,n)+1, gesvdj does not converge under given tolerance and maximum sweeps. If the user sets an improper tolerance, gesvdj may not converge. For example, tolerance should not be smaller than machine accuracy. Please visit cuSOLVER Library Samples - gesvdj for a code example. Remark 1: gesvdj supports any combination of m and n. Remark 2: the routine returns V, not Vᴴ . This is different from gesvd.
- jobz: Specifies options to either compute singular value only or singular vectors as well: jobz = EigModeNovector : Compute singular values only; jobz = EigModeVector : Compute singular values and singular vectors
- econ: econ = 1 for economy size for U and V
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,m). On exit, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- s: Real array of dimension min(m,n). The singular values of A, sorted so that S(i) >= S(i+1)
- u: array of dimension ldu * m if econ is zero. If econ is nonzero, the dimension is ldu * min(m,n). U contains the left singular vectors
- ldu: Leading dimension of two-dimensional array used to store matrix U. ldu is not less than max(1,m)
- v: array of dimension ldv * n if econ is zero. If econ is nonzero, the dimension is ldv * min(m,n). V contains the right singular vectors
- ldv: Leading dimension of two-dimensional array used to store matrix V. ldv is not less than max(1,n)
- work: array of size lwork, working space
- lwork: Size of work, returned by gesvdj_bufferSize
- info: If info = 0, the operation is successful. if info = -i, the i-th parameter is wrong (not counting handle). if info = min(m,n)+1, gesvdj dose not converge under given tolerance and maximum sweeps
- params: Structure filled with parameters of Jacobi algorithm and results of gesvdj. params can be destroyed after the host thread exits the routine
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m) or ldu<max(1,m) or ldv<max(1,n) or jobz is not EigModeNovector or EigModeVector ).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSgesvdj.
func (Handle) SgesvdjBatched ¶
func (h Handle) SgesvdjBatched(jobz EigMode, m int32, n int32, a driver.DevicePtr, lda int32, s driver.DevicePtr, u driver.DevicePtr, ldu int32, v driver.DevicePtr, ldv int32, work driver.DevicePtr, lwork int32, info driver.DevicePtr, params GesvdjInfo, batchSize int32) error
SgesvdjBatched computes singular values and singular vectors of a sequence of general m×n matrices.
Aⱼ=Uⱼ*Σⱼ*Vⱼᴴ, where Σⱼ is a real m×n diagonal matrix which is zero except for its min(m,n) diagonal elements. Uⱼ (left singular vectors) is an m×m unitary matrix and Vⱼ (right singular vectors) is a n×n unitary matrix. The diagonal elements of Σⱼ are the singular values of Aⱼ in either descending order or non-sorting order. gesvdjBatched performs gesvdj on each matrix. It requires that all matrices are of the same size m,n no greater than 32 and are packed in contiguous way, A=(A0A1⋯) Each matrix is column-major with leading dimension lda, so the formula for random access is Aₖ(i,j)=A[i+lda*j+lda*n*k] . The parameter S also contains singular values of each matrix in contiguous way, S=(S0S1⋯) The formula for random access of S is Sₖ(j)=S[j+min(m,n)*k] . Except for tolerance and maximum sweeps, gesvdjBatched can either sort the singular values in descending order (default) or chose as-is (without sorting) by the function GesvdjInfo.XgesvdjSetSortEig. If the user packs several tiny matrices into diagonal blocks of one matrix, non-sorting option can separate singular values of those tiny matrices. gesvdjBatched cannot report residual and executed sweeps by function Handle.XgesvdjGetResidual and Handle.XgesvdjGetSweeps. Any call of the above two returns ErrNotSupported. The user needs to compute residual explicitly. The input parameter lwork is the size of the working space, and it is returned by gesvdjBatched_bufferSize(). The output parameter info is an integer array of size batchSize. If the function returns ErrInvalidValue, the first element info[0] = -i (less than zero) indicates i-th parameter is wrong (not counting handle). Otherwise, if info[i] = min(m,n)+1, gesvdjBatched does not converge on i-th matrix under given tolerance and maximum sweeps. Please visit cuSOLVER Library Samples - gesvdjBatched for a code example.
- jobz: Specifies options to either compute singular value only or singular vectors as well: jobz = EigModeNovector : Compute singular values only; jobz = EigModeVector : Compute singular values and singular vectors
- m: Number of rows of matrix Aj. m is no greater than 32
- n: Number of columns of matrix Aj. n is no greater than 32
- a: array of dimension lda * n * batchSize with lda is not less than max(1,n). on Exit: the contents of Aj are destroyed
- lda: Lading dimension of two-dimensional array used to store matrix Aj
- s: Areal array of dimension min(m,n)*batchSize. It stores the singular values of Aj in descending order or non-sorting order
- u: array of dimension ldu * m * batchSize. Uj contains the left singular vectors of Aj
- ldu: Leading dimension of two-dimensional array used to store matrix Uj. ldu is not less than max(1,m)
- v: array of dimension ldv * n * batchSize. Vj contains the right singular vectors of Aj
- ldv: Leading dimension of two-dimensional array used to store matrix Vj. ldv is not less than max(1,n)
- work: array of size lwork, working space
- lwork: Size of work, returned by gesvdjBatched_bufferSize
- info: An integer array of dimension batchSize. If ErrInvalidValue is returned, info[0] = -i (less than zero) indicates i-th parameter is wrong (not counting handle). Otherwise, if info[i] = 0, the operation is successful. if info[i] = min(m,n)+1, gesvdjBatched dose not converge on i-th matrix under given tolerance and maximum sweeps
- params: Structure filled with parameters of Jacobi algorithm. params can be destroyed after the host thread exits the routine
- batchSize: Number of matrices
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m) or ldu<max(1,m) or ldv<max(1,n) or jobz is not EigModeNovector or EigModeVector , or batchSize<0).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSgesvdjBatched.
func (Handle) SgesvdjBatchedBufferSize ¶
func (h Handle) SgesvdjBatchedBufferSize(jobz EigMode, m int32, n int32, a driver.DevicePtr, lda int32, s driver.DevicePtr, u driver.DevicePtr, ldu int32, v driver.DevicePtr, ldv int32, lwork *int32, params GesvdjInfo, batchSize int32) error
SgesvdjBatchedBufferSize returns the workspace size, in elements of float32, for Handle.SgesvdjBatched.
- jobz: Specifies options to either compute singular value only or singular vectors as well: jobz = EigModeNovector : Compute singular values only; jobz = EigModeVector : Compute singular values and singular vectors
- m: Number of rows of matrix Aj. m is no greater than 32
- n: Number of columns of matrix Aj. n is no greater than 32
- a: array of dimension lda * n * batchSize with lda is not less than max(1,n). on Exit: the contents of Aj are destroyed
- lda: Lading dimension of two-dimensional array used to store matrix Aj
- s: Areal array of dimension min(m,n)*batchSize. It stores the singular values of Aj in descending order or non-sorting order
- u: array of dimension ldu * m * batchSize. Uj contains the left singular vectors of Aj
- ldu: Leading dimension of two-dimensional array used to store matrix Uj. ldu is not less than max(1,m)
- v: array of dimension ldv * n * batchSize. Vj contains the right singular vectors of Aj
- ldv: Leading dimension of two-dimensional array used to store matrix Vj. ldv is not less than max(1,n)
- lwork: Size of work, in elements of float32
- params: Structure filled with parameters of Jacobi algorithm. params can be destroyed after the host thread exits the routine
- batchSize: Number of matrices
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m) or ldu<max(1,m) or ldv<max(1,n) or jobz is not EigModeNovector or EigModeVector , or batchSize<0).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSgesvdjBatchedBufferSize, bound as cusolverDnSgesvdjBatched_bufferSize.
func (Handle) SgesvdjBufferSize ¶
func (h Handle) SgesvdjBufferSize(jobz EigMode, econ int32, m int32, n int32, a driver.DevicePtr, lda int32, s driver.DevicePtr, u driver.DevicePtr, ldu int32, v driver.DevicePtr, ldv int32, lwork *int32, params GesvdjInfo) error
SgesvdjBufferSize returns the workspace size, in elements of float32, for Handle.Sgesvdj.
- jobz: Specifies options to either compute singular value only or singular vectors as well: jobz = EigModeNovector : Compute singular values only; jobz = EigModeVector : Compute singular values and singular vectors
- econ: econ = 1 for economy size for U and V
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,m). On exit, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- s: Real array of dimension min(m,n). The singular values of A, sorted so that S(i) >= S(i+1)
- u: array of dimension ldu * m if econ is zero. If econ is nonzero, the dimension is ldu * min(m,n). U contains the left singular vectors
- ldu: Leading dimension of two-dimensional array used to store matrix U. ldu is not less than max(1,m)
- v: array of dimension ldv * n if econ is zero. If econ is nonzero, the dimension is ldv * min(m,n). V contains the right singular vectors
- ldv: Leading dimension of two-dimensional array used to store matrix V. ldv is not less than max(1,n)
- lwork: Size of work, in elements of float32
- params: Structure filled with parameters of Jacobi algorithm and results of gesvdj. params can be destroyed after the host thread exits the routine
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m) or ldu<max(1,m) or ldv<max(1,n) or jobz is not EigModeNovector or EigModeVector ).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSgesvdjBufferSize, bound as cusolverDnSgesvdj_bufferSize.
func (Handle) Sgetrf ¶
func (h Handle) Sgetrf(m int32, n int32, a driver.DevicePtr, lda int32, workspace driver.DevicePtr, devIpiv driver.DevicePtr, devInfo driver.DevicePtr) error
Sgetrf computes the LU factorization of an m×n matrix.
P*A=L*U, where A is an m×n matrix, P is a permutation matrix, L is a lower triangular matrix with unit diagonal, and U is an upper triangular matrix. The input parameter Lwork is size of the working space, and it is returned by getrf_bufferSize(). If LU factorization failed, i.e. matrix A ( U) is singular, The output parameter devInfo=i indicates U(i,i) = 0. If devIpiv is null, no pivoting is performed. The factorization is A=L*U, which is not numerically stable. No matter LU factorization failed or not, the output parameter devIpiv contains pivoting sequence, row i is interchanged with row devIpiv(i). The user can combine getrf and getrs to complete a linear solver. Remark: getrf uses fastest implementation with large workspace of size m*n. The user can choose the legacy implementation with minimal workspace by Getrf and Params.SetAdvOptions(params, CUSOLVERDN_GETRF, Alg1).
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,m)
- lda: Leading dimension of two-dimensional array used to store matrix A
- workspace: Working space, array of size Lwork
- devIpiv: Array of size at least min(m,n), containing pivot indices
- devInfo: If devInfo = 0, the LU factorization is successful. if devInfo = -i, the i-th parameter is wrong (not counting handle). if devInfo = i, the U(i,i) = 0
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSgetrf.
func (Handle) SgetrfBufferSize ¶
SgetrfBufferSize returns the workspace size, in elements of float32, for Handle.Sgetrf.
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,m)
- lda: Leading dimension of two-dimensional array used to store matrix A
- lwork: Size of Workspace, in elements of float32
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSgetrfBufferSize, bound as cusolverDnSgetrf_bufferSize.
func (Handle) Sgetrs ¶
func (h Handle) Sgetrs(trans Operation, n int32, nrhs int32, a driver.DevicePtr, lda int32, devIpiv driver.DevicePtr, b driver.DevicePtr, ldb int32, devInfo driver.DevicePtr) error
Sgetrs solves a linear system of multiple right-hand sides.
op(A)*X=B, where A is an n×n matrix, and was LU-factored by getrf, that is, lower triangular part of A is L, and upper triangular part (including diagonal elements) of A is U. B is an n×nrhs right-hand side matrix. The input parameter trans is defined by op(A) = A if trans == CUBLAS_OP_N, op(A) = Aᵀ if trans == CUBLAS_OP_T, and op(A) = Aᴴ if trans == CUBLAS_OP_C. The input parameter devIpiv is an output of getrf. It contains pivot indices, which are used to permutate right-hand sides. The user can combine getrf and getrs to complete a linear solver.
- trans: Operation op(A) that is non- or (conj.) transpose
- n: Number of rows and columns of matrix A
- nrhs: Number of right-hand sides
- a: array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- devIpiv: Array of size at least n, containing pivot indices
- b: array of dimension ldb * nrhs with ldb is not less than max(1,n)
- ldb: Leading dimension of two-dimensional array used to store matrix B
- devInfo: If devInfo = 0, the operation is successful. if devInfo = -i, the i-th parameter is wrong (not counting handle)
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n) or ldb<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSgetrs.
func (Handle) Slaswp ¶
func (h Handle) Slaswp(n int32, a driver.DevicePtr, lda int32, k1 int32, k2 int32, devIpiv driver.DevicePtr, incx int32) error
Slaswp wraps cusolverDnSlaswp.
func (Handle) Slauum ¶
func (h Handle) Slauum(uplo FillMode, n int32, a driver.DevicePtr, lda int32, work driver.DevicePtr, lwork int32, devInfo driver.DevicePtr) error
Slauum wraps cusolverDnSlauum.
func (Handle) SlauumBufferSize ¶
func (h Handle) SlauumBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32) (int32, error)
SlauumBufferSize wraps cusolverDnSlauumBufferSize.
Wraps cusolverDnSlauumBufferSize, bound as cusolverDnSlauum_bufferSize.
func (Handle) Sorgbr ¶
func (h Handle) Sorgbr(side SideMode, m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Sorgbr generates one of the unitary matrices Q or P**H determined by gebrd when reducing a matrix A to bidiagonal form: Qᴴ*A*P=B.
Q and P**H are defined as products of elementary reflectors H(i) or G(i) respectively. The input parameter lwork is size of the working space, and it is returned by orgbr_bufferSize().
- side: If side = CUBLAS_SIDE_LEFT, generate Q. if side = CUBLAS_SIDE_RIGHT, generate P**T
- m: Number of rows of matrix Q or P**T
- n: If side = CUBLAS_SIDE_LEFT, m>= n>= min(m,k). if side = CUBLAS_SIDE_RIGHT, n>= m>= min(n,k)
- k: If side = CUBLAS_SIDE_LEFT, the number of columns in the original m-by-k matrix reduced by gebrd. if side = CUBLAS_SIDE_RIGHT, the number of rows in the original k-by-n matrix reduced by gebrd
- 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
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m)
- 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
- work: Working space, array of size lwork
- lwork: Size of working array work
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or wrong lda ).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSorgbr.
func (Handle) SorgbrBufferSize ¶
func (h Handle) SorgbrBufferSize(side SideMode, m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr) (int32, error)
SorgbrBufferSize returns the workspace size, in elements of float32, for Handle.Sorgbr.
- side: If side = CUBLAS_SIDE_LEFT, generate Q. if side = CUBLAS_SIDE_RIGHT, generate P**T
- m: Number of rows of matrix Q or P**T
- n: If side = CUBLAS_SIDE_LEFT, m>= n>= min(m,k). if side = CUBLAS_SIDE_RIGHT, n>= m>= min(n,k)
- k: If side = CUBLAS_SIDE_LEFT, the number of columns in the original m-by-k matrix reduced by gebrd. if side = CUBLAS_SIDE_RIGHT, the number of rows in the original k-by-n matrix reduced by gebrd
- 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
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m)
- 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
- lwork: Size of work, in elements of float32
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or wrong lda ).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSorgbrBufferSize, bound as cusolverDnSorgbr_bufferSize.
func (Handle) Sorgqr ¶
func (h Handle) Sorgqr(m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Sorgqr overwrites m×n matrix A.
Q=H(1)*H(2)*...*H(k), where Q is a unitary matrix formed by a sequence of elementary reflection vectors stored in A. The input parameter lwork is size of the working space, and it is returned by orgqr_bufferSize(). The user can combine geqrf, orgqr to complete orthogonalization.
- m: Number of rows of matrix Q. m >= 0
- n: Number of columns of matrix Q. m >= n >= 0
- k: Number of elementary reflections whose product defines the matrix Q. n >= k >= 0
- a: array of dimension lda * n with lda is not less than max(1,m). i-th column of A contains elementary reflection vector
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m)
- tau: array of dimension k. tau(i) is the scalar of i-th elementary reflection vector
- work: Working space, array of size lwork
- lwork: Size of working array work
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n,k<0, n>m, k>n or lda<m).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSorgqr.
func (Handle) SorgqrBufferSize ¶
func (h Handle) SorgqrBufferSize(m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr) (int32, error)
SorgqrBufferSize returns the workspace size, in elements of float32, for Handle.Sorgqr.
- m: Number of rows of matrix Q. m >= 0
- n: Number of columns of matrix Q. m >= n >= 0
- k: Number of elementary reflections whose product defines the matrix Q. n >= k >= 0
- a: array of dimension lda * n with lda is not less than max(1,m). i-th column of A contains elementary reflection vector
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m)
- tau: array of dimension k. tau(i) is the scalar of i-th elementary reflection vector
- lwork: Size of work, in elements of float32
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n,k<0, n>m, k>n or lda<m).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSorgqrBufferSize, bound as cusolverDnSorgqr_bufferSize.
func (Handle) Sorgtr ¶
func (h Handle) Sorgtr(uplo FillMode, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Sorgtr generates a unitary matrix Q which is defined as the product of n-1 elementary reflectors of order n, as returned by sytrd:
The input parameter lwork is size of the working space, and it is returned by orgtr_bufferSize().
- 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
- n: Number of rows (columns) of matrix Q
- 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
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,n)
- tau: array of dimension (n-1) tau(i) is the scalar of i-th elementary reflection vector
- work: Working space, array of size lwork
- lwork: Size of working array work
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or wrong lda).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSorgtr.
func (Handle) SorgtrBufferSize ¶
func (h Handle) SorgtrBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr) (int32, error)
SorgtrBufferSize returns the workspace size, in elements of float32, for Handle.Sorgtr.
- 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
- n: Number of rows (columns) of matrix Q
- 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
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,n)
- tau: array of dimension (n-1) tau(i) is the scalar of i-th elementary reflection vector
- lwork: Size of work, in elements of float32
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or wrong lda).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSorgtrBufferSize, bound as cusolverDnSorgtr_bufferSize.
func (Handle) Sormqr ¶
func (h Handle) Sormqr(side SideMode, trans Operation, m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, c driver.DevicePtr, ldc int32, work driver.DevicePtr, lwork int32, devInfo driver.DevicePtr) error
Sormqr overwrites m×n matrix C.
C = op(Q)*C if side == CUBLAS_SIDE_LEFT, and C = C*op(Q) if side == CUBLAS_SIDE_RIGHT. The operation of Q is defined by op(Q) = Q if trans == CUBLAS_OP_N, op(Q) = Qᵀ if trans == CUBLAS_OP_T, and op(Q) = Qᴴ if trans == CUBLAS_OP_C. Q is a unitary matrix formed by a sequence of elementary reflection vectors from QR factorization ( geqrf) of A. Q = H(1) H(2) … H(k) Q is of order m if side = CUBLAS_SIDE_LEFT and of order n if side = CUBLAS_SIDE_RIGHT. The input parameter lwork is size of the working space, and it is returned by geqrf_bufferSize() or ormqr_bufferSize(). The user can combine geqrf, ormqr and trsm to complete a linear solver or a least-square solver.
- side: Indicates if matrix Q is on the left or right of C
- trans: Operation op(Q) that is non- or (conj.) transpose
- m: Number of rows of matrix C
- n: Number of columns of matrix C
- k: Number of elementary reflections whose product defines the matrix Q. If side is CUBLAS_SIDE_LEFT, m >= k >= 0; if side is CUBLAS_SIDE_RIGHT, n >= k >= 0
- a: array of dimension lda * k with lda is not less than max(1,m). The matrix A is from geqrf, so i-th column contains elementary reflection vector
- 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)
- tau: array of dimension k. The vector tau is from geqrf, so tau(i) is the scalar of the i-th elementary reflection vector
- c: array of size ldc * n. On exit, C is overwritten by op(Q)*C or C*op(Q)
- ldc: Leading dimension of two-dimensional array of matrix C. ldc >= max(1,m)
- work: Working space, array of size lwork
- lwork: Size of working array work
- devInfo: If devInfo = 0, the ormqr is successful. If devInfo = -i, the i-th parameter is wrong (not counting handle)
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n,k<0, k > m if CUBLAS_SIDE_LEFT, k > n if CUBLAS_SIDE_RIGHT, wrong lda or ldc or invalid trans).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSormqr.
func (Handle) SormqrBufferSize ¶
func (h Handle) SormqrBufferSize(side SideMode, trans Operation, m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, c driver.DevicePtr, ldc int32) (int32, error)
SormqrBufferSize returns the workspace size, in elements of float32, for Handle.Sormqr.
- side: Indicates if matrix Q is on the left or right of C
- trans: Operation op(Q) that is non- or (conj.) transpose
- m: Number of rows of matrix C
- n: Number of columns of matrix C
- k: Number of elementary reflections whose product defines the matrix Q. If side is CUBLAS_SIDE_LEFT, m >= k >= 0; if side is CUBLAS_SIDE_RIGHT, n >= k >= 0
- a: array of dimension lda * k with lda is not less than max(1,m). The matrix A is from geqrf, so i-th column contains elementary reflection vector
- 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)
- tau: array of dimension k. The vector tau is from geqrf, so tau(i) is the scalar of the i-th elementary reflection vector
- c: array of size ldc * n. On exit, C is overwritten by op(Q)*C or C*op(Q)
- ldc: Leading dimension of two-dimensional array of matrix C. ldc >= max(1,m)
- lwork: Size of work, in elements of float32
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n,k<0, k > m if CUBLAS_SIDE_LEFT, k > n if CUBLAS_SIDE_RIGHT, wrong lda or ldc or invalid trans).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSormqrBufferSize, bound as cusolverDnSormqr_bufferSize.
func (Handle) Sormtr ¶
func (h Handle) Sormtr(side SideMode, uplo FillMode, trans Operation, m int32, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, c driver.DevicePtr, ldc int32, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Sormtr overwrites m×n matrix C.
C = op(Q)*C if side == CUBLAS_SIDE_LEFT, and C = C*op(Q) if side == CUBLAS_SIDE_RIGHT, where Q is a unitary matrix formed by a sequence of elementary reflection vectors from sytrd. The operation on Q is defined by op(Q) = Q if trans == CUBLAS_OP_N, op(Q) = Qᵀ if trans == CUBLAS_OP_T, and op(Q) = Qᴴ if trans == CUBLAS_OP_C. The input parameter lwork is size of the working space, and it is returned by ormtr_bufferSize().
- side: side = CUBLAS_SIDE_LEFT, apply Q or Q**T from the Left; side = CUBLAS_SIDE_RIGHT, apply Q or Q**T from the Right
- 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
- trans: Operation op(Q) that is non- or (conj.) transpose
- m: Number of rows of matrix C
- n: Number of columns of matrix C
- 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
- 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)
- 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
- c: array of size ldc * n. On exit, C is overwritten by op(Q)*C or C*op(Q)
- ldc: Leading dimension of two-dimensional array of matrix C. ldc >= max(1,m)
- work: Working space, array of size lwork
- lwork: Size of working array work
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or wrong lda or ldc).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSormtr.
func (Handle) SormtrBufferSize ¶
func (h Handle) SormtrBufferSize(side SideMode, uplo FillMode, trans Operation, m int32, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, c driver.DevicePtr, ldc int32) (int32, error)
SormtrBufferSize returns the workspace size, in elements of float32, for Handle.Sormtr.
- side: side = CUBLAS_SIDE_LEFT, apply Q or Q**T from the Left; side = CUBLAS_SIDE_RIGHT, apply Q or Q**T from the Right
- 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
- trans: Operation op(Q) that is non- or (conj.) transpose
- m: Number of rows of matrix C
- n: Number of columns of matrix C
- 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
- 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)
- 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
- c: array of size ldc * n. On exit, C is overwritten by op(Q)*C or C*op(Q)
- ldc: Leading dimension of two-dimensional array of matrix C. ldc >= max(1,m)
- lwork: Size of work, in elements of float32
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or wrong lda or ldc).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSormtrBufferSize, bound as cusolverDnSormtr_bufferSize.
func (Handle) Spotrf ¶
func (h Handle) Spotrf(uplo FillMode, n int32, a driver.DevicePtr, lda int32, workspace driver.DevicePtr, lwork int32, devInfo driver.DevicePtr) error
Spotrf computes the Cholesky factorization of a Hermitian positive-definite matrix.
A is an n×n Hermitian matrix, only the lower or upper part is meaningful. The input parameter uplo indicates which part of the matrix is used. The function will leave the other part untouched. If input parameter uplo is CUBLAS_FILL_MODE_LOWER, only the lower triangular part of A is processed, and replaced by the lower triangular Cholesky factor L. A=L*Lᴴ If input parameter uplo is CUBLAS_FILL_MODE_UPPER, only upper triangular part of A is processed, and replaced by upper triangular Cholesky factor U. A=Uᴴ*U The input parameter Lwork is size of the working space, and it is returned by potrf_bufferSize(). If Cholesky factorization failed, i.e. some leading minor of A is not positive definite, or equivalently some diagonal elements of L or U is not a real number. The output parameter devInfo would indicate smallest leading minor of A which is not positive definite.
- uplo: Indicates if matrix A lower or upper part is stored; the other part is not referenced
- n: Number of rows and columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- workspace: Working space, array of size Lwork
- lwork: Size of Workspace, returned by potrf_bufferSize
- devInfo: If devInfo = 0, the Cholesky factorization is successful. if devInfo = -i, the i-th parameter is wrong (not counting handle). if devInfo = i, the leading minor of order i is not positive definite
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSpotrf.
func (Handle) SpotrfBatched ¶
func (h Handle) SpotrfBatched(uplo FillMode, n int32, aarray driver.DevicePtr, lda int32, infoArray driver.DevicePtr, batchSize int32) error
SpotrfBatched computes the Cholesky factorization of a sequence of Hermitian positive-definite matrices.
Each Aarray[i] for i=0,1,..., batchSize-1 is a n×n Hermitian matrix, only lower or upper part is meaningful. The input parameter uplo indicates which part of the matrix is used. If input parameter uplo is CUBLAS_FILL_MODE_LOWER, only lower triangular part of A is processed, and replaced by lower triangular Cholesky factor L. A=L*Lᴴ If input parameter uplo is CUBLAS_FILL_MODE_UPPER, only upper triangular part of A is processed, and replaced by upper triangular Cholesky factor U. A=Uᴴ*U If Cholesky factorization failed, i.e. some leading minor of A is not positive definite, or equivalently some diagonal elements of L or U is not a real number. The output parameter infoArray would indicate smallest leading minor of A which is not positive definite. infoArray is an integer array of size batchsize. If potrfBatched returns ErrInvalidValue, infoArray[0] = -i (less than zero), meaning that the i-th parameter is wrong (not counting handle). If potrfBatched returns Success but infoArray[i] = k is positive, then i-th matrix is not positive definite and the Cholesky factorization failed at row k. Remark: the other part of A is used as a workspace. For example, if uplo is CUBLAS_FILL_MODE_UPPER, upper triangle of A contains Cholesky factor U and lower triangle of A is destroyed after potrfBatched.
- uplo: Indicates if lower or upper part is stored; the other part is used as a workspace
- n: Number of rows and columns of matrix A
- aarray: Array of pointers to array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store each matrix Aarray[i]
- infoArray: Array of size batchSize. infoArray[i] contains information of factorization of Aarray[i]. if potrfBatched returns ErrInvalidValue, infoArray[0] = -i (less than zero) means the i-th parameter is wrong (not counting handle). if potrfBatched returns Success, infoArray[i] = 0 means the Cholesky factorization of i-th matrix is successful, and infoArray[i] = k means the leading submatrix of order k of i-th matrix is not positive definite
- batchSize: Number of pointers in Aarray
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n) or batchSize<1).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSpotrfBatched.
func (Handle) SpotrfBufferSize ¶
func (h Handle) SpotrfBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32) (int32, error)
SpotrfBufferSize returns the workspace size, in elements of float32, for Handle.Spotrf.
- uplo: Indicates if matrix A lower or upper part is stored; the other part is not referenced
- n: Number of rows and columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- lwork: Size of Workspace, in elements of float32
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSpotrfBufferSize, bound as cusolverDnSpotrf_bufferSize.
func (Handle) Spotri ¶
func (h Handle) Spotri(uplo FillMode, n int32, a driver.DevicePtr, lda int32, work driver.DevicePtr, lwork int32, devInfo driver.DevicePtr) error
Spotri computes the inverse of a positive-definite matrix A using the Cholesky factorization.
A=L*Lᴴ=Uᴴ*U, computed by potrf(). A is an n×n matrix containing the triangular factor L or U computed by the Cholesky factorization. Only lower or upper part is meaningful and the input parameter uplo indicates which part of the matrix is used. The function would leave the other part untouched. If the input parameter uplo is CUBLAS_FILL_MODE_LOWER, only lower triangular part of A is processed, and replaced the by lower triangular part of the inverse of A. If the input parameter uplo is CUBLAS_FILL_MODE_UPPER, only upper triangular part of A is processed, and replaced by the upper triangular part of the inverse of A. The input parameter Lwork is the size of the working space, returned by potri_bufferSize(). If the computation of the inverse fails, i.e. some leading minor of L or U, is null, the output parameter devInfo would indicate the smallest leading minor of L or U which is not positive definite.
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- n: Number of rows and columns of matrix A
- a: array of dimension lda * n where lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- lwork: Size of Workspace, returned by potri_bufferSize
- devInfo: If devInfo = 0, the computation of the inverse is successful. if devInfo = -i, the i-th parameter is wrong (not counting handle). if devInfo = i, the leading minor of order i is zero
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSpotri.
func (Handle) SpotriBufferSize ¶
func (h Handle) SpotriBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32) (int32, error)
SpotriBufferSize returns the workspace size, in elements of float32, for Handle.Spotri.
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- n: Number of rows and columns of matrix A
- a: array of dimension lda * n where lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- lwork: Size of Workspace, in elements of float32
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSpotriBufferSize, bound as cusolverDnSpotri_bufferSize.
func (Handle) Spotrs ¶
func (h Handle) Spotrs(uplo FillMode, n int32, nrhs int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, devInfo driver.DevicePtr) error
Spotrs solves a system of linear equations.
A*X=B, where A is an n×n Hermitian matrix, only lower or upper part is meaningful. The input parameter uplo indicates which part of the matrix is used. The function will leave the other part untouched. The user has to call potrf first to factorize matrix A. If input parameter uplo is CUBLAS_FILL_MODE_LOWER, A is lower triangular Cholesky factor L corresponding to A=L*Lᴴ . If input parameter uplo is CUBLAS_FILL_MODE_UPPER, A is upper triangular Cholesky factor U corresponding to A=Uᴴ*U . The operation is in-place, i.e. matrix X overwrites matrix B with the same leading dimension ldb.
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- n: Number of rows and columns of matrix A
- nrhs: Number of columns of matrix X and B
- 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
- lda: Leading dimension of two-dimensional array used to store matrix A
- 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
- devInfo: If devInfo = 0, the Cholesky factorization is successful. if devInfo = -i, the i-th parameter is wrong (not counting handle)
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, nrhs<0, lda<max(1,n) or ldb<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSpotrs.
func (Handle) SpotrsBatched ¶
func (h Handle) SpotrsBatched(uplo FillMode, n int32, nrhs int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, dInfo driver.DevicePtr, batchSize int32) error
SpotrsBatched solves a sequence of linear systems.
A[i]*X[i]=B[i], where each Aarray[i] for i=0,1,..., batchSize-1 is a n×n Hermitian matrix, only lower or upper part is meaningful. The input parameter uplo indicates which part of the matrix is used. The user has to call potrfBatched first to factorize matrix Aarray[i]. If input parameter uplo is CUBLAS_FILL_MODE_LOWER, A is lower triangular Cholesky factor L corresponding to A=L*Lᴴ . If input parameter uplo is CUBLAS_FILL_MODE_UPPER, A is upper triangular Cholesky factor U corresponding to A=Uᴴ*U . The operation is in-place, i.e. matrix X overwrites matrix B with the same leading dimension ldb. The output parameter info is a scalar. If info = -i (less than zero), the i-th parameter is wrong (not counting handle). Remark 1: only nrhs=1 is supported. Remark 2: infoArray from potrfBatched indicates if the matrix is positive definite. info from potrsBatched only shows which input parameter is wrong (not counting handle). Remark 3: the other part of A is used as a workspace. For example, if uplo is CUBLAS_FILL_MODE_UPPER, upper triangle of A contains Cholesky factor U and lower triangle of A is destroyed after potrsBatched. Please visit cuSOLVER Library Samples - potrfBatched for a code example.
- uplo: Indicates if matrix A lower or upper part is stored
- n: Number of rows and columns of matrix A
- nrhs: Number of columns of matrix X and B
- lda: Leading dimension of two-dimensional array used to store each matrix Aarray[i]
- ldb: Leading dimension of two-dimensional array used to store each matrix Barray[i]
- batchSize: Number of pointers in Aarray
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, nrhs<0, lda<max(1,n), ldb<max(1,n) or batchSize<0).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSpotrsBatched.
func (Handle) Ssyevd ¶
func (h Handle) Ssyevd(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, w driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Ssyevd computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix A.
The standard symmetric eigenvalue problem is A*V=V*Λ, where Λ is a real n×n diagonal matrix. V is an n×n unitary matrix. The diagonal elements of Λ are the eigenvalues of A in ascending order. The input parameter lwork is size of the working space, and it is returned by syevd_bufferSize(). If devInfo = i (greater than zero), i off-diagonal elements of an intermediate tridiagonal form did not converge to zero. If jobz = EigModeVector, A contains the orthonormal eigenvectors of the matrix A. The eigenvectors are computed by a divide and conquer algorithm. Please visit cuSOLVER Library Samples - syevd for a code example.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- w: A real array of dimension n. The eigenvalue values of A, in ascending order ie, sorted so that W(i) <= W(i+1)
- work: Working space, array of size lwork
- lwork: Size of work, returned by syevd_bufferSize
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSsyevd.
func (Handle) SsyevdBufferSize ¶
func (h Handle) SsyevdBufferSize(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, w driver.DevicePtr) (int32, error)
SsyevdBufferSize returns the workspace size, in elements of float32, for Handle.Ssyevd.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- w: A real array of dimension n. The eigenvalue values of A, in ascending order ie, sorted so that W(i) <= W(i+1)
- lwork: Size of work, in elements of float32
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSsyevdBufferSize, bound as cusolverDnSsyevd_bufferSize.
func (Handle) Ssyevdx ¶
func (h Handle) Ssyevdx(jobz EigMode, range_ EigRange, uplo FillMode, n int32, a driver.DevicePtr, lda int32, vl float32, vu float32, il int32, iu int32, meig *int32, w driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Ssyevdx computes all or selection of the eigenvalues and optionally eigenvectors of a symmetric (Hermitian) n×n matrix A.
The standard symmetric eigenvalue problem is: A*V=V*Λ where Λ is a real n×h_meig diagonal matrix. V is an n×h_meig unitary matrix. h_meig is the number of eigenvalues/eigenvectors computed by the routine, h_meig is equal to n when the whole spectrum (e.g., range = EigRangeAll) is requested. The diagonal elements of Λ are the eigenvalues of A in ascending order. The input parameter lwork is size of the working space, and it is returned by syevdx_bufferSize(). If devInfo = i (greater than zero), i off-diagonal elements of an intermediate tridiagonal form did not converge to zero. If jobz = EigModeVector, A contains the orthonormal eigenvectors of the matrix A. The eigenvectors are computed by a divide and conquer algorithm. Please visit cuSOLVER Library Samples - syevdx for a code example.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- range_: Specifies options to which selection of eigenvalues and optionally eigenvectors that need to be computed: range = EigRangeAll : all eigenvalues/eigenvectors will be found, will becomes the classical syevd/heevd routine; range = EigRangeV : all eigenvalues/eigenvectors in the half-open interval (vl,vu] will be found; range = EigRangeI : the il-th through iu-th eigenvalues/eigenvectors will be found
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- vl: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user wants to be sure not to miss any eigenvalue within the interval bound, we suggest that the user subtract/add epsilon (machine precision) to the interval bound such as (vl=vl-eps, vu=vu+eps]. This suggestion is valid for any selective routine from cuSolver or LAPACK
- vu: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user wants to be sure not to miss any eigenvalue within the interval bound, we suggest that the user subtract/add epsilon (machine precision) to the interval bound such as (vl=vl-eps, vu=vu+eps]. This suggestion is valid for any selective routine from cuSolver or LAPACK
- il: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- iu: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- w: A real array of dimension n. The eigenvalue values of A, in ascending order ie, sorted so that W(i) <= W(i+1)
- work: Working space, array of size lwork
- lwork: Size of work, returned by syevdx_bufferSize
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or range is not EigRangeAll or EigRangeV or EigRangeI, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSsyevdx.
func (Handle) SsyevdxBufferSize ¶
func (h Handle) SsyevdxBufferSize(jobz EigMode, range_ EigRange, uplo FillMode, n int32, a driver.DevicePtr, lda int32, vl float32, vu float32, il int32, iu int32, w driver.DevicePtr) (meig int32, lwork int32, err error)
SsyevdxBufferSize returns the workspace size, in elements of float32, for Handle.Ssyevdx.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- range_: Specifies options to which selection of eigenvalues and optionally eigenvectors that need to be computed: range = EigRangeAll : all eigenvalues/eigenvectors will be found, will becomes the classical syevd/heevd routine; range = EigRangeV : all eigenvalues/eigenvectors in the half-open interval (vl,vu] will be found; range = EigRangeI : the il-th through iu-th eigenvalues/eigenvectors will be found
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- vl: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user wants to be sure not to miss any eigenvalue within the interval bound, we suggest that the user subtract/add epsilon (machine precision) to the interval bound such as (vl=vl-eps, vu=vu+eps]. This suggestion is valid for any selective routine from cuSolver or LAPACK
- vu: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user wants to be sure not to miss any eigenvalue within the interval bound, we suggest that the user subtract/add epsilon (machine precision) to the interval bound such as (vl=vl-eps, vu=vu+eps]. This suggestion is valid for any selective routine from cuSolver or LAPACK
- il: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- iu: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- w: A real array of dimension n. The eigenvalue values of A, in ascending order ie, sorted so that W(i) <= W(i+1)
- lwork: Size of work, in elements of float32
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or range is not EigRangeAll or EigRangeV or EigRangeI, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSsyevdxBufferSize, bound as cusolverDnSsyevdx_bufferSize.
func (Handle) Ssyevj ¶
func (h Handle) Ssyevj(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, w driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr, params SyevjInfo) error
Ssyevj computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix A.
The standard symmetric eigenvalue problem is A*Q=Q*Λ, where Λ is a real n×n diagonal matrix. Q is an n×n unitary matrix. The diagonal elements of Λ are the eigenvalues of A in ascending order. syevj has the same functionality as syevd. The difference is that syevd uses QR algorithm and syevj uses Jacobi method. The parallelism of Jacobi method gives GPU better performance on small and medium size matrices. Moreover the user can configure syevj to perform approximation up to certain accuracy. How does it work? syevj iteratively generates a sequence of unitary matrices to transform matrix A to the following form Vᴴ*A*V=W+E where W is diagonal and E is symmetric without diagonal. During the iterations, the Frobenius norm of E decreases monotonically. As E goes down to zero, W is the set of eigenvalues. In practice, Jacobi method stops if ‖E‖_(F)≤eps*‖A‖_(F) where eps is the given tolerance. syevj has two parameters to control the accuracy. First parameter is tolerance ( eps). The default value is machine accuracy but The user can use function SyevjInfo.XsyevjSetTolerance to set a priori tolerance. The second parameter is maximum number of sweeps which controls number of iterations of Jacobi method. The default value is 100 but the user can use function SyevjInfo.XsyevjSetMaxSweeps to set a proper bound. The experiments show 15 sweeps are good enough to converge to machine accuracy. syevj stops either tolerance is met or maximum number of sweeps is met. The Jacobi method has quadratic convergence, so the accuracy is not proportional to number of sweeps. To guarantee certain accuracy, the user should configure tolerance only. After syevj, the user can query residual by function Handle.XsyevjGetResidual and number of executed sweeps by function Handle.XsyevjGetSweeps. However the user needs to be aware that residual is the Frobenius norm of E, not accuracy of individual eigenvalue, i.e. residual=‖E‖_(F)=‖Λ−W‖_(F) The input parameter lwork is the size of the working space, and it is returned by syevj_bufferSize(). If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). If info = n+1, syevj does not converge under given tolerance and maximum sweeps. If the user sets an improper tolerance, syevj may not converge. For example, tolerance should not be smaller than machine accuracy. If jobz = EigModeVector, A contains the orthonormal eigenvectors V. Please visit cuSOLVER Library Samples - syevj for a code example.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and info = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- w: A real array of dimension n. The eigenvalue values of A, in ascending order ie, sorted so that W(i) <= W(i+1)
- work: Working space, array of size lwork
- lwork: Size of work, returned by syevj_bufferSize
- info: If info = 0, the operation is successful. If info = -i, the i-th parameter is wrong (not counting handle). If info = n+1, syevj does not converge under given tolerance and maximum sweeps
- params: Structure filled with parameters of Jacobi algorithm and results of syevj
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSsyevj.
func (Handle) SsyevjBatched ¶
func (h Handle) SsyevjBatched(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, w driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr, params SyevjInfo, batchSize int32) error
SsyevjBatched computes eigenvalues and eigenvectors of a sequence of symmetric (Hermitian) n×n matrices.
Aⱼ*Qⱼ=Qⱼ*Λⱼ, where Λⱼ is a real n×n diagonal matrix. Qⱼ is an n×n unitary matrix. The diagonal elements of Λⱼ are the eigenvalues of Aⱼ in either ascending order or non-sorting order. syevjBatched performs syevj on each matrix. It requires that all matrices are of the same size n and are packed in contiguous way, A=(A0A1⋯) Each matrix is column-major with leading dimension lda, so the formula for random access is Aₖ(i,j)=A[i+lda*j+lda*n*k] . The parameter W also contains eigenvalues of each matrix in contiguous way, W=(W0W1⋯) The formula for random access of W is Wₖ(j)=W[j+n*k] . Except for tolerance and maximum sweeps, syevjBatched can either sort the eigenvalues in ascending order (default) or chose as-is (without sorting) by the function SyevjInfo.XsyevjSetSortEig. If the user packs several tiny matrices into diagonal blocks of one matrix, non-sorting option can separate spectrum of those tiny matrices. syevjBatched cannot report residual and executed sweeps by function Handle.XsyevjGetResidual and Handle.XsyevjGetSweeps. Any call of the above two returns ErrNotSupported. The user needs to compute residual explicitly. The input parameter lwork is the size of the working space, and it is returned by syevjBatched_bufferSize(). The output parameter info is an integer array of size batchSize. If the function returns ErrInvalidValue, the first element info[0] = -i (less than zero) indicates i-th parameter is wrong (not counting handle). Otherwise, if info[i] = n+1, syevjBatched does not converge on i-th matrix under given tolerance and maximum sweeps. If jobz = EigModeVector, Aⱼ contains the orthonormal eigenvectors Vⱼ. Please visit cuSOLVER Library Samples - syevjBatched for a code example.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of Aj is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of Aj is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of Aj is stored
- n: Number of rows (or columns) of matrix each Aj
- a: array of dimension lda * n * batchSize with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of Aj contains the upper triangular part of the matrix Aj. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of Aj contains the lower triangular part of the matrix Aj. On exit, if jobz = EigModeVector, and info[j] = 0, Aj contains the orthonormal eigenvectors of the matrix Aj. If jobz = EigModeNovector, the contents of Aj are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix Aj
- w: A real array of dimension n*batchSize. It stores the eigenvalues of Aj in ascending order or non-sorting order
- work: array of size lwork, workspace
- lwork: Size of work, returned by syevjBatched_bufferSize
- info: An integer array of dimension batchSize. If ErrInvalidValue is returned, info[0] = -i (less than zero) indicates i-th parameter is wrong (not counting handle). Otherwise, if info[i] = 0, the operation is successful. If info[i] = n+1, syevjBatched does not converge on i-th matrix under given tolerance and maximum sweeps
- params: Structure filled with parameters of Jacobi algorithm
- batchSize: Number of matrices
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER), or batchSize<0.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSsyevjBatched.
func (Handle) SsyevjBatchedBufferSize ¶
func (h Handle) SsyevjBatchedBufferSize(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, w driver.DevicePtr, lwork *int32, params SyevjInfo, batchSize int32) error
SsyevjBatchedBufferSize returns the workspace size, in elements of float32, for Handle.SsyevjBatched.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of Aj is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of Aj is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of Aj is stored
- n: Number of rows (or columns) of matrix each Aj
- a: array of dimension lda * n * batchSize with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of Aj contains the upper triangular part of the matrix Aj. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of Aj contains the lower triangular part of the matrix Aj. On exit, if jobz = EigModeVector, and info[j] = 0, Aj contains the orthonormal eigenvectors of the matrix Aj. If jobz = EigModeNovector, the contents of Aj are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix Aj
- w: A real array of dimension n*batchSize. It stores the eigenvalues of Aj in ascending order or non-sorting order
- lwork: Size of work, in elements of float32
- params: Structure filled with parameters of Jacobi algorithm
- batchSize: Number of matrices
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER), or batchSize<0.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSsyevjBatchedBufferSize, bound as cusolverDnSsyevjBatched_bufferSize.
func (Handle) SsyevjBufferSize ¶
func (h Handle) SsyevjBufferSize(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, w driver.DevicePtr, lwork *int32, params SyevjInfo) error
SsyevjBufferSize returns the workspace size, in elements of float32, for Handle.Ssyevj.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and info = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- w: A real array of dimension n. The eigenvalue values of A, in ascending order ie, sorted so that W(i) <= W(i+1)
- lwork: Size of work, in elements of float32
- params: Structure filled with parameters of Jacobi algorithm and results of syevj
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSsyevjBufferSize, bound as cusolverDnSsyevj_bufferSize.
func (Handle) Ssygvd ¶
func (h Handle) Ssygvd(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, w driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Ssygvd computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix-pair ( A, B).
The generalized symmetric-definite eigenvalue problem is A*V = B*V*Λ if itype == EigType1, A*B*V = V*Λ if itype == EigType2, and B*A*V = V*Λ if itype == EigType3, where the matrix B is positive definite. Λ is a real n×n diagonal matrix. The diagonal elements of Λ are the eigenvalues of ( A, B) in ascending order. V is an n×n orthogonal matrix. The eigenvectors are normalized as follows: Vᴴ*B*V = I if itype == EigType1 or EigType2, and Vᴴ*inv(B)*V = I if itype == EigType3. The input parameter lwork is size of the working space, and it is returned by sygvd_bufferSize(). If devInfo = i (i > 0 and i<=n) and jobz = EigModeNovector, i off-diagonal elements of an intermediate tridiagonal form did not converge to zero. If devInfo = N + i (i > 0), then the leading minor of order i of B is not positive definite. The factorization of B could not be completed and no eigenvalues or eigenvectors were computed. if jobz = EigModeVector, A contains the orthogonal eigenvectors of the matrix A. The eigenvectors are computed by divide and conquer algorithm. Please visit cuSOLVER Library Samples - sygvd for a code example.
- itype: Specifies the problem type to be solved: itype =[EigType1]: A*x = (lambda)*B*x. itype =[EigType2]: A*B*x = (lambda)*x. itype =[EigType3]: B*A*x = (lambda)*x
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A and B are stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A and B are stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A and B are stored
- n: Number of rows (or columns) of matrix A and B
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- b: array of dimension ldb * n. If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of B contains the upper triangular part of the matrix B. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of B contains the lower triangular part of the matrix B. On exit, if devInfo is less than n, B is overwritten by triangular factor U or L from the Cholesky factorization of B
- ldb: Leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n)
- w: A real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1)
- work: Working space, array of size lwork
- lwork: Size of work, returned by sygvd_bufferSize
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or ldb<max(1,n), or itype is not 1, 2 or 3, or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSsygvd.
func (Handle) SsygvdBufferSize ¶
func (h Handle) SsygvdBufferSize(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, w driver.DevicePtr) (int32, error)
SsygvdBufferSize returns the workspace size, in elements of float32, for Handle.Ssygvd.
- itype: Specifies the problem type to be solved: itype =[EigType1]: A*x = (lambda)*B*x. itype =[EigType2]: A*B*x = (lambda)*x. itype =[EigType3]: B*A*x = (lambda)*x
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A and B are stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A and B are stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A and B are stored
- n: Number of rows (or columns) of matrix A and B
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- b: array of dimension ldb * n. If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of B contains the upper triangular part of the matrix B. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of B contains the lower triangular part of the matrix B. On exit, if devInfo is less than n, B is overwritten by triangular factor U or L from the Cholesky factorization of B
- ldb: Leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n)
- w: A real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1)
- lwork: Size of work, in elements of float32
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or ldb<max(1,n), or itype is not 1, 2 or 3, or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSsygvdBufferSize, bound as cusolverDnSsygvd_bufferSize.
func (Handle) Ssygvdx ¶
func (h Handle) Ssygvdx(itype EigType, jobz EigMode, range_ EigRange, uplo FillMode, n int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, vl float32, vu float32, il int32, iu int32, meig *int32, w driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Ssygvdx computes all or selection of the eigenvalues and optionally eigenvectors of a symmetric (Hermitian) n×n matrix-pair ( A, B).
The generalized symmetric-definite eigenvalue problem is A*V = B*V*Λ if itype == EigType1, A*B*V = V*Λ if itype == EigType2, and B*A*V = V*Λ if itype == EigType3, where the matrix B is positive definite. Λ is a real n×h_meig diagonal matrix. The diagonal elements of Λ are the eigenvalues of ( A, B) in ascending order. V is an n×h_meig orthogonal matrix. h_meig is the number of eigenvalues/eigenvectors computed by the routine, h_meig is equal to n when the whole spectrum (for example, range = EigRangeAll) is requested. The eigenvectors are normalized as follows: Vᴴ*B*V = I if itype == EigType1 or EigType2, and Vᴴ*inv(B)*V = I if itype == EigType3. The input parameter lwork is size of the working space, and it is returned by sygvdx_bufferSize(). If devInfo = i (i > 0 and i<=n) and jobz = EigModeNovector, i off-diagonal elements of an intermediate tridiagonal form did not converge to zero. If devInfo = n + i (i > 0), then the leading minor of order i of B is not positive definite. The factorization of B could not be completed and no eigenvalues or eigenvectors were computed. If jobz = EigModeVector, A contains the orthogonal eigenvectors of the matrix A. The eigenvectors are computed by divide and conquer algorithm. Please visit cuSOLVER Library Samples - sygvdx for a code example.
- itype: Specifies the problem type to be solved: itype =[EigType1]: A*x = (lambda)*B*x; itype =[EigType2]: A*B*x = (lambda)*x; itype =[EigType3]: B*A*x = (lambda)*x
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- range_: Specifies options to which selection of eigenvalues and optionally eigenvectors that need to be computed: range = EigRangeAll : all eigenvalues/eigenvectors will be found, will becomes the classical syevd/heevd routine; range = EigRangeV : all eigenvalues/eigenvectors in the half-open interval (vl,vu] will be found; range = EigRangeI : the il-th through iu-th eigenvalues/eigenvectors will be found
- uplo: Specifies which part of A and B are stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A and B are stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A and B are stored
- n: Number of rows (or columns) of matrix A and B
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- b: array of dimension ldb * n. If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of B contains the upper triangular part of the matrix B. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of B contains the lower triangular part of the matrix B. On exit, if devInfo is less than n, B is overwritten by triangular factor U or L from the Cholesky factorization of B
- ldb: Leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n)
- vl: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user want to be sure not to miss any eigenvalue within the interval bound, we suggest that, the user subtract/add epsilon (machine precision) to the interval bound such as ( vl = vl- eps, vu = vu + eps]. this suggestion is valid for any selective routine from cuSolver or LAPACK
- vu: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user want to be sure not to miss any eigenvalue within the interval bound, we suggest that, the user subtract/add epsilon (machine precision) to the interval bound such as ( vl = vl- eps, vu = vu + eps]. this suggestion is valid for any selective routine from cuSolver or LAPACK
- il: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- iu: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- w: A real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1)
- work: Working space, array of size lwork
- lwork: Size of work, returned by sygvdx_bufferSize
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or ldb<max(1,n), or itype is not EigType1 or EigType2 or EigType3 or jobz is not EigModeNovector or CUSOLVER_EIG_MODE_VECTORL, or range is not EigRangeAll or EigRangeV or EigRangeI, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSsygvdx.
func (Handle) SsygvdxBufferSize ¶
func (h Handle) SsygvdxBufferSize(itype EigType, jobz EigMode, range_ EigRange, uplo FillMode, n int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, vl float32, vu float32, il int32, iu int32, w driver.DevicePtr) (meig int32, lwork int32, err error)
SsygvdxBufferSize returns the workspace size, in elements of float32, for Handle.Ssygvdx.
- itype: Specifies the problem type to be solved: itype =[EigType1]: A*x = (lambda)*B*x; itype =[EigType2]: A*B*x = (lambda)*x; itype =[EigType3]: B*A*x = (lambda)*x
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- range_: Specifies options to which selection of eigenvalues and optionally eigenvectors that need to be computed: range = EigRangeAll : all eigenvalues/eigenvectors will be found, will becomes the classical syevd/heevd routine; range = EigRangeV : all eigenvalues/eigenvectors in the half-open interval (vl,vu] will be found; range = EigRangeI : the il-th through iu-th eigenvalues/eigenvectors will be found
- uplo: Specifies which part of A and B are stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A and B are stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A and B are stored
- n: Number of rows (or columns) of matrix A and B
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- b: array of dimension ldb * n. If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of B contains the upper triangular part of the matrix B. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of B contains the lower triangular part of the matrix B. On exit, if devInfo is less than n, B is overwritten by triangular factor U or L from the Cholesky factorization of B
- ldb: Leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n)
- vl: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user want to be sure not to miss any eigenvalue within the interval bound, we suggest that, the user subtract/add epsilon (machine precision) to the interval bound such as ( vl = vl- eps, vu = vu + eps]. this suggestion is valid for any selective routine from cuSolver or LAPACK
- vu: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user want to be sure not to miss any eigenvalue within the interval bound, we suggest that, the user subtract/add epsilon (machine precision) to the interval bound such as ( vl = vl- eps, vu = vu + eps]. this suggestion is valid for any selective routine from cuSolver or LAPACK
- il: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- iu: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- w: A real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1)
- lwork: Size of work, in elements of float32
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or ldb<max(1,n), or itype is not EigType1 or EigType2 or EigType3 or jobz is not EigModeNovector or CUSOLVER_EIG_MODE_VECTORL, or range is not EigRangeAll or EigRangeV or EigRangeI, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSsygvdxBufferSize, bound as cusolverDnSsygvdx_bufferSize.
func (Handle) Ssygvj ¶
func (h Handle) Ssygvj(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, w driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr, params SyevjInfo) error
Ssygvj computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix-pair ( A, B).
The generalized symmetric-definite eigenvalue problem is A*V = B*V*Λ if itype == EigType1, A*B*V = V*Λ if itype == EigType2, and B*A*V = V*Λ if itype == EigType3, where the matrix B is positive definite. Λ is a real n×n diagonal matrix. The diagonal elements of Λ are the eigenvalues of ( A, B) in ascending order. V is an n×n orthogonal matrix. The eigenvectors are normalized as follows: Vᴴ*B*V = I if itype == EigType1 or EigType2, and Vᴴ*inv(B)*V = I if itype == EigType3. This function has the same functionality as sygvd except that syevd in sygvd is replaced by syevj in sygvj. Therefore, sygvj inherits properties of syevj, the user can use SyevjInfo.XsyevjSetTolerance and SyevjInfo.XsyevjSetMaxSweeps to configure tolerance and maximum sweeps. However the meaning of residual is different from syevj. sygvj first computes Cholesky factorization of matrix B, B=L*Lᴴ transform the problem to standard eigenvalue problem, then calls syevj. For example, the standard eigenvalue problem of type I is M*Q=Q*Λ where matrix M is symmetric M=L⁻¹*A*L⁻ᴴ The residual is the result of syevj on matrix M, not A. The input parameter lwork is the size of the working space, and it is returned by sygvj_bufferSize(). If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). If info = i (i > 0 and i<=n), B is not positive definite, the factorization of B could not be completed and no eigenvalues or eigenvectors were computed. If info = n+1, syevj does not converge under given tolerance and maximum sweeps. In this case, the eigenvalues and eigenvectors are still computed because non-convergence comes from improper tolerance of maximum sweeps. if jobz = EigModeVector, A contains the orthogonal eigenvectors V. Please visit cuSOLVER Library Samples - sygvj for a code example.
- itype: Specifies the problem type to be solved: itype =[EigType1]: A*x = (lambda)*B*x. itype =[EigType2]: A*B*x = (lambda)*x. itype =[EigType3]: B*A*x = (lambda)*x
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A and B are stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A and B are stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A and B are stored
- n: Number of rows (or columns) of matrix A and B
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and info = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- b: array of dimension ldb * n. If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of B contains the upper triangular part of the matrix B. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of B contains the lower triangular part of the matrix B. On exit, if info is less than n, B is overwritten by triangular factor U or L from the Cholesky factorization of B
- ldb: Leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n)
- w: A real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1)
- work: Working space, array of size lwork
- lwork: Size of work, returned by sygvj_bufferSize
- info: If info = 0, the operation is successful. if info = -i, the i-th parameter is wrong (not counting handle). If info = i (> 0), info indicates either B is not positive definite or syevj (called by sygvj) does not converge
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or ldb<max(1,n), or itype is not 1, 2 or 3, or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSsygvj.
func (Handle) SsygvjBufferSize ¶
func (h Handle) SsygvjBufferSize(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, w driver.DevicePtr, lwork *int32, params SyevjInfo) error
SsygvjBufferSize returns the workspace size, in elements of float32, for Handle.Ssygvj.
- itype: Specifies the problem type to be solved: itype =[EigType1]: A*x = (lambda)*B*x. itype =[EigType2]: A*B*x = (lambda)*x. itype =[EigType3]: B*A*x = (lambda)*x
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A and B are stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A and B are stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A and B are stored
- n: Number of rows (or columns) of matrix A and B
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and info = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- b: array of dimension ldb * n. If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of B contains the upper triangular part of the matrix B. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of B contains the lower triangular part of the matrix B. On exit, if info is less than n, B is overwritten by triangular factor U or L from the Cholesky factorization of B
- ldb: Leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n)
- w: A real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1)
- lwork: Size of work, in elements of float32
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or ldb<max(1,n), or itype is not 1, 2 or 3, or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSsygvjBufferSize, bound as cusolverDnSsygvj_bufferSize.
func (Handle) Ssytrd ¶
func (h Handle) Ssytrd(uplo FillMode, n int32, a driver.DevicePtr, lda int32, d driver.DevicePtr, e driver.DevicePtr, tau driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Ssytrd reduces a general symmetric (Hermitian) n×n matrix A to real symmetric tridiagonal form T by an orthogonal transformation: Qᴴ*A*Q=T.
As an output, A contains T and householder reflection vectors. If uplo = CUBLAS_FILL_MODE_UPPER, the diagonal and first superdiagonal of A are overwritten by the corresponding elements of the tridiagonal matrix T, and the elements above the first superdiagonal, with the array tau, represent the orthogonal matrix Q as a product of elementary reflectors; If uplo = CUBLAS_FILL_MODE_LOWER, the diagonal and first subdiagonal of A are overwritten by the corresponding elements of the tridiagonal matrix T, and the elements below the first subdiagonal, with the array tau, represent the orthogonal matrix Q as a product of elementary reflectors. The input parameter lwork is size of the working space, and it is returned by sytrd_bufferSize(). Note that the problem size n is limited by a condition n*lda < INT32_MAX primarily due to the current implementation constraints.
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. On exit, A is overwritten by T and householder reflection vectors
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,n)
- d: Real array of dimension n. The diagonal elements of the tridiagonal matrix T: D(i) = A(i,i)
- e: Real array of dimension (n-1). The off-diagonal elements of the tridiagonal matrix T: if uplo = CUBLAS_FILL_MODE_UPPER, E(i) = A(i,i+1). if uplo = CUBLAS_FILL_MODE_LOWER E(i) = A(i+1,i)
- tau: array of dimension (n-1). The scalar factors of the elementary reflectors which represent the orthogonal matrix Q
- work: Working space, array of size lwork
- lwork: Size of work, returned by sytrd_bufferSize
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSsytrd.
func (Handle) SsytrdBufferSize ¶
func (h Handle) SsytrdBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32, d driver.DevicePtr, e driver.DevicePtr, tau driver.DevicePtr) (int32, error)
SsytrdBufferSize returns the workspace size, in elements of float32, for Handle.Ssytrd.
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. On exit, A is overwritten by T and householder reflection vectors
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,n)
- tau: array of dimension (n-1). The scalar factors of the elementary reflectors which represent the orthogonal matrix Q
- lwork: Size of work, in elements of float32
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSsytrdBufferSize, bound as cusolverDnSsytrd_bufferSize.
func (Handle) Ssytrf ¶
func (h Handle) Ssytrf(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ipiv driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Ssytrf computes the factorization of a symmetric indefinite matrix using the Bunch-Kaufman diagonal pivoting.
A is a n×n symmetric matrix, only lower or upper part is meaningful. The input parameter uplo indicates which part of the matrix is used. If devIpiv is null, no pivoting is performed, which is not numerically stable. If input parameter uplo is CUBLAS_FILL_MODE_LOWER, only lower triangular part of A is processed, and replaced by lower triangular factor L and block diagonal matrix D. Each block of D is either 1x1 or 2x2 block, depending on pivoting. P*A*Pᵀ=L*D*Lᵀ If input parameter uplo is CUBLAS_FILL_MODE_UPPER, only upper triangular part of A is processed, and replaced by upper triangular factor U and block diagonal matrix D. P*A*Pᵀ=U*D*Uᵀ The input parameter lwork is size of the working space, and it is returned by sytrf_bufferSize(). When no pivoting is performed, the other triangular part of the input matrix A is used as workspace. If Bunch-Kaufman factorization failed, i.e. A is singular. The output parameter devInfo = i would indicate D(i,i)=0. The output parameter devIpiv contains pivoting sequence. If devIpiv(i) = k > 0, D(i,i) is 1x1 block, and i-th row/column of A is interchanged with k-th row/column of A. If uplo is CUBLAS_FILL_MODE_UPPER and devIpiv(i-1) = devIpiv(i) = -m < 0, D(i-1:i,i-1:i) is a 2x2 block, and (i-1)-th row/column is interchanged with m-th row/column. If uplo is CUBLAS_FILL_MODE_LOWER and devIpiv(i+1) = devIpiv(i) = -m < 0, D(i:i+1,i:i+1) is a 2x2 block, and (i+1)-th row/column is interchanged with m-th row/column.
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- n: Number of rows and columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- work: Working space, array of size lwork
- lwork: Size of working space work
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSsytrf.
func (Handle) SsytrfBufferSize ¶
SsytrfBufferSize returns the workspace size, in elements of float32, for Handle.Ssytrf.
- n: Number of rows and columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- lwork: Size of work, in elements of float32
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnSsytrfBufferSize, bound as cusolverDnSsytrf_bufferSize.
func (Handle) Ssytri ¶
func (h Handle) Ssytri(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ipiv driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Ssytri wraps cusolverDnSsytri.
func (Handle) SsytriBufferSize ¶
func (h Handle) SsytriBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ipiv driver.DevicePtr) (int32, error)
SsytriBufferSize wraps cusolverDnSsytriBufferSize.
Wraps cusolverDnSsytriBufferSize, bound as cusolverDnSsytri_bufferSize.
func (Handle) Stream ¶
Stream queries the stream to be used by the cuSolverDN library to execute its routines.
- streamId: The stream which is used by handle
Errors:
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnGetStream.
func (Handle) Xgeev ¶
func (h Handle) Xgeev(params Params, jobvl EigMode, jobvr EigMode, n int64, dataTypeA DataType, a driver.DevicePtr, lda int64, dataTypeW DataType, w driver.DevicePtr, dataTypeVL DataType, vl driver.DevicePtr, ldvl int64, dataTypeVR DataType, vr driver.DevicePtr, ldvr int64, computeType DataType, bufferOnDevice driver.DevicePtr, workspaceInBytesOnDevice uint, bufferOnHost uintptr, workspaceInBytesOnHost uint, info driver.DevicePtr) error
Xgeev computes for an n-by-n real non-symmetric or complex non-Hermitian matrix A the eigenvalues and, optionally, the left and/or right eigenvectors.
The right eigenvector v(j) of A satisfies A*v(j)=w(j)*v(j), where w(j) is its eigenvalue. The left eigenvalue u(j) of A satisfies u(j)ᴴ*A=w(j)*v(j)ᴴ where u(j)ᴴ denotes the conjugate-transpose of u(j). The computed eigenvectors are normalized to have Euclidean norm equal to 1 and largest component real. If A is real-valued, there are two options to return the eigenvalues in W. The first options sets all data types to real-valued types. Then W holds 2*n entries. The first n entries hold the real parts and the last n entries hold the imaginary parts. The LAPACK interface with separate arrays for the real parts WR and the imaginary parts WI can be recovered by settings pointers WR = W, WI = W+n. The second option uses a complex data type for W. Then W is n entries long; each real eigenvalue is stored as a complex number and for each complex conjugate pair, both eigenvalues are returned. The computation is still executed fully in real arithmetic. The user has to provide device and host working space which are pointed to by the input parameters bufferOnDevice and bufferOnHost. The input parameters workspaceInBytesOnDevice and workspaceInBytesOnHost denote the size in bytes of the device and host working space, and returned by Handle.XgeevBufferSize. If the output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). If info = 0, the QR algorithm converged and W contains the computed eigenvalues of A and, if requested, the corresponding left and/or right eigenvectors have been computed. If info = i (greater than zero), the QR algorithm failed to compute all the eigenvalues and no eigenvectors have been computed. The elements i+1:n of W contain eigenvalues which have converged. Remark 1: geev only supports the computation of right eigenvectors. So, jobvl = EigModeNovector must be set. Remark 2: geev uses balancing to improve the conditioning of the eigenvalues and eigenvectors. Remark 3: geev is a hybrid CPU-GPU algorithm. Best performance is attained with pinned host memory. Currently, Handle.Xgeev supports only the default algorithm. Please visit cuSOLVER Library Samples - Handle.Xgeev for a code example. Table of algorithms supported by Handle.Xgeev
- Alg0, the zero value: Default algorithm.
The generic API has five different types, dataTypeA is the data type of the matrix A, dataTypeW is the data type of the array W, dataTypeVL is the data type of the matrix VL, dataTypeVR is the data type of the matrix VR and computeType is compute type of the operation. Handle.Xgeev only supports the following four combinations: Valid combination of data type and compute type
DataTypeA DataTypeW DataTypeVL DataTypeVR ComputeType Meaning CUDA_R_32F CUDA_R_32F CUDA_R_32F CUDA_R_32F CUDA_R_32F SGEEV CUDA_R_32F CUDA_C_32F CUDA_R_32F CUDA_R_32F CUDA_R_32F 32F mixed real-complex CUDA_R_64F CUDA_R_64F CUDA_R_64F CUDA_R_64F CUDA_R_64F DGEEV CUDA_R_64F CUDA_C_64F CUDA_R_64F CUDA_R_64F CUDA_R_64F 64F mixed real-complex CUDA_C_32F CUDA_C_32F CUDA_C_32F CUDA_C_32F CUDA_C_32F CGEEV CUDA_C_64F CUDA_C_64F CUDA_C_64F CUDA_C_64F CUDA_C_64F ZGEEV
Parameters:
- params: Structure with information collected by Params.SetAdvOptions
- jobvl: Specifies whether or not to compute left eigenvectors. jobvl = EigModeNovector: Do not compute left eigenvectors of A; jobvl = EigModeVector: Compute left eigenvectors of A
- jobvr: Specifies whether or not to compute right eigenvectors. jobvl = EigModeNovector: Do not compute left eigenvectors of A; jobvl = EigModeVector: Compute left eigenvectors of A
- n: Number of rows (or columns) of matrix A
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda is not less than max(1,n). On entry, the n-by-n matrix A. On exit, A has been overwritten
- lda: Leading dimension of two-dimensional array used to store matrix A
- dataTypeW: Data type of array W
- w: Array holding the computed eigenvalues of A. Its length is 2*n if dataTypeA = CUDA_R_32F and dataTypeW = CUDA_R_32F or dataTypeA = CUDA_R_64F and dataTypeW = CUDA_R_64F and the first n entries of W hold the real parts and the last n entries of W hold the imaginary parts of the eigenvalues. Otherwise, the length is n
- dataTypeVL: Data type of array VL
- vl: Array of dimension ldvl * n. If jobvl = EigModeVector, the left eigenvectors u(j) are stored one after another in the columns of VL, in the same order as their eigenvalues. If datatypeVL is complex or the j-th eigenvalue is real, then u(j) = VL(:,j), the j-th column of VL. If dataTypeVL is real and the j-th and (j+1)-st eigenvalues form a complex conjugate pair, then u(j) = VL(:,j) + i*VL(:,j+1) and u(j+1) = VL(:,j) - i*VL(:,j+1). If jobvl = EigModeNovector, VL is not referenced
- ldvl: Leading dimension of two-dimensional array used to store matrix VL with ldvl >= 1. If jobvl = EigModeVector, ldvl >= n
- dataTypeVR: Data type of array VR
- vr: Array of dimension ldvr * n. If jobvr = EigModeVector, the right eigenvectors v(j) are stored one after another in the columns of VR, in the same order as their eigenvalues. If datatypeVR is complex or the j-th eigenvalue is real, then v(j) = VR(:,j), the j-th column of VR. If dataTypeVR is real and the j-th and (j+1)-st eigenvalues form a complex conjugate pair, then v(j) = VR(:,j) + i*VR(:,j+1) and v(j+1) = VR(:,j) - i*VR(:,j+1). If jobvr = EigModeNovector, VR is not referenced
- ldvr: Leading dimension of two-dimensional array used to store matrix VR with ldvr >= 1. If jobvr = EigModeVector, ldvr >= n
- computeType: Data type of computation
- bufferOnDevice: Device workspace. Array of type void of size workspaceInBytesOnDevice bytes
- workspaceInBytesOnDevice: Size in bytes of bufferOnDevice, returned by Handle.XgeevBufferSize
- bufferOnHost: Host workspace. Array of type void of size workspaceInBytesOnHost bytes
- workspaceInBytesOnHost: Size in bytes of bufferOnHost, returned by Handle.XgeevBufferSize
- info: If info = 0, the operation is successful. If info = -i, the i-th parameter is wrong (not counting handle). If info = i (greater than zero), the QR algorithm failed to compute all the eigenvalues and no eigenvectors have been computed; elements i+1:n of W contain eigenvalues which have converged
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( jobvl is not EigModeNovector or EigModeVector, or jobvr is not EigModeNovector or EigModeVector, n<0, or lda < max(1,n), or ldvl < n if jobvl is EigModeVector, or ldvr < n if jobvr is EigModeVector).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXgeev.
func (Handle) XgeevBufferSize ¶
func (h Handle) XgeevBufferSize(params Params, jobvl EigMode, jobvr EigMode, n int64, dataTypeA DataType, a driver.DevicePtr, lda int64, dataTypeW DataType, w driver.DevicePtr, dataTypeVL DataType, vl driver.DevicePtr, ldvl int64, dataTypeVR DataType, vr driver.DevicePtr, ldvr int64, computeType DataType) (workspaceInBytesOnDevice uint, workspaceInBytesOnHost uint, err error)
XgeevBufferSize returns the workspace sizes, in bytes, for Handle.Xgeev.
- params: Structure with information collected by Params.SetAdvOptions
- jobvl: Specifies whether or not to compute left eigenvectors. jobvl = EigModeNovector: Do not compute left eigenvectors of A; jobvl = EigModeVector: Compute left eigenvectors of A
- jobvr: Specifies whether or not to compute right eigenvectors. jobvl = EigModeNovector: Do not compute left eigenvectors of A; jobvl = EigModeVector: Compute left eigenvectors of A
- n: Number of rows (or columns) of matrix A
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda is not less than max(1,n). On entry, the n-by-n matrix A. On exit, A has been overwritten
- lda: Leading dimension of two-dimensional array used to store matrix A
- dataTypeW: Data type of array W
- w: Array holding the computed eigenvalues of A. Its length is 2*n if dataTypeA = CUDA_R_32F and dataTypeW = CUDA_R_32F or dataTypeA = CUDA_R_64F and dataTypeW = CUDA_R_64F and the first n entries of W hold the real parts and the last n entries of W hold the imaginary parts of the eigenvalues. Otherwise, the length is n
- dataTypeVL: Data type of array VL
- vl: Array of dimension ldvl * n. If jobvl = EigModeVector, the left eigenvectors u(j) are stored one after another in the columns of VL, in the same order as their eigenvalues. If datatypeVL is complex or the j-th eigenvalue is real, then u(j) = VL(:,j), the j-th column of VL. If dataTypeVL is real and the j-th and (j+1)-st eigenvalues form a complex conjugate pair, then u(j) = VL(:,j) + i*VL(:,j+1) and u(j+1) = VL(:,j) - i*VL(:,j+1). If jobvl = EigModeNovector, VL is not referenced
- ldvl: Leading dimension of two-dimensional array used to store matrix VL with ldvl >= 1. If jobvl = EigModeVector, ldvl >= n
- dataTypeVR: Data type of array VR
- vr: Array of dimension ldvr * n. If jobvr = EigModeVector, the right eigenvectors v(j) are stored one after another in the columns of VR, in the same order as their eigenvalues. If datatypeVR is complex or the j-th eigenvalue is real, then v(j) = VR(:,j), the j-th column of VR. If dataTypeVR is real and the j-th and (j+1)-st eigenvalues form a complex conjugate pair, then v(j) = VR(:,j) + i*VR(:,j+1) and v(j+1) = VR(:,j) - i*VR(:,j+1). If jobvr = EigModeNovector, VR is not referenced
- ldvr: Leading dimension of two-dimensional array used to store matrix VR with ldvr >= 1. If jobvr = EigModeVector, ldvr >= n
- computeType: Data type of computation
- workspaceInBytesOnDevice: Size of bufferOnDevice, in bytes
- workspaceInBytesOnHost: Size of bufferOnHost, in bytes
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( jobvl is not EigModeNovector or EigModeVector, or jobvr is not EigModeNovector or EigModeVector, n<0, or lda < max(1,n), or ldvl < n if jobvl is EigModeVector, or ldvr < n if jobvr is EigModeVector).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXgeevBufferSize, bound as cusolverDnXgeev_bufferSize.
func (Handle) Xgeqrf ¶
func (h Handle) Xgeqrf(params Params, m int64, n int64, dataTypeA DataType, a driver.DevicePtr, lda int64, dataTypeTau DataType, tau driver.DevicePtr, computeType DataType, bufferOnDevice driver.DevicePtr, workspaceInBytesOnDevice uint, bufferOnHost uintptr, workspaceInBytesOnHost uint, info driver.DevicePtr) error
Xgeqrf computes the QR factorization of a m×n matrix.
A=Q*R, where A is an m×n matrix, Q is a m×n matrix, and R is an n×n upper triangular matrix using the generic API interface. The user has to provide device and host working spaces which are pointed by input parameters bufferOnDevice and bufferOnHost. The input parameters workspaceInBytesOnDevice (and workspaceInBytesOnHost) is size in bytes of the device (and host) working space, and it is returned by Handle.XgeqrfBufferSize. The matrix R is overwritten in upper triangular part of A, including diagonal elements. The matrix Q is not formed explicitly, instead, a sequence of householder vectors are stored in lower triangular part of A. The leading nonzero element of householder vector is assumed to be 1 such that output parameter TAU contains the scaling factor τ. If v is original householder vector, q is the new householder vector corresponding to τ, satisfying the following relation I−2*v*vᴴ=I−τ*q*qᴴ If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). Currently, Handle.Xgeqrf supports only the default algorithm. Please visit cuSOLVER Library Samples - Handle.Xgeqrf for a code example. Algorithms supported by Handle.Xgeqrf
- Alg0, the zero value: Default algorithm.
The generic API has two different types, dataTypeA is data type of the matrix A, dataTypeTau is data type of the array tau and computeType is compute type of the operation. Handle.Xgeqrf only supports the following four combinations. Valid combination of data type and compute type
DataTypeA ComputeType Meaning CUDA_R_32F CUDA_R_32F SGEQRF CUDA_R_64F CUDA_R_64F DGEQRF CUDA_C_32F CUDA_C_32F CGEQRF CUDA_C_64F CUDA_C_64F ZGEQRF
Parameters:
- params: Structure with information collected by Params.SetAdvOptions
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda is not less than max(1,m)
- lda: Leading dimension of two-dimensional array used to store matrix A
- dataTypeTau: Data type of array tau
- tau: Array of dimension at least min(m,n)
- computeType: Data type of computation
- bufferOnDevice: Device workspace. Array of type void of size workspaceInBytesOnDevice bytes
- workspaceInBytesOnDevice: Size in bytes of bufferOnDevice, returned by Handle.XgeqrfBufferSize
- bufferOnHost: Host workspace. Array of type void of size workspaceInBytesOnHost bytes
- workspaceInBytesOnHost: Size in bytes of bufferOnHost, returned by Handle.XgeqrfBufferSize
- info: If info = 0, the QR factorization is successful. If info = -i, the i-th parameter is wrong (not counting handle)
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXgeqrf.
func (Handle) XgeqrfBufferSize ¶
func (h Handle) XgeqrfBufferSize(params Params, m int64, n int64, dataTypeA DataType, a driver.DevicePtr, lda int64, dataTypeTau DataType, tau driver.DevicePtr, computeType DataType) (workspaceInBytesOnDevice uint, workspaceInBytesOnHost uint, err error)
XgeqrfBufferSize returns the workspace sizes, in bytes, for Handle.Xgeqrf.
- params: Structure with information collected by Params.SetAdvOptions
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda is not less than max(1,m)
- lda: Leading dimension of two-dimensional array used to store matrix A
- dataTypeTau: Data type of array tau
- tau: Array of dimension at least min(m,n)
- computeType: Data type of computation
- workspaceInBytesOnDevice: Size of bufferOnDevice, in bytes
- workspaceInBytesOnHost: Size of bufferOnHost, in bytes
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXgeqrfBufferSize, bound as cusolverDnXgeqrf_bufferSize.
func (Handle) Xgesvd ¶
func (h Handle) Xgesvd(params Params, jobu int8, jobvt int8, m int64, n int64, dataTypeA DataType, a driver.DevicePtr, lda int64, dataTypeS DataType, s driver.DevicePtr, dataTypeU DataType, u driver.DevicePtr, ldu int64, dataTypeVT DataType, vt driver.DevicePtr, ldvt int64, computeType DataType, bufferOnDevice driver.DevicePtr, workspaceInBytesOnDevice uint, bufferOnHost uintptr, workspaceInBytesOnHost uint, info driver.DevicePtr) error
Xgesvd computes the singular value decomposition (SVD) of an m×n matrix A and corresponding the left and/or right singular vectors.
The SVD is written A=U*Σ*Vᴴ, where Σ is an m×n matrix which is zero except for its min(m,n) diagonal elements, U is an m×m unitary matrix, and V is an n×n unitary matrix. The diagonal elements of Σ are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A. The user has to provide device and host working spaces which are pointed by input parameters bufferOnDevice and bufferOnHost. The input parameters workspaceInBytesOnDevice (and workspaceInBytesOnHost) is size in bytes of the device (and host) working space, and it is returned by Handle.XgesvdBufferSize. If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). if bdsqr did not converge, info specifies how many superdiagonals of an intermediate bidiagonal form did not converge to zero. Currently, Handle.Xgesvd supports only the default algorithm. Algorithms supported by Handle.Xgesvd
- Alg0, the zero value: Default algorithm.
Please visit cuSOLVER Library Samples - Handle.Xgesvd for a code example. Remark 1: gesvd only supports m>=n. Remark 2: the routine returns Vᴴ , not V. The generic API has three different types, dataTypeA is data type of the matrix A, dataTypeS is data type of the vector S and dataTypeU is data type of the matrix U, dataTypeVT is data type of the matrix VT, computeType is compute type of the operation. Handle.Xgesvd only supports the following four combinations. Valid combination of data type and compute type
DataTypeA DataTypeS DataTypeU DataTypeVT ComputeType Meaning CUDA_R_32F CUDA_R_32F CUDA_R_32F CUDA_R_32F CUDA_R_32F SGESVD CUDA_R_64F CUDA_R_64F CUDA_R_64F CUDA_R_64F CUDA_R_64F DGESVD CUDA_C_32F CUDA_R_32F CUDA_C_32F CUDA_C_32F CUDA_C_32F CGESVD CUDA_C_64F CUDA_R_64F CUDA_C_64F CUDA_C_64F CUDA_C_64F ZGESVD
Parameters:
- params: Structure with information collected by Params.SetAdvOptions
- 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
- jobvt: Specifies options for computing all or part of the matrix V**T: = ‘A’: all N rows of V**T are returned in the array VT; = ‘S’: the first min(m,n) rows of V**T (the right singular vectors) are returned in the array VT; = ‘O’: the first min(m,n) rows of V**T (the right singular vectors) are overwritten on the array A; = ‘N’: no rows of V**T (no right singular vectors) are computed
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda is not less than max(1,m). On exit, if jobu = ‘O’, A is overwritten with U; if jobvt = ‘O’, A is overwritten with VT; otherwise, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- dataTypeS: Data type of array S
- s: Real array of dimension min(m,n). The singular values of A, sorted so that S(i) >= S(i+1)
- dataTypeU: Data type of array U
- u: Array of dimension ldu * m with ldu is not less than max(1,m). If jobu = ‘A’, U contains the m×m unitary matrix U. If jobu = ‘S’, U contains the first min(m,n) columns of U. If jobu = ‘N’ or ‘O’, U is not referenced
- ldu: Leading dimension of two-dimensional array used to store matrix U. If jobu = ‘A’ or ‘S’, ldu >= max(1,m). Otherwise, ldu >= 1
- dataTypeVT: Data type of array VT
- vt: Array of dimension ldvt * n with ldvt is not less than max(1,n). If jobvt = ‘A’,“VT“ contains the n×n unitary matrix V**T. If jobvt = ‘S’, VT contains the first min(m,n) rows of V**T. If jobvt = ‘N’ or ‘O’, VT is not referenced
- ldvt: Leading dimension of two-dimensional array used to store matrix VT. If jobvt = ‘A’, ldvt >= max(1,n). If jobvt = ‘S’, ldvt >= max(1,min(m,n)). Otherwise, ldvt >= 1
- computeType: Data type of computation
- bufferOnDevice: Device workspace. Array of type void of size workspaceInBytesOnDevice bytes
- workspaceInBytesOnDevice: Size in bytes of bufferOnDevice, returned by Handle.XgesvdBufferSize
- bufferOnHost: Host workspace. Array of type void of size workspaceInBytesOnHost bytes
- workspaceInBytesOnHost: Size in bytes of bufferOnHost, returned by Handle.XgesvdBufferSize
- info: If info = 0, the operation is successful. If info = -i, the i-th parameter is wrong (not counting handle). If info > 0, info indicates how many superdiagonals of an intermediate bidiagonal form did not converge to zero
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0, or lda<max(1,m), or ldu<1, or if jobu“='S' or 'A' “ldu<m, or ldvt<1, or if jobvt = ‘A’ ldvt<n, or if jobvt = ‘S’ ldvt<min(m,n), or jobu, jobvt are none of ‘N’, ‘O’, ‘S’, ‘A’, or jobu = jobvt = ‘O’ ).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXgesvd.
func (Handle) XgesvdBufferSize ¶
func (h Handle) XgesvdBufferSize(params Params, jobu int8, jobvt int8, m int64, n int64, dataTypeA DataType, a driver.DevicePtr, lda int64, dataTypeS DataType, s driver.DevicePtr, dataTypeU DataType, u driver.DevicePtr, ldu int64, dataTypeVT DataType, vt driver.DevicePtr, ldvt int64, computeType DataType) (workspaceInBytesOnDevice uint, workspaceInBytesOnHost uint, err error)
XgesvdBufferSize returns the workspace sizes, in bytes, for Handle.Xgesvd.
- params: Structure with information collected by Params.SetAdvOptions
- 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
- jobvt: Specifies options for computing all or part of the matrix V**T: = ‘A’: all N rows of V**T are returned in the array VT; = ‘S’: the first min(m,n) rows of V**T (the right singular vectors) are returned in the array VT; = ‘O’: the first min(m,n) rows of V**T (the right singular vectors) are overwritten on the array A; = ‘N’: no rows of V**T (no right singular vectors) are computed
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda is not less than max(1,m). On exit, if jobu = ‘O’, A is overwritten with U; if jobvt = ‘O’, A is overwritten with VT; otherwise, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- dataTypeS: Data type of array S
- s: Real array of dimension min(m,n). The singular values of A, sorted so that S(i) >= S(i+1)
- dataTypeU: Data type of array U
- u: Array of dimension ldu * m with ldu is not less than max(1,m). If jobu = ‘A’, U contains the m×m unitary matrix U. If jobu = ‘S’, U contains the first min(m,n) columns of U. If jobu = ‘N’ or ‘O’, U is not referenced
- ldu: Leading dimension of two-dimensional array used to store matrix U. If jobu = ‘A’ or ‘S’, ldu >= max(1,m). Otherwise, ldu >= 1
- dataTypeVT: Data type of array VT
- vt: Array of dimension ldvt * n with ldvt is not less than max(1,n). If jobvt = ‘A’,“VT“ contains the n×n unitary matrix V**T. If jobvt = ‘S’, VT contains the first min(m,n) rows of V**T. If jobvt = ‘N’ or ‘O’, VT is not referenced
- ldvt: Leading dimension of two-dimensional array used to store matrix VT. If jobvt = ‘A’, ldvt >= max(1,n). If jobvt = ‘S’, ldvt >= max(1,min(m,n)). Otherwise, ldvt >= 1
- computeType: Data type of computation
- workspaceInBytesOnDevice: Size of bufferOnDevice, in bytes
- workspaceInBytesOnHost: Size of bufferOnHost, in bytes
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0, or lda<max(1,m), or ldu<1, or if jobu“='S' or 'A' “ldu<m, or ldvt<1, or if jobvt = ‘A’ ldvt<n, or if jobvt = ‘S’ ldvt<min(m,n), or jobu, jobvt are none of ‘N’, ‘O’, ‘S’, ‘A’, or jobu = jobvt = ‘O’ ).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXgesvdBufferSize, bound as cusolverDnXgesvd_bufferSize.
func (Handle) XgesvdjGetResidual ¶
func (h Handle) XgesvdjGetResidual(info GesvdjInfo) (float64, error)
XgesvdjGetResidual reports the Frobenius norm of the internal residual returned by gesvdj.
Note that this is not the Frobenious norm of the exact residual calculated as ‖S−Uᴴ*A*V‖_(F) This function does not support gesvdjBatched. If the user calls this function after gesvdjBatched, the error ErrNotSupported is returned.
- info: The pointer to the structure of gesvdj
- residual: Residual of gesvdj
Errors:
- ErrNotSupported: Does not support batched version
Wraps cusolverDnXgesvdjGetResidual.
func (Handle) XgesvdjGetSweeps ¶
func (h Handle) XgesvdjGetSweeps(info GesvdjInfo) (int32, error)
XgesvdjGetSweeps reports number of executed sweeps of gesvdj.
It does not support gesvdjBatched. If the user calls this function after gesvdjBatched, the error ErrNotSupported is returned.
- info: The pointer to the structure of gesvdj
- executedSweeps: Number of executed sweeps
Errors:
- ErrNotSupported: Does not support batched version
Wraps cusolverDnXgesvdjGetSweeps.
func (Handle) Xgesvdp ¶
func (h Handle) Xgesvdp(params Params, jobz EigMode, econ int32, m int64, n int64, dataTypeA DataType, a driver.DevicePtr, lda int64, dataTypeS DataType, s driver.DevicePtr, dataTypeU DataType, u driver.DevicePtr, ldu int64, dataTypeV DataType, v driver.DevicePtr, ldv int64, computeType DataType, bufferOnDevice driver.DevicePtr, workspaceInBytesOnDevice uint, bufferOnHost uintptr, workspaceInBytesOnHost uint, dInfo driver.DevicePtr, hErrSigma *float64) error
Xgesvdp computes the singular value decomposition (SVD) of an m×n matrix A and corresponding the left and/or right singular vectors.
The SVD is written A=U*Σ*Vᴴ, where Σ is an m×n matrix which is zero except for its min(m,n) diagonal elements, U is an m×m unitary matrix, and V is an n×n unitary matrix. The diagonal elements of Σ are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A. Handle.Xgesvdp combines polar decomposition in [14] and Handle.Xsyevd to compute SVD. It is much faster than Handle.Xgesvd which is based on QR algorithm. However polar decomposition in [14] may not deliver a full unitary matrix when the matrix A has a singular value close to zero. To workaround the issue when the singular value is close to zero, we add a small perturbation so polar decomposition can deliver the correct result. The consequence is inaccurate singular values shifted by this perturbation. The output parameter hErrSigma is the magnitude of this perturbation. In other words, hErrSigma shows the accuracy of SVD. The user has to provide device and host working spaces which are pointed by input parameters bufferOnDevice and bufferOnHost. The input parameters workspaceInBytesOnDevice (and workspaceInBytesOnHost) is size in bytes of the device (and host) working space, and it is returned by Handle.XgesvdpBufferSize. If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). Currently, Handle.Xgesvdp supports only the default algorithm. Algorithms supported by Handle.Xgesvdp
- Alg0, the zero value: Default algorithm.
Please visit cuSOLVER Library Samples - Handle.Xgesvdp for a code example. Remark 1: gesvdp supports n>=m as well. Remark 2: the routine returns V, not Vᴴ The generic API has three different types, dataTypeA is data type of the matrix A, dataTypeS is data type of the vector S and dataTypeU is data type of the matrix U, dataTypeV is data type of the matrix V, computeType is compute type of the operation. Handle.Xgesvdp only supports the following four combinations: Valid combination of data type and compute type
DataTypeA DataTypeS DataTypeU DataTypeV ComputeType Meaning CUDA_R_32F CUDA_R_32F CUDA_R_32F CUDA_R_32F CUDA_R_32F SGESVDP CUDA_R_64F CUDA_R_64F CUDA_R_64F CUDA_R_64F CUDA_R_64F DGESVDP CUDA_C_32F CUDA_R_32F CUDA_C_32F CUDA_C_32F CUDA_C_32F CGESVDP CUDA_C_64F CUDA_R_64F CUDA_C_64F CUDA_C_64F CUDA_C_64F ZGESVDP
Parameters:
- params: Structure with information collected by Params.SetAdvOptions
- jobz: Specifies options to either compute singular values only or compute singular vectors as well: jobz = EigModeNovector : Compute singular values only. jobz = EigModeVector : Compute singular values and singular vectors
- econ: econ = 1 for economy size for U and V
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda is not less than max(1,m). On exit, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- dataTypeS: Data type of array S
- s: Real array of dimension min(m,n). The singular values of A, sorted so that S(i) >= S(i+1)
- dataTypeU: Data type of array U
- u: Array of dimension ldu * m with ldu is not less than max(1,m). U contains the m×m unitary matrix U. If econ=1, only reports first min(m,n) columns of U
- ldu: Leading dimension of two-dimensional array used to store matrix U
- dataTypeV: Data type of array V
- v: Array of dimension ldv * n with ldv is not less than max(1,n). V contains the n×n unitary matrix V. if econ=1, only reports first min(m,n) columns of V
- ldv: Leading dimension of two-dimensional array used to store matrix V
- computeType: Data type of computation
- bufferOnDevice: Device workspace. Array of type void of size workspaceInBytesOnDevice bytes
- workspaceInBytesOnDevice: Size in bytes of bufferOnDevice, returned by Handle.XgesvdpBufferSize
- bufferOnHost: Host workspace. Array of type void of size workspaceInBytesOnHost bytes
- workspaceInBytesOnHost: Size in bytes of bufferOnHost, returned by Handle.XgesvdpBufferSize
- hErrSigma: Magnitude of the perturbation, showing the accuracy of SVD
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m) or ldu<max(1,m) or ldv<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXgesvdp.
func (Handle) XgesvdpBufferSize ¶
func (h Handle) XgesvdpBufferSize(params Params, jobz EigMode, econ int32, m int64, n int64, dataTypeA DataType, a driver.DevicePtr, lda int64, dataTypeS DataType, s driver.DevicePtr, dataTypeU DataType, u driver.DevicePtr, ldu int64, dataTypeV DataType, v driver.DevicePtr, ldv int64, computeType DataType) (workspaceInBytesOnDevice uint, workspaceInBytesOnHost uint, err error)
XgesvdpBufferSize returns the workspace sizes, in bytes, for Handle.Xgesvdp.
- params: Structure with information collected by Params.SetAdvOptions
- jobz: Specifies options to either compute singular values only or compute singular vectors as well: jobz = EigModeNovector : Compute singular values only. jobz = EigModeVector : Compute singular values and singular vectors
- econ: econ = 1 for economy size for U and V
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda is not less than max(1,m). On exit, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- dataTypeS: Data type of array S
- s: Real array of dimension min(m,n). The singular values of A, sorted so that S(i) >= S(i+1)
- dataTypeU: Data type of array U
- u: Array of dimension ldu * m with ldu is not less than max(1,m). U contains the m×m unitary matrix U. If econ=1, only reports first min(m,n) columns of U
- ldu: Leading dimension of two-dimensional array used to store matrix U
- dataTypeV: Data type of array V
- v: Array of dimension ldv * n with ldv is not less than max(1,n). V contains the n×n unitary matrix V. if econ=1, only reports first min(m,n) columns of V
- ldv: Leading dimension of two-dimensional array used to store matrix V
- computeType: Data type of computation
- workspaceInBytesOnDevice: Size of bufferOnDevice, in bytes
- workspaceInBytesOnHost: Size of bufferOnHost, in bytes
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m) or ldu<max(1,m) or ldv<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXgesvdpBufferSize, bound as cusolverDnXgesvdp_bufferSize.
func (Handle) Xgesvdr ¶
func (h Handle) Xgesvdr(params Params, jobu int8, jobv int8, m int64, n int64, k int64, p int64, niters int64, dataTypeA DataType, a driver.DevicePtr, lda int64, dataTypeSrand DataType, srand driver.DevicePtr, dataTypeUrand DataType, urand driver.DevicePtr, ldUrand int64, dataTypeVrand DataType, vrand driver.DevicePtr, ldVrand int64, computeType DataType, bufferOnDevice driver.DevicePtr, workspaceInBytesOnDevice uint, bufferOnHost uintptr, workspaceInBytesOnHost uint, dInfo driver.DevicePtr) error
Xgesvdr computes the approximated rank-k singular value decomposition (k-SVD) of an m×n matrix A and the corresponding left and/or right singular vectors.
The k-SVD is written as Aₖ≈U*Σ*Vᴴ, where Σ is a k×k matrix which is zero except for its diagonal elements, U is an m×k orthonormal matrix, and V is an k×n orthonormal matrix. The diagonal elements of Σ are the approximated singular values of A; they are real and non-negative, and are returned in descending order. The columns of U and V are the top- k left and right singular vectors of A. Handle.Xgesvdr implements randomized methods described in [15] to compute k-SVD that is accurate with high probability if the conditions described in [15] hold. Handle.Xgesvdr is intended to compute a very small portion of the spectrum (meaning that k is very small compared to min(m,n)). of A fast and with good quality, specially when the dimensions of the matrix are large. The accuracy of the method depends on the spectrum of A, the number of power iterations niters, the oversampling parameter p and the ratio between p and the dimensions of the matrix A. Larger values of oversampling p or larger number of iterations niters might produce more accurate approximations, but it will also increase the run time of Handle.Xgesvdr. Our recommendation is to use two iterations and set the oversampling to at least 2k. Once the solver provides enough accuracy, adjust the values of k and niters for better performance. The user has to provide device and host working spaces which are pointed by input parameters bufferOnDevice and bufferOnHost. The input parameters workspaceInBytesOnDevice (and workspaceInBytesOnHost) is size in bytes of the device (and host) working space, and it is returned by Handle.XgesvdrBufferSize. If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). Currently, Handle.Xgesvdr supports only the default algorithm. Algorithms supported by Handle.Xgesvdr
- Alg0, the zero value: Default algorithm.
Please visit cuSOLVER Library Samples - Handle.Xgesvdr for a code example. Remark 1: gesvdr supports n>=m as well. Remark 2: the routine returns V, not Vᴴ The generic API has five different types, dataTypeA is data type of the matrix A, dataTypeS is data type of the vector S and dataTypeU is data type of the matrix U, dataTypeV is data type of the matrix V, computeType is compute type of the operation. Handle.Xgesvdr only supports the following four combinations. Valid combination of data type and compute type
DataTypeA DataTypeS DataTypeU DataTypeV ComputeType Meaning CUDA_R_32F CUDA_R_32F CUDA_R_32F CUDA_R_32F CUDA_R_32F SGESVDR CUDA_R_64F CUDA_R_64F CUDA_R_64F CUDA_R_64F CUDA_R_64F DGESVDR CUDA_C_32F CUDA_R_32F CUDA_C_32F CUDA_C_32F CUDA_C_32F CGESVDR CUDA_C_64F CUDA_R_64F CUDA_C_64F CUDA_C_64F CUDA_C_64F ZGESVDR
Parameters:
- params: Structure with information collected by Params.SetAdvOptions
- jobu: Specifies options for computing all or part of the matrix U: = ‘S’: the first k columns of U (the left singular vectors) are returned in the array U; = ‘N’: no columns of U (no left singular vectors) are computed
- jobv: Specifies options for computing all or part of the matrix V: = ‘S’: the first k rows of V (the right singular vectors) are returned in the array V; = ‘N’: no rows of V (no right singular vectors) are computed
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- k: Rank of the k-SVD decomposition of matrix A. rank is less than min(m,n)
- p: Oversampling. The size of the subspace will be (k + p). (k+p) is less than min(m,n)
- niters: Number of iteration of power method
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda is not less than max(1,m). On exit, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- computeType: Data type of computation
- bufferOnDevice: Device workspace. Array of type void of size workspaceInBytesOnDevice bytes
- workspaceInBytesOnDevice: Size in bytes of bufferOnDevice, returned by Handle.XgesvdrBufferSize
- bufferOnHost: Host workspace. Array of type void of size workspaceInBytesOnHost bytes
- workspaceInBytesOnHost: Size in bytes of bufferOnHost, returned by Handle.XgesvdrBufferSize
- dInfo: If info = 0, the operation is successful. If info = -i, the i-th parameter is wrong (not counting handle)
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m) or ldu<max(1,m) or ldv<max(1,n) ).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXgesvdr.
func (Handle) XgesvdrBufferSize ¶
func (h Handle) XgesvdrBufferSize(params Params, jobu int8, jobv int8, m int64, n int64, k int64, p int64, niters int64, dataTypeA DataType, a driver.DevicePtr, lda int64, dataTypeSrand DataType, srand driver.DevicePtr, dataTypeUrand DataType, urand driver.DevicePtr, ldUrand int64, dataTypeVrand DataType, vrand driver.DevicePtr, ldVrand int64, computeType DataType) (workspaceInBytesOnDevice uint, workspaceInBytesOnHost uint, err error)
XgesvdrBufferSize returns the workspace sizes, in bytes, for Handle.Xgesvdr.
- params: Structure with information collected by Params.SetAdvOptions
- jobu: Specifies options for computing all or part of the matrix U: = ‘S’: the first k columns of U (the left singular vectors) are returned in the array U; = ‘N’: no columns of U (no left singular vectors) are computed
- jobv: Specifies options for computing all or part of the matrix V: = ‘S’: the first k rows of V (the right singular vectors) are returned in the array V; = ‘N’: no rows of V (no right singular vectors) are computed
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- k: Rank of the k-SVD decomposition of matrix A. rank is less than min(m,n)
- p: Oversampling. The size of the subspace will be (k + p). (k+p) is less than min(m,n)
- niters: Number of iteration of power method
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda is not less than max(1,m). On exit, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- computeType: Data type of computation
- workspaceInBytesOnDevice: Size of bufferOnDevice, in bytes
- workspaceInBytesOnHost: Size of bufferOnHost, in bytes
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m) or ldu<max(1,m) or ldv<max(1,n) ).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXgesvdrBufferSize, bound as cusolverDnXgesvdr_bufferSize.
func (Handle) Xgetrf ¶
func (h Handle) Xgetrf(params Params, m int64, n int64, dataTypeA DataType, a driver.DevicePtr, lda int64, ipiv driver.DevicePtr, computeType DataType, bufferOnDevice driver.DevicePtr, workspaceInBytesOnDevice uint, bufferOnHost uintptr, workspaceInBytesOnHost uint, info driver.DevicePtr) error
Xgetrf computes the LU factorization of a m×n matrix.
P*A=L*U, 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 using the generic API interface. If LU factorization failed, i.e. matrix A ( U) is singular, The output parameter info=i indicates U(i,i) = 0. If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). If ipiv is null, no pivoting is performed. The factorization is A=L*U, which is not numerically stable. No matter LU factorization failed or not, the output parameter ipiv contains pivoting sequence, row i is interchanged with row ipiv(i). The user has to provide device and host working spaces which are pointed by input parameters bufferOnDevice and bufferOnHost. The input parameters workspaceInBytesOnDevice (and workspaceInBytesOnHost) is size in bytes of the device (and host) working space, and it is returned by Handle.XgetrfBufferSize. The user can combine Handle.Xgetrf and cusolverDnGetrs to complete a linear solver. Currently, Handle.Xgetrf supports two algorithms. To select legacy implementation, the user has to call Params.SetAdvOptions. Please visit cuSOLVER Library Samples - Handle.Xgetrf for a code example. Algorithms supported by Handle.Xgetrf
- Alg0, the zero value: Default algorithm. The fastest, requires a large workspace of m*n elements.
- Alg1: Legacy implementation
The generic API has two different types, dataTypeA is data type of the matrix A, computeType is compute type of the operation. Handle.Xgetrf only supports the following four combinations. Valid combination of data type and compute type
DataTypeA ComputeType Meaning CUDA_R_32F CUDA_R_32F SGETRF CUDA_R_64F CUDA_R_64F DGETRF CUDA_C_32F CUDA_C_32F CGETRF CUDA_C_64F CUDA_C_64F ZGETRF
Parameters:
- params: Structure with information collected by Params.SetAdvOptions
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- dataTypeA: Data type of array A
- a: array of dimension lda * n with lda is not less than max(1,m)
- lda: Leading dimension of two-dimensional array used to store matrix A
- ipiv: Array of size at least min(m,n), containing pivot indices
- computeType: Data type of computation
- bufferOnDevice: Device workspace. Array of type void of size workspaceInBytesOnDevice bytes
- workspaceInBytesOnDevice: Size in bytes of bufferOnDevice, returned by Handle.XgetrfBufferSize
- bufferOnHost: Host workspace. Array of type void of size workspaceInBytesOnHost bytes
- workspaceInBytesOnHost: Size in bytes of bufferOnHost, returned by Handle.XgetrfBufferSize
- info: If info = 0, the LU factorization is successful. if info = -i, the i-th parameter is wrong (not counting handle). If info = i, the U(i,i) = 0
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXgetrf.
func (Handle) XgetrfBufferSize ¶
func (h Handle) XgetrfBufferSize(params Params, m int64, n int64, dataTypeA DataType, a driver.DevicePtr, lda int64, computeType DataType) (workspaceInBytesOnDevice uint, workspaceInBytesOnHost uint, err error)
XgetrfBufferSize returns the workspace sizes, in bytes, for Handle.Xgetrf.
- params: Structure with information collected by Params.SetAdvOptions
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- dataTypeA: Data type of array A
- a: array of dimension lda * n with lda is not less than max(1,m)
- lda: Leading dimension of two-dimensional array used to store matrix A
- computeType: Data type of computation
- workspaceInBytesOnDevice: Size of bufferOnDevice, in bytes
- workspaceInBytesOnHost: Size of bufferOnHost, in bytes
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXgetrfBufferSize, bound as cusolverDnXgetrf_bufferSize.
func (Handle) Xgetrs ¶
func (h Handle) Xgetrs(params Params, trans Operation, n int64, nrhs int64, dataTypeA DataType, a driver.DevicePtr, lda int64, ipiv driver.DevicePtr, dataTypeB DataType, b driver.DevicePtr, ldb int64, info driver.DevicePtr) error
Xgetrs solves a linear system of multiple right-hand sides.
op(A)*X=B, where A is an n×n matrix, and was LU-factored by Handle.Xgetrf, that is, lower triangular part of A is L, and upper triangular part (including diagonal elements) of A is U. B is an n×nrhs right-hand side matrix using the generic API interface. The input parameter trans is defined by op(A) = A if trans == CUBLAS_OP_N, op(A) = Aᵀ if trans == CUBLAS_OP_T, and op(A) = Aᴴ if trans == CUBLAS_OP_C. The input parameter ipiv is an output of Handle.Xgetrf. It contains pivot indices, which are used to permutate right-hand sides. If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). The user can combine Handle.Xgetrf and Handle.Xgetrs to complete a linear solver. Currently, Handle.Xgetrs supports only the default algorithm. Please visit cuSOLVER Library Samples - Handle.Xgetrf for a code example. Algorithms supported by Handle.Xgetrs
- Alg0, the zero value: Default algorithm.
The generic API has two different types: dataTypeA is data type of the matrix A and dataTypeB is data type of the matrix B. Handle.Xgetrs only supports the following four combinations: Valid combination of data type and compute type
DataTypeA dataTypeB Meaning CUDA_R_32F CUDA_R_32F SGETRS CUDA_R_64F CUDA_R_64F DGETRS CUDA_C_32F CUDA_C_32F CGETRS CUDA_C_64F CUDA_C_64F ZGETRS
Parameters:
- params: Structure with information collected by Params.SetAdvOptions
- trans: Operation op(A) that is non- or (conj.) transpose
- n: Number of rows and columns of matrix A
- nrhs: Number of right-hand sides
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- ipiv: Array of size at least n, containing pivot indices
- dataTypeB: Data type of array B
- b: array of dimension ldb * nrhs with ldb is not less than max(1,n)
- ldb: Leading dimension of two-dimensional array used to store matrix B
- info: If info = 0, the operation is successful. If info = -i, the i-th parameter is wrong (not counting handle)
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n) or ldb<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXgetrs.
func (Handle) Xhetrf ¶
func (h Handle) Xhetrf(params Params, uplo FillMode, n int64, dataTypeA DataType, a driver.DevicePtr, lda int64, ipiv driver.DevicePtr, computeType DataType, bufferOnDevice driver.DevicePtr, workspaceInBytesOnDevice uint, bufferOnHost uintptr, workspaceInBytesOnHost uint, info driver.DevicePtr) error
Xhetrf computes the factorization of a Hermitian indefinite matrix using the Bunch-Kaufman diagonal pivoting and the generic API interface.
A is an n×n Hermitian matrix, only lower or upper part is meaningful. The input parameter uplo indicates which part of the matrix is used. If ipiv is NULL, no pivoting is performed, which is not numerically stable. If input parameter uplo is CUBLAS_FILL_MODE_LOWER, only lower triangular part of A is processed, and replaced by lower triangular factor L and block diagonal matrix D. Each block of D is either a 1x1 or 2x2 block, depending on pivoting. P*A*Pᴴ=L*D*Lᴴ If input parameter uplo is CUBLAS_FILL_MODE_UPPER, only upper triangular part of A is processed, and replaced by upper triangular factor U and block diagonal matrix D. P*A*Pᴴ=U*D*Uᴴ where P is a permutation matrix determined by the pivoting sequence (returned in ipiv). The user has to provide device and host work spaces which are pointed by input parameters bufferOnDevice and bufferOnHost. The input parameters workspaceInBytesOnDevice and workspaceInBytesOnHost are sizes in bytes of the device and host work spaces, and they are returned by Handle.XhetrfBufferSize. The other triangular part of the input matrix A may also be used as workspace. If the Bunch-Kaufman factorization failed, i.e. A is singular, the output parameter info = i indicates that D(i,i) = 0, where i uses 1-based (Fortran) indexing, consistent with the value returned in info. If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). The output parameter ipiv contains the pivoting sequence. If ipiv(i) = k > 0, D(i,i) is a 1x1 block, and the i-th row/column of A is interchanged with the k-th row/column of A. If uplo is CUBLAS_FILL_MODE_UPPER and ipiv(i-1) = ipiv(i) = -m < 0, D(i-1:i,i-1:i) is a 2x2 block, and the (i-1)-th row/column is interchanged with the m-th row/column. If uplo is CUBLAS_FILL_MODE_LOWER and ipiv(i+1) = ipiv(i) = -m < 0, D(i:i+1,i:i+1) is a 2x2 block, and the (i+1)-th row/column is interchanged with the m-th row/column. The user can combine Handle.Xhetrf and Handle.Xhetrs to complete a linear solver for a Hermitian indefinite system. The generic API has two different types, dataTypeA is data type of the matrix A, computeType is compute type of the operation. As a Hermitian factorization, Handle.Xhetrf only supports the following two combinations. Valid combination of data type and compute type
DataTypeA ComputeType Meaning CUDA_C_32F CUDA_C_32F CHETRF CUDA_C_64F CUDA_C_64F ZHETRF
Parameters:
- params: Structure with information collected by Params.SetAdvOptions
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- n: Number of rows and columns of matrix A
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda not less than max(1,n). On exit, overwritten by the factors D and L or U. The other triangular part may be used as workspace
- lda: Leading dimension of two-dimensional array used to store matrix A
- ipiv: Array of size at least n, containing pivot indices. To perform no pivoting, set the argument NULL
- computeType: Data type of computation
- bufferOnDevice: Device workspace. Array of type void of size workspaceInBytesOnDevice bytes
- workspaceInBytesOnDevice: Size in bytes of bufferOnDevice, returned by Handle.XhetrfBufferSize
- bufferOnHost: Host workspace. Array of type void of size workspaceInBytesOnHost bytes
- workspaceInBytesOnHost: Size in bytes of bufferOnHost, returned by Handle.XhetrfBufferSize
- info: If info = 0, the factorization is successful. If info = -i, the i-th parameter is wrong (not counting handle). If info = i, D(i,i) = 0
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrMatrixTypeNotSupported: Data type is not supported.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXhetrf.
func (Handle) XhetrfBufferSize ¶
func (h Handle) XhetrfBufferSize(params Params, uplo FillMode, n int64, dataTypeA DataType, a driver.DevicePtr, lda int64, ipiv driver.DevicePtr, computeType DataType, workspaceInBytesOnDevice *uint, workspaceInBytesOnHost *uint) error
XhetrfBufferSize returns the workspace sizes, in bytes, for Handle.Xhetrf.
- params: Structure with information collected by Params.SetAdvOptions
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- n: Number of rows and columns of matrix A
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda not less than max(1,n). On exit, overwritten by the factors D and L or U. The other triangular part may be used as workspace
- lda: Leading dimension of two-dimensional array used to store matrix A
- ipiv: Array of size at least n, containing pivot indices. To perform no pivoting, set the argument NULL
- computeType: Data type of computation
- workspaceInBytesOnDevice: Size of bufferOnDevice, in bytes
- workspaceInBytesOnHost: Size of bufferOnHost, in bytes
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrMatrixTypeNotSupported: Data type is not supported.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXhetrfBufferSize, bound as cusolverDnXhetrf_bufferSize.
func (Handle) Xhetrs ¶
func (h Handle) Xhetrs(params Params, uplo FillMode, n int64, nrhs int64, dataTypeA DataType, a driver.DevicePtr, lda int64, ipiv driver.DevicePtr, dataTypeB DataType, b driver.DevicePtr, ldb int64, bufferOnDevice driver.DevicePtr, workspaceInBytesOnDevice uint, bufferOnHost uintptr, workspaceInBytesOnHost uint, info driver.DevicePtr) error
Xhetrs solves a system of linear equations with a Hermitian indefinite coefficient matrix using the generic API interface.
A contains the factorization from Handle.Xhetrf, only lower or upper part is meaningful, the other part is not touched. If input parameter uplo is CUBLAS_FILL_MODE_LOWER, the details of the factorization are stored as: A=L*D*Lᴴ If input parameter uplo is CUBLAS_FILL_MODE_UPPER, the details of the factorization are stored as: A=U*D*Uᴴ The user has to provide the pivot indices that can be obtained by Handle.Xhetrf as well as device and host work spaces which are pointed by input parameters bufferOnDevice and bufferOnHost. The input parameters workspaceInBytesOnDevice and workspaceInBytesOnHost are sizes in bytes of the device and host work spaces, and they are returned by Handle.XhetrsBufferSize. To factorize and solve the Hermitian system without pivoting, the user should set ipiv = NULL when calling Handle.Xhetrf and Handle.Xhetrs. If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). The generic API has two different types, dataTypeA is data type of the matrix A, dataTypeB is data type of the matrix B. As a Hermitian solver, Handle.Xhetrs only supports the following two combinations. Valid combination of data type and compute type
DataTypeA DataTypeB Meaning CUDA_C_32F CUDA_C_32F CHETRS CUDA_C_64F CUDA_C_64F ZHETRS
Parameters:
- params: Structure with information collected by Params.SetAdvOptions
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- n: Number of rows and columns of matrix A
- nrhs: Number of right-hand sides
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda not less than max(1,n). Factorization returned by Handle.Xhetrf; not modified
- lda: Leading dimension of two-dimensional array used to store matrix A
- ipiv: Array of size at least n, containing pivot indices produced by Handle.Xhetrf. To solve the system without pivoting, set the argument NULL
- dataTypeB: Data type of array B
- b: Array of dimension ldb * nrhs with ldb not less than max(1,n). On exit, overwritten by the solution X
- ldb: Leading dimension of two-dimensional array used to store matrix B
- bufferOnDevice: Device workspace. Array of type void of size workspaceInBytesOnDevice bytes
- workspaceInBytesOnDevice: Size in bytes of bufferOnDevice, returned by Handle.XhetrsBufferSize
- bufferOnHost: Host workspace. Array of type void of size workspaceInBytesOnHost bytes
- workspaceInBytesOnHost: Size in bytes of bufferOnHost, returned by Handle.XhetrsBufferSize
- info: If info = -i (less than zero), the i-th parameter is wrong (not counting handle). Otherwise, info = 0 indicates all parameters are valid
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrMatrixTypeNotSupported: Data type is not supported.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXhetrs.
func (Handle) XhetrsBufferSize ¶
func (h Handle) XhetrsBufferSize(params Params, uplo FillMode, n int64, nrhs int64, dataTypeA DataType, a driver.DevicePtr, lda int64, ipiv driver.DevicePtr, dataTypeB DataType, b driver.DevicePtr, ldb int64, workspaceInBytesOnDevice *uint, workspaceInBytesOnHost *uint) error
XhetrsBufferSize returns the workspace sizes, in bytes, for Handle.Xhetrs.
- params: Structure with information collected by Params.SetAdvOptions
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- n: Number of rows and columns of matrix A
- nrhs: Number of right-hand sides
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda not less than max(1,n). Factorization returned by Handle.Xhetrf; not modified
- lda: Leading dimension of two-dimensional array used to store matrix A
- ipiv: Array of size at least n, containing pivot indices produced by Handle.Xhetrf. To solve the system without pivoting, set the argument NULL
- dataTypeB: Data type of array B
- b: Array of dimension ldb * nrhs with ldb not less than max(1,n). On exit, overwritten by the solution X
- ldb: Leading dimension of two-dimensional array used to store matrix B
- workspaceInBytesOnDevice: Size of bufferOnDevice, in bytes
- workspaceInBytesOnHost: Size of bufferOnHost, in bytes
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrMatrixTypeNotSupported: Data type is not supported.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXhetrsBufferSize, bound as cusolverDnXhetrs_bufferSize.
func (Handle) Xlarft ¶
func (h Handle) Xlarft(params Params, direct DirectMode, storev StorevMode, n int64, k int64, dataTypeV DataType, v driver.DevicePtr, ldv int64, dataTypeTau DataType, tau driver.DevicePtr, dataTypeT DataType, t driver.DevicePtr, ldt int64, computeType DataType, bufferOnDevice driver.DevicePtr, workspaceInBytesOnDevice uint, bufferOnHost uintptr, workspaceInBytesOnHost uint) error
Xlarft forms the triangular factor T of a real block reflector H of order n, which is defined as a product of k elementary reflectors.
If: Only storev == CUBLAS_STOREV_COLUMNWISE is supported, which indicates that the vector defining the elementary reflector H(i) is stored in the i-th column of the array V, and H=I−V*T*Vᵀ (H=I−V*T*Vᴴ for complex types). The user has to provide device and host working spaces which are pointed by input parameters bufferOnDevice and bufferOnHost. The input parameters workspaceInBytesOnDevice (and workspaceInBytesOnHost) is size in bytes of the device (and host) working space, and it is returned by Handle.XlarftBufferSize. Currently, only n >= k scenario is supported. The generic API has four different types: Handle.Xlarft only supports the following four combinations. Valid combinations of data types and compute types
DataTypeV DataTypeTau DataTypeT ComputeType Meaning CUDA_R_32F CUDA_R_32F CUDA_R_32F CUDA_R_32F SLARFT CUDA_R_64F CUDA_R_64F CUDA_R_64F CUDA_R_64F DLARFT CUDA_C_32F CUDA_C_32F CUDA_C_32F CUDA_C_32F CLARFT CUDA_C_64F CUDA_C_64F CUDA_C_64F CUDA_C_64F ZLARFT
Parameters:
- params: Structure with information collected by Params.SetAdvOptions
- direct: Specifies the order in which the elementary reflectors are multiplied to form the block reflector
- storev: Specifies how the vectors which define the elementary reflectors are stored
- n: The order of the block reflector H. n >= 0
- k: The order of the triangular factor T (= the number of elementary reflectors). k >= 1
- dataTypeV: Data type of array V
- v: The matrix V of dimension lda * k
- ldv: Leading dimension of the array V. ldv >= max(1,n)
- dataTypeTau: Data type of array tau
- tau: Dimension k. tau(i) must contain the scalar factor of the elementary reflector H(i)
- dataTypeT: Data type of array T
- t: Dimension ldt * k. The k×k triangular factor T of the block reflector. If direct == CUBLAS_DIRECT_FORWARD, T is upper triangular; if direct == CUBLAS_DIRECT_BACKWARD, T is lower triangular
- ldt: The leading dimension of the array T. ldt >= k
- computeType: Data type of computation
- bufferOnDevice: Device workspace. Array of type void of size workspaceInBytesOnDevice bytes
- workspaceInBytesOnDevice: Size in bytes of bufferOnDevice, returned by Handle.XlarftBufferSize
- bufferOnHost: Host workspace. Array of type void of size workspaceInBytesOnHost bytes
- workspaceInBytesOnHost: Size in bytes of bufferOnHost, returned by Handle.XlarftBufferSize
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n == 0, k > n, or storev == CUBLAS_STOREV_ROWWISE).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXlarft.
func (Handle) XlarftBufferSize ¶
func (h Handle) XlarftBufferSize(params Params, direct DirectMode, storev StorevMode, n int64, k int64, dataTypeV DataType, v driver.DevicePtr, ldv int64, dataTypeTau DataType, tau driver.DevicePtr, dataTypeT DataType, t driver.DevicePtr, ldt int64, computeType DataType) (workspaceInBytesOnDevice uint, workspaceInBytesOnHost uint, err error)
XlarftBufferSize returns the workspace sizes, in bytes, for Handle.Xlarft.
- params: Structure with information collected by Params.SetAdvOptions
- direct: Specifies the order in which the elementary reflectors are multiplied to form the block reflector
- storev: Specifies how the vectors which define the elementary reflectors are stored
- n: The order of the block reflector H. n >= 0
- k: The order of the triangular factor T (= the number of elementary reflectors). k >= 1
- dataTypeV: Data type of array V
- v: The matrix V of dimension lda * k
- ldv: Leading dimension of the array V. ldv >= max(1,n)
- dataTypeTau: Data type of array tau
- tau: Dimension k. tau(i) must contain the scalar factor of the elementary reflector H(i)
- dataTypeT: Data type of array T
- t: Dimension ldt * k. The k×k triangular factor T of the block reflector. If direct == CUBLAS_DIRECT_FORWARD, T is upper triangular; if direct == CUBLAS_DIRECT_BACKWARD, T is lower triangular
- ldt: The leading dimension of the array T. ldt >= k
- computeType: Data type of computation
- workspaceInBytesOnDevice: Size of bufferOnDevice, in bytes
- workspaceInBytesOnHost: Size of bufferOnHost, in bytes
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n == 0, k > n, or storev == CUBLAS_STOREV_ROWWISE).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXlarftBufferSize, bound as cusolverDnXlarft_bufferSize.
func (Handle) Xpolar ¶
func (ha Handle) Xpolar(params Params, uplo FillMode, m int64, n int64, dataTypeA DataType, a driver.DevicePtr, lda int64, dataTypeH DataType, h driver.DevicePtr, ldh int64, computeType DataType, bufferOnDevice driver.DevicePtr, workspaceInBytesOnDevice uint, bufferOnHost uintptr, workspaceInBytesOnHost uint, dResNrm driver.DevicePtr, dANrmF driver.DevicePtr, dRcond driver.DevicePtr, dInfo driver.DevicePtr) error
Xpolar computes the polar decomposition of an m×n matrix A (where m≥n).
The polar decomposition is written A=Uₚ⋅H, where Uₚ is an m×n matrix with orthonormal columns and H is an n×n Hermitian positive semidefinite matrix. Handle.Xpolar uses the QDWH (QR-based Dynamically Weighted Halley) iteration [14][16] to compute Uₚ. The QDWH iteration converges cubically and requires at most ~6 iterations. For ill-conditioned or rank-deficient matrices A, the routine adds a small perturbation ξ to ensure the polar decomposition converges correctly. The output parameter dResNrm reports the magnitude of the residual ‖A−Uₚ⋅H‖₂. The user has to provide device and host working spaces which are pointed by input parameters bufferOnDevice and bufferOnHost. The input parameters workspaceInBytesOnDevice (and workspaceInBytesOnHost) is size in bytes of the device (and host) working space, and it is returned by Handle.XpolarBufferSize. If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). Currently, Handle.Xpolar supports only the default algorithm. Algorithms supported by Handle.Xpolar
- Alg0, the zero value: Default algorithm.
Remark 1: If H is NULL, computation of H is skipped. Remark 2: uplo = CUBLAS_FILL_MODE_UPPER treats A as upper triangular, saving one QR decomposition. CUBLAS_FILL_MODE_LOWER is not supported. Remark 3: dResNrm serves dual purpose. On input, if *dResNrm >= 0, it overrides the perturbation ξ (skipping automatic search). On output, it reports the residual norm ‖A−Uₚ⋅H‖₂. The generic API has three different types, dataTypeA is data type of the matrix A, dataTypeH is data type of the matrix H, and computeType is compute type of the operation. Handle.Xpolar only supports the following four combinations: Valid combination of data type and compute type
DataTypeA DataTypeH ComputeType Meaning CUDA_R_32F CUDA_R_32F CUDA_R_32F SPOLAR CUDA_R_64F CUDA_R_64F CUDA_R_64F DPOLAR CUDA_C_32F CUDA_C_32F CUDA_C_32F CPOLAR CUDA_C_64F CUDA_C_64F CUDA_C_64F ZPOLAR
Parameters:
- params: Structure with information collected by Params.SetAdvOptions
- uplo: Specifies the structure of matrix A. uplo = CUBLAS_FILL_MODE_UPPER : A is upper triangular, saving one QR decomposition. uplo = CUBLAS_FILL_MODE_FULL : A is a general matrix. CUBLAS_FILL_MODE_LOWER is not supported
- m: Number of rows of matrix A, m >= n >= 0
- n: Number of columns of matrix A
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda is not less than max(1,m). On exit, A is overwritten with the unitary polar factor Uₚ with orthonormal columns
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m)
- dataTypeH: Data type of array H. Must equal dataTypeA
- h: Array of dimension ldh * n with ldh is not less than max(1,n). n×n Hermitian positive semidefinite factor. If H is NULL, computation of H is skipped
- ldh: Leading dimension of two-dimensional array used to store matrix H. ldh >= max(1,n) when H is not NULL
- computeType: Data type of computation. Must equal dataTypeA
- bufferOnDevice: Device workspace. Array of type void of size workspaceInBytesOnDevice bytes
- workspaceInBytesOnDevice: Size in bytes of bufferOnDevice, returned by Handle.XpolarBufferSize
- bufferOnHost: Host workspace. Array of type void of size workspaceInBytesOnHost bytes
- workspaceInBytesOnHost: Size in bytes of bufferOnHost, returned by Handle.XpolarBufferSize
- dResNrm: On input, if *dResNrm >= 0, it overrides the perturbation ξ (skipping automatic search). On output, reports ‖A−Uₚ⋅H‖₂
- dANrmF: ‖A‖_(F) (Frobenius norm of A). If NULL, the computation is skipped
- dRcond: Reciprocal condition number 1/cond(A,fro). If NULL, the computation is skipped. Undefined if a user-supplied ξ>0 was provided via dResNrm
- dInfo: If info = 0, the operation is successful. If info = -i, the i-th parameter is wrong (not counting handle). If info = 1, the algorithm failed to find rcond > 1.e-15 by adding perturbation. If info = 10, the algorithm failed to converge within 10 iterations
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m<0, or n<0, or m<n, or lda < max(1,m), or ldh < max(1,n) when H is not NULL, or uplo is CUBLAS_FILL_MODE_LOWER, or dataTypeH != dataTypeA, or computeType != dataTypeA).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXpolar.
func (Handle) XpolarBufferSize ¶
func (ha Handle) XpolarBufferSize(params Params, uplo FillMode, m int64, n int64, dataTypeA DataType, a driver.DevicePtr, lda int64, dataTypeH DataType, h driver.DevicePtr, ldh int64, computeType DataType, workspaceInBytesOnDevice *uint, workspaceInBytesOnHost *uint) error
XpolarBufferSize returns the workspace sizes, in bytes, for Handle.Xpolar.
- params: Structure with information collected by Params.SetAdvOptions
- uplo: Specifies the structure of matrix A. uplo = CUBLAS_FILL_MODE_UPPER : A is upper triangular, saving one QR decomposition. uplo = CUBLAS_FILL_MODE_FULL : A is a general matrix. CUBLAS_FILL_MODE_LOWER is not supported
- m: Number of rows of matrix A, m >= n >= 0
- n: Number of columns of matrix A
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda is not less than max(1,m). On exit, A is overwritten with the unitary polar factor Uₚ with orthonormal columns
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m)
- dataTypeH: Data type of array H. Must equal dataTypeA
- h: Array of dimension ldh * n with ldh is not less than max(1,n). n×n Hermitian positive semidefinite factor. If H is NULL, computation of H is skipped
- ldh: Leading dimension of two-dimensional array used to store matrix H. ldh >= max(1,n) when H is not NULL
- computeType: Data type of computation. Must equal dataTypeA
- workspaceInBytesOnDevice: Size of bufferOnDevice, in bytes
- workspaceInBytesOnHost: Size of bufferOnHost, in bytes
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m<0, or n<0, or m<n, or lda < max(1,m), or ldh < max(1,n) when H is not NULL, or uplo is CUBLAS_FILL_MODE_LOWER, or dataTypeH != dataTypeA, or computeType != dataTypeA).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXpolarBufferSize, bound as cusolverDnXpolar_bufferSize.
func (Handle) Xpotrf ¶
func (h Handle) Xpotrf(params Params, uplo FillMode, n int64, dataTypeA DataType, a driver.DevicePtr, lda int64, computeType DataType, bufferOnDevice driver.DevicePtr, workspaceInBytesOnDevice uint, bufferOnHost uintptr, workspaceInBytesOnHost uint, info driver.DevicePtr) error
Xpotrf computes the Cholesky factorization of a Hermitian positive-definite matrix using the generic API interface.
A is a n×n Hermitian matrix, only lower or upper part is meaningful. The input parameter uplo indicates which part of the matrix is used. The function will leave the other part untouched. If input parameter uplo is CUBLAS_FILL_MODE_LOWER, only lower triangular part of A is processed, and replaced by lower triangular Cholesky factor L. A=L*Lᴴ If input parameter uplo is CUBLAS_FILL_MODE_UPPER, only upper triangular part of A is processed, and replaced by upper triangular Cholesky factor U. A=Uᴴ*U The user has to provide device and host working spaces which are pointed by input parameters bufferOnDevice and bufferOnHost. The input parameters workspaceInBytesOnDevice (and workspaceInBytesOnHost) is size in bytes of the device (and host) working space, and it is returned by Handle.XpotrfBufferSize. If Cholesky factorization failed, i.e. some leading minor of A is not positive definite, or equivalently some diagonal elements of L or U is not a real number. The output parameter info would indicate smallest leading minor of A which is not positive definite. If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). Currently, Handle.Xpotrf supports only the default algorithm. Please visit cuSOLVER Library Samples - Handle.Xpotrf for a code example. Algorithms supported by Handle.Xpotrf
- Alg0, the zero value: Default algorithm.
The generic API has two different types, dataTypeA is data type of the matrix A, computeType is compute type of the operation. Handle.Xpotrf only supports the following four combinations. Valid combination of data type and compute type
DataTypeA ComputeType Meaning CUDA_R_32F CUDA_R_32F SPOTRF CUDA_R_64F CUDA_R_64F DPOTRF CUDA_C_32F CUDA_C_32F CPOTRF CUDA_C_64F CUDA_C_64F ZPOTRF
Parameters:
- params: Structure with information collected by Params.SetAdvOptions
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- n: Number of rows and columns of matrix A
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- computeType: Data type of computation
- bufferOnDevice: Device workspace. Array of type void of size workspaceInBytesOnDevice bytes
- workspaceInBytesOnDevice: Size in bytes of bufferOnDevice, returned by Handle.XpotrfBufferSize
- bufferOnHost: Host workspace. Array of type void of size workspaceInBytesOnHost bytes
- workspaceInBytesOnHost: Size in bytes of bufferOnHost, returned by Handle.XpotrfBufferSize
- info: If info = 0, the Cholesky factorization is successful. If info = -i, the i-th parameter is wrong (not counting handle). If info = i, the leading minor of order i is not positive definite
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXpotrf.
func (Handle) XpotrfBufferSize ¶
func (h Handle) XpotrfBufferSize(params Params, uplo FillMode, n int64, dataTypeA DataType, a driver.DevicePtr, lda int64, computeType DataType) (workspaceInBytesOnDevice uint, workspaceInBytesOnHost uint, err error)
XpotrfBufferSize returns the workspace sizes, in bytes, for Handle.Xpotrf.
- params: Structure with information collected by Params.SetAdvOptions
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- n: Number of rows and columns of matrix A
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- computeType: Data type of computation
- workspaceInBytesOnDevice: Size of bufferOnDevice, in bytes
- workspaceInBytesOnHost: Size of bufferOnHost, in bytes
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXpotrfBufferSize, bound as cusolverDnXpotrf_bufferSize.
func (Handle) Xpotrs ¶
func (h Handle) Xpotrs(params Params, uplo FillMode, n int64, nrhs int64, dataTypeA DataType, a driver.DevicePtr, lda int64, dataTypeB DataType, b driver.DevicePtr, ldb int64, info driver.DevicePtr) error
Xpotrs solves a system of linear equations.
A*X=B, where A is a n×n Hermitian matrix, only lower or upper part is meaningful using the generic API interface. The input parameter uplo indicates which part of the matrix is used. The function will leave the other part untouched. The user has to call Handle.Xpotrf first to factorize matrix A. If input parameter uplo is CUBLAS_FILL_MODE_LOWER, A is lower triangular Cholesky factor L corresponding to A=L*Lᴴ . If input parameter uplo is CUBLAS_FILL_MODE_UPPER, A is upper triangular Cholesky factor U corresponding to A=Uᴴ*U . The operation is in-place, i.e. matrix X overwrites matrix B with the same leading dimension ldb. If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). Currently, Handle.Xpotrs supports only the default algorithm. Please visit cuSOLVER Library Samples - Handle.Xpotrf for a code example. Algorithms supported by Handle.Xpotrs
- Alg0, the zero value: Default algorithm.
The generic API has two different types, dataTypeA is data type of the matrix A, dataTypeB is data type of the matrix B. Handle.Xpotrs only supports the following four combinations. Valid combination of data type and compute type
dataTypeA dataTypeB Meaning CUDA_R_32F CUDA_R_32F SPOTRS CUDA_R_64F CUDA_R_64F DPOTRS CUDA_C_32F CUDA_C_32F CPOTRS CUDA_C_64F CUDA_C_64F ZPOTRS
Parameters:
- params: Structure with information collected by Params.SetAdvOptions
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- n: Number of rows and columns of matrix A
- nrhs: Number of columns of matrix X and B
- dataTypeA: Data type of array A
- 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
- lda: Leading dimension of two-dimensional array used to store matrix A
- dataTypeB: Data type of array B
- 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
- info: If info = 0, the Cholesky factorization is successful. if info = -i, the i-th parameter is wrong (not counting handle)
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, nrhs<0, lda<max(1,n) or ldb<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXpotrs.
func (Handle) Xstedc ¶
func (h Handle) Xstedc(params Params, compz EigComp, n int64, dataTypeDE DataType, d driver.DevicePtr, e driver.DevicePtr, dataTypeZ DataType, z driver.DevicePtr, ldz int64, computeType DataType, bufferOnDevice driver.DevicePtr, workspaceInBytesOnDevice uint, bufferOnHost uintptr, workspaceInBytesOnHost uint, info driver.DevicePtr) error
Xstedc computes all eigenvalues and (optionally) eigenvectors of a real symmetric tridiagonal matrix using the divide and conquer algorithm.
This function corresponds to the LAPACK routine STEDC. The symmetric tridiagonal matrix is defined by the diagonal elements in vector D (length n) and the subdiagonal elements in vector E (length n-1). On successful completion, D contains the eigenvalues in ascending order. The user has to provide device and host working spaces which are pointed to by input parameters bufferOnDevice and bufferOnHost. The input parameter workspaceInBytesOnDevice (and workspaceInBytesOnHost) is the size in bytes of the device (and host) working space, and it is returned by Handle.XstedcBufferSize. If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). If info = i (greater than zero), the algorithm did not converge and failed to compute all eigenvalues. The parameter compz specifies the computational mode: EigCompN compute only the eigenvalues; EigCompI compute eigenvalues and eigenvectors of the tridiagonal matrix; EigCompV compute eigenvalues and eigenvectors as the product of the input matrix Z and the unitary transformations applied during STEDC; typically Z is on entry the unitary matrix produced by SYTRD, and then on exit Z holds the eigenvectors of the original matrix. Currently, Handle.Xstedc supports only the default algorithm. Algorithms supported by Handle.Xstedc
- Alg0, the zero value: Default algorithm.
The generic API uses dataTypeDE for the data type of the vectors D and E, dataTypeZ for the matrix Z, and computeType for the compute type of the operation. Handle.Xstedc only supports the following four combinations:. Valid combination of data type and compute type
DataTypeDE DataTypeZ ComputeType Meaning CUDA_R_32F CUDA_R_32F CUDA_R_32F SSTEDC CUDA_R_64F CUDA_R_64F CUDA_R_64F DSTEDC CUDA_R_32F CUDA_C_32F CUDA_C_32F CSTEDC CUDA_R_64F CUDA_C_64F CUDA_C_64F ZSTEDC
Parameters:
- params: Structure with information collected by Params.SetAdvOptions
- compz: Computational mode: EigCompN compute only eigenvalues; EigCompI compute eigenvalues and eigenvectors of the tridiagonal matrix; EigCompV compute eigenvalues and eigenvectors as Z*Q; Z is typically from SYTRD
- n: Problem size. Vector D has length n, vector E has length n-1, and matrix Z is n by n
- dataTypeDE: Data type of vectors D and E
- d: Vector of length n. On input, the diagonal elements of the tridiagonal matrix. On output, if successful, the eigenvalues in ascending order
- e: Vector of length n-1. On input, the subdiagonal elements of the tridiagonal matrix. On output, the contents are destroyed
- dataTypeZ: Data type of array Z
- z: Array of dimension ldz * n. If compz = EigCompN, Z is not referenced. If compz = EigCompI, Z holds the eigenvectors of the tridiagonal matrix. If compz = EigCompV, Z is overwritten with Z*Q ( Q = unitary from STEDC; Z typically from SYTRD)
- ldz: Leading dimension of two-dimensional array used to store matrix Z. If compz = EigCompI or EigCompV ldz >= max(1,n). Otherwise, ldz >= 1
- computeType: Data type of computation
- bufferOnDevice: Device workspace. Array of type void of size workspaceInBytesOnDevice bytes
- workspaceInBytesOnDevice: Size in bytes of bufferOnDevice, returned by Handle.XstedcBufferSize
- bufferOnHost: Host workspace. Array of type void of size workspaceInBytesOnHost bytes
- workspaceInBytesOnHost: Size in bytes of bufferOnHost, returned by Handle.XstedcBufferSize
- info: If info = 0, the operation is successful. If info = -i, the i-th parameter is wrong (not counting handle). If info = i ( i > 0), the algorithm failed to converge and did not compute all eigenvalues
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed (e.g. n<0, or ldz<max(1,n) when compz is EigCompI or EigCompV, or compz is not EigCompN, EigCompI, or EigCompV).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXstedc.
func (Handle) XstedcBufferSize ¶
func (h Handle) XstedcBufferSize(params Params, compz EigComp, n int64, dataTypeDE DataType, d driver.DevicePtr, e driver.DevicePtr, dataTypeZ DataType, z driver.DevicePtr, ldz int64, computeType DataType, workspaceInBytesOnDevice *uint, workspaceInBytesOnHost *uint) error
XstedcBufferSize returns the workspace sizes, in bytes, for Handle.Xstedc.
- params: Structure with information collected by Params.SetAdvOptions
- compz: Computational mode: EigCompN compute only eigenvalues; EigCompI compute eigenvalues and eigenvectors of the tridiagonal matrix; EigCompV compute eigenvalues and eigenvectors as Z*Q; Z is typically from SYTRD
- n: Problem size. Vector D has length n, vector E has length n-1, and matrix Z is n by n
- dataTypeDE: Data type of vectors D and E
- d: Vector of length n. On input, the diagonal elements of the tridiagonal matrix. On output, if successful, the eigenvalues in ascending order
- e: Vector of length n-1. On input, the subdiagonal elements of the tridiagonal matrix. On output, the contents are destroyed
- dataTypeZ: Data type of array Z
- z: Array of dimension ldz * n. If compz = EigCompN, Z is not referenced. If compz = EigCompI, Z holds the eigenvectors of the tridiagonal matrix. If compz = EigCompV, Z is overwritten with Z*Q ( Q = unitary from STEDC; Z typically from SYTRD)
- ldz: Leading dimension of two-dimensional array used to store matrix Z. If compz = EigCompI or EigCompV ldz >= max(1,n). Otherwise, ldz >= 1
- computeType: Data type of computation
- workspaceInBytesOnDevice: Size of bufferOnDevice, in bytes
- workspaceInBytesOnHost: Size of bufferOnHost, in bytes
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed (e.g. n<0, or ldz<max(1,n) when compz is EigCompI or EigCompV, or compz is not EigCompN, EigCompI, or EigCompV).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXstedcBufferSize, bound as cusolverDnXstedc_bufferSize.
func (Handle) XsyevBatched ¶
func (h Handle) XsyevBatched(params Params, jobz EigMode, uplo FillMode, n int64, dataTypeA DataType, a driver.DevicePtr, lda int64, dataTypeW DataType, w driver.DevicePtr, computeType DataType, bufferOnDevice driver.DevicePtr, workspaceInBytesOnDevice uint, bufferOnHost uintptr, workspaceInBytesOnHost uint, info driver.DevicePtr, batchSize int64) error
XsyevBatched computes eigenvalues and eigenvectors of a sequence of symmetric (Hermitian) n×n matrices.
Aⱼ*Vⱼ=Vⱼ*Λⱼ, where Λⱼ is a real n×n diagonal matrix. Vⱼ is an n×n unitary matrix. The diagonal elements of Λⱼ are the eigenvalues of Aⱼ in ascending order. syevBatched performs an eigendecomposition on each matrix. It requires that all matrices are of the same size n and are packed in a contiguous way, A=(A0A1⋯) Each matrix is column-major with leading dimension lda, so the formula for random access is Aₖ(i,j)=A[i+lda*j+lda*n*k] . The parameter W also contains the eigenvalues of each matrix in a contiguous way, W=(W0W1⋯) The formula for random access of W is Wₖ(j)=W[j+n*k] . The user has to provide device and host working space which are pointed to by the input parameters bufferOnDevice and bufferOnHost. The input parameters workspaceInBytesOnDevice and workspaceInBytesOnHost denote the size in bytes of the device and host working space, and returned by Handle.XsyevBatchedBufferSize. The output parameter info is an integer array of size batchSize. If the function returns ErrInvalidValue, the first element info[0] = -i (less than zero) indicates the i-th parameter is wrong (not counting handle). Otherwise, if info[i] > 0, syevBatched does not converge on the i-th matrix. If jobz = EigModeVector, Aⱼ contains the orthonormal eigenvectors of the matrix Aⱼ. Note that the problem size is limited by the condition n*lda*batchSize<=INT32_MAX primarily due to the current implementation constraints.
- Alg0, the zero value: Default. May switch between algorithms for best performance.
- Alg1: Uses a single algorithm for consistent accuracy over all n.
The generic API has three different types, dataTypeA is data type of the matrix A, dataTypeW is data type of the array W and computeType is compute type of the operation. Handle.XsyevBatched only supports the following four combinations: Valid combination of data type and compute type
DataTypeA DataTypeW ComputeType Meaning CUDA_R_32F CUDA_R_32F CUDA_R_32F SSYEVBATCHED CUDA_R_64F CUDA_R_64F CUDA_R_64F DSYEVBATCHED CUDA_C_32F CUDA_R_32F CUDA_C_32F CSYEVBATCHED CUDA_C_64F CUDA_R_64F CUDA_C_64F ZSYEVBATCHED
Parameters:
- params: Structure with information collected by Params.SetAdvOptions
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- dataTypeA: Data type of array A
- a: Array of dimension lda * n * batchSize with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of Aj contains the upper triangular part of the matrix Aj. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of Aj contains the lower triangular part of the matrix Aj. On exit, if jobz = EigModeVector, and info[j] = 0, Aj contains the orthonormal eigenvectors of the matrix Aj. If jobz = EigModeNovector, the contents of Aj are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix Aj. lda is not less than max(1,n)
- dataTypeW: Data type of array W
- w: A real array of dimension n * batchSize. The eigenvalue values of Aj, in ascending order, i.e., sorted so that Wj(i) <= Wj(i+1)
- computeType: Data type of computation
- bufferOnDevice: Device workspace. Array of type void of size workspaceInBytesOnDevice bytes
- workspaceInBytesOnDevice: Size in bytes of bufferOnDevice, returned by Handle.XsyevBatchedBufferSize
- bufferOnHost: Host workspace. Array of type void of size workspaceInBytesOnHost bytes
- workspaceInBytesOnHost: Size in bytes of bufferOnHost, returned by Handle.XsyevBatchedBufferSize
- info: An integer array of dimension batchSize. If ErrInvalidValue is returned, info[0] = -i (less than zero) indicates i-th parameter is wrong (not counting handle). Otherwise, if info[i] = 0, the operation is successful. If info[i] > 0, syevBatched does not converge on the i-th matrix
- batchSize: Number of matrices. batchSize is not less than 1
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or n*lda*batchSize>INT32_MAX, or lda<max(1,n), or jobz is not EigModeNovector or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER or batchSize<0).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXsyevBatched.
func (Handle) XsyevBatchedBufferSize ¶
func (h Handle) XsyevBatchedBufferSize(params Params, jobz EigMode, uplo FillMode, n int64, dataTypeA DataType, a driver.DevicePtr, lda int64, dataTypeW DataType, w driver.DevicePtr, computeType DataType, workspaceInBytesOnDevice *uint, workspaceInBytesOnHost *uint, batchSize int64) error
XsyevBatchedBufferSize returns the workspace sizes, in bytes, for Handle.XsyevBatched.
- params: Structure with information collected by Params.SetAdvOptions
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- dataTypeA: Data type of array A
- a: Array of dimension lda * n * batchSize with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of Aj contains the upper triangular part of the matrix Aj. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of Aj contains the lower triangular part of the matrix Aj. On exit, if jobz = EigModeVector, and info[j] = 0, Aj contains the orthonormal eigenvectors of the matrix Aj. If jobz = EigModeNovector, the contents of Aj are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix Aj. lda is not less than max(1,n)
- dataTypeW: Data type of array W
- w: A real array of dimension n * batchSize. The eigenvalue values of Aj, in ascending order, i.e., sorted so that Wj(i) <= Wj(i+1)
- computeType: Data type of computation
- workspaceInBytesOnDevice: Size of bufferOnDevice, in bytes
- workspaceInBytesOnHost: Size of bufferOnHost, in bytes
- batchSize: Number of matrices. batchSize is not less than 1
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or n*lda*batchSize>INT32_MAX, or lda<max(1,n), or jobz is not EigModeNovector or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER or batchSize<0).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXsyevBatchedBufferSize, bound as cusolverDnXsyevBatched_bufferSize.
func (Handle) Xsyevd ¶
func (h Handle) Xsyevd(params Params, jobz EigMode, uplo FillMode, n int64, dataTypeA DataType, a driver.DevicePtr, lda int64, dataTypeW DataType, w driver.DevicePtr, computeType DataType, bufferOnDevice driver.DevicePtr, workspaceInBytesOnDevice uint, bufferOnHost uintptr, workspaceInBytesOnHost uint, info driver.DevicePtr) error
Xsyevd computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix A using the generic API interface.
The standard symmetric eigenvalue problem is A*V=V*Λ, where Λ is a real n×n diagonal matrix. V is an n×n unitary matrix. The diagonal elements of Λ are the eigenvalues of A in ascending order. The user has to provide device and host working spaces which are pointed by input parameters bufferOnDevice and bufferOnHost. The input parameters workspaceInBytesOnDevice (and workspaceInBytesOnHost) is size in bytes of the device (and host) working space, and it is returned by Handle.XsyevdBufferSize. If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). If info = i (greater than zero), i off-diagonal elements of an intermediate tridiagonal form did not converge to zero. If jobz = EigModeVector, A contains the orthonormal eigenvectors of the matrix A. The eigenvectors are computed by a divide and conquer algorithm. Please visit cuSOLVER Library Samples - Handle.Xsyevd for a code example. Currently, Handle.Xsyevd supports only the default algorithm. Algorithms supported by Handle.Xsyevd
- Alg0, the zero value: Default algorithm.
The generic API has three different types, dataTypeA is data type of the matrix A, dataTypeW is data type of the matrix W and computeType is compute type of the operation. Handle.Xsyevd only supports the following four combinations. Valid combination of data type and compute type
DataTypeA DataTypeW ComputeType Meaning CUDA_R_32F CUDA_R_32F CUDA_R_32F SSYEVD CUDA_R_64F CUDA_R_64F CUDA_R_64F DSYEVD CUDA_C_32F CUDA_R_32F CUDA_C_32F CHEEVD CUDA_C_64F CUDA_R_64F CUDA_C_64F ZHEEVD
Parameters:
- params: Structure with information collected by Params.SetAdvOptions
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and info = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- dataTypeW: Data type of array W
- w: A real array of dimension n. The eigenvalue values of A, in ascending order, i.e., sorted so that W(i) <= W(i+1)
- computeType: Data type of computation
- bufferOnDevice: Device workspace. Array of type void of size workspaceInBytesOnDevice bytes
- workspaceInBytesOnDevice: Size in bytes of bufferOnDevice, returned by Handle.XsyevdBufferSize
- bufferOnHost: Host workspace. Array of type void of size workspaceInBytesOnHost bytes
- workspaceInBytesOnHost: Size in bytes of bufferOnHost, returned by Handle.XsyevdBufferSize
- info: If info = 0, the operation is successful. If info = -i, the i-th parameter is wrong (not counting handle). If info = i (> 0), info indicates i off-diagonal elements of an intermediate tridiagonal form did not converge to zero
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXsyevd.
func (Handle) XsyevdBufferSize ¶
func (h Handle) XsyevdBufferSize(params Params, jobz EigMode, uplo FillMode, n int64, dataTypeA DataType, a driver.DevicePtr, lda int64, dataTypeW DataType, w driver.DevicePtr, computeType DataType) (workspaceInBytesOnDevice uint, workspaceInBytesOnHost uint, err error)
XsyevdBufferSize returns the workspace sizes, in bytes, for Handle.Xsyevd.
- params: Structure with information collected by Params.SetAdvOptions
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and info = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- dataTypeW: Data type of array W
- w: A real array of dimension n. The eigenvalue values of A, in ascending order, i.e., sorted so that W(i) <= W(i+1)
- computeType: Data type of computation
- workspaceInBytesOnDevice: Size of bufferOnDevice, in bytes
- workspaceInBytesOnHost: Size of bufferOnHost, in bytes
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXsyevdBufferSize, bound as cusolverDnXsyevd_bufferSize.
func (Handle) Xsyevdx ¶
func (h Handle) Xsyevdx(params Params, jobz EigMode, range_ EigRange, uplo FillMode, n int64, dataTypeA DataType, a driver.DevicePtr, lda int64, vl unsafe.Pointer, vu unsafe.Pointer, il int64, iu int64, meig64 *int64, dataTypeW DataType, w driver.DevicePtr, computeType DataType, bufferOnDevice driver.DevicePtr, workspaceInBytesOnDevice uint, bufferOnHost uintptr, workspaceInBytesOnHost uint, info driver.DevicePtr) error
Xsyevdx computes all or selection of the eigenvalues and optionally eigenvectors of a symmetric (Hermitian) n×n matrix A using the generic API interface.
The standard symmetric eigenvalue problem is A*V=V*Λ, where Λ is a real n×h_meig diagonal matrix. V is an n×h_meig unitary matrix. h_meig is the number of eigenvalues/eigenvectors computed by the routine, h_meig is equal to n when the whole spectrum (e.g., range = EigRangeAll) is requested. The diagonal elements of Λ are the eigenvalues of A in ascending order. The user has to provide device and host working spaces which are pointed by input parameters bufferOnDevice and bufferOnHost. The input parameters workspaceInBytesOnDevice (and workspaceInBytesOnHost) is size in bytes of the device (and host) working space, and it is returned by Handle.XsyevdxBufferSize. If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). If info = i (greater than zero), i off-diagonal elements of an intermediate tridiagonal form did not converge to zero. if jobz = EigModeVector, A contains the orthonormal eigenvectors of the matrix A. The eigenvectors are computed by a divide and conquer algorithm. Currently, Handle.Xsyevdx supports only the default algorithm. Please visit cuSOLVER Library Samples - Handle.Xsyevdx for a code example. Algorithms supported by Handle.Xsyevdx
- Alg0, the zero value: Default algorithm.
The generic API has three different types, dataTypeA is data type of the matrix A, dataTypeW is data type of the matrix W and computeType is compute type of the operation. Handle.Xsyevdx only supports the following four combinations: Valid combination of data type and compute type
DataTypeA DataTypeW ComputeType Meaning CUDA_R_32F CUDA_R_32F CUDA_R_32F SSYEVDX CUDA_R_64F CUDA_R_64F CUDA_R_64F DSYEVDX CUDA_C_32F CUDA_R_32F CUDA_C_32F CHEEVDX CUDA_C_64F CUDA_R_64F CUDA_C_64F ZHEEVDX
Parameters:
- params: Structure with information collected by Params.SetAdvOptions
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- range_: Specifies options to which selection of eigenvalues and optionally eigenvectors that need to be computed: range = EigRangeAll : all eigenvalues/eigenvectors will be found, will becomes the classical syevd/heevd routine; range = EigRangeV : all eigenvalues/eigenvectors in the half-open interval (vl,vu] will be found; range = EigRangeI : the il-th through iu-th eigenvalues/eigenvectors will be found
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and info = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- vl: If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user want to be sure not to miss any eigenvalue within the interval bound, we suggest that, the user subtract/add epsilon (machine precision) to the interval bound such as (vl=vl-eps, vu=vu+eps]. this suggestion is valid for any selective routine from cuSolver or LAPACK
- vu: If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user want to be sure not to miss any eigenvalue within the interval bound, we suggest that, the user subtract/add epsilon (machine precision) to the interval bound such as (vl=vl-eps, vu=vu+eps]. this suggestion is valid for any selective routine from cuSolver or LAPACK
- il: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- iu: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- dataTypeW: Data type of array W
- w: A real array of dimension n. The eigenvalue values of A, in ascending order, i.e., sorted so that W(i) <= W(i+1)
- computeType: Data type of computation
- bufferOnDevice: Device workspace. Array of type void of size workspaceInBytesOnDevice bytes
- workspaceInBytesOnDevice: Size in bytes of bufferOnDevice, returned by Handle.XsyevdxBufferSize
- bufferOnHost: Host workspace. Array of type void of size workspaceInBytesOnHost bytes
- workspaceInBytesOnHost: Size in bytes of bufferOnHost, returned by Handle.XsyevdxBufferSize
- info: If info = 0, the operation is successful. if info = -i, the i-th parameter is wrong (not counting handle). If info = i (> 0), info indicates i off-diagonal elements of an intermediate tridiagonal form did not converge to zero
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or range is not EigRangeAll or EigRangeV or EigRangeI, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXsyevdx.
func (Handle) XsyevdxBufferSize ¶
func (h Handle) XsyevdxBufferSize(params Params, jobz EigMode, range_ EigRange, uplo FillMode, n int64, dataTypeA DataType, a driver.DevicePtr, lda int64, vl unsafe.Pointer, vu unsafe.Pointer, il int64, iu int64, dataTypeW DataType, w driver.DevicePtr, computeType DataType) (hMeig int64, workspaceInBytesOnDevice uint, workspaceInBytesOnHost uint, err error)
XsyevdxBufferSize returns the workspace sizes, in bytes, for Handle.Xsyevdx.
- params: Structure with information collected by Params.SetAdvOptions
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- range_: Specifies options to which selection of eigenvalues and optionally eigenvectors that need to be computed: range = EigRangeAll : all eigenvalues/eigenvectors will be found, will becomes the classical syevd/heevd routine; range = EigRangeV : all eigenvalues/eigenvectors in the half-open interval (vl,vu] will be found; range = EigRangeI : the il-th through iu-th eigenvalues/eigenvectors will be found
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and info = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- vl: If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user want to be sure not to miss any eigenvalue within the interval bound, we suggest that, the user subtract/add epsilon (machine precision) to the interval bound such as (vl=vl-eps, vu=vu+eps]. this suggestion is valid for any selective routine from cuSolver or LAPACK
- vu: If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user want to be sure not to miss any eigenvalue within the interval bound, we suggest that, the user subtract/add epsilon (machine precision) to the interval bound such as (vl=vl-eps, vu=vu+eps]. this suggestion is valid for any selective routine from cuSolver or LAPACK
- il: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- iu: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- hMeig: Integer. The total number of eigenvalues found. 0 <= hMeig <= n. If range = EigRangeAll, hMeig = n, and if range = EigRangeI, hMeig = iu-il+1
- dataTypeW: Data type of array W
- w: A real array of dimension n. The eigenvalue values of A, in ascending order, i.e., sorted so that W(i) <= W(i+1)
- computeType: Data type of computation
- workspaceInBytesOnDevice: Size of bufferOnDevice, in bytes
- workspaceInBytesOnHost: Size of bufferOnHost, in bytes
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or range is not EigRangeAll or EigRangeV or EigRangeI, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXsyevdxBufferSize, bound as cusolverDnXsyevdx_bufferSize.
func (Handle) XsyevjGetResidual ¶
XsyevjGetResidual reports residual of syevj or sygvj.
It does not support syevjBatched. If the user calls this function after syevjBatched, the error ErrNotSupported is returned.
- info: The pointer to the structure of syevj
- residual: Residual of syevj
Errors:
- ErrNotSupported: Does not support batched version.
Wraps cusolverDnXsyevjGetResidual.
func (Handle) XsyevjGetSweeps ¶
XsyevjGetSweeps reports number of executed sweeps of syevj or sygvj.
It does not support syevjBatched. If the user calls this function after syevjBatched, the error ErrNotSupported is returned.
- info: The pointer to the structure of syevj
- executedSweeps: Number of executed sweeps
Errors:
- ErrNotSupported: Does not support batched version.
Wraps cusolverDnXsyevjGetSweeps.
func (Handle) XsygvStridedBatched ¶
func (h Handle) XsygvStridedBatched(params Params, itype EigType, jobz EigMode, uplo FillMode, n int64, dataTypeA DataType, a driver.DevicePtr, lda int64, strideA int64, dataTypeB DataType, b driver.DevicePtr, ldb int64, strideB int64, dataTypeW DataType, w driver.DevicePtr, strideW int64, computeType DataType, batchSize int64, bufferOnDevice driver.DevicePtr, workspaceInBytesOnDevice uint, bufferOnHost uintptr, workspaceInBytesOnHost uint, info driver.DevicePtr) error
XsygvStridedBatched wraps cusolverDnXsygvStridedBatched.
func (Handle) XsygvStridedBatchedBufferSize ¶
func (h Handle) XsygvStridedBatchedBufferSize(params Params, itype EigType, jobz EigMode, uplo FillMode, n int64, dataTypeA DataType, a driver.DevicePtr, lda int64, strideA int64, dataTypeB DataType, b driver.DevicePtr, ldb int64, strideB int64, dataTypeW DataType, w driver.DevicePtr, strideW int64, computeType DataType, batchSize int64, workspaceInBytesOnDevice *uint, workspaceInBytesOnHost *uint) error
XsygvStridedBatchedBufferSize wraps cusolverDnXsygvStridedBatchedBufferSize.
Wraps cusolverDnXsygvStridedBatchedBufferSize, bound as cusolverDnXsygvStridedBatched_bufferSize.
func (Handle) Xsygvd ¶
func (h Handle) Xsygvd(params Params, itype EigType, jobz EigMode, uplo FillMode, n int64, dataTypeA DataType, dA driver.DevicePtr, lda int64, dataTypeB DataType, dB driver.DevicePtr, ldb int64, dataTypeW DataType, dW driver.DevicePtr, computeType DataType, bufferOnDevice driver.DevicePtr, workspaceInBytesOnDevice uint, bufferOnHost uintptr, workspaceInBytesOnHost uint, dInfo driver.DevicePtr) error
Xsygvd computes all the eigenvalues, and optionally the eigenvectors, of a generalized symmetric (Hermitian) definite eigenproblem.
The following routine computes all the eigenvalues, and optionally, the eigenvectors of a generalized symmetric (Hermitian) definite eigenproblem.
The generalized symmetric (Hermitian) definite eigenvalue problem is A*V = B*V*Λ if itype == EigType1, A*B*V = V*Λ if itype == EigType2, and B*A*V = V*Λ if itype == EigType3, where the matrix A and B are n×n; A is symmetric/Hermitian and B is symmetrix/Hermitian positive definite. The eigenvalues of ( A, B) are computed and stored in the W vector in ascending order. V is an n×n orthogonal matrix. The eigenvectors are normalized as follows:v: Vᴴ*B*V = I if itype == EigType1 or EigType2, and Vᴴ*inv(B)*V = I if itype == EigType3. The user has to provide device and host working spaces which are pointed by input parameters bufferOnDevice and bufferOnHost. The input parameters workspaceInBytesOnDevice (and workspaceInBytesOnHost) is size in bytes of the device (and host) working space, and it is returned by Handle.XsygvdBufferSize. If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). If info = i (i > 0 and i<=n) and jobz = EigModeNovector, i off-diagonal elements of an intermediate tridiagonal form did not converge to zero. If info = n + i (i > 0), then the leading minor of order i of B is not positive definite. The factorization of B could not be completed and no eigenvalues or eigenvectors were computed. If jobz = EigModeVector, A contains the orthonormal eigenvectors of the matrix A. The eigenvectors are computed by a divide and conquer algorithm. Currently, Handle.Xsygvd supports only the default algorithm. Algorithms supported by Handle.Xsygvd
- Alg0, the zero value: Default algorithm.
The generic API has four different data types, dataTypeA is data type of the matrix A, dataTypeB is data type of the matrix B, dataTypeW is data type of the matrix W and computeType is compute type of the operation. Handle.Xsygvd only supports the following four combinations. Valid combination of data type and compute type
DataTypeA DataTypeB DataTypeW ComputeType Meaning CUDA_R_32F CUDA_R_32F CUDA_R_32F CUDA_R_32F SSYGVD CUDA_R_64F CUDA_R_64F CUDA_R_64F CUDA_R_64F DSYGVD CUDA_C_32F CUDA_C_32F CUDA_R_32F CUDA_C_32F CHEGVD CUDA_C_64F CUDA_C_64F CUDA_R_64F CUDA_C_64F ZHEGVD
Parameters:
- params: Structure with information collected by Params.SetAdvOptions
- itype: Specifies the problem type to be solved: itype =[EigType1]: A*x = (lambda)*B*x. itype =[EigType2]: A*B*x = (lambda)*x. itype =[EigType3]: B*A*x = (lambda)*x
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- dataTypeA: Data type of array A
- lda: Leading dimension of two-dimensional array used to store matrix A
- dataTypeB: Data type of array B
- ldb: Leading dimension of two-dimensional array used to store matrix B
- dataTypeW: Data type of array W
- computeType: Data type of computation
- bufferOnDevice: Device workspace. Array of type void of size workspaceInBytesOnDevice bytes
- workspaceInBytesOnDevice: Size in bytes of bufferOnDevice, returned by Handle.XsygvdBufferSize
- bufferOnHost: Host workspace. Array of type void of size workspaceInBytesOnHost bytes
- workspaceInBytesOnHost: Size in bytes of bufferOnHost, returned by Handle.XsygvdBufferSize
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or ldb<max(1,n), or itype is not 1, 2 or 3, or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER), or the combination of dataType{A,B,C} and computeType are not supported.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXsygvd.
func (Handle) XsygvdBufferSize ¶
func (h Handle) XsygvdBufferSize(params Params, itype EigType, jobz EigMode, uplo FillMode, n int64, dataTypeA DataType, dA driver.DevicePtr, lda int64, dataTypeB DataType, dB driver.DevicePtr, ldb int64, dataTypeW DataType, dW driver.DevicePtr, computeType DataType) (workspaceInBytesOnDevice uint, workspaceInBytesOnHost uint, err error)
XsygvdBufferSize returns the workspace sizes, in bytes, for Handle.Xsygvd.
- params: Structure with information collected by Params.SetAdvOptions
- itype: Specifies the problem type to be solved: itype =[EigType1]: A*x = (lambda)*B*x. itype =[EigType2]: A*B*x = (lambda)*x. itype =[EigType3]: B*A*x = (lambda)*x
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- dataTypeA: Data type of array A
- lda: Leading dimension of two-dimensional array used to store matrix A
- dataTypeB: Data type of array B
- ldb: Leading dimension of two-dimensional array used to store matrix B
- dataTypeW: Data type of array W
- computeType: Data type of computation
- workspaceInBytesOnDevice: Size of bufferOnDevice, in bytes
- workspaceInBytesOnHost: Size of bufferOnHost, in bytes
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or ldb<max(1,n), or itype is not 1, 2 or 3, or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER), or the combination of dataType{A,B,C} and computeType are not supported.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXsygvdBufferSize, bound as cusolverDnXsygvd_bufferSize.
func (Handle) Xsygvdx ¶
func (h Handle) Xsygvdx(params Params, itype EigType, jobz EigMode, range_ EigRange, uplo FillMode, n int64, dataTypeA DataType, dA driver.DevicePtr, lda int64, dataTypeB DataType, dB driver.DevicePtr, ldb int64, vl unsafe.Pointer, vu unsafe.Pointer, il int64, iu int64, meig *int64, dataTypeW DataType, dW driver.DevicePtr, computeType DataType, bufferOnDevice driver.DevicePtr, workspaceInBytesOnDevice uint, bufferOnHost uintptr, workspaceInBytesOnHost uint, dInfo driver.DevicePtr) error
Xsygvdx computes all or a selection of the eigenvalues, and optionally the eigenvectors, of a generalized symmetric (Hermitian) definite eigenproblem.
The following routine computes all or selection of the eigenvalues, and optionally, the eigenvectors of a generalized symmetric (Hermitian) definite eigenproblem.
The generalized symmetric-definite eigenvalue problem is A*V = B*V*Λ if itype == EigType1, A*B*V = V*Λ if itype == EigType2, and B*A*V = V*Λ if itype == EigType3, where the matrix A and B are n×n; A is symmetric/Hermitian and B is symmetrix/Hermitian positive definite. The eigenvalues of ( A, B) are computed and stored in the W vector in ascending order. h_meig represents the number of eigenvalues/eigenvectors computed by the routine, h_meig is equal to n when the whole spectrum (for example, range = EigRangeAll) is requested. V is an n×n orthogonal matrix. The eigenvectors are normalized as follows: Vᴴ*B*V = I if itype == EigType1 or EigType2, and Vᴴ*inv(B)*V = I if itype == EigType3. The user has to provide device and host working spaces which are pointed by input parameters bufferOnDevice and bufferOnHost. The input parameters workspaceInBytesOnDevice (and workspaceInBytesOnHost) is size in bytes of the device (and host) working space, and it is returned by Handle.XsygvdxBufferSize. If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). If info = i (i > 0 and i<=n) and jobz = EigModeNovector, i off-diagonal elements of an intermediate tridiagonal form did not converge to zero. If info = n + i (i > 0), then the leading minor of order i of B is not positive definite. The factorization of B could not be completed and no eigenvalues or eigenvectors were computed. If jobz = EigModeVector, A contains the orthogonal eigenvectors of the matrix A. The eigenvectors are computed by divide and conquer algorithm. Algorithms supported by Handle.Xsygvdx
- Alg0, the zero value: Default algorithm.
The generic API has four different types, dataTypeA is data type of the matrix A, dataTypeB is data type of the matrix B, dataTypeW is data type of the matrix W and computeType is compute type of the operation. Handle.Xsygvdx only supports the following four combinations: Valid combination of data type and compute type
DataTypeA DataTypeB DataTypeW ComputeType Meaning CUDA_R_32F CUDA_R_32F CUDA_R_32F CUDA_R_32F SSYGVDX CUDA_R_64F CUDA_R_64F CUDA_R_64F CUDA_R_64F DSYGVDX CUDA_C_32F CUDA_C_32F CUDA_R_32F CUDA_C_32F CHEGVDX CUDA_C_64F CUDA_C_64F CUDA_R_64F CUDA_C_64F ZHEGVDX
Parameters:
- params: Structure with information collected by Params.SetAdvOptions
- itype: Specifies the problem type to be solved: itype =[EigType1]: A*x = (lambda)*B*x. itype =[EigType2]: A*B*x = (lambda)*x. itype =[EigType3]: B*A*x = (lambda)*x
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- range_: Specifies options to which selection of eigenvalues and optionally eigenvectors that need to be computed: range = EigRangeAll : all eigenvalues/eigenvectors will be found, will becomes the classical sygvd/hegvd routine; range = EigRangeV : all eigenvalues/eigenvectors in the half-open interval (vl,vu] will be found; range = EigRangeI : the il-th through iu-th eigenvalues/eigenvectors will be found
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- dataTypeA: Data type of array A
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- dataTypeB: Data type of array B
- ldb: Leading dimension of two-dimensional array used to store matrix B
- vl: If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. The values are treated as dataTypeW. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user want to be sure not to miss any eigenvalue within the interval bound, we suggest that, the user subtract/add epsilon (machine precision) to the interval bound such as (vl=vl-eps, vu=vu+eps]. this suggestion is valid for any selective routine from cuSolver or LAPACK
- vu: If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. The values are treated as dataTypeW. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user want to be sure not to miss any eigenvalue within the interval bound, we suggest that, the user subtract/add epsilon (machine precision) to the interval bound such as (vl=vl-eps, vu=vu+eps]. this suggestion is valid for any selective routine from cuSolver or LAPACK
- il: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- iu: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- dataTypeW: Data type of array W
- computeType: Data type of computation
- bufferOnDevice: Device workspace. Array of type void of size workspaceInBytesOnDevice bytes
- workspaceInBytesOnDevice: Size in bytes of bufferOnDevice, returned by Handle.XsygvdxBufferSize
- bufferOnHost: Host workspace. Array of type void of size workspaceInBytesOnHost bytes
- workspaceInBytesOnHost: Size in bytes of bufferOnHost, returned by Handle.XsygvdxBufferSize
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or ldb<max(1,n), or itype is not 1, 2 or 3, or jobz is not EigModeNovector or EigModeVector, or range is not EigRangeAll or EigRangeV or EigRangeI, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER), or the combination of dataType{A,B,C} and computeType are not supported.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXsygvdx.
func (Handle) XsygvdxBufferSize ¶
func (h Handle) XsygvdxBufferSize(params Params, itype EigType, jobz EigMode, uplo FillMode, n int64, dataTypeA DataType, dA driver.DevicePtr, lda int64, dataTypeB DataType, dB driver.DevicePtr, ldb int64, vl unsafe.Pointer, vu unsafe.Pointer, il int64, iu int64, dataTypeW DataType, dW driver.DevicePtr, computeType DataType) (meig int64, workspaceInBytesOnDevice uint, workspaceInBytesOnHost uint, err error)
XsygvdxBufferSize returns the workspace sizes, in bytes, for Handle.Xsygvdx.
- params: Structure with information collected by Params.SetAdvOptions
- itype: Specifies the problem type to be solved: itype =[EigType1]: A*x = (lambda)*B*x. itype =[EigType2]: A*B*x = (lambda)*x. itype =[EigType3]: B*A*x = (lambda)*x
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- dataTypeA: Data type of array A
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- dataTypeB: Data type of array B
- ldb: Leading dimension of two-dimensional array used to store matrix B
- vl: If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. The values are treated as dataTypeW. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user want to be sure not to miss any eigenvalue within the interval bound, we suggest that, the user subtract/add epsilon (machine precision) to the interval bound such as (vl=vl-eps, vu=vu+eps]. this suggestion is valid for any selective routine from cuSolver or LAPACK
- vu: If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. The values are treated as dataTypeW. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user want to be sure not to miss any eigenvalue within the interval bound, we suggest that, the user subtract/add epsilon (machine precision) to the interval bound such as (vl=vl-eps, vu=vu+eps]. this suggestion is valid for any selective routine from cuSolver or LAPACK
- il: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- iu: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- dataTypeW: Data type of array W
- computeType: Data type of computation
- workspaceInBytesOnDevice: Size of bufferOnDevice, in bytes
- workspaceInBytesOnHost: Size of bufferOnHost, in bytes
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or ldb<max(1,n), or itype is not 1, 2 or 3, or jobz is not EigModeNovector or EigModeVector, or range is not EigRangeAll or EigRangeV or EigRangeI, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER), or the combination of dataType{A,B,C} and computeType are not supported.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXsygvdxBufferSize, bound as cusolverDnXsygvdx_bufferSize.
func (Handle) Xsytrf ¶
func (h Handle) Xsytrf(params Params, uplo FillMode, n int64, dataTypeA DataType, a driver.DevicePtr, lda int64, ipiv driver.DevicePtr, computeType DataType, bufferOnDevice driver.DevicePtr, workspaceInBytesOnDevice uint, bufferOnHost uintptr, workspaceInBytesOnHost uint, info driver.DevicePtr) error
Xsytrf computes the factorization of a symmetric indefinite matrix using the Bunch-Kaufman diagonal pivoting and the generic API interface.
A is an n×n symmetric matrix, only lower or upper part is meaningful. The input parameter uplo indicates which part of the matrix is used. If ipiv is NULL, no pivoting is performed, which is not numerically stable. If input parameter uplo is CUBLAS_FILL_MODE_LOWER, only lower triangular part of A is processed, and replaced by lower triangular factor L and block diagonal matrix D. Each block of D is either a 1x1 or 2x2 block, depending on pivoting. P*A*Pᵀ=L*D*Lᵀ If input parameter uplo is CUBLAS_FILL_MODE_UPPER, only upper triangular part of A is processed, and replaced by upper triangular factor U and block diagonal matrix D. P*A*Pᵀ=U*D*Uᵀ where P is a permutation matrix determined by the pivoting sequence (returned in ipiv). The user has to provide device and host work spaces which are pointed by input parameters bufferOnDevice and bufferOnHost. The input parameters workspaceInBytesOnDevice and workspaceInBytesOnHost are sizes in bytes of the device and host work spaces, and they are returned by Handle.XsytrfBufferSize. The other triangular part of the input matrix A may also be used as workspace. If the Bunch-Kaufman factorization failed, i.e. A is singular, the output parameter info = i indicates that D(i,i) = 0, where i uses 1-based (Fortran) indexing, consistent with the value returned in info. If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). The output parameter ipiv contains the pivoting sequence. If ipiv(i) = k > 0, D(i,i) is a 1x1 block, and the i-th row/column of A is interchanged with the k-th row/column of A. If uplo is CUBLAS_FILL_MODE_UPPER and ipiv(i-1) = ipiv(i) = -m < 0, D(i-1:i,i-1:i) is a 2x2 block, and the (i-1)-th row/column is interchanged with the m-th row/column. If uplo is CUBLAS_FILL_MODE_LOWER and ipiv(i+1) = ipiv(i) = -m < 0, D(i:i+1,i:i+1) is a 2x2 block, and the (i+1)-th row/column is interchanged with the m-th row/column. The user can combine Handle.Xsytrf and Handle.Xsytrs to complete a linear solver for a symmetric indefinite system. The generic API has two different types, dataTypeA is data type of the matrix A, computeType is compute type of the operation. Handle.Xsytrf only supports the following four combinations. Valid combination of data type and compute type
DataTypeA ComputeType Meaning CUDA_R_32F CUDA_R_32F SSYTRF CUDA_R_64F CUDA_R_64F DSYTRF CUDA_C_32F CUDA_C_32F CSYTRF CUDA_C_64F CUDA_C_64F ZSYTRF
Parameters:
- params: Structure with information collected by Params.SetAdvOptions
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- n: Number of rows and columns of matrix A
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda not less than max(1,n). On exit, overwritten by the factors D and L or U. The other triangular part may be used as workspace
- lda: Leading dimension of two-dimensional array used to store matrix A
- ipiv: Array of size at least n, containing pivot indices. To perform no pivoting, set the argument NULL
- computeType: Data type of computation
- bufferOnDevice: Device workspace. Array of type void of size workspaceInBytesOnDevice bytes
- workspaceInBytesOnDevice: Size in bytes of bufferOnDevice, returned by Handle.XsytrfBufferSize
- bufferOnHost: Host workspace. Array of type void of size workspaceInBytesOnHost bytes
- workspaceInBytesOnHost: Size in bytes of bufferOnHost, returned by Handle.XsytrfBufferSize
- info: If info = 0, the factorization is successful. If info = -i, the i-th parameter is wrong (not counting handle). If info = i, D(i,i) = 0
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrMatrixTypeNotSupported: Data type is not supported.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXsytrf.
func (Handle) XsytrfBufferSize ¶
func (h Handle) XsytrfBufferSize(params Params, uplo FillMode, n int64, dataTypeA DataType, a driver.DevicePtr, lda int64, ipiv driver.DevicePtr, computeType DataType, workspaceInBytesOnDevice *uint, workspaceInBytesOnHost *uint) error
XsytrfBufferSize returns the workspace sizes, in bytes, for Handle.Xsytrf.
- params: Structure with information collected by Params.SetAdvOptions
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- n: Number of rows and columns of matrix A
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda not less than max(1,n). On exit, overwritten by the factors D and L or U. The other triangular part may be used as workspace
- lda: Leading dimension of two-dimensional array used to store matrix A
- ipiv: Array of size at least n, containing pivot indices. To perform no pivoting, set the argument NULL
- computeType: Data type of computation
- workspaceInBytesOnDevice: Size of bufferOnDevice, in bytes
- workspaceInBytesOnHost: Size of bufferOnHost, in bytes
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrMatrixTypeNotSupported: Data type is not supported.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXsytrfBufferSize, bound as cusolverDnXsytrf_bufferSize.
func (Handle) Xsytrs ¶
func (h Handle) Xsytrs(uplo FillMode, n int64, nrhs int64, dataTypeA DataType, a driver.DevicePtr, lda int64, ipiv driver.DevicePtr, dataTypeB DataType, b driver.DevicePtr, ldb int64, bufferOnDevice driver.DevicePtr, workspaceInBytesOnDevice uint, bufferOnHost uintptr, workspaceInBytesOnHost uint, info driver.DevicePtr) error
Xsytrs solves a system of linear equations using the generic API interface.
A contains the factorization from cusolverDn<t>sytrf(), only lower or upper part is meaningful, the other part is not touched. If input parameter uplo is CUBLAS_FILL_MODE_LOWER, the details of the factorization are stores as: A=L*D*Lᵀ If input parameter uplo is CUBLAS_FILL_MODE_UPPER, the details of the factorization are stores as: A=U*D*Uᵀ The user has to provide the pivot indices that can be obtained by cusolverDn<t>sytrf() as well as device and host work spaces which are pointed by input parameters bufferOnDevice and bufferOnHost. The input parameters workspaceInBytesOnDevice and workspaceInBytesOnHost are sizes in bytes of the device and host work spaces, and they are returned by Handle.XsytrsBufferSize. To factorize and solve the symmetric system without pivoting, the user should set devIpiv = NULL when calling cusolverDn<t>sytrf and Handle.Xsytrs. The generic API has two different types: dataTypeA is data type of the matrix A, dataTypeB is data type of the matrix A. Handle.Xsytrs only supports the following four combinations: Valid combination of data type and compute type
DataTypeA DataTypeB Meaning CUDA_R_32F CUDA_R_32F SSYTRS CUDA_R_64F CUDA_R_64F DSYTRS CUDA_C_32F CUDA_C_32F CSYTRS CUDA_C_64F CUDA_C_64F ZSYTRS
Parameters:
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- n: Number of rows and columns of matrix A
- nrhs: Number of right-hand sides
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- dataTypeB: Data type of array B
- b: Array of dimension ldb * nrhs with ldb is not less than max(1,nrhs)
- ldb: Leading dimension of two-dimensional array used to store matrix B
- bufferOnDevice: Device workspace. Array of type void of size workspaceInBytesOnDevice bytes
- workspaceInBytesOnDevice: Size in bytes of bufferOnDevice, returned by Handle.XsytrsBufferSize
- bufferOnHost: Host workspace. Array of type void of size workspaceInBytesOnHost bytes
- workspaceInBytesOnHost: Size in bytes of bufferOnHost, returned by Handle.XsytrsBufferSize
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrMatrixTypeNotSupported: Data type is not supported.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXsytrs.
func (Handle) XsytrsBufferSize ¶
func (h Handle) XsytrsBufferSize(uplo FillMode, n int64, nrhs int64, dataTypeA DataType, a driver.DevicePtr, lda int64, ipiv driver.DevicePtr, dataTypeB DataType, b driver.DevicePtr, ldb int64) (workspaceInBytesOnDevice uint, workspaceInBytesOnHost uint, err error)
XsytrsBufferSize returns the workspace sizes, in bytes, for Handle.Xsytrs.
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- n: Number of rows and columns of matrix A
- nrhs: Number of right-hand sides
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- dataTypeB: Data type of array B
- b: Array of dimension ldb * nrhs with ldb is not less than max(1,nrhs)
- ldb: Leading dimension of two-dimensional array used to store matrix B
- workspaceInBytesOnDevice: Size of bufferOnDevice, in bytes
- workspaceInBytesOnHost: Size of bufferOnHost, in bytes
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrMatrixTypeNotSupported: Data type is not supported.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnXsytrsBufferSize, bound as cusolverDnXsytrs_bufferSize.
func (Handle) Xtrtri ¶
func (h Handle) Xtrtri(uplo FillMode, diag DiagType, n int64, dataTypeA DataType, a driver.DevicePtr, lda int64, bufferOnDevice driver.DevicePtr, workspaceInBytesOnDevice uint, bufferOnHost uintptr, workspaceInBytesOnHost uint, devInfo driver.DevicePtr) error
Xtrtri computes the inverse of a triangular matrix using the generic API interface.
A is an n×n triangular matrix, only lower or upper part is meaningful. The input parameter uplo indicates which part of the matrix is used. The function will leave the other part untouched. If input parameter uplo is CUBLAS_FILL_MODE_LOWER, only lower triangular part of A is processed, and replaced by lower triangular inverse. If input parameter uplo is CUBLAS_FILL_MODE_UPPER, only upper triangular part of A is processed, and replaced by upper triangular inverse. The user has to provide device and host work spaces which are pointed by input parameters bufferOnDevice and bufferOnHost. The input parameters workspaceInBytesOnDevice and workspaceInBytesOnHost are sizes in bytes of the device and host work spaces, and they are returned by Handle.XtrtriBufferSize. If matrix inversion fails, the output parameter info = i shows A(i,i) = 0. If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). Please visit cuSOLVER Library Samples - Handle.Xtrtri for a code example. Valid data types
- DataTypeA: Meaning
- CUDA_R_32F: STRTRI
- CUDA_R_64F: DTRTRI
- CUDA_C_32F: CTRTRI
- CUDA_C_64F: ZTRTRI
Parameters:
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- diag: The enumerated unit diagonal type
- n: Number of rows and columns of matrix A
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- bufferOnDevice: Device workspace. Array of type void of size workspaceInBytesOnDevice bytes
- workspaceInBytesOnDevice: Size in bytes of bufferOnDevice, returned by Handle.XtrtriBufferSize
- bufferOnHost: Host workspace. Array of type void of size workspaceInBytesOnHost bytes
- workspaceInBytesOnHost: Size in bytes of bufferOnHost, returned by Handle.XtrtriBufferSize
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrNotInitialized: The library was not initialized.
- ErrNotSupported: Data type is not supported.
Wraps cusolverDnXtrtri.
func (Handle) XtrtriBufferSize ¶
func (h Handle) XtrtriBufferSize(uplo FillMode, diag DiagType, n int64, dataTypeA DataType, a driver.DevicePtr, lda int64) (workspaceInBytesOnDevice uint, workspaceInBytesOnHost uint, err error)
XtrtriBufferSize returns the workspace sizes, in bytes, for Handle.Xtrtri.
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- diag: The enumerated unit diagonal type
- n: Number of rows and columns of matrix A
- dataTypeA: Data type of array A
- a: Array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- workspaceInBytesOnDevice: Size of bufferOnDevice, in bytes
- workspaceInBytesOnHost: Size of bufferOnHost, in bytes
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrNotInitialized: The library was not initialized.
- ErrNotSupported: Data type is not supported.
Wraps cusolverDnXtrtriBufferSize, bound as cusolverDnXtrtri_bufferSize.
func (Handle) ZCgels ¶
func (h Handle) ZCgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
ZCgels computes the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
These functions are similar in term of functionalities to the full precision LAPACK QR (least squares) solver (Xgels, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an QR factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is m-by-n matrix and X is n-by-nrhs and B is m-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Description of these functions is given below. <t1><t2>gels() functions are designated by two floating point precisions The <t1> corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the <t2> represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gels() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision <t1>. If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgels) such a way that there is always a good solution at the output of these functions. If <t2> is equal to <t1>, then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if: ITER > ITERMAX or for all the RHS we have: RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK<t1>LAMCH('Epsilon')
The values ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gels_bufferSize(). We provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (e.g., main and lowest precision are equal <t2> is equal to <t1>). The following table specifies which precisions will be used for which interface function: Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gels for the FP64 case).
- Interface function: Handle.ZZgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
cusolverDn<t1><t2>gels_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gels() function.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can’t be NULL. On return - unchanged if the lowest precision is not equal to the main precision and the iterative refinement solver converged, - garbage otherwise
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gels_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZCgels.
func (Handle) ZCgelsBufferSize ¶
func (h Handle) ZCgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
ZCgelsBufferSize returns the workspace size, in bytes, for Handle.ZCgels.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZCgelsBufferSize, bound as cusolverDnZCgels_bufferSize.
func (Handle) ZCgesv ¶
func (h Handle) ZCgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
ZCgesv is modelled after functions DSGESV and ZCGESV from LAPACK.
They compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the LU factorization Xgesv. These functions are similar in term of functionalities to the full precision LU solver ( Xgesv, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an LU factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is n-by-n matrix and X and B are n-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Parameters and behavior are mostly the same as LAPACK counterparts. Description of these functions and differences from LAPACK is given below. <t1><t2>gesv() functions are designated by two floating point precisions The corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gesv() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision . If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgesv) such a way that there is always a good solution at the output of these functions. If is equal to , then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if or for all the RHS we have: where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK LAMCH(‘Epsilon’)
The value ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gesv_bufferSize(). Note that in addition to the two mixed precision functions available in LAPACK (for example, dsgesv and zcgesv), we provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (, main and lowest precision are equal is equal to ). The following table specifies which precisions will be used for which interface function. Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gesv for the FP64 case).
- Interface function: Handle.ZZgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgesv*; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgesv*; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
* Has LAPACK counterparts cusolverDn<t1><t2>gesv_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gesv() function.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can’t be NULL. On return - unchanged if the iterative refinement process converged. If not - will contains the factorization of the matrix A in the main precision ( A = P * L * U, where P - permutation matrix defined by vector ipiv, L and U - lower and upper triangular matrices)
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Vector that defines permutation for the factorization - row i was interchanged with row ipiv[i]
- dB: Set of right hand sides B of size n-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gesv_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid. If dinfo = i, then U(i,i) computed in main precision is exactly zero. The factorization has been completed, but the factor U is exactly singular, so the solution could not be computed
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZCgesv.
func (Handle) ZCgesvBufferSize ¶
func (h Handle) ZCgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
ZCgesvBufferSize returns the workspace size, in bytes, for Handle.ZCgesv.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Pivoting sequence. Not used and can be NULL
- dB: Set of right hand sides B of size n-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZCgesvBufferSize, bound as cusolverDnZCgesv_bufferSize.
func (Handle) ZEgels ¶
func (h Handle) ZEgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
ZEgels computes the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
These functions are similar in term of functionalities to the full precision LAPACK QR (least squares) solver (Xgels, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an QR factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is m-by-n matrix and X is n-by-nrhs and B is m-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Description of these functions is given below. <t1><t2>gels() functions are designated by two floating point precisions The <t1> corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the <t2> represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gels() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision <t1>. If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgels) such a way that there is always a good solution at the output of these functions. If <t2> is equal to <t1>, then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if: ITER > ITERMAX or for all the RHS we have: RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK<t1>LAMCH('Epsilon')
The values ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gels_bufferSize(). We provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (e.g., main and lowest precision are equal <t2> is equal to <t1>). The following table specifies which precisions will be used for which interface function: Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gels for the FP64 case).
- Interface function: Handle.ZZgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
cusolverDn<t1><t2>gels_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gels() function.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can’t be NULL. On return - unchanged if the lowest precision is not equal to the main precision and the iterative refinement solver converged, - garbage otherwise
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gels_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZEgels.
func (Handle) ZEgelsBufferSize ¶
func (h Handle) ZEgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
ZEgelsBufferSize returns the workspace size, in bytes, for Handle.ZEgels.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZEgelsBufferSize, bound as cusolverDnZEgels_bufferSize.
func (Handle) ZEgesv ¶
func (h Handle) ZEgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
ZEgesv is modelled after functions DSGESV and ZCGESV from LAPACK.
They compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the LU factorization Xgesv. These functions are similar in term of functionalities to the full precision LU solver ( Xgesv, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an LU factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is n-by-n matrix and X and B are n-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Parameters and behavior are mostly the same as LAPACK counterparts. Description of these functions and differences from LAPACK is given below. <t1><t2>gesv() functions are designated by two floating point precisions The corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gesv() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision . If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgesv) such a way that there is always a good solution at the output of these functions. If is equal to , then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if or for all the RHS we have: where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK LAMCH(‘Epsilon’)
The value ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gesv_bufferSize(). Note that in addition to the two mixed precision functions available in LAPACK (for example, dsgesv and zcgesv), we provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (, main and lowest precision are equal is equal to ). The following table specifies which precisions will be used for which interface function. Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gesv for the FP64 case).
- Interface function: Handle.ZZgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgesv*; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgesv*; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
* Has LAPACK counterparts cusolverDn<t1><t2>gesv_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gesv() function.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can’t be NULL. On return - unchanged if the iterative refinement process converged. If not - will contains the factorization of the matrix A in the main precision ( A = P * L * U, where P - permutation matrix defined by vector ipiv, L and U - lower and upper triangular matrices)
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Vector that defines permutation for the factorization - row i was interchanged with row ipiv[i]
- dB: Set of right hand sides B of size n-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gesv_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid. If dinfo = i, then U(i,i) computed in main precision is exactly zero. The factorization has been completed, but the factor U is exactly singular, so the solution could not be computed
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZEgesv.
func (Handle) ZEgesvBufferSize ¶
func (h Handle) ZEgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
ZEgesvBufferSize returns the workspace size, in bytes, for Handle.ZEgesv.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Pivoting sequence. Not used and can be NULL
- dB: Set of right hand sides B of size n-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZEgesvBufferSize, bound as cusolverDnZEgesv_bufferSize.
func (Handle) ZKgels ¶
func (h Handle) ZKgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
ZKgels computes the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
These functions are similar in term of functionalities to the full precision LAPACK QR (least squares) solver (Xgels, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an QR factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is m-by-n matrix and X is n-by-nrhs and B is m-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Description of these functions is given below. <t1><t2>gels() functions are designated by two floating point precisions The <t1> corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the <t2> represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gels() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision <t1>. If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgels) such a way that there is always a good solution at the output of these functions. If <t2> is equal to <t1>, then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if: ITER > ITERMAX or for all the RHS we have: RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK<t1>LAMCH('Epsilon')
The values ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gels_bufferSize(). We provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (e.g., main and lowest precision are equal <t2> is equal to <t1>). The following table specifies which precisions will be used for which interface function: Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gels for the FP64 case).
- Interface function: Handle.ZZgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
cusolverDn<t1><t2>gels_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gels() function.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can’t be NULL. On return - unchanged if the lowest precision is not equal to the main precision and the iterative refinement solver converged, - garbage otherwise
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gels_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZKgels.
func (Handle) ZKgelsBufferSize ¶
func (h Handle) ZKgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
ZKgelsBufferSize returns the workspace size, in bytes, for Handle.ZKgels.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZKgelsBufferSize, bound as cusolverDnZKgels_bufferSize.
func (Handle) ZKgesv ¶
func (h Handle) ZKgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
ZKgesv is modelled after functions DSGESV and ZCGESV from LAPACK.
They compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the LU factorization Xgesv. These functions are similar in term of functionalities to the full precision LU solver ( Xgesv, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an LU factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is n-by-n matrix and X and B are n-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Parameters and behavior are mostly the same as LAPACK counterparts. Description of these functions and differences from LAPACK is given below. <t1><t2>gesv() functions are designated by two floating point precisions The corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gesv() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision . If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgesv) such a way that there is always a good solution at the output of these functions. If is equal to , then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if or for all the RHS we have: where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK LAMCH(‘Epsilon’)
The value ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gesv_bufferSize(). Note that in addition to the two mixed precision functions available in LAPACK (for example, dsgesv and zcgesv), we provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (, main and lowest precision are equal is equal to ). The following table specifies which precisions will be used for which interface function. Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gesv for the FP64 case).
- Interface function: Handle.ZZgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgesv*; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgesv*; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
* Has LAPACK counterparts cusolverDn<t1><t2>gesv_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gesv() function.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can’t be NULL. On return - unchanged if the iterative refinement process converged. If not - will contains the factorization of the matrix A in the main precision ( A = P * L * U, where P - permutation matrix defined by vector ipiv, L and U - lower and upper triangular matrices)
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Vector that defines permutation for the factorization - row i was interchanged with row ipiv[i]
- dB: Set of right hand sides B of size n-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gesv_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid. If dinfo = i, then U(i,i) computed in main precision is exactly zero. The factorization has been completed, but the factor U is exactly singular, so the solution could not be computed
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZKgesv.
func (Handle) ZKgesvBufferSize ¶
func (h Handle) ZKgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
ZKgesvBufferSize returns the workspace size, in bytes, for Handle.ZKgesv.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Pivoting sequence. Not used and can be NULL
- dB: Set of right hand sides B of size n-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZKgesvBufferSize, bound as cusolverDnZKgesv_bufferSize.
func (Handle) ZYgels ¶
func (h Handle) ZYgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
ZYgels computes the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
These functions are similar in term of functionalities to the full precision LAPACK QR (least squares) solver (Xgels, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an QR factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is m-by-n matrix and X is n-by-nrhs and B is m-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Description of these functions is given below. <t1><t2>gels() functions are designated by two floating point precisions The <t1> corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the <t2> represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gels() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision <t1>. If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgels) such a way that there is always a good solution at the output of these functions. If <t2> is equal to <t1>, then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if: ITER > ITERMAX or for all the RHS we have: RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK<t1>LAMCH('Epsilon')
The values ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gels_bufferSize(). We provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (e.g., main and lowest precision are equal <t2> is equal to <t1>). The following table specifies which precisions will be used for which interface function: Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gels for the FP64 case).
- Interface function: Handle.ZZgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
cusolverDn<t1><t2>gels_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gels() function.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can’t be NULL. On return - unchanged if the lowest precision is not equal to the main precision and the iterative refinement solver converged, - garbage otherwise
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gels_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZYgels.
func (Handle) ZYgelsBufferSize ¶
func (h Handle) ZYgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
ZYgelsBufferSize returns the workspace size, in bytes, for Handle.ZYgels.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZYgelsBufferSize, bound as cusolverDnZYgels_bufferSize.
func (Handle) ZYgesv ¶
func (h Handle) ZYgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
ZYgesv is modelled after functions DSGESV and ZCGESV from LAPACK.
They compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the LU factorization Xgesv. These functions are similar in term of functionalities to the full precision LU solver ( Xgesv, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an LU factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is n-by-n matrix and X and B are n-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Parameters and behavior are mostly the same as LAPACK counterparts. Description of these functions and differences from LAPACK is given below. <t1><t2>gesv() functions are designated by two floating point precisions The corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gesv() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision . If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgesv) such a way that there is always a good solution at the output of these functions. If is equal to , then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if or for all the RHS we have: where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK LAMCH(‘Epsilon’)
The value ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gesv_bufferSize(). Note that in addition to the two mixed precision functions available in LAPACK (for example, dsgesv and zcgesv), we provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (, main and lowest precision are equal is equal to ). The following table specifies which precisions will be used for which interface function. Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gesv for the FP64 case).
- Interface function: Handle.ZZgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgesv*; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgesv*; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
* Has LAPACK counterparts cusolverDn<t1><t2>gesv_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gesv() function.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can’t be NULL. On return - unchanged if the iterative refinement process converged. If not - will contains the factorization of the matrix A in the main precision ( A = P * L * U, where P - permutation matrix defined by vector ipiv, L and U - lower and upper triangular matrices)
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Vector that defines permutation for the factorization - row i was interchanged with row ipiv[i]
- dB: Set of right hand sides B of size n-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gesv_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid. If dinfo = i, then U(i,i) computed in main precision is exactly zero. The factorization has been completed, but the factor U is exactly singular, so the solution could not be computed
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZYgesv.
func (Handle) ZYgesvBufferSize ¶
func (h Handle) ZYgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
ZYgesvBufferSize returns the workspace size, in bytes, for Handle.ZYgesv.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Pivoting sequence. Not used and can be NULL
- dB: Set of right hand sides B of size n-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZYgesvBufferSize, bound as cusolverDnZYgesv_bufferSize.
func (Handle) ZZgels ¶
func (h Handle) ZZgels(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
ZZgels computes the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the QR factorization Xgels.
These functions are similar in term of functionalities to the full precision LAPACK QR (least squares) solver (Xgels, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an QR factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is m-by-n matrix and X is n-by-nrhs and B is m-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Description of these functions is given below. <t1><t2>gels() functions are designated by two floating point precisions The <t1> corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the <t2> represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gels() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision <t1>. If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgels) such a way that there is always a good solution at the output of these functions. If <t2> is equal to <t1>, then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if: ITER > ITERMAX or for all the RHS we have: RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK<t1>LAMCH('Epsilon')
The values ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gels_bufferSize(). We provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (e.g., main and lowest precision are equal <t2> is equal to <t1>). The following table specifies which precisions will be used for which interface function: Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gels for the FP64 case).
- Interface function: Handle.ZZgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgels; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgels; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgels; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgels; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
cusolverDn<t1><t2>gels_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gels() function.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can’t be NULL. On return - unchanged if the lowest precision is not equal to the main precision and the iterative refinement solver converged, - garbage otherwise
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gels_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZZgels.
func (Handle) ZZgelsBufferSize ¶
func (h Handle) ZZgelsBufferSize(m CusolverInt, n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
ZZgelsBufferSize returns the workspace size, in bytes, for Handle.ZZgels.
- m: Number of rows of the matrix A. Should be non-negative and n<=m
- n: Number of columns of the matrix A. Should be non-negative and n<=m
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size m-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. ldda >= m
- dB: Set of right hand sides B of size m-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. lddb >= max(1,m)
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. lddx >= max(1,n)
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred; check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 ldda<max(1,m) lddb<max(1,m) lddx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZZgelsBufferSize, bound as cusolverDnZZgels_bufferSize.
func (Handle) ZZgesv ¶
func (h Handle) ZZgesv(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr, lworkBytes uint, iter *CusolverInt, dInfo driver.DevicePtr) error
ZZgesv is modelled after functions DSGESV and ZCGESV from LAPACK.
They compute the solution of a system of linear equations with one or multiple right hand sides using mixed precision iterative refinement techniques based on the LU factorization Xgesv. These functions are similar in term of functionalities to the full precision LU solver ( Xgesv, where X denotes Z,C,D,S) but it uses lower precision internally in order to provide faster time to solution, from here comes the name mixed precision. Mixed precision iterative refinement techniques means that the solver compute an LU factorization in lower precision and then iteratively refine the solution to achieve the accuracy of the Inputs/Outputs datatype precision. The corresponds to the Inputs/Outputs datatype precision while represent the internal lower precision at which the factorization will be carried on. A×X=B Where A is n-by-n matrix and X and B are n-by-nrhs matrices. Functions API are designed to be as close as possible to LAPACK API to be considered as a quick and easy drop-in replacement. Parameters and behavior are mostly the same as LAPACK counterparts. Description of these functions and differences from LAPACK is given below. <t1><t2>gesv() functions are designated by two floating point precisions The corresponds to the main precision (e.g., Inputs/Outputs datatype precision) and the represent the internal lower precision at which the factorization will be carried on. cusolver<t1><t2>gesv() first attempts to factorize the matrix in lower precision and use this factorization within an iterative refinement procedure to obtain a solution with same normwise backward error as the main precision . If the approach fails to converge, then the method fallback to the main precision factorization and solve (Xgesv) such a way that there is always a good solution at the output of these functions. If is equal to , then it is not a mixed precision process but rather a full one precision factorization, solve and refinement within the same main precision. The iterative refinement process is stopped if or for all the RHS we have: where
- ITER is the number of the current iteration in the iterative refinement process
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon that matches LAPACK LAMCH(‘Epsilon’)
The value ITERMAX and BWDMAX are fixed to 50 and 1.0 respectively. The function returns value describes the results of the solving process. A Success indicates that the function finished with success otherwise, it indicates if one of the API arguments is incorrect, or if the function did not finish with success. More details about the error will be in the niters and the dinfo API parameters. See their description below for more details. User should provide the required workspace allocated on device memory. The amount of bytes required can be queried by calling the respective function <t1><t2>gesv_bufferSize(). Note that in addition to the two mixed precision functions available in LAPACK (for example, dsgesv and zcgesv), we provide a large set of mixed precision functions that include half, bfloat and tensorfloat as a lower precision as well as same precision functions (, main and lowest precision are equal is equal to ). The following table specifies which precisions will be used for which interface function. Tensor Float (TF32), introduced with NVIDIA Ampere Architecture GPUs, is the most robust tensor core accelerated compute mode for the iterative refinement solver. On Volta and Turing architecture GPUs, half precision tensor core acceleration is recommended. In cases where the iterative refinement solver fails to converge to the desired accuracy (main precision, INOUT data precision), it is recommended to use main precision as internal lowest precision (i.e., cusolverDn[DD,ZZ]gesv for the FP64 case).
- Interface function: Handle.ZZgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: double complex
- Interface function: Handle.ZCgesv*; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.ZKgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.ZEgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.ZYgesv; Main precision (matrix, rhs and solution datatype): cuDoubleComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.CCgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: single complex
- Interface function: Handle.CKgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: half complex
- Interface function: Handle.CEgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: bfloat complex
- Interface function: Handle.CYgesv; Main precision (matrix, rhs and solution datatype): cuComplex; Lowest precision allowed to be used internally: tensorfloat complex
- Interface function: Handle.DDgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: double
- Interface function: Handle.DSgesv*; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: single
- Interface function: Handle.DHgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: half
- Interface function: Handle.DBgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.DXgesv; Main precision (matrix, rhs and solution datatype): double; Lowest precision allowed to be used internally: tensorfloat
- Interface function: Handle.SSgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: single
- Interface function: Handle.SHgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: half
- Interface function: Handle.SBgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: bfloat
- Interface function: Handle.SXgesv; Main precision (matrix, rhs and solution datatype): float; Lowest precision allowed to be used internally: tensorfloat
* Has LAPACK counterparts cusolverDn<t1><t2>gesv_bufferSize() functions will return workspace buffer size in bytes required for the corresponding cusolverDn<t1><t2>gesv() function.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can’t be NULL. On return - unchanged if the iterative refinement process converged. If not - will contains the factorization of the matrix A in the main precision ( A = P * L * U, where P - permutation matrix defined by vector ipiv, L and U - lower and upper triangular matrices)
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Vector that defines permutation for the factorization - row i was interchanged with row ipiv[i]
- dB: Set of right hand sides B of size n-by-nrhs. Can’t be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can’t be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- dWorkspace: Pointer to an allocated workspace in device memory of size lworkBytes
- lworkBytes: Size of the allocated device workspace. Should be at least what was returned by cusolverDn<T1><T2>gesv_bufferSize() function
- dInfo: Status of the IRS solver on the return. If 0 - solve was successful. If dinfo = - i then i-th argument is not valid. If dinfo = i, then U(i,i) computed in main precision is exactly zero. The factorization has been completed, but the factor U is exactly singular, so the solution could not be computed
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZZgesv.
func (Handle) ZZgesvBufferSize ¶
func (h Handle) ZZgesvBufferSize(n CusolverInt, nrhs CusolverInt, dA driver.DevicePtr, ldda CusolverInt, dipiv driver.DevicePtr, dB driver.DevicePtr, lddb CusolverInt, dX driver.DevicePtr, lddx CusolverInt, dWorkspace driver.DevicePtr) (uint, error)
ZZgesvBufferSize returns the workspace size, in bytes, for Handle.ZZgesv.
- n: Number of rows and columns of square matrix A. Should be non-negative
- nrhs: Number of right hand sides to solve. Should be non-negative
- dA: Matrix A with size n-by-n. Can be NULL
- ldda: Leading dimension of two-dimensional array used to store matrix A. lda >= n
- dipiv: Pivoting sequence. Not used and can be NULL
- dB: Set of right hand sides B of size n-by-nrhs. Can be NULL
- lddb: Leading dimension of two-dimensional array used to store matrix of right hand sides B. ldb >= n
- dX: Set of solution vectors X of size n-by-nrhs. Can be NULL
- lddx: Leading dimension of two-dimensional array used to store matrix of solution vectors X. ldx >= n
- lworkBytes: Size of dWorkspace, in bytes
Errors:
- ErrArchMismatch: The IRS solver supports compute capability 7.0 and above. The lowest precision options CUSOLVER_CR_16BF and CUSOLVER_CR_TF32 are only available on compute capability 8.0 and above.
- ErrInternalError: An internal error occurred, check the dinfo and the niters arguments for more details.
- ErrInvalidValue: Invalid parameters were passed, for example: n<0 lda<max(1,n) ldb<max(1,n) ldx<max(1,n)
- ErrInvalidWorkspace: lwork_bytes is smaller than the required workspace.
- ErrIrsOutOfRange: Numerical error related to niters <0, see niters description for more details.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZZgesvBufferSize, bound as cusolverDnZZgesv_bufferSize.
func (Handle) Zgebrd ¶
func (h Handle) Zgebrd(m int32, n int32, a driver.DevicePtr, lda int32, d driver.DevicePtr, e driver.DevicePtr, tauq driver.DevicePtr, taup driver.DevicePtr, work driver.DevicePtr, lwork int32, devInfo driver.DevicePtr) error
Zgebrd reduces a general m×n matrix A to a real upper or lower bidiagonal form B by an orthogonal transformation: Qᴴ*A*P=B.
If m>=n, B is upper bidiagonal; if m<n, B is lower bidiagonal. The matrix Q and P are overwritten into matrix A in the following sense:
- if m>=n, the diagonal and the first superdiagonal are overwritten with the upper bidiagonal matrix B; the elements below the diagonal, with the array TAUQ, represent the orthogonal matrix Q as a product of elementary reflectors, and the elements above the first superdiagonal, with the array TAUP, represent the orthogonal matrix P as a product of elementary reflectors.
- if m<n, the diagonal and the first subdiagonal are overwritten with the lower bidiagonal matrix B; the elements below the first subdiagonal, with the array TAUQ, represent the orthogonal matrix Q as a product of elementary reflectors, and the elements above the diagonal, with the array TAUP, represent the orthogonal matrix P as a product of elementary reflectors.
The input parameter Lwork is size of the working space, and it is returned by gebrd_bufferSize(). Remark: gebrd only supports m>=n.
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- d: Real array of dimension min(m,n). The diagonal elements of the bidiagonal matrix B: D(i) = A(i,i)
- e: Real 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
- tauq: array of dimension min(m,n). The scalar factors of the elementary reflectors which represent the orthogonal matrix Q
- taup: array of dimension min(m,n). The scalar factors of the elementary reflectors which represent the orthogonal matrix P
- work: Working space, array of size Lwork
- lwork: Size of Work, returned by gebrd_bufferSize
- devInfo: If devInfo = 0, the operation is successful. if devInfo = -i, the i-th parameter is wrong (not counting handle)
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0, or lda<max(1,m)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZgebrd.
func (Handle) ZgebrdBufferSize ¶
ZgebrdBufferSize returns the workspace size, in elements of complex128, for Handle.Zgebrd.
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- lwork: Size of Work, in elements of complex128
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0, or lda<max(1,m)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZgebrdBufferSize, bound as cusolverDnZgebrd_bufferSize.
func (Handle) Zgeqrf ¶
func (h Handle) Zgeqrf(m int32, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, workspace driver.DevicePtr, lwork int32, devInfo driver.DevicePtr) error
Zgeqrf computes the QR factorization of an m×n matrix.
A=Q*R, where A is an m×n matrix, Q is an m×n matrix, and R is a n×n upper triangular matrix. The input parameter Lwork is size of the working space, and it is returned by geqrf_bufferSize(). The matrix R is overwritten in upper triangular part of A, including diagonal elements. The matrix Q is not formed explicitly, instead, a sequence of householder vectors are stored in lower triangular part of A. The leading nonzero element of householder vector is assumed to be 1 such that output parameter TAU contains the scaling factor τ. If v is original householder vector, q is the new householder vector corresponding to τ, satisfying the following relation I−2*v*vᴴ=I−τ*q*qᴴ
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,m)
- lda: Leading dimension of two-dimensional array used to store matrix A
- tau: array of dimension at least min(m,n)
- workspace: Working space, array of size Lwork
- lwork: Size of working array Workspace
- devInfo: If devInfo = 0, the LU factorization is successful. if devInfo = -i, the i-th parameter is wrong (not counting handle)
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZgeqrf.
func (Handle) ZgeqrfBufferSize ¶
ZgeqrfBufferSize returns the workspace size, in elements of complex128, for Handle.Zgeqrf.
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,m)
- lda: Leading dimension of two-dimensional array used to store matrix A
- lwork: Size of Workspace, in elements of complex128
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZgeqrfBufferSize, bound as cusolverDnZgeqrf_bufferSize.
func (Handle) Zgesvd ¶
func (h Handle) Zgesvd(jobu int8, jobvt int8, m int32, n int32, a driver.DevicePtr, lda int32, s driver.DevicePtr, u driver.DevicePtr, ldu int32, vt driver.DevicePtr, ldvt int32, work driver.DevicePtr, lwork int32, rwork driver.DevicePtr, info driver.DevicePtr) error
Zgesvd computes the singular value decomposition (SVD) of an m×n matrix A and corresponding the left and/or right singular vectors.
The SVD is written A=U*Σ*Vᴴ, where Σ is an m×n matrix which is zero except for its min(m,n) diagonal elements, U is an m×m unitary matrix, and V is an n×n unitary matrix. The diagonal elements of Σ are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A. The input parameter lwork is size of the working space, and it is returned by gesvd_bufferSize(). if bdsqr did not converge, devInfo specifies how many superdiagonals of an intermediate bidiagonal form did not converge to zero. The rwork is real array of dimension (min(m,n)-1). If devInfo >0 and rwork is not NULL, rwork contains the unconverged superdiagonal elements of an upper bidiagonal matrix. This is slightly different from LAPACK which puts unconverged superdiagonal elements in work if type is real; in rwork if type is complex. rwork can be a NULL pointer if the user does not want the information from superdiagonal. Please visit cuSOLVER Library Samples - gesvd for a code example. Remark 1: gesvd only supports m>=n. Remark 2: the routine returns Vᴴ , not V.
- 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
- jobvt: Specifies options for computing all or part of the matrix V**T: = ‘A’: all N rows of V**T are returned in the array VT; = ‘S’: the first min(m,n) rows of V**T (the right singular vectors) are returned in the array VT; = ‘O’: the first min(m,n) rows of V**T (the right singular vectors) are overwritten on the array A; = ‘N’: no rows of V**T (no right singular vectors) are computed
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,m). On exit, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- s: Real array of dimension min(m,n). The singular values of A, sorted so that S(i) >= S(i+1)
- u: array of dimension ldu * m with ldu is not less than max(1,m). U contains the m×m unitary matrix U
- ldu: Leading dimension of two-dimensional array used to store matrix U
- vt: array of dimension ldvt * n with ldvt is not less than max(1,n). VT contains the n×n unitary matrix V**T
- ldvt: Leading dimension of two-dimensional array used to store matrix Vt
- work: Working space, array of size lwork
- lwork: Size of work, returned by gesvd_bufferSize
- rwork: Real array of dimension min(m,n)-1. It contains the unconverged superdiagonal elements of an upper bidiagonal matrix if devInfo > 0
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m) or ldu<max(1,m) or ldvt<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZgesvd.
func (Handle) ZgesvdBufferSize ¶
ZgesvdBufferSize returns the workspace size, in elements of complex128, for Handle.Zgesvd.
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- lwork: Size of work, in elements of complex128
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m) or ldu<max(1,m) or ldvt<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZgesvdBufferSize, bound as cusolverDnZgesvd_bufferSize.
func (Handle) ZgesvdaStridedBatched ¶
func (h Handle) ZgesvdaStridedBatched(jobz EigMode, rank int32, m int32, n int32, dA driver.DevicePtr, lda int32, strideA int64, dS driver.DevicePtr, strideS int64, dU driver.DevicePtr, ldu int32, strideU int64, dV driver.DevicePtr, ldv int32, strideV int64, dWork driver.DevicePtr, lwork int32, dInfo driver.DevicePtr, hRNrmF *float64, batchSize int32) error
ZgesvdaStridedBatched gesvda ( a stands for approximate) approximates the singular value decomposition of a tall skinny m×n matrix A and corresponding the left and right singular vectors.
The economy form of SVD is written by A=U*Σ*Vᴴ, where Σ is an n×n matrix. U is an m×n unitary matrix, and V is an n×n unitary matrix. The diagonal elements of Σ are the singular values of A; they are real and non-negative, and are returned in descending order. U and V are the left and right singular vectors of A. gesvda computes eigenvalues of A**T*A, or A**H*A (if A is complex), to approximate singular values and singular vectors. It generates matrices U and V and transforms the matrix A to the following form Uᴴ*A*V=S+E where S is diagonal and E depends on rounding errors. To certain conditions, U, V and S approximate singular values and singular vectors up to machine zero of single precision. In general, V is unitary, S is more accurate than U. If singular value is far from zero, then left singular vector U is accurate. In other words, the accuracy of singular values and left singular vectors depend on the distance between singular value and zero. Since the computation of A**T*A, or A**H*A can greatly amplify errors, it is recommended to use gesvda only with well-conditioned data. The input parameter rank decides the number of singular values and singular vectors are computed in parameter S, U and V. The output parameter h_RnrmF computes Frobenius norm of residual. To compute h_RnrmF, info != NULL is required. A−U*S*Vᴴ if the parameter rank is equal n. Otherwise, h_RnrmF reports ‖U*S*Vᴴ‖−‖S‖ in Frobenius norm sense, that is, how far U is from unitary. gesvdaStridedBatched performs gesvda on each matrix. It requires that all matrices are of the same size m,n and are packed in a contiguous way, A=(A0A1⋯) Each matrix is column-major with leading dimension lda, so the formula for random access is Aₖ(i,j)=A[i+lda*j+strideA*k] . Similarly, the formula for random access of S is Sₖ(j)=S[j+StrideS*k] , the formula for random access of U is Uₖ(i,j)=U[i+ldu*j+strideU*k] and the formula for random access of V is Vₖ(i,j)=V[i+ldv*j+strideV*k] . The input parameter lwork is the size of the working space, and it is returned by gesvdaStridedBatched_bufferSize(). The output parameter info is an integer array of size batchSize. If the function returns ErrInvalidValue, the first element info[0] = -i (less than zero) indicates i-th parameter is wrong (not counting handle). Otherwise, if info[i] = min(m,n)+1, gesvdaStridedBatched did not converge on the i-th matrix. If 0 < info[i] < min(m,n)+1, gesvdaStridedBatched could not compute an SVD of the i-th matrix fully; the leading singular values Si[k], 0 <= k <= info[i]-1, and corresponding singular vectors may still be useful. In this case, if h_RnrmF is requested, h_RnrmF reports the residual as if rank was set to info[i]-1. Note that the problem size is limited by the condition batchSize*stride{A/S/U/V}<=INT32_MAX primarily due to the current implementation constraints. Please visit cuSOLVER Library Samples - gesvdaStridedBatched for a code example. Remark 1: The routine returns V, not Vᴴ . This is different from gesvd. Remark 2: The routine only supports m >=n. Remark 3: It is recommended to use an FP64 data type, that is Handle.DgesvdaStridedBatched or Handle.ZgesvdaStridedBatched. Remark 4: If the user is confident on the accuracy of singular values and singular vectors, for example, certain conditions hold (required singular value is far from zero), then the performance can be improved by passing a null pointer to h_RnrmF, i.e. no computation of the residual norm.
- jobz: Specifies options to either compute singular value only or singular vectors as well: jobz = EigModeNovector : Compute singular values only; jobz = EigModeVector : Compute singular values and singular vectors
- rank: Number of singular values (from largest to smallest)
- m: Number of rows of matrix Aj
- n: Number of columns of matrix Aj
- lda: Leading dimension of two-dimensional array used to store matrix Aj
- strideA: Value of type long long int that gives the address offset between A[i] and A[i+1]. strideA is not less than lda*n
- strideS: Value of type long long int that gives the address offset between S[i] and S[i+1]. strideS is not less than rank
- ldu: Leading dimension of two-dimensional array used to store matrix Uj. ldu is not less than max(1,m)
- strideU: Value of type long long int that gives the address offset between U[i] and U[i+1]. strideU is not less than ldu*rank
- ldv: Leading dimension of two-dimensional array used to store matrix Vj. ldv is not less than max(1,n)
- strideV: Value of type long long int that gives the address offset between V[i] and V[i+1]. strideV is not less than ldv*rank
- lwork: Size of work, returned by gesvdaStridedBatched_bufferSize
- hRNrmF: array of size batchSize. h_RnrmF[i] is norm of residual of i-th matrix. If 0 < info[i] < min(m,n)+1, h_RnrmF[i] reports the residual as if rank of the i-th matrix had been set to info[i]-1
- batchSize: Number of matrices. batchSize is not less than 1
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or batchSize*stride{A/S/U/V}>INT32_MAX or lda<max(1,m) or ldu<max(1,m) or ldv<max(1,n) or strideA<lda*n or strideS<rank or strideU<ldu*rank or strideV<ldv*rank or batchSize<1 or jobz is not EigModeNovector or EigModeVector).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZgesvdaStridedBatched.
func (Handle) ZgesvdaStridedBatchedBufferSize ¶
func (h Handle) ZgesvdaStridedBatchedBufferSize(jobz EigMode, rank int32, m int32, n int32, dA driver.DevicePtr, lda int32, strideA int64, dS driver.DevicePtr, strideS int64, dU driver.DevicePtr, ldu int32, strideU int64, dV driver.DevicePtr, ldv int32, strideV int64, lwork *int32, batchSize int32) error
ZgesvdaStridedBatchedBufferSize returns the workspace size, in elements of complex128, for Handle.ZgesvdaStridedBatched.
- jobz: Specifies options to either compute singular value only or singular vectors as well: jobz = EigModeNovector : Compute singular values only; jobz = EigModeVector : Compute singular values and singular vectors
- rank: Number of singular values (from largest to smallest)
- m: Number of rows of matrix Aj
- n: Number of columns of matrix Aj
- lda: Leading dimension of two-dimensional array used to store matrix Aj
- strideA: Value of type long long int that gives the address offset between A[i] and A[i+1]. strideA is not less than lda*n
- strideS: Value of type long long int that gives the address offset between S[i] and S[i+1]. strideS is not less than rank
- ldu: Leading dimension of two-dimensional array used to store matrix Uj. ldu is not less than max(1,m)
- strideU: Value of type long long int that gives the address offset between U[i] and U[i+1]. strideU is not less than ldu*rank
- ldv: Leading dimension of two-dimensional array used to store matrix Vj. ldv is not less than max(1,n)
- strideV: Value of type long long int that gives the address offset between V[i] and V[i+1]. strideV is not less than ldv*rank
- lwork: Size of work, in elements of complex128
- batchSize: Number of matrices. batchSize is not less than 1
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or batchSize*stride{A/S/U/V}>INT32_MAX or lda<max(1,m) or ldu<max(1,m) or ldv<max(1,n) or strideA<lda*n or strideS<rank or strideU<ldu*rank or strideV<ldv*rank or batchSize<1 or jobz is not EigModeNovector or EigModeVector).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZgesvdaStridedBatchedBufferSize, bound as cusolverDnZgesvdaStridedBatched_bufferSize.
func (Handle) Zgesvdj ¶
func (h Handle) Zgesvdj(jobz EigMode, econ int32, m int32, n int32, a driver.DevicePtr, lda int32, s driver.DevicePtr, u driver.DevicePtr, ldu int32, v driver.DevicePtr, ldv int32, work driver.DevicePtr, lwork int32, info driver.DevicePtr, params GesvdjInfo) error
Zgesvdj computes the singular value decomposition (SVD) of an m×n matrix A and corresponding the left and/or right singular vectors.
The SVD is written: A=U*Σ*Vᴴ where Σ is an m×n matrix which is zero except for its min(m,n) diagonal elements, U is an m×m unitary matrix, and V is an n×n unitary matrix. The diagonal elements of Σ are the singular values of A; they are real and non-negative, and are returned in descending order. The first min(m,n) columns of U and V are the left and right singular vectors of A. gesvdj has the same functionality as gesvd. The difference is that gesvd uses QR algorithm and gesvdj uses Jacobi method. The parallelism of Jacobi method gives GPU better performance on small and medium size matrices. Moreover the user can configure gesvdj to perform approximation up to certain accuracy. gesvdj iteratively generates a sequence of unitary matrices to transform matrix A to the following form Uᴴ*A*V=S+E where S is diagonal and diagonal of E is zero. During the iterations, the Frobenius norm of E decreases monotonically. As E goes down to zero, S is the set of singular values. In practice, Jacobi method stops if ‖E‖_(F)≤eps*‖A‖_(F) where eps is given tolerance. Note that if the real residual norm ‖S−Uᴴ*A*V‖_(F) is computed, it will differ from ‖E‖_(F) up to roundoff errors of order N=max(m,n), to still have the standard SVD accuracy expectation ‖S−Uᴴ*A*V‖_(F)O(N)*‖A‖_(F)≤‖E‖_(F)‖A‖_(F)≤eps O(N) is typically N, but the constant depends on the number of sweeps, which gives an upper roundoff error bound of sweeps*N. gesvdj has two parameters to control the accuracy. First parameter is tolerance ( eps). The default value is machine accuracy but The user can use function GesvdjInfo.XgesvdjSetTolerance to set a priori tolerance. The second parameter is maximum number of sweeps which controls number of iterations of Jacobi method. The default value is 100 but the user can use function GesvdjInfo.XgesvdjSetMaxSweeps to set a proper bound. The experiments show 15 sweeps are good enough to converge to machine accuracy. gesvdj stops either tolerance is met or maximum number of sweeps is met. Jacobi method has quadratic convergence, so the accuracy is not proportional to number of sweeps. To guarantee certain accuracy, the user should configure tolerance only. The input parameter lwork is the size of the working space, and it is returned by gesvdj_bufferSize(). If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). If info = min(m,n)+1, gesvdj does not converge under given tolerance and maximum sweeps. If the user sets an improper tolerance, gesvdj may not converge. For example, tolerance should not be smaller than machine accuracy. Please visit cuSOLVER Library Samples - gesvdj for a code example. Remark 1: gesvdj supports any combination of m and n. Remark 2: the routine returns V, not Vᴴ . This is different from gesvd.
- jobz: Specifies options to either compute singular value only or singular vectors as well: jobz = EigModeNovector : Compute singular values only; jobz = EigModeVector : Compute singular values and singular vectors
- econ: econ = 1 for economy size for U and V
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,m). On exit, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- s: Real array of dimension min(m,n). The singular values of A, sorted so that S(i) >= S(i+1)
- u: array of dimension ldu * m if econ is zero. If econ is nonzero, the dimension is ldu * min(m,n). U contains the left singular vectors
- ldu: Leading dimension of two-dimensional array used to store matrix U. ldu is not less than max(1,m)
- v: array of dimension ldv * n if econ is zero. If econ is nonzero, the dimension is ldv * min(m,n). V contains the right singular vectors
- ldv: Leading dimension of two-dimensional array used to store matrix V. ldv is not less than max(1,n)
- work: array of size lwork, working space
- lwork: Size of work, returned by gesvdj_bufferSize
- info: If info = 0, the operation is successful. if info = -i, the i-th parameter is wrong (not counting handle). if info = min(m,n)+1, gesvdj dose not converge under given tolerance and maximum sweeps
- params: Structure filled with parameters of Jacobi algorithm and results of gesvdj. params can be destroyed after the host thread exits the routine
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m) or ldu<max(1,m) or ldv<max(1,n) or jobz is not EigModeNovector or EigModeVector ).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZgesvdj.
func (Handle) ZgesvdjBatched ¶
func (h Handle) ZgesvdjBatched(jobz EigMode, m int32, n int32, a driver.DevicePtr, lda int32, s driver.DevicePtr, u driver.DevicePtr, ldu int32, v driver.DevicePtr, ldv int32, work driver.DevicePtr, lwork int32, info driver.DevicePtr, params GesvdjInfo, batchSize int32) error
ZgesvdjBatched computes singular values and singular vectors of a sequence of general m×n matrices.
Aⱼ=Uⱼ*Σⱼ*Vⱼᴴ, where Σⱼ is a real m×n diagonal matrix which is zero except for its min(m,n) diagonal elements. Uⱼ (left singular vectors) is an m×m unitary matrix and Vⱼ (right singular vectors) is a n×n unitary matrix. The diagonal elements of Σⱼ are the singular values of Aⱼ in either descending order or non-sorting order. gesvdjBatched performs gesvdj on each matrix. It requires that all matrices are of the same size m,n no greater than 32 and are packed in contiguous way, A=(A0A1⋯) Each matrix is column-major with leading dimension lda, so the formula for random access is Aₖ(i,j)=A[i+lda*j+lda*n*k] . The parameter S also contains singular values of each matrix in contiguous way, S=(S0S1⋯) The formula for random access of S is Sₖ(j)=S[j+min(m,n)*k] . Except for tolerance and maximum sweeps, gesvdjBatched can either sort the singular values in descending order (default) or chose as-is (without sorting) by the function GesvdjInfo.XgesvdjSetSortEig. If the user packs several tiny matrices into diagonal blocks of one matrix, non-sorting option can separate singular values of those tiny matrices. gesvdjBatched cannot report residual and executed sweeps by function Handle.XgesvdjGetResidual and Handle.XgesvdjGetSweeps. Any call of the above two returns ErrNotSupported. The user needs to compute residual explicitly. The input parameter lwork is the size of the working space, and it is returned by gesvdjBatched_bufferSize(). The output parameter info is an integer array of size batchSize. If the function returns ErrInvalidValue, the first element info[0] = -i (less than zero) indicates i-th parameter is wrong (not counting handle). Otherwise, if info[i] = min(m,n)+1, gesvdjBatched does not converge on i-th matrix under given tolerance and maximum sweeps. Please visit cuSOLVER Library Samples - gesvdjBatched for a code example.
- jobz: Specifies options to either compute singular value only or singular vectors as well: jobz = EigModeNovector : Compute singular values only; jobz = EigModeVector : Compute singular values and singular vectors
- m: Number of rows of matrix Aj. m is no greater than 32
- n: Number of columns of matrix Aj. n is no greater than 32
- a: array of dimension lda * n * batchSize with lda is not less than max(1,n). on Exit: the contents of Aj are destroyed
- lda: Lading dimension of two-dimensional array used to store matrix Aj
- s: Areal array of dimension min(m,n)*batchSize. It stores the singular values of Aj in descending order or non-sorting order
- u: array of dimension ldu * m * batchSize. Uj contains the left singular vectors of Aj
- ldu: Leading dimension of two-dimensional array used to store matrix Uj. ldu is not less than max(1,m)
- v: array of dimension ldv * n * batchSize. Vj contains the right singular vectors of Aj
- ldv: Leading dimension of two-dimensional array used to store matrix Vj. ldv is not less than max(1,n)
- work: array of size lwork, working space
- lwork: Size of work, returned by gesvdjBatched_bufferSize
- info: An integer array of dimension batchSize. If ErrInvalidValue is returned, info[0] = -i (less than zero) indicates i-th parameter is wrong (not counting handle). Otherwise, if info[i] = 0, the operation is successful. if info[i] = min(m,n)+1, gesvdjBatched dose not converge on i-th matrix under given tolerance and maximum sweeps
- params: Structure filled with parameters of Jacobi algorithm. params can be destroyed after the host thread exits the routine
- batchSize: Number of matrices
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m) or ldu<max(1,m) or ldv<max(1,n) or jobz is not EigModeNovector or EigModeVector , or batchSize<0).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZgesvdjBatched.
func (Handle) ZgesvdjBatchedBufferSize ¶
func (h Handle) ZgesvdjBatchedBufferSize(jobz EigMode, m int32, n int32, a driver.DevicePtr, lda int32, s driver.DevicePtr, u driver.DevicePtr, ldu int32, v driver.DevicePtr, ldv int32, lwork *int32, params GesvdjInfo, batchSize int32) error
ZgesvdjBatchedBufferSize returns the workspace size, in elements of complex128, for Handle.ZgesvdjBatched.
- jobz: Specifies options to either compute singular value only or singular vectors as well: jobz = EigModeNovector : Compute singular values only; jobz = EigModeVector : Compute singular values and singular vectors
- m: Number of rows of matrix Aj. m is no greater than 32
- n: Number of columns of matrix Aj. n is no greater than 32
- a: array of dimension lda * n * batchSize with lda is not less than max(1,n). on Exit: the contents of Aj are destroyed
- lda: Lading dimension of two-dimensional array used to store matrix Aj
- s: Areal array of dimension min(m,n)*batchSize. It stores the singular values of Aj in descending order or non-sorting order
- u: array of dimension ldu * m * batchSize. Uj contains the left singular vectors of Aj
- ldu: Leading dimension of two-dimensional array used to store matrix Uj. ldu is not less than max(1,m)
- v: array of dimension ldv * n * batchSize. Vj contains the right singular vectors of Aj
- ldv: Leading dimension of two-dimensional array used to store matrix Vj. ldv is not less than max(1,n)
- lwork: Size of work, in elements of complex128
- params: Structure filled with parameters of Jacobi algorithm. params can be destroyed after the host thread exits the routine
- batchSize: Number of matrices
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m) or ldu<max(1,m) or ldv<max(1,n) or jobz is not EigModeNovector or EigModeVector , or batchSize<0).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZgesvdjBatchedBufferSize, bound as cusolverDnZgesvdjBatched_bufferSize.
func (Handle) ZgesvdjBufferSize ¶
func (h Handle) ZgesvdjBufferSize(jobz EigMode, econ int32, m int32, n int32, a driver.DevicePtr, lda int32, s driver.DevicePtr, u driver.DevicePtr, ldu int32, v driver.DevicePtr, ldv int32, lwork *int32, params GesvdjInfo) error
ZgesvdjBufferSize returns the workspace size, in elements of complex128, for Handle.Zgesvdj.
- jobz: Specifies options to either compute singular value only or singular vectors as well: jobz = EigModeNovector : Compute singular values only; jobz = EigModeVector : Compute singular values and singular vectors
- econ: econ = 1 for economy size for U and V
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,m). On exit, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- s: Real array of dimension min(m,n). The singular values of A, sorted so that S(i) >= S(i+1)
- u: array of dimension ldu * m if econ is zero. If econ is nonzero, the dimension is ldu * min(m,n). U contains the left singular vectors
- ldu: Leading dimension of two-dimensional array used to store matrix U. ldu is not less than max(1,m)
- v: array of dimension ldv * n if econ is zero. If econ is nonzero, the dimension is ldv * min(m,n). V contains the right singular vectors
- ldv: Leading dimension of two-dimensional array used to store matrix V. ldv is not less than max(1,n)
- lwork: Size of work, in elements of complex128
- params: Structure filled with parameters of Jacobi algorithm and results of gesvdj. params can be destroyed after the host thread exits the routine
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m) or ldu<max(1,m) or ldv<max(1,n) or jobz is not EigModeNovector or EigModeVector ).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZgesvdjBufferSize, bound as cusolverDnZgesvdj_bufferSize.
func (Handle) Zgetrf ¶
func (h Handle) Zgetrf(m int32, n int32, a driver.DevicePtr, lda int32, workspace driver.DevicePtr, devIpiv driver.DevicePtr, devInfo driver.DevicePtr) error
Zgetrf computes the LU factorization of an m×n matrix.
P*A=L*U, where A is an m×n matrix, P is a permutation matrix, L is a lower triangular matrix with unit diagonal, and U is an upper triangular matrix. The input parameter Lwork is size of the working space, and it is returned by getrf_bufferSize(). If LU factorization failed, i.e. matrix A ( U) is singular, The output parameter devInfo=i indicates U(i,i) = 0. If devIpiv is null, no pivoting is performed. The factorization is A=L*U, which is not numerically stable. No matter LU factorization failed or not, the output parameter devIpiv contains pivoting sequence, row i is interchanged with row devIpiv(i). The user can combine getrf and getrs to complete a linear solver. Remark: getrf uses fastest implementation with large workspace of size m*n. The user can choose the legacy implementation with minimal workspace by Getrf and Params.SetAdvOptions(params, CUSOLVERDN_GETRF, Alg1).
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,m)
- lda: Leading dimension of two-dimensional array used to store matrix A
- workspace: Working space, array of size Lwork
- devIpiv: Array of size at least min(m,n), containing pivot indices
- devInfo: If devInfo = 0, the LU factorization is successful. if devInfo = -i, the i-th parameter is wrong (not counting handle). if devInfo = i, the U(i,i) = 0
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZgetrf.
func (Handle) ZgetrfBufferSize ¶
ZgetrfBufferSize returns the workspace size, in elements of complex128, for Handle.Zgetrf.
- m: Number of rows of matrix A
- n: Number of columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,m)
- lda: Leading dimension of two-dimensional array used to store matrix A
- lwork: Size of Workspace, in elements of complex128
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or lda<max(1,m)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZgetrfBufferSize, bound as cusolverDnZgetrf_bufferSize.
func (Handle) Zgetrs ¶
func (h Handle) Zgetrs(trans Operation, n int32, nrhs int32, a driver.DevicePtr, lda int32, devIpiv driver.DevicePtr, b driver.DevicePtr, ldb int32, devInfo driver.DevicePtr) error
Zgetrs solves a linear system of multiple right-hand sides.
op(A)*X=B, where A is an n×n matrix, and was LU-factored by getrf, that is, lower triangular part of A is L, and upper triangular part (including diagonal elements) of A is U. B is an n×nrhs right-hand side matrix. The input parameter trans is defined by op(A) = A if trans == CUBLAS_OP_N, op(A) = Aᵀ if trans == CUBLAS_OP_T, and op(A) = Aᴴ if trans == CUBLAS_OP_C. The input parameter devIpiv is an output of getrf. It contains pivot indices, which are used to permutate right-hand sides. The user can combine getrf and getrs to complete a linear solver.
- trans: Operation op(A) that is non- or (conj.) transpose
- n: Number of rows and columns of matrix A
- nrhs: Number of right-hand sides
- a: array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- devIpiv: Array of size at least n, containing pivot indices
- b: array of dimension ldb * nrhs with ldb is not less than max(1,n)
- ldb: Leading dimension of two-dimensional array used to store matrix B
- devInfo: If devInfo = 0, the operation is successful. if devInfo = -i, the i-th parameter is wrong (not counting handle)
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n) or ldb<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZgetrs.
func (Handle) Zheevd ¶
func (h Handle) Zheevd(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, w driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Zheevd computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix A.
The standard symmetric eigenvalue problem is A*V=V*Λ, where Λ is a real n×n diagonal matrix. V is an n×n unitary matrix. The diagonal elements of Λ are the eigenvalues of A in ascending order. The input parameter lwork is size of the working space, and it is returned by syevd_bufferSize(). If devInfo = i (greater than zero), i off-diagonal elements of an intermediate tridiagonal form did not converge to zero. If jobz = EigModeVector, A contains the orthonormal eigenvectors of the matrix A. The eigenvectors are computed by a divide and conquer algorithm. Please visit cuSOLVER Library Samples - syevd for a code example.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- w: A real array of dimension n. The eigenvalue values of A, in ascending order ie, sorted so that W(i) <= W(i+1)
- work: Working space, array of size lwork
- lwork: Size of work, returned by syevd_bufferSize
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZheevd.
func (Handle) ZheevdBufferSize ¶
func (h Handle) ZheevdBufferSize(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, w driver.DevicePtr) (int32, error)
ZheevdBufferSize returns the workspace size, in elements of complex128, for Handle.Zheevd.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- w: A real array of dimension n. The eigenvalue values of A, in ascending order ie, sorted so that W(i) <= W(i+1)
- lwork: Size of work, in elements of complex128
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZheevdBufferSize, bound as cusolverDnZheevd_bufferSize.
func (Handle) Zheevdx ¶
func (h Handle) Zheevdx(jobz EigMode, range_ EigRange, uplo FillMode, n int32, a driver.DevicePtr, lda int32, vl float64, vu float64, il int32, iu int32, meig *int32, w driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Zheevdx computes all or selection of the eigenvalues and optionally eigenvectors of a symmetric (Hermitian) n×n matrix A.
The standard symmetric eigenvalue problem is: A*V=V*Λ where Λ is a real n×h_meig diagonal matrix. V is an n×h_meig unitary matrix. h_meig is the number of eigenvalues/eigenvectors computed by the routine, h_meig is equal to n when the whole spectrum (e.g., range = EigRangeAll) is requested. The diagonal elements of Λ are the eigenvalues of A in ascending order. The input parameter lwork is size of the working space, and it is returned by syevdx_bufferSize(). If devInfo = i (greater than zero), i off-diagonal elements of an intermediate tridiagonal form did not converge to zero. If jobz = EigModeVector, A contains the orthonormal eigenvectors of the matrix A. The eigenvectors are computed by a divide and conquer algorithm. Please visit cuSOLVER Library Samples - syevdx for a code example.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- range_: Specifies options to which selection of eigenvalues and optionally eigenvectors that need to be computed: range = EigRangeAll : all eigenvalues/eigenvectors will be found, will becomes the classical syevd/heevd routine; range = EigRangeV : all eigenvalues/eigenvectors in the half-open interval (vl,vu] will be found; range = EigRangeI : the il-th through iu-th eigenvalues/eigenvectors will be found
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- vl: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user wants to be sure not to miss any eigenvalue within the interval bound, we suggest that the user subtract/add epsilon (machine precision) to the interval bound such as (vl=vl-eps, vu=vu+eps]. This suggestion is valid for any selective routine from cuSolver or LAPACK
- vu: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user wants to be sure not to miss any eigenvalue within the interval bound, we suggest that the user subtract/add epsilon (machine precision) to the interval bound such as (vl=vl-eps, vu=vu+eps]. This suggestion is valid for any selective routine from cuSolver or LAPACK
- il: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- iu: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- w: A real array of dimension n. The eigenvalue values of A, in ascending order ie, sorted so that W(i) <= W(i+1)
- work: Working space, array of size lwork
- lwork: Size of work, returned by syevdx_bufferSize
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or range is not EigRangeAll or EigRangeV or EigRangeI, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZheevdx.
func (Handle) ZheevdxBufferSize ¶
func (h Handle) ZheevdxBufferSize(jobz EigMode, range_ EigRange, uplo FillMode, n int32, a driver.DevicePtr, lda int32, vl float64, vu float64, il int32, iu int32, w driver.DevicePtr) (meig int32, lwork int32, err error)
ZheevdxBufferSize returns the workspace size, in elements of complex128, for Handle.Zheevdx.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- range_: Specifies options to which selection of eigenvalues and optionally eigenvectors that need to be computed: range = EigRangeAll : all eigenvalues/eigenvectors will be found, will becomes the classical syevd/heevd routine; range = EigRangeV : all eigenvalues/eigenvectors in the half-open interval (vl,vu] will be found; range = EigRangeI : the il-th through iu-th eigenvalues/eigenvectors will be found
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- vl: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user wants to be sure not to miss any eigenvalue within the interval bound, we suggest that the user subtract/add epsilon (machine precision) to the interval bound such as (vl=vl-eps, vu=vu+eps]. This suggestion is valid for any selective routine from cuSolver or LAPACK
- vu: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user wants to be sure not to miss any eigenvalue within the interval bound, we suggest that the user subtract/add epsilon (machine precision) to the interval bound such as (vl=vl-eps, vu=vu+eps]. This suggestion is valid for any selective routine from cuSolver or LAPACK
- il: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- iu: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- w: A real array of dimension n. The eigenvalue values of A, in ascending order ie, sorted so that W(i) <= W(i+1)
- lwork: Size of work, in elements of complex128
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or range is not EigRangeAll or EigRangeV or EigRangeI, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZheevdxBufferSize, bound as cusolverDnZheevdx_bufferSize.
func (Handle) Zheevj ¶
func (h Handle) Zheevj(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, w driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr, params SyevjInfo) error
Zheevj computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix A.
The standard symmetric eigenvalue problem is A*Q=Q*Λ, where Λ is a real n×n diagonal matrix. Q is an n×n unitary matrix. The diagonal elements of Λ are the eigenvalues of A in ascending order. syevj has the same functionality as syevd. The difference is that syevd uses QR algorithm and syevj uses Jacobi method. The parallelism of Jacobi method gives GPU better performance on small and medium size matrices. Moreover the user can configure syevj to perform approximation up to certain accuracy. How does it work? syevj iteratively generates a sequence of unitary matrices to transform matrix A to the following form Vᴴ*A*V=W+E where W is diagonal and E is symmetric without diagonal. During the iterations, the Frobenius norm of E decreases monotonically. As E goes down to zero, W is the set of eigenvalues. In practice, Jacobi method stops if ‖E‖_(F)≤eps*‖A‖_(F) where eps is the given tolerance. syevj has two parameters to control the accuracy. First parameter is tolerance ( eps). The default value is machine accuracy but The user can use function SyevjInfo.XsyevjSetTolerance to set a priori tolerance. The second parameter is maximum number of sweeps which controls number of iterations of Jacobi method. The default value is 100 but the user can use function SyevjInfo.XsyevjSetMaxSweeps to set a proper bound. The experiments show 15 sweeps are good enough to converge to machine accuracy. syevj stops either tolerance is met or maximum number of sweeps is met. The Jacobi method has quadratic convergence, so the accuracy is not proportional to number of sweeps. To guarantee certain accuracy, the user should configure tolerance only. After syevj, the user can query residual by function Handle.XsyevjGetResidual and number of executed sweeps by function Handle.XsyevjGetSweeps. However the user needs to be aware that residual is the Frobenius norm of E, not accuracy of individual eigenvalue, i.e. residual=‖E‖_(F)=‖Λ−W‖_(F) The input parameter lwork is the size of the working space, and it is returned by syevj_bufferSize(). If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). If info = n+1, syevj does not converge under given tolerance and maximum sweeps. If the user sets an improper tolerance, syevj may not converge. For example, tolerance should not be smaller than machine accuracy. If jobz = EigModeVector, A contains the orthonormal eigenvectors V. Please visit cuSOLVER Library Samples - syevj for a code example.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and info = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- w: A real array of dimension n. The eigenvalue values of A, in ascending order ie, sorted so that W(i) <= W(i+1)
- work: Working space, array of size lwork
- lwork: Size of work, returned by syevj_bufferSize
- info: If info = 0, the operation is successful. If info = -i, the i-th parameter is wrong (not counting handle). If info = n+1, syevj does not converge under given tolerance and maximum sweeps
- params: Structure filled with parameters of Jacobi algorithm and results of syevj
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZheevj.
func (Handle) ZheevjBatched ¶
func (h Handle) ZheevjBatched(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, w driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr, params SyevjInfo, batchSize int32) error
ZheevjBatched computes eigenvalues and eigenvectors of a sequence of symmetric (Hermitian) n×n matrices.
Aⱼ*Qⱼ=Qⱼ*Λⱼ, where Λⱼ is a real n×n diagonal matrix. Qⱼ is an n×n unitary matrix. The diagonal elements of Λⱼ are the eigenvalues of Aⱼ in either ascending order or non-sorting order. syevjBatched performs syevj on each matrix. It requires that all matrices are of the same size n and are packed in contiguous way, A=(A0A1⋯) Each matrix is column-major with leading dimension lda, so the formula for random access is Aₖ(i,j)=A[i+lda*j+lda*n*k] . The parameter W also contains eigenvalues of each matrix in contiguous way, W=(W0W1⋯) The formula for random access of W is Wₖ(j)=W[j+n*k] . Except for tolerance and maximum sweeps, syevjBatched can either sort the eigenvalues in ascending order (default) or chose as-is (without sorting) by the function SyevjInfo.XsyevjSetSortEig. If the user packs several tiny matrices into diagonal blocks of one matrix, non-sorting option can separate spectrum of those tiny matrices. syevjBatched cannot report residual and executed sweeps by function Handle.XsyevjGetResidual and Handle.XsyevjGetSweeps. Any call of the above two returns ErrNotSupported. The user needs to compute residual explicitly. The input parameter lwork is the size of the working space, and it is returned by syevjBatched_bufferSize(). The output parameter info is an integer array of size batchSize. If the function returns ErrInvalidValue, the first element info[0] = -i (less than zero) indicates i-th parameter is wrong (not counting handle). Otherwise, if info[i] = n+1, syevjBatched does not converge on i-th matrix under given tolerance and maximum sweeps. If jobz = EigModeVector, Aⱼ contains the orthonormal eigenvectors Vⱼ. Please visit cuSOLVER Library Samples - syevjBatched for a code example.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of Aj is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of Aj is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of Aj is stored
- n: Number of rows (or columns) of matrix each Aj
- a: array of dimension lda * n * batchSize with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of Aj contains the upper triangular part of the matrix Aj. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of Aj contains the lower triangular part of the matrix Aj. On exit, if jobz = EigModeVector, and info[j] = 0, Aj contains the orthonormal eigenvectors of the matrix Aj. If jobz = EigModeNovector, the contents of Aj are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix Aj
- w: A real array of dimension n*batchSize. It stores the eigenvalues of Aj in ascending order or non-sorting order
- work: array of size lwork, workspace
- lwork: Size of work, returned by syevjBatched_bufferSize
- info: An integer array of dimension batchSize. If ErrInvalidValue is returned, info[0] = -i (less than zero) indicates i-th parameter is wrong (not counting handle). Otherwise, if info[i] = 0, the operation is successful. If info[i] = n+1, syevjBatched does not converge on i-th matrix under given tolerance and maximum sweeps
- params: Structure filled with parameters of Jacobi algorithm
- batchSize: Number of matrices
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER), or batchSize<0.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZheevjBatched.
func (Handle) ZheevjBatchedBufferSize ¶
func (h Handle) ZheevjBatchedBufferSize(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, w driver.DevicePtr, lwork *int32, params SyevjInfo, batchSize int32) error
ZheevjBatchedBufferSize returns the workspace size, in elements of complex128, for Handle.ZheevjBatched.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of Aj is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of Aj is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of Aj is stored
- n: Number of rows (or columns) of matrix each Aj
- a: array of dimension lda * n * batchSize with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of Aj contains the upper triangular part of the matrix Aj. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of Aj contains the lower triangular part of the matrix Aj. On exit, if jobz = EigModeVector, and info[j] = 0, Aj contains the orthonormal eigenvectors of the matrix Aj. If jobz = EigModeNovector, the contents of Aj are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix Aj
- w: A real array of dimension n*batchSize. It stores the eigenvalues of Aj in ascending order or non-sorting order
- lwork: Size of work, in elements of complex128
- params: Structure filled with parameters of Jacobi algorithm
- batchSize: Number of matrices
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER), or batchSize<0.
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZheevjBatchedBufferSize, bound as cusolverDnZheevjBatched_bufferSize.
func (Handle) ZheevjBufferSize ¶
func (h Handle) ZheevjBufferSize(jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, w driver.DevicePtr, lwork *int32, params SyevjInfo) error
ZheevjBufferSize returns the workspace size, in elements of complex128, for Handle.Zheevj.
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (or columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and info = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A
- w: A real array of dimension n. The eigenvalue values of A, in ascending order ie, sorted so that W(i) <= W(i+1)
- lwork: Size of work, in elements of complex128
- params: Structure filled with parameters of Jacobi algorithm and results of syevj
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZheevjBufferSize, bound as cusolverDnZheevj_bufferSize.
func (Handle) Zhegvd ¶
func (h Handle) Zhegvd(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, w driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Zhegvd computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix-pair ( A, B).
The generalized symmetric-definite eigenvalue problem is A*V = B*V*Λ if itype == EigType1, A*B*V = V*Λ if itype == EigType2, and B*A*V = V*Λ if itype == EigType3, where the matrix B is positive definite. Λ is a real n×n diagonal matrix. The diagonal elements of Λ are the eigenvalues of ( A, B) in ascending order. V is an n×n orthogonal matrix. The eigenvectors are normalized as follows: Vᴴ*B*V = I if itype == EigType1 or EigType2, and Vᴴ*inv(B)*V = I if itype == EigType3. The input parameter lwork is size of the working space, and it is returned by sygvd_bufferSize(). If devInfo = i (i > 0 and i<=n) and jobz = EigModeNovector, i off-diagonal elements of an intermediate tridiagonal form did not converge to zero. If devInfo = N + i (i > 0), then the leading minor of order i of B is not positive definite. The factorization of B could not be completed and no eigenvalues or eigenvectors were computed. if jobz = EigModeVector, A contains the orthogonal eigenvectors of the matrix A. The eigenvectors are computed by divide and conquer algorithm. Please visit cuSOLVER Library Samples - sygvd for a code example.
- itype: Specifies the problem type to be solved: itype =[EigType1]: A*x = (lambda)*B*x. itype =[EigType2]: A*B*x = (lambda)*x. itype =[EigType3]: B*A*x = (lambda)*x
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A and B are stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A and B are stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A and B are stored
- n: Number of rows (or columns) of matrix A and B
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- b: array of dimension ldb * n. If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of B contains the upper triangular part of the matrix B. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of B contains the lower triangular part of the matrix B. On exit, if devInfo is less than n, B is overwritten by triangular factor U or L from the Cholesky factorization of B
- ldb: Leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n)
- w: A real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1)
- work: Working space, array of size lwork
- lwork: Size of work, returned by sygvd_bufferSize
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or ldb<max(1,n), or itype is not 1, 2 or 3, or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZhegvd.
func (Handle) ZhegvdBufferSize ¶
func (h Handle) ZhegvdBufferSize(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, w driver.DevicePtr) (int32, error)
ZhegvdBufferSize returns the workspace size, in elements of complex128, for Handle.Zhegvd.
- itype: Specifies the problem type to be solved: itype =[EigType1]: A*x = (lambda)*B*x. itype =[EigType2]: A*B*x = (lambda)*x. itype =[EigType3]: B*A*x = (lambda)*x
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A and B are stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A and B are stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A and B are stored
- n: Number of rows (or columns) of matrix A and B
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- b: array of dimension ldb * n. If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of B contains the upper triangular part of the matrix B. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of B contains the lower triangular part of the matrix B. On exit, if devInfo is less than n, B is overwritten by triangular factor U or L from the Cholesky factorization of B
- ldb: Leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n)
- w: A real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1)
- lwork: Size of work, in elements of complex128
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or ldb<max(1,n), or itype is not 1, 2 or 3, or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZhegvdBufferSize, bound as cusolverDnZhegvd_bufferSize.
func (Handle) Zhegvdx ¶
func (h Handle) Zhegvdx(itype EigType, jobz EigMode, range_ EigRange, uplo FillMode, n int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, vl float64, vu float64, il int32, iu int32, meig *int32, w driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Zhegvdx computes all or selection of the eigenvalues and optionally eigenvectors of a symmetric (Hermitian) n×n matrix-pair ( A, B).
The generalized symmetric-definite eigenvalue problem is A*V = B*V*Λ if itype == EigType1, A*B*V = V*Λ if itype == EigType2, and B*A*V = V*Λ if itype == EigType3, where the matrix B is positive definite. Λ is a real n×h_meig diagonal matrix. The diagonal elements of Λ are the eigenvalues of ( A, B) in ascending order. V is an n×h_meig orthogonal matrix. h_meig is the number of eigenvalues/eigenvectors computed by the routine, h_meig is equal to n when the whole spectrum (for example, range = EigRangeAll) is requested. The eigenvectors are normalized as follows: Vᴴ*B*V = I if itype == EigType1 or EigType2, and Vᴴ*inv(B)*V = I if itype == EigType3. The input parameter lwork is size of the working space, and it is returned by sygvdx_bufferSize(). If devInfo = i (i > 0 and i<=n) and jobz = EigModeNovector, i off-diagonal elements of an intermediate tridiagonal form did not converge to zero. If devInfo = n + i (i > 0), then the leading minor of order i of B is not positive definite. The factorization of B could not be completed and no eigenvalues or eigenvectors were computed. If jobz = EigModeVector, A contains the orthogonal eigenvectors of the matrix A. The eigenvectors are computed by divide and conquer algorithm. Please visit cuSOLVER Library Samples - sygvdx for a code example.
- itype: Specifies the problem type to be solved: itype =[EigType1]: A*x = (lambda)*B*x; itype =[EigType2]: A*B*x = (lambda)*x; itype =[EigType3]: B*A*x = (lambda)*x
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- range_: Specifies options to which selection of eigenvalues and optionally eigenvectors that need to be computed: range = EigRangeAll : all eigenvalues/eigenvectors will be found, will becomes the classical syevd/heevd routine; range = EigRangeV : all eigenvalues/eigenvectors in the half-open interval (vl,vu] will be found; range = EigRangeI : the il-th through iu-th eigenvalues/eigenvectors will be found
- uplo: Specifies which part of A and B are stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A and B are stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A and B are stored
- n: Number of rows (or columns) of matrix A and B
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- b: array of dimension ldb * n. If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of B contains the upper triangular part of the matrix B. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of B contains the lower triangular part of the matrix B. On exit, if devInfo is less than n, B is overwritten by triangular factor U or L from the Cholesky factorization of B
- ldb: Leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n)
- vl: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user want to be sure not to miss any eigenvalue within the interval bound, we suggest that, the user subtract/add epsilon (machine precision) to the interval bound such as ( vl = vl- eps, vu = vu + eps]. this suggestion is valid for any selective routine from cuSolver or LAPACK
- vu: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user want to be sure not to miss any eigenvalue within the interval bound, we suggest that, the user subtract/add epsilon (machine precision) to the interval bound such as ( vl = vl- eps, vu = vu + eps]. this suggestion is valid for any selective routine from cuSolver or LAPACK
- il: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- iu: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- w: A real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1)
- work: Working space, array of size lwork
- lwork: Size of work, returned by sygvdx_bufferSize
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or ldb<max(1,n), or itype is not EigType1 or EigType2 or EigType3 or jobz is not EigModeNovector or CUSOLVER_EIG_MODE_VECTORL, or range is not EigRangeAll or EigRangeV or EigRangeI, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZhegvdx.
func (Handle) ZhegvdxBufferSize ¶
func (h Handle) ZhegvdxBufferSize(itype EigType, jobz EigMode, range_ EigRange, uplo FillMode, n int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, vl float64, vu float64, il int32, iu int32, w driver.DevicePtr) (meig int32, lwork int32, err error)
ZhegvdxBufferSize returns the workspace size, in elements of complex128, for Handle.Zhegvdx.
- itype: Specifies the problem type to be solved: itype =[EigType1]: A*x = (lambda)*B*x; itype =[EigType2]: A*B*x = (lambda)*x; itype =[EigType3]: B*A*x = (lambda)*x
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- range_: Specifies options to which selection of eigenvalues and optionally eigenvectors that need to be computed: range = EigRangeAll : all eigenvalues/eigenvectors will be found, will becomes the classical syevd/heevd routine; range = EigRangeV : all eigenvalues/eigenvectors in the half-open interval (vl,vu] will be found; range = EigRangeI : the il-th through iu-th eigenvalues/eigenvectors will be found
- uplo: Specifies which part of A and B are stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A and B are stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A and B are stored
- n: Number of rows (or columns) of matrix A and B
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and devInfo = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- b: array of dimension ldb * n. If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of B contains the upper triangular part of the matrix B. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of B contains the lower triangular part of the matrix B. On exit, if devInfo is less than n, B is overwritten by triangular factor U or L from the Cholesky factorization of B
- ldb: Leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n)
- vl: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user want to be sure not to miss any eigenvalue within the interval bound, we suggest that, the user subtract/add epsilon (machine precision) to the interval bound such as ( vl = vl- eps, vu = vu + eps]. this suggestion is valid for any selective routine from cuSolver or LAPACK
- vu: Real values float or double for (C, S) or (Z, D) precision respectively. If range = EigRangeV, the lower and upper bounds of the interval to be searched for eigenvalues. vl > vu. Not referenced if range = EigRangeAll or range = EigRangeI. Note that, if eigenvalues are very close to each other, it is well known that two different eigenvalues routines might find slightly different number of eigenvalues inside the same interval. This is due to the fact that different eigenvalue algorithms, or even same algorithm but different run might find eigenvalues within some rounding error close to the machine precision. Thus, if the user want to be sure not to miss any eigenvalue within the interval bound, we suggest that, the user subtract/add epsilon (machine precision) to the interval bound such as ( vl = vl- eps, vu = vu + eps]. this suggestion is valid for any selective routine from cuSolver or LAPACK
- il: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- iu: Integer. If range = EigRangeI, the indices (in ascending order) of the smallest and largest eigenvalues to be returned. 1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0. Not referenced if range = EigRangeAll or range = EigRangeV
- w: A real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1)
- lwork: Size of work, in elements of complex128
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or ldb<max(1,n), or itype is not EigType1 or EigType2 or EigType3 or jobz is not EigModeNovector or CUSOLVER_EIG_MODE_VECTORL, or range is not EigRangeAll or EigRangeV or EigRangeI, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZhegvdxBufferSize, bound as cusolverDnZhegvdx_bufferSize.
func (Handle) Zhegvj ¶
func (h Handle) Zhegvj(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, w driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr, params SyevjInfo) error
Zhegvj computes eigenvalues and eigenvectors of a symmetric (Hermitian) n×n matrix-pair ( A, B).
The generalized symmetric-definite eigenvalue problem is A*V = B*V*Λ if itype == EigType1, A*B*V = V*Λ if itype == EigType2, and B*A*V = V*Λ if itype == EigType3, where the matrix B is positive definite. Λ is a real n×n diagonal matrix. The diagonal elements of Λ are the eigenvalues of ( A, B) in ascending order. V is an n×n orthogonal matrix. The eigenvectors are normalized as follows: Vᴴ*B*V = I if itype == EigType1 or EigType2, and Vᴴ*inv(B)*V = I if itype == EigType3. This function has the same functionality as sygvd except that syevd in sygvd is replaced by syevj in sygvj. Therefore, sygvj inherits properties of syevj, the user can use SyevjInfo.XsyevjSetTolerance and SyevjInfo.XsyevjSetMaxSweeps to configure tolerance and maximum sweeps. However the meaning of residual is different from syevj. sygvj first computes Cholesky factorization of matrix B, B=L*Lᴴ transform the problem to standard eigenvalue problem, then calls syevj. For example, the standard eigenvalue problem of type I is M*Q=Q*Λ where matrix M is symmetric M=L⁻¹*A*L⁻ᴴ The residual is the result of syevj on matrix M, not A. The input parameter lwork is the size of the working space, and it is returned by sygvj_bufferSize(). If output parameter info = -i (less than zero), the i-th parameter is wrong (not counting handle). If info = i (i > 0 and i<=n), B is not positive definite, the factorization of B could not be completed and no eigenvalues or eigenvectors were computed. If info = n+1, syevj does not converge under given tolerance and maximum sweeps. In this case, the eigenvalues and eigenvectors are still computed because non-convergence comes from improper tolerance of maximum sweeps. if jobz = EigModeVector, A contains the orthogonal eigenvectors V. Please visit cuSOLVER Library Samples - sygvj for a code example.
- itype: Specifies the problem type to be solved: itype =[EigType1]: A*x = (lambda)*B*x. itype =[EigType2]: A*B*x = (lambda)*x. itype =[EigType3]: B*A*x = (lambda)*x
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A and B are stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A and B are stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A and B are stored
- n: Number of rows (or columns) of matrix A and B
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and info = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- b: array of dimension ldb * n. If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of B contains the upper triangular part of the matrix B. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of B contains the lower triangular part of the matrix B. On exit, if info is less than n, B is overwritten by triangular factor U or L from the Cholesky factorization of B
- ldb: Leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n)
- w: A real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1)
- work: Working space, array of size lwork
- lwork: Size of work, returned by sygvj_bufferSize
- info: If info = 0, the operation is successful. if info = -i, the i-th parameter is wrong (not counting handle). If info = i (> 0), info indicates either B is not positive definite or syevj (called by sygvj) does not converge
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or ldb<max(1,n), or itype is not 1, 2 or 3, or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZhegvj.
func (Handle) ZhegvjBufferSize ¶
func (h Handle) ZhegvjBufferSize(itype EigType, jobz EigMode, uplo FillMode, n int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, w driver.DevicePtr, lwork *int32, params SyevjInfo) error
ZhegvjBufferSize returns the workspace size, in elements of complex128, for Handle.Zhegvj.
- itype: Specifies the problem type to be solved: itype =[EigType1]: A*x = (lambda)*B*x. itype =[EigType2]: A*B*x = (lambda)*x. itype =[EigType3]: B*A*x = (lambda)*x
- jobz: Specifies options to either compute eigenvalue only or compute eigen-pair: jobz = EigModeNovector : Compute eigenvalues only; jobz = EigModeVector : Compute eigenvalues and eigenvectors
- uplo: Specifies which part of A and B are stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A and B are stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A and B are stored
- n: Number of rows (or columns) of matrix A and B
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A. On exit, if jobz = EigModeVector, and info = 0, A contains the orthonormal eigenvectors of the matrix A. If jobz = EigModeNovector, the contents of A are destroyed
- lda: Leading dimension of two-dimensional array used to store matrix A. lda is not less than max(1,n)
- b: array of dimension ldb * n. If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of B contains the upper triangular part of the matrix B. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of B contains the lower triangular part of the matrix B. On exit, if info is less than n, B is overwritten by triangular factor U or L from the Cholesky factorization of B
- ldb: Leading dimension of two-dimensional array used to store matrix B. ldb is not less than max(1,n)
- w: A real array of dimension n. The eigenvalue values of A, sorted so that W(i) >= W(i+1)
- lwork: Size of work, in elements of complex128
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or ldb<max(1,n), or itype is not 1, 2 or 3, or jobz is not EigModeNovector or EigModeVector, or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZhegvjBufferSize, bound as cusolverDnZhegvj_bufferSize.
func (Handle) Zhetrd ¶
func (h Handle) Zhetrd(uplo FillMode, n int32, a driver.DevicePtr, lda int32, d driver.DevicePtr, e driver.DevicePtr, tau driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Zhetrd reduces a general symmetric (Hermitian) n×n matrix A to real symmetric tridiagonal form T by an orthogonal transformation: Qᴴ*A*Q=T.
As an output, A contains T and householder reflection vectors. If uplo = CUBLAS_FILL_MODE_UPPER, the diagonal and first superdiagonal of A are overwritten by the corresponding elements of the tridiagonal matrix T, and the elements above the first superdiagonal, with the array tau, represent the orthogonal matrix Q as a product of elementary reflectors; If uplo = CUBLAS_FILL_MODE_LOWER, the diagonal and first subdiagonal of A are overwritten by the corresponding elements of the tridiagonal matrix T, and the elements below the first subdiagonal, with the array tau, represent the orthogonal matrix Q as a product of elementary reflectors. The input parameter lwork is size of the working space, and it is returned by sytrd_bufferSize(). Note that the problem size n is limited by a condition n*lda < INT32_MAX primarily due to the current implementation constraints.
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. On exit, A is overwritten by T and householder reflection vectors
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,n)
- d: Real array of dimension n. The diagonal elements of the tridiagonal matrix T: D(i) = A(i,i)
- e: Real array of dimension (n-1). The off-diagonal elements of the tridiagonal matrix T: if uplo = CUBLAS_FILL_MODE_UPPER, E(i) = A(i,i+1). if uplo = CUBLAS_FILL_MODE_LOWER E(i) = A(i+1,i)
- tau: array of dimension (n-1). The scalar factors of the elementary reflectors which represent the orthogonal matrix Q
- work: Working space, array of size lwork
- lwork: Size of work, returned by sytrd_bufferSize
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZhetrd.
func (Handle) ZhetrdBufferSize ¶
func (h Handle) ZhetrdBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32, d driver.DevicePtr, e driver.DevicePtr, tau driver.DevicePtr) (int32, error)
ZhetrdBufferSize returns the workspace size, in elements of complex128, for Handle.Zhetrd.
- uplo: Specifies which part of A is stored. uplo = CUBLAS_FILL_MODE_LOWER: Lower triangle of A is stored. uplo = CUBLAS_FILL_MODE_UPPER: Upper triangle of A is stored
- n: Number of rows (columns) of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n). If uplo = CUBLAS_FILL_MODE_UPPER, the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If uplo = CUBLAS_FILL_MODE_LOWER, the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. On exit, A is overwritten by T and householder reflection vectors
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,n)
- tau: array of dimension (n-1). The scalar factors of the elementary reflectors which represent the orthogonal matrix Q
- lwork: Size of work, in elements of complex128
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, or lda<max(1,n), or uplo is not CUBLAS_FILL_MODE_LOWER or CUBLAS_FILL_MODE_UPPER).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZhetrdBufferSize, bound as cusolverDnZhetrd_bufferSize.
func (Handle) Zlaswp ¶
func (h Handle) Zlaswp(n int32, a driver.DevicePtr, lda int32, k1 int32, k2 int32, devIpiv driver.DevicePtr, incx int32) error
Zlaswp wraps cusolverDnZlaswp.
func (Handle) Zlauum ¶
func (h Handle) Zlauum(uplo FillMode, n int32, a driver.DevicePtr, lda int32, work driver.DevicePtr, lwork int32, devInfo driver.DevicePtr) error
Zlauum wraps cusolverDnZlauum.
func (Handle) ZlauumBufferSize ¶
func (h Handle) ZlauumBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32) (int32, error)
ZlauumBufferSize wraps cusolverDnZlauumBufferSize.
Wraps cusolverDnZlauumBufferSize, bound as cusolverDnZlauum_bufferSize.
func (Handle) Zpotrf ¶
func (h Handle) Zpotrf(uplo FillMode, n int32, a driver.DevicePtr, lda int32, workspace driver.DevicePtr, lwork int32, devInfo driver.DevicePtr) error
Zpotrf computes the Cholesky factorization of a Hermitian positive-definite matrix.
A is an n×n Hermitian matrix, only the lower or upper part is meaningful. The input parameter uplo indicates which part of the matrix is used. The function will leave the other part untouched. If input parameter uplo is CUBLAS_FILL_MODE_LOWER, only the lower triangular part of A is processed, and replaced by the lower triangular Cholesky factor L. A=L*Lᴴ If input parameter uplo is CUBLAS_FILL_MODE_UPPER, only upper triangular part of A is processed, and replaced by upper triangular Cholesky factor U. A=Uᴴ*U The input parameter Lwork is size of the working space, and it is returned by potrf_bufferSize(). If Cholesky factorization failed, i.e. some leading minor of A is not positive definite, or equivalently some diagonal elements of L or U is not a real number. The output parameter devInfo would indicate smallest leading minor of A which is not positive definite.
- uplo: Indicates if matrix A lower or upper part is stored; the other part is not referenced
- n: Number of rows and columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- workspace: Working space, array of size Lwork
- lwork: Size of Workspace, returned by potrf_bufferSize
- devInfo: If devInfo = 0, the Cholesky factorization is successful. if devInfo = -i, the i-th parameter is wrong (not counting handle). if devInfo = i, the leading minor of order i is not positive definite
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZpotrf.
func (Handle) ZpotrfBatched ¶
func (h Handle) ZpotrfBatched(uplo FillMode, n int32, aarray driver.DevicePtr, lda int32, infoArray driver.DevicePtr, batchSize int32) error
ZpotrfBatched computes the Cholesky factorization of a sequence of Hermitian positive-definite matrices.
Each Aarray[i] for i=0,1,..., batchSize-1 is a n×n Hermitian matrix, only lower or upper part is meaningful. The input parameter uplo indicates which part of the matrix is used. If input parameter uplo is CUBLAS_FILL_MODE_LOWER, only lower triangular part of A is processed, and replaced by lower triangular Cholesky factor L. A=L*Lᴴ If input parameter uplo is CUBLAS_FILL_MODE_UPPER, only upper triangular part of A is processed, and replaced by upper triangular Cholesky factor U. A=Uᴴ*U If Cholesky factorization failed, i.e. some leading minor of A is not positive definite, or equivalently some diagonal elements of L or U is not a real number. The output parameter infoArray would indicate smallest leading minor of A which is not positive definite. infoArray is an integer array of size batchsize. If potrfBatched returns ErrInvalidValue, infoArray[0] = -i (less than zero), meaning that the i-th parameter is wrong (not counting handle). If potrfBatched returns Success but infoArray[i] = k is positive, then i-th matrix is not positive definite and the Cholesky factorization failed at row k. Remark: the other part of A is used as a workspace. For example, if uplo is CUBLAS_FILL_MODE_UPPER, upper triangle of A contains Cholesky factor U and lower triangle of A is destroyed after potrfBatched.
- uplo: Indicates if lower or upper part is stored; the other part is used as a workspace
- n: Number of rows and columns of matrix A
- aarray: Array of pointers to array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store each matrix Aarray[i]
- infoArray: Array of size batchSize. infoArray[i] contains information of factorization of Aarray[i]. if potrfBatched returns ErrInvalidValue, infoArray[0] = -i (less than zero) means the i-th parameter is wrong (not counting handle). if potrfBatched returns Success, infoArray[i] = 0 means the Cholesky factorization of i-th matrix is successful, and infoArray[i] = k means the leading submatrix of order k of i-th matrix is not positive definite
- batchSize: Number of pointers in Aarray
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n) or batchSize<1).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZpotrfBatched.
func (Handle) ZpotrfBufferSize ¶
func (h Handle) ZpotrfBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32) (int32, error)
ZpotrfBufferSize returns the workspace size, in elements of complex128, for Handle.Zpotrf.
- uplo: Indicates if matrix A lower or upper part is stored; the other part is not referenced
- n: Number of rows and columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- lwork: Size of Workspace, in elements of complex128
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZpotrfBufferSize, bound as cusolverDnZpotrf_bufferSize.
func (Handle) Zpotri ¶
func (h Handle) Zpotri(uplo FillMode, n int32, a driver.DevicePtr, lda int32, work driver.DevicePtr, lwork int32, devInfo driver.DevicePtr) error
Zpotri computes the inverse of a positive-definite matrix A using the Cholesky factorization.
A=L*Lᴴ=Uᴴ*U, computed by potrf(). A is an n×n matrix containing the triangular factor L or U computed by the Cholesky factorization. Only lower or upper part is meaningful and the input parameter uplo indicates which part of the matrix is used. The function would leave the other part untouched. If the input parameter uplo is CUBLAS_FILL_MODE_LOWER, only lower triangular part of A is processed, and replaced the by lower triangular part of the inverse of A. If the input parameter uplo is CUBLAS_FILL_MODE_UPPER, only upper triangular part of A is processed, and replaced by the upper triangular part of the inverse of A. The input parameter Lwork is the size of the working space, returned by potri_bufferSize(). If the computation of the inverse fails, i.e. some leading minor of L or U, is null, the output parameter devInfo would indicate the smallest leading minor of L or U which is not positive definite.
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- n: Number of rows and columns of matrix A
- a: array of dimension lda * n where lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- lwork: Size of Workspace, returned by potri_bufferSize
- devInfo: If devInfo = 0, the computation of the inverse is successful. if devInfo = -i, the i-th parameter is wrong (not counting handle). if devInfo = i, the leading minor of order i is zero
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZpotri.
func (Handle) ZpotriBufferSize ¶
func (h Handle) ZpotriBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32) (int32, error)
ZpotriBufferSize returns the workspace size, in elements of complex128, for Handle.Zpotri.
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- n: Number of rows and columns of matrix A
- a: array of dimension lda * n where lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- lwork: Size of Workspace, in elements of complex128
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZpotriBufferSize, bound as cusolverDnZpotri_bufferSize.
func (Handle) Zpotrs ¶
func (h Handle) Zpotrs(uplo FillMode, n int32, nrhs int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, devInfo driver.DevicePtr) error
Zpotrs solves a system of linear equations.
A*X=B, where A is an n×n Hermitian matrix, only lower or upper part is meaningful. The input parameter uplo indicates which part of the matrix is used. The function will leave the other part untouched. The user has to call potrf first to factorize matrix A. If input parameter uplo is CUBLAS_FILL_MODE_LOWER, A is lower triangular Cholesky factor L corresponding to A=L*Lᴴ . If input parameter uplo is CUBLAS_FILL_MODE_UPPER, A is upper triangular Cholesky factor U corresponding to A=Uᴴ*U . The operation is in-place, i.e. matrix X overwrites matrix B with the same leading dimension ldb.
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- n: Number of rows and columns of matrix A
- nrhs: Number of columns of matrix X and B
- 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
- lda: Leading dimension of two-dimensional array used to store matrix A
- 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
- devInfo: If devInfo = 0, the Cholesky factorization is successful. if devInfo = -i, the i-th parameter is wrong (not counting handle)
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, nrhs<0, lda<max(1,n) or ldb<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZpotrs.
func (Handle) ZpotrsBatched ¶
func (h Handle) ZpotrsBatched(uplo FillMode, n int32, nrhs int32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, dInfo driver.DevicePtr, batchSize int32) error
ZpotrsBatched solves a sequence of linear systems.
A[i]*X[i]=B[i], where each Aarray[i] for i=0,1,..., batchSize-1 is a n×n Hermitian matrix, only lower or upper part is meaningful. The input parameter uplo indicates which part of the matrix is used. The user has to call potrfBatched first to factorize matrix Aarray[i]. If input parameter uplo is CUBLAS_FILL_MODE_LOWER, A is lower triangular Cholesky factor L corresponding to A=L*Lᴴ . If input parameter uplo is CUBLAS_FILL_MODE_UPPER, A is upper triangular Cholesky factor U corresponding to A=Uᴴ*U . The operation is in-place, i.e. matrix X overwrites matrix B with the same leading dimension ldb. The output parameter info is a scalar. If info = -i (less than zero), the i-th parameter is wrong (not counting handle). Remark 1: only nrhs=1 is supported. Remark 2: infoArray from potrfBatched indicates if the matrix is positive definite. info from potrsBatched only shows which input parameter is wrong (not counting handle). Remark 3: the other part of A is used as a workspace. For example, if uplo is CUBLAS_FILL_MODE_UPPER, upper triangle of A contains Cholesky factor U and lower triangle of A is destroyed after potrsBatched. Please visit cuSOLVER Library Samples - potrfBatched for a code example.
- uplo: Indicates if matrix A lower or upper part is stored
- n: Number of rows and columns of matrix A
- nrhs: Number of columns of matrix X and B
- lda: Leading dimension of two-dimensional array used to store each matrix Aarray[i]
- ldb: Leading dimension of two-dimensional array used to store each matrix Barray[i]
- batchSize: Number of pointers in Aarray
Errors:
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0, nrhs<0, lda<max(1,n), ldb<max(1,n) or batchSize<0).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZpotrsBatched.
func (Handle) Zsytrf ¶
func (h Handle) Zsytrf(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ipiv driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Zsytrf computes the factorization of a symmetric indefinite matrix using the Bunch-Kaufman diagonal pivoting.
A is a n×n symmetric matrix, only lower or upper part is meaningful. The input parameter uplo indicates which part of the matrix is used. If devIpiv is null, no pivoting is performed, which is not numerically stable. If input parameter uplo is CUBLAS_FILL_MODE_LOWER, only lower triangular part of A is processed, and replaced by lower triangular factor L and block diagonal matrix D. Each block of D is either 1x1 or 2x2 block, depending on pivoting. P*A*Pᵀ=L*D*Lᵀ If input parameter uplo is CUBLAS_FILL_MODE_UPPER, only upper triangular part of A is processed, and replaced by upper triangular factor U and block diagonal matrix D. P*A*Pᵀ=U*D*Uᵀ The input parameter lwork is size of the working space, and it is returned by sytrf_bufferSize(). When no pivoting is performed, the other triangular part of the input matrix A is used as workspace. If Bunch-Kaufman factorization failed, i.e. A is singular. The output parameter devInfo = i would indicate D(i,i)=0. The output parameter devIpiv contains pivoting sequence. If devIpiv(i) = k > 0, D(i,i) is 1x1 block, and i-th row/column of A is interchanged with k-th row/column of A. If uplo is CUBLAS_FILL_MODE_UPPER and devIpiv(i-1) = devIpiv(i) = -m < 0, D(i-1:i,i-1:i) is a 2x2 block, and (i-1)-th row/column is interchanged with m-th row/column. If uplo is CUBLAS_FILL_MODE_LOWER and devIpiv(i+1) = devIpiv(i) = -m < 0, D(i:i+1,i:i+1) is a 2x2 block, and (i+1)-th row/column is interchanged with m-th row/column.
- uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced
- n: Number of rows and columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- work: Working space, array of size lwork
- lwork: Size of working space work
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZsytrf.
func (Handle) ZsytrfBufferSize ¶
ZsytrfBufferSize returns the workspace size, in elements of complex128, for Handle.Zsytrf.
- n: Number of rows and columns of matrix A
- a: array of dimension lda * n with lda is not less than max(1,n)
- lda: Leading dimension of two-dimensional array used to store matrix A
- lwork: Size of work, in elements of complex128
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or lda<max(1,n)).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZsytrfBufferSize, bound as cusolverDnZsytrf_bufferSize.
func (Handle) Zsytri ¶
func (h Handle) Zsytri(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ipiv driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Zsytri wraps cusolverDnZsytri.
func (Handle) ZsytriBufferSize ¶
func (h Handle) ZsytriBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ipiv driver.DevicePtr) (int32, error)
ZsytriBufferSize wraps cusolverDnZsytriBufferSize.
Wraps cusolverDnZsytriBufferSize, bound as cusolverDnZsytri_bufferSize.
func (Handle) Zungbr ¶
func (h Handle) Zungbr(side SideMode, m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Zungbr generates one of the unitary matrices Q or P**H determined by gebrd when reducing a matrix A to bidiagonal form: Qᴴ*A*P=B.
Q and P**H are defined as products of elementary reflectors H(i) or G(i) respectively. The input parameter lwork is size of the working space, and it is returned by orgbr_bufferSize().
- side: If side = CUBLAS_SIDE_LEFT, generate Q. if side = CUBLAS_SIDE_RIGHT, generate P**T
- m: Number of rows of matrix Q or P**T
- n: If side = CUBLAS_SIDE_LEFT, m>= n>= min(m,k). if side = CUBLAS_SIDE_RIGHT, n>= m>= min(n,k)
- k: If side = CUBLAS_SIDE_LEFT, the number of columns in the original m-by-k matrix reduced by gebrd. if side = CUBLAS_SIDE_RIGHT, the number of rows in the original k-by-n matrix reduced by gebrd
- 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
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m)
- 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
- work: Working space, array of size lwork
- lwork: Size of working array work
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or wrong lda ).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZungbr.
func (Handle) ZungbrBufferSize ¶
func (h Handle) ZungbrBufferSize(side SideMode, m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr) (int32, error)
ZungbrBufferSize returns the workspace size, in elements of complex128, for Handle.Zungbr.
- side: If side = CUBLAS_SIDE_LEFT, generate Q. if side = CUBLAS_SIDE_RIGHT, generate P**T
- m: Number of rows of matrix Q or P**T
- n: If side = CUBLAS_SIDE_LEFT, m>= n>= min(m,k). if side = CUBLAS_SIDE_RIGHT, n>= m>= min(n,k)
- k: If side = CUBLAS_SIDE_LEFT, the number of columns in the original m-by-k matrix reduced by gebrd. if side = CUBLAS_SIDE_RIGHT, the number of rows in the original k-by-n matrix reduced by gebrd
- 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
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m)
- 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
- lwork: Size of work, in elements of complex128
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or wrong lda ).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZungbrBufferSize, bound as cusolverDnZungbr_bufferSize.
func (Handle) Zungqr ¶
func (h Handle) Zungqr(m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Zungqr overwrites m×n matrix A.
Q=H(1)*H(2)*...*H(k), where Q is a unitary matrix formed by a sequence of elementary reflection vectors stored in A. The input parameter lwork is size of the working space, and it is returned by orgqr_bufferSize(). The user can combine geqrf, orgqr to complete orthogonalization.
- m: Number of rows of matrix Q. m >= 0
- n: Number of columns of matrix Q. m >= n >= 0
- k: Number of elementary reflections whose product defines the matrix Q. n >= k >= 0
- a: array of dimension lda * n with lda is not less than max(1,m). i-th column of A contains elementary reflection vector
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m)
- tau: array of dimension k. tau(i) is the scalar of i-th elementary reflection vector
- work: Working space, array of size lwork
- lwork: Size of working array work
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n,k<0, n>m, k>n or lda<m).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZungqr.
func (Handle) ZungqrBufferSize ¶
func (h Handle) ZungqrBufferSize(m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr) (int32, error)
ZungqrBufferSize returns the workspace size, in elements of complex128, for Handle.Zungqr.
- m: Number of rows of matrix Q. m >= 0
- n: Number of columns of matrix Q. m >= n >= 0
- k: Number of elementary reflections whose product defines the matrix Q. n >= k >= 0
- a: array of dimension lda * n with lda is not less than max(1,m). i-th column of A contains elementary reflection vector
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,m)
- tau: array of dimension k. tau(i) is the scalar of i-th elementary reflection vector
- lwork: Size of work, in elements of complex128
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n,k<0, n>m, k>n or lda<m).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZungqrBufferSize, bound as cusolverDnZungqr_bufferSize.
func (Handle) Zungtr ¶
func (h Handle) Zungtr(uplo FillMode, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Zungtr generates a unitary matrix Q which is defined as the product of n-1 elementary reflectors of order n, as returned by sytrd:
The input parameter lwork is size of the working space, and it is returned by orgtr_bufferSize().
- 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
- n: Number of rows (columns) of matrix Q
- 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
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,n)
- tau: array of dimension (n-1) tau(i) is the scalar of i-th elementary reflection vector
- work: Working space, array of size lwork
- lwork: Size of working array work
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or wrong lda).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZungtr.
func (Handle) ZungtrBufferSize ¶
func (h Handle) ZungtrBufferSize(uplo FillMode, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr) (int32, error)
ZungtrBufferSize returns the workspace size, in elements of complex128, for Handle.Zungtr.
- 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
- n: Number of rows (columns) of matrix Q
- 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
- lda: Leading dimension of two-dimensional array used to store matrix A. lda >= max(1,n)
- tau: array of dimension (n-1) tau(i) is the scalar of i-th elementary reflection vector
- lwork: Size of work, in elements of complex128
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( n<0 or wrong lda).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZungtrBufferSize, bound as cusolverDnZungtr_bufferSize.
func (Handle) Zunmqr ¶
func (h Handle) Zunmqr(side SideMode, trans Operation, m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, c driver.DevicePtr, ldc int32, work driver.DevicePtr, lwork int32, devInfo driver.DevicePtr) error
Zunmqr overwrites m×n matrix C.
C = op(Q)*C if side == CUBLAS_SIDE_LEFT, and C = C*op(Q) if side == CUBLAS_SIDE_RIGHT. The operation of Q is defined by op(Q) = Q if trans == CUBLAS_OP_N, op(Q) = Qᵀ if trans == CUBLAS_OP_T, and op(Q) = Qᴴ if trans == CUBLAS_OP_C. Q is a unitary matrix formed by a sequence of elementary reflection vectors from QR factorization ( geqrf) of A. Q = H(1) H(2) … H(k) Q is of order m if side = CUBLAS_SIDE_LEFT and of order n if side = CUBLAS_SIDE_RIGHT. The input parameter lwork is size of the working space, and it is returned by geqrf_bufferSize() or ormqr_bufferSize(). The user can combine geqrf, ormqr and trsm to complete a linear solver or a least-square solver.
- side: Indicates if matrix Q is on the left or right of C
- trans: Operation op(Q) that is non- or (conj.) transpose
- m: Number of rows of matrix C
- n: Number of columns of matrix C
- k: Number of elementary reflections whose product defines the matrix Q. If side is CUBLAS_SIDE_LEFT, m >= k >= 0; if side is CUBLAS_SIDE_RIGHT, n >= k >= 0
- a: array of dimension lda * k with lda is not less than max(1,m). The matrix A is from geqrf, so i-th column contains elementary reflection vector
- 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)
- tau: array of dimension k. The vector tau is from geqrf, so tau(i) is the scalar of the i-th elementary reflection vector
- c: array of size ldc * n. On exit, C is overwritten by op(Q)*C or C*op(Q)
- ldc: Leading dimension of two-dimensional array of matrix C. ldc >= max(1,m)
- work: Working space, array of size lwork
- lwork: Size of working array work
- devInfo: If devInfo = 0, the ormqr is successful. If devInfo = -i, the i-th parameter is wrong (not counting handle)
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n,k<0, k > m if CUBLAS_SIDE_LEFT, k > n if CUBLAS_SIDE_RIGHT, wrong lda or ldc or invalid trans).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZunmqr.
func (Handle) ZunmqrBufferSize ¶
func (h Handle) ZunmqrBufferSize(side SideMode, trans Operation, m int32, n int32, k int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, c driver.DevicePtr, ldc int32) (int32, error)
ZunmqrBufferSize returns the workspace size, in elements of complex128, for Handle.Zunmqr.
- side: Indicates if matrix Q is on the left or right of C
- trans: Operation op(Q) that is non- or (conj.) transpose
- m: Number of rows of matrix C
- n: Number of columns of matrix C
- k: Number of elementary reflections whose product defines the matrix Q. If side is CUBLAS_SIDE_LEFT, m >= k >= 0; if side is CUBLAS_SIDE_RIGHT, n >= k >= 0
- a: array of dimension lda * k with lda is not less than max(1,m). The matrix A is from geqrf, so i-th column contains elementary reflection vector
- 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)
- tau: array of dimension k. The vector tau is from geqrf, so tau(i) is the scalar of the i-th elementary reflection vector
- c: array of size ldc * n. On exit, C is overwritten by op(Q)*C or C*op(Q)
- ldc: Leading dimension of two-dimensional array of matrix C. ldc >= max(1,m)
- lwork: Size of work, in elements of complex128
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n,k<0, k > m if CUBLAS_SIDE_LEFT, k > n if CUBLAS_SIDE_RIGHT, wrong lda or ldc or invalid trans).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZunmqrBufferSize, bound as cusolverDnZunmqr_bufferSize.
func (Handle) Zunmtr ¶
func (h Handle) Zunmtr(side SideMode, uplo FillMode, trans Operation, m int32, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, c driver.DevicePtr, ldc int32, work driver.DevicePtr, lwork int32, info driver.DevicePtr) error
Zunmtr overwrites m×n matrix C.
C = op(Q)*C if side == CUBLAS_SIDE_LEFT, and C = C*op(Q) if side == CUBLAS_SIDE_RIGHT, where Q is a unitary matrix formed by a sequence of elementary reflection vectors from sytrd. The operation on Q is defined by op(Q) = Q if trans == CUBLAS_OP_N, op(Q) = Qᵀ if trans == CUBLAS_OP_T, and op(Q) = Qᴴ if trans == CUBLAS_OP_C. The input parameter lwork is size of the working space, and it is returned by ormtr_bufferSize().
- side: side = CUBLAS_SIDE_LEFT, apply Q or Q**T from the Left; side = CUBLAS_SIDE_RIGHT, apply Q or Q**T from the Right
- 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
- trans: Operation op(Q) that is non- or (conj.) transpose
- m: Number of rows of matrix C
- n: Number of columns of matrix C
- 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
- 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)
- 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
- c: array of size ldc * n. On exit, C is overwritten by op(Q)*C or C*op(Q)
- ldc: Leading dimension of two-dimensional array of matrix C. ldc >= max(1,m)
- work: Working space, array of size lwork
- lwork: Size of working array work
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or wrong lda or ldc).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZunmtr.
func (Handle) ZunmtrBufferSize ¶
func (h Handle) ZunmtrBufferSize(side SideMode, uplo FillMode, trans Operation, m int32, n int32, a driver.DevicePtr, lda int32, tau driver.DevicePtr, c driver.DevicePtr, ldc int32) (int32, error)
ZunmtrBufferSize returns the workspace size, in elements of complex128, for Handle.Zunmtr.
- side: side = CUBLAS_SIDE_LEFT, apply Q or Q**T from the Left; side = CUBLAS_SIDE_RIGHT, apply Q or Q**T from the Right
- 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
- trans: Operation op(Q) that is non- or (conj.) transpose
- m: Number of rows of matrix C
- n: Number of columns of matrix C
- 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
- 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)
- 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
- c: array of size ldc * n. On exit, C is overwritten by op(Q)*C or C*op(Q)
- ldc: Leading dimension of two-dimensional array of matrix C. ldc >= max(1,m)
- lwork: Size of work, in elements of complex128
Errors:
- ErrArchMismatch: The device only supports compute capability 5.0 and above.
- ErrInternalError: An internal operation failed.
- ErrInvalidValue: Invalid parameters were passed ( m,n<0 or wrong lda or ldc).
- ErrNotInitialized: The library was not initialized.
Wraps cusolverDnZunmtrBufferSize, bound as cusolverDnZunmtr_bufferSize.
type IRSInfos ¶
type IRSInfos uintptr
IRSInfos is an opaque handle for cusolverDnIRSInfos_t.
func NewIRSInfos ¶
NewIRSInfos creates and initializes the Infos structure that will hold the refinement information of an Iterative Refinement Solver (IRS) call.
Such information includes the total number of iterations that was needed to converge ( Niters), the outer number of iterations (meaningful when two-levels preconditioner such as IrsRefineClassicalGmres is used ), the maximal number of iterations that was allowed for that call, and a pointer to the matrix of the convergence history residual norms. The Infos structure needs to be created before a call to an IRS solver. The Infos structure is valid for only one call to an IRS solver, since it holds info about that solve and thus each solve will requires its own Infos structure.
Errors:
- ErrAllocFailed: The resources could not be allocated.
Wraps cusolverDnIRSInfosCreate.
func (*IRSInfos) Close ¶
Close destroys and releases any memory required by the Infos structure.
This function destroys all the information (for example, Niters performed, OuterNiters performed, residual history etc.) about a solver call; thus, this function should only be called after the user is finished with the information.
Errors:
- ErrIrsInfosNotInitialized: The Infos structure was not created.
If i is zero, Close returns nil. Otherwise Close sets i to zero when the call succeeds and leaves it unchanged when it fails. Only i is zeroed: a copy of it still refers to the released object.
Wraps cusolverDnIRSInfosDestroy.
func (IRSInfos) MaxIters ¶
func (i IRSInfos) MaxIters() (CusolverInt, error)
MaxIters returns the maximal allowed number of iterations that was set for the corresponding call to the IRS solver.
Note that this function returns the setting that was set when that call happened and is not to be confused with the IRSParams.MaxIters which returns the current setting in the params configuration structure. To be clearer, the params structure can be used for many calls to an IRS solver. A user can change the allowed MaxIters between calls while the Infos structure in IRSInfos.MaxIters contains information about a particular call and cannot be reused for different calls, thus IRSInfos.MaxIters returns the allowed MaxIters for that call.
- maxiters: The maximal number of iterations that is currently set
Errors:
- ErrIrsInfosNotInitialized: The Infos structure was not created.
Wraps cusolverDnIRSInfosGetMaxIters.
func (IRSInfos) Niters ¶
func (i IRSInfos) Niters() (CusolverInt, error)
Niters returns the total number of iterations performed by the IRS solver.
If it was negative, it means that the IRS solver did not converge and if the user did not disable the fallback to full precision, then the fallback to a full precision solution happened and solution is good. Please refer to the description of negative niters values in the corresponding IRS linear solver functions such as cusolverDnXgesv() or cusolverDnXgels().
- niters: The total number of iterations performed by the IRS solver
Errors:
- ErrIrsInfosNotInitialized: The Infos structure was not created.
Wraps cusolverDnIRSInfosGetNiters.
func (IRSInfos) OuterNiters ¶
func (i IRSInfos) OuterNiters() (CusolverInt, error)
OuterNiters returns the number of iterations performed by the outer refinement loop of the IRS solver.
When the refinement solver consists of a one-level solver such as IrsRefineClassical or IrsRefineGmres, it is the same as Niters. When the refinement solver consists of a two-levels solver such as IrsRefineClassicalGmres or IrsRefineGmresGmres, it is the number of iterations of the outer loop. Refer to the description of the IRSRefinement for more details.
- outerNiters: The number of iterations of the outer refinement loop of the IRS solver
Errors:
- ErrIrsInfosNotInitialized: The Infos structure was not created.
Wraps cusolverDnIRSInfosGetOuterNiters.
func (IRSInfos) RequestResidual ¶
RequestResidual tells the IRS solver to store the convergence history (residual norms) of the refinement phase in a matrix that can be accessed via a pointer returned by the IRSInfos.ResidualHistory function.
Errors:
- ErrIrsInfosNotInitialized: The Infos structure was not created.
Wraps cusolverDnIRSInfosRequestResidual.
func (IRSInfos) ResidualHistory ¶
ResidualHistory returns the residual norms of the refinement phase, when their history was requested before the solve.
If the user called IRSInfos.RequestResidual before the call to the IRS function, then the IRS solver will store the convergence history (residual norms) of the refinement phase in a matrix that can be accessed via a pointer returned by this function.
The datatype of the residual norms depends on the input and output data type. If the Inputs/Outputs datatype is double precision real or complex (CUSOLVER_R_FP64 or CUSOLVER_C_FP64), this residual will be of type real double precision (FP64) double, otherwise if the Inputs/Outputs datatype is single precision real or complex (CUSOLVER_R_FP32 or CUSOLVER_C_FP32), this residual will be real single precision FP32 float. The residual history matrix consists of two columns (even for the multiple right-hand side case NRHS) of MaxIters+1 row, thus a matrix of size ( MaxIters+1,2). Only the first OuterNiters+1 rows contains the residual norms the other (e.g., OuterNiters+2:Maxiters+1) are garbage. On the first column, each row “i” specify the total number of iterations happened till this outer iteration “i” and on the second columns the residual norm corresponding to this outer iteration “i”. Thus, the first row (e.g., outer iteration “0”) consists of the initial residual (e.g., the residual before the refinement loop start) then the consecutive rows are the residual obtained at each outer iteration of the refinement loop. Note, it only consists of the history of the outer loop. If the refinement solver was IrsRefineClassical or IrsRefineGmres, then OuterNiters=Niters (Niters is the total number of iterations performed) and there is Niters+1 rows of norms that correspond to the Niters outer iterations. If the refinement solver was IrsRefineClassicalGmres or IrsRefineGmresGmres, then OuterNiters <= Niters corresponds to the outer iterations performed by the outer refinement loop. Thus, there is OuterNiters+1 residual norms where row “i” correspond to the outer iteration “i” and the first column specify the total number of iterations (outer and inner) that were performed till this step the second columns correspond to the residual norm at this step. For example, let’s say the user specifies IrsRefineClassicalGmres as a refinement solver and say it needed 3 outer iterations to converge and 4,3,3 inner iterations at each outer, respectively. This consists of 10 total iterations. Row 0 corresponds to the first residual before the refinement start, so it has 0 in its first column. On row 1 which corresponds to the outer iteration 1, it will be 4 (4 is the total number of iterations that were performed till now), on row 2 it will be 7, and on row 3 it will be 10. In summary, let’s define ldh=Maxiters+1, the leading dimension of the residual matrix. then residualHistory[i] shows the total number of iterations performed at the outer iteration “i” and residualHistory[i+ldh] corresponds to the norm of the residual at this outer iteration.
- residualHistory: Returns a void pointer to the matrix of the convergence history residual norms. See the description above for the relation between the residual norm datatype and the inout datatype
Errors:
- ErrInvalidValue: This function was called without calling IRSInfos.RequestResidual in advance.
- ErrIrsInfosNotInitialized: The Infos structure was not created
Wraps cusolverDnIRSInfosGetResidualHistory.
type IRSParams ¶
type IRSParams uintptr
IRSParams is an opaque handle for cusolverDnIRSParams_t.
func NewIRSParams ¶
NewIRSParams creates and initializes the structure of parameters for an IRS solver such as the Handle.IRSXgesv or the Handle.IRSXgels functions to default values.
The params structure created by this function can be used by one or more call to the same or to a different IRS solver. Note that in CUDA 10.2, the behavior was different and a new params structure was needed to be created per each call to an IRS solver. Also note that the user can also change configurations of the params and then call a new IRS instance, but be careful that the previous call was done because any change to the configuration before the previous call was done could affect it.
A nil error means the structure was created and initialized successfully.
Errors:
- ErrAllocFailed: The resources could not be allocated.
Wraps cusolverDnIRSParamsCreate.
func (*IRSParams) Close ¶
Close destroys and releases any memory required by the Params structure.
Errors:
- ErrIrsInfosNotDestroyed: Not all the Infos structure associated with this Params structure have been destroyed yet.
- ErrIrsParamsNotInitialized: The Params structure was not created.
If i is zero, Close returns nil. Otherwise Close sets i to zero when the call succeeds and leaves it unchanged when it fails. Only i is zeroed: a copy of it still refers to the released object.
Wraps cusolverDnIRSParamsDestroy.
func (IRSParams) DisableFallback ¶
DisableFallback disables the fallback to the main precision in case the Iterative Refinement Solver (IRS) failed to converge.
In other term, if the IRS solver failed to converge, the solver will return a no convergence code (e.g., niter < 0), but can either return the non-convergent solution as it is (e.g., disable fallback) or can fallback (e.g., enable fallback) to the main precision (which is the precision of the Inputs/Outputs data) and solve the problem from scratch returning the good solution. This function disables the fallback and the returned solution is whatever the refinement solver was able to reach before it returns. Disabling fallback does not guarantee that the solution is the good one. However, if users want to keep getting the solution of the lower precision in case the IRS did not converge after certain number of iterations, they need to disable the fallback. The user can re-enable it by calling IRSParams.EnableFallback.
Errors:
- ErrIrsParamsNotInitialized: The Params structure was not created.
Wraps cusolverDnIRSParamsDisableFallback.
func (IRSParams) EnableFallback ¶
EnableFallback enables the fallback to the main precision in case the Iterative Refinement Solver (IRS) failed to converge.
In other term, if the IRS solver failed to converge, the solver will return a no convergence code (e.g., niter < 0), but can either return the non-convergent solution as it is (e.g., disable fallback) or can fallback (e.g., enable fallback) to the main precision (which is the precision of the Inputs/Outputs data) and solve the problem from scratch returning the good solution. This is the behavior by default, and it will guarantee that the IRS solver always provide the good solution. This function is provided because we provided IRSParams.DisableFallback which allows the user to disable the fallback and thus this function allow the user to re-enable it.
Errors:
- ErrIrsParamsNotInitialized: The Params structure was not created.
Wraps cusolverDnIRSParamsEnableFallback.
func (IRSParams) MaxIters ¶
func (i IRSParams) MaxIters() (CusolverInt, error)
MaxIters returns the current setting in the params structure for the maximal allowed number of iterations (for example, either the default MaxIters, or the one set by the user in case he set it using IRSParams.SetMaxIters).
Note that this function returns the current setting in the params configuration and not to be confused with the IRSInfos.MaxIters which return the maximal allowed number of iterations for a particular call to an IRS solver. To be clearer, the params structure can be used for many calls to an IRS solver. A user can change the allowed MaxIters between calls while the Infos structure in IRSInfos.MaxIters contains information about a particular call and cannot be reused for different calls, and thus, IRSInfos.MaxIters returns the allowed MaxIters for that call.
- maxiters: The maximal number of iterations that is currently set
Errors:
- ErrIrsParamsNotInitialized: The Params structure was not created.
Wraps cusolverDnIRSParamsGetMaxIters.
func (IRSParams) SetMaxIters ¶
func (i IRSParams) SetMaxIters(maxiters CusolverInt) error
SetMaxIters sets the total number of allowed refinement iterations after which the solver will stop.
Total means any iteration which means the sum of the outer and the inner iterations (inner is meaningful when two-levels refinement solver is set). Default value is set to 50. Our goal is to give the user more control such a way he can investigate and control every detail of the IRS solver.
- maxiters: Maximum total number of iterations allowed for the refinement solver
Errors:
- ErrIrsParamsNotInitialized: The Params structure was not created.
Wraps cusolverDnIRSParamsSetMaxIters.
func (IRSParams) SetMaxItersInner ¶
func (i IRSParams) SetMaxItersInner(maxitersInner CusolverInt) error
SetMaxItersInner sets the maximal number of iterations allowed for the inner refinement solver.
It is not referenced in case of one level refinement solver such as IrsRefineClassical or IrsRefineGmres. The inner refinement solver will stop after reaching either the inner tolerance or the MaxItersInner value. By default, it is set to 50. Note that this value could not be larger than the MaxIters since MaxIters is the total number of allowed iterations. Note that if the user calls IRSParams.SetMaxIters after calling this function, SetMaxIters has priority and will overwrite MaxItersInner to the minimum value of (MaxIters, MaxItersInner).
- maxitersInner: Maximum number of allowed inner iterations for the inner refinement solver. Meaningful when the refinement solver is a two-levels solver such as IrsRefineClassicalGmres or IrsRefineGmresGmres. Value should be less or equal to MaxIters
Errors:
- ErrIrsParamsInvalid: If the value was larger than MaxIters.
- ErrIrsParamsNotInitialized: The Params structure was not created.
Wraps cusolverDnIRSParamsSetMaxItersInner.
func (IRSParams) SetRefinementSolver ¶
func (i IRSParams) SetRefinementSolver(refinementSolver IRSRefinement) error
SetRefinementSolver sets the refinement solver to be used in the Iterative Refinement Solver functions such as the Handle.IRSXgesv or the Handle.IRSXgels functions.
Note that the user has to set the refinement algorithm before a first call to the IRS solver because it is NOT set by default with the creating of params. Details about values that can be set to and theirs meaning are described in the table below.
Errors:
- IrsRefineClassical: Classical iterative refinement solver. Similar to the one used in LAPACK routines.
- IrsRefineClassicalGmres: Classical iterative refinement solver that uses the GMRES (Generalized Minimal Residual) internally to solve the correction equation at each iteration. We call the classical refinement iteration the outer iteration while the GMRES is called inner iteration. Note that if the tolerance of the inner GMRES is set very low, let say to machine precision, then the outer classical refinement iteration will performs only one iteration and thus this option will behaves like IrsRefineGmres.
- IrsRefineGmres: GMRES (Generalized Minimal Residual) based iterative refinement solver. In recent study, the GMRES method has drawn the scientific community attention for its ability to be used as refinement solver that outperforms the classical iterative refinement method. Based on our experimentation, we recommend this setting.
- IrsRefineGmresGmres: Similar to IrsRefineClassicalGmres which consists of classical refinement process that uses GMRES to solve the inner correction system, here it is a GMRES (Generalized Minimal Residual) based iterative refinement solver that uses another GMRES internally to solve the preconditioned system.
- IrsRefineNone: No refinement solver; the IRS solver performs a factorization followed by a solve without any refinement. For example, if the IRS solver was Handle.IRSXgesv, this is equivalent to a Xgesv routine without refinement and where the factorization is carried out in the lowest precision. If for example the main precision was R64F and the lowest was R64F as well, then this is equivalent to a call to cusolverDnDgesv().
- IrsRefineNotSet: Solver is not set, this value is what is set when creating the params structure. IRS solver will return an error.
- ErrIrsParamsNotInitialized: The Params structure was not created.
Wraps cusolverDnIRSParamsSetRefinementSolver.
func (IRSParams) SetSolverLowestPrecision ¶
SetSolverLowestPrecision sets the lowest precision that will be used by Iterative Refinement Solver.
By lowest precision, we mean the solver is allowed to use as lowest computational precision during the LU factorization process. Note that the user has to set both the main and lowest precision before a first call to the IRS solver because they are NOT set by default with the params structure creation, as it depends on the Input Output data type and user request. Usually the lowest precision defines the speedup that can be achieved. The ratio of the performance of the lowest precision over the main precision (e.g., Inputs/Outputs datatype) define somehow the upper bound of the speedup that could be obtained. More precisely, it depends on many factors, but for large matrices sizes, it is the ratio of the matrix-matrix rank-k product (e.g., GEMM where K is 256 and M=N=size of the matrix) that define the possible speedup. For instance, if the inout precision is real double precision R64F and the lowest precision is R32F, then we can expect a speedup of at most 2X for large problem sizes. If the lowest precision was R16F, then we can expect 3X-4X. A reasonable strategy should take the number of right-hand sides, the size of the matrix as well as the convergence rate into account.
Errors:
- ErrIrsParamsNotInitialized: The Params structure was not created.
Wraps cusolverDnIRSParamsSetSolverLowestPrecision.
func (IRSParams) SetSolverMainPrecision ¶
SetSolverMainPrecision sets the main precision for the Iterative Refinement Solver (IRS).
By main precision, we mean, the type of the Input and Output data. Note that the user has to set both the main and lowest precision before a first call to the IRS solver because they are NOT set by default with the params structure creation, as it depends on the Input Output data type and user request. user can set it by either calling this function or by calling IRSParams.SetSolverPrecisions which set both the main and the lowest precision together. All possible combinations of main/lowest precision are described in the table in the IRSParams.SetSolverPrecisions section above.
- solverMainPrecision: Allowed Inputs/Outputs datatype (for example CUSOLVER_R_FP64 for a real double precision data). See the table in the IRSParams.SetSolverPrecisions section above for the supported precisions
Errors:
- ErrIrsParamsNotInitialized: The Params structure was not created.
Wraps cusolverDnIRSParamsSetSolverMainPrecision.
func (IRSParams) SetSolverPrecisions ¶
func (i IRSParams) SetSolverPrecisions(solverMainPrecision PrecType, solverLowestPrecision PrecType) error
SetSolverPrecisions sets both the main and the lowest precision for the Iterative Refinement Solver (IRS).
By main precision, we mean the precision of the Input and Output datatype. By lowest precision, we mean the solver is allowed to use as lowest computational precision during the LU factorization process. Note that the user has to set both the main and lowest precision before the first call to the IRS solver because they are NOT set by default with the params structure creation, as it depends on the Input Output data type and user request. It is a wrapper to both IRSParams.SetSolverMainPrecision and IRSParams.SetSolverLowestPrecision. All possible combinations of main/lowest precision are described in the table below. Usually the lowest precision defines the speedup that can be achieved. The ratio of the performance of the lowest precision over the main precision (e.g., Inputs/Outputs datatype) define the upper bound of the speedup that could be obtained. More precisely, it depends on many factors, but for large matrices sizes, it is the ratio of the matrix-matrix rank-k product (e.g., GEMM where K is 256 and M=N=size of the matrix) that define the possible speedup. For instance, if the inout precision is real double precision R64F and the lowest precision is R32F, then we can expect a speedup of at most 2X for large problem sizes. If the lowest precision was R16F, then we can expect 3X-4X. A reasonable strategy should take the number of right-hand sides, the size of the matrix as well as the convergence rate into account.
- Inputs/Outputs Data Type (e.g., main precision): C64F; Supported values for the lowest precision: C64F, C32F, C16F, C16BF, CTF32
- Inputs/Outputs Data Type (e.g., main precision): C32F; Supported values for the lowest precision: C32F, C16F, C16BF, CTF32
- Inputs/Outputs Data Type (e.g., main precision): R64F; Supported values for the lowest precision: R64F, R32F, R16F, R16BF, RTF32
- Inputs/Outputs Data Type (e.g., main precision): R32F; Supported values for the lowest precision: R32F, R16F, R16BF, RTF32
Parameters:
- solverMainPrecision: Allowed Inputs/Outputs datatype (for example CUSOLVER_R_FP64 for a real double precision data). See the table below for the supported precisions
- solverLowestPrecision: Allowed lowest compute type (for example R16F for half precision computation). See the table below for the supported precisions
Errors:
- ErrIrsParamsNotInitialized: The Params structure was not created. Supported Inputs/Outputs data type and lower precision for the IRS solver
Wraps cusolverDnIRSParamsSetSolverPrecisions.
func (IRSParams) SetTol ¶
SetTol sets the tolerance for the refinement solver.
By default it is such that all the RHS satisfy: RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX where
- RNRM is the infinity-norm of the residual
- XNRM is the infinity-norm of the solution
- ANRM is the infinity-operator-norm of the matrix A
- EPS is the machine epsilon for the Inputs/Outputs datatype that matches LAPACK LAMCH(‘Epsilon’)
- BWDMAX, the value BWDMAX is fixed to 1.0
The user can use this function to change the tolerance to a lower or higher value. Our goal is to give the user more control such a way he can investigate and control every detail of the IRS solver. Note that the tolerance value is always in real double precision whatever the Inputs/Outputs datatype is.
- val: Double precision real value to which the refinement tolerance will be set
Errors:
- ErrIrsParamsNotInitialized: The Params structure was not created.
Wraps cusolverDnIRSParamsSetTol.
func (IRSParams) SetTolInner ¶
SetTolInner sets the tolerance for the inner refinement solver when the refinement solver consists of two-levels solver (for example, IrsRefineClassicalGmres or IrsRefineGmresGmres cases).
It is not referenced in case of one level refinement solver such as IrsRefineClassical or IrsRefineGmres. It is set to 1e-4 by default. This function set the tolerance for the inner solver (e.g. the inner GMRES). For example, if the Refinement Solver was set to IrsRefineClassicalGmres, setting this tolerance mean that the inner GMRES solver will converge to that tolerance at each outer iteration of the classical refinement solver. Our goal is to give the user more control such a way he can investigate and control every detail of the IRS solver. Note the, the tolerance value is always in real double precision whatever the Inputs/Outputs datatype is.
- val: Double precision real value to which the tolerance of the inner refinement solver will be set
Errors:
- ErrIrsParamsNotInitialized: The Params structure was not created.
Wraps cusolverDnIRSParamsSetTolInner.
type IRSRefinement ¶
type IRSRefinement int32
IRSRefinement indicates which solver type would be used for the specific cusolver function.
Most of our experimentation shows that IrsRefineGmres is the best option. More details about the refinement process can be found in Azzam Haidar, Stanimire Tomov, Jack Dongarra, and Nicholas J. Higham. 2018. Harnessing GPU tensor cores for fast FP16 arithmetic to speed up mixed-precision iterative refinement solvers. In Proceedings of the International Conference for High Performance Computing, Networking, Storage, and Analysis (SC ‘18). IEEE Press, Piscataway, NJ, USA, Article 47, 11 pages. IrsRefineNotSet Solver is not set; this value is what is set when creating the params structure. IRS solver will return an error. IrsRefineNone No refinement solver, the IRS solver performs a factorization followed by a solve without any refinement. For example if the IRS solver was Handle.IRSXgesv, this is equivalent to a Xgesv routine without refinement and where the factorization is carried out in the lowest precision. If for example the main precision was R64F and the lowest was R64F as well, then this is equivalent to a call to cusolverDnDgesv(). IrsRefineClassical Classical iterative refinement solver. Similar to the one used in LAPACK routines. IrsRefineGmres GMRES (Generalized Minimal Residual) based iterative refinement solver. In recent study, the GMRES method has drawn the scientific community attention for its ability to be used as refinement solver that outperforms the classical iterative refinement method. Based on our experimentation, we recommend this setting. IrsRefineClassicalGmres Classical iterative refinement solver that uses the GMRES (Generalized Minimal Residual) internally to solve the correction equation at each iteration. We call the classical refinement iteration the outer iteration while the GMRES is called inner iteration. Note that if the tolerance of the inner GMRES is set very low, lets say to machine precision, then the outer classical refinement iteration will performs only one iteration and thus this option will behave like IrsRefineGmres. IrsRefineGmresGmres Similar to IrsRefineClassicalGmres which consists of classical refinement process that uses GMRES to solve the inner correction system; here it is a GMRES (Generalized Minimal Residual) based iterative refinement solver that uses another GMRES internally to solve the preconditioned system.
const ( IrsRefineNotSet IRSRefinement = 1100 IrsRefineNone IRSRefinement = 1101 IrsRefineClassical IRSRefinement = 1102 IrsRefineClassicalGmres IRSRefinement = 1103 IrsRefineGmres IRSRefinement = 1104 IrsRefineGmresGmres IRSRefinement = 1105 IrsRefineGmresNopcond IRSRefinement = 1106 PrecDd IRSRefinement = 1150 PrecSs IRSRefinement = 1151 PrecSht IRSRefinement = 1152 )
func (IRSRefinement) String ¶
func (e IRSRefinement) String() string
String returns the constant name, or a numeric representation for unknown values.
type LibraryAttempt ¶
LibraryAttempt records one failed attempt to open the shared library.
type LibraryConflictError ¶
type LibraryConflictError struct {
Loaded string
Requested string
// Implicit reports that the loaded library was opened lazily and no
// successful Load has since acknowledged it. A
// caller that sees this called some
// other function first, and that call took the default search list.
Implicit bool
}
LibraryConflictError reports a Load call naming a different library than the one already loaded. Only one library is loaded per process.
func (*LibraryConflictError) Error ¶
func (e *LibraryConflictError) Error() string
Error reports the conflicting library paths, and whether the library that is already loaded got there without a Load call.
type LibraryError ¶
type LibraryError struct {
Library string
Env string
Path string
Attempts []LibraryAttempt
Hint string
}
LibraryError reports that libcusolver could not be opened. Attempts lists every name tried in order. Path is set when an explicit path, from Load or CUSOLVER_LIB_PATH, was requested and failed. Hint reports pkg-config discovery results and query failures, when discovery ran.
func (*LibraryError) Error ¶
func (e *LibraryError) Error() string
Error describes the library load attempts and their errors.
func (*LibraryError) Unwrap ¶
func (e *LibraryError) Unwrap() []error
Unwrap returns the error from each attempt.
type LibraryPropertyType ¶
type LibraryPropertyType int32
LibraryPropertyType identifies a CUDA library property.
const ( MajorVersion LibraryPropertyType = 0 MinorVersion LibraryPropertyType = 1 PatchLevel LibraryPropertyType = 2 )
LibraryPropertyType constants.
type LoggerCallback ¶
type LoggerCallback uintptr
LoggerCallback represents cusolverDnLoggerCallback_t.
type MathMode ¶
type MathMode int32
MathMode is used in Handle.SetMathMode to choose compute precision modes as defined in the following table: The following combinations of MathMode using the bitwise OR operator are allowed.
type Params ¶
type Params uintptr
Params is an opaque handle for cusolverDnParams_t.
func CreateParams ¶
CreateParams creates and initializes the structure of 64-bit API to default values.
- params: The pointer to the structure of 64-bit API
Errors:
- ErrAllocFailed: The resources could not be allocated.
Wraps cusolverDnCreateParams.
func (*Params) Close ¶
Close destroys and releases any memory required by the structure.
If p is zero, Close returns nil. Otherwise Close sets p to zero when the call succeeds and leaves it unchanged when it fails. Only p is zeroed: a copy of it still refers to the released object.
Wraps cusolverDnDestroyParams.
func (Params) SetAdvOptions ¶
SetAdvOptions configures algorithm algo of function, a 64-bit API routine.
- function: The routine to be configured
- algo: The algorithm to be configured
Errors:
- ErrInvalidValue: Wrong combination of function and algo.
Wraps cusolverDnSetAdvOptions.
type PrecType ¶
type PrecType int32
PrecType represents cusolverPrecType_t.
const ( R8I PrecType = 1201 R8U PrecType = 1202 R64F PrecType = 1203 R32F PrecType = 1204 R16F PrecType = 1205 R16BF PrecType = 1206 RTF32 PrecType = 1207 RAp PrecType = 1208 C8I PrecType = 1211 C8U PrecType = 1212 C64F PrecType = 1213 C32F PrecType = 1214 C16F PrecType = 1215 C16BF PrecType = 1216 CTF32 PrecType = 1217 CAp PrecType = 1218 )
type Result ¶
type Result int32
Result represents a cusolver API error code (cusolverStatus_t).
const ( Success Result = 0 ErrNotInitialized Result = 1 ErrAllocFailed Result = 2 ErrInvalidValue Result = 3 ErrArchMismatch Result = 4 ErrMappingError Result = 5 ErrExecutionFailed Result = 6 ErrInternalError Result = 7 ErrMatrixTypeNotSupported Result = 8 ErrNotSupported Result = 9 ErrZeroPivot Result = 10 ErrInvalidLicense Result = 11 ErrIrsParamsNotInitialized Result = 12 ErrIrsParamsInvalid Result = 13 ErrIrsParamsInvalidPrec Result = 14 ErrIrsParamsInvalidRefine Result = 15 ErrIrsParamsInvalidMaxiter Result = 16 ErrIrsInternalError Result = 20 ErrIrsNotSupported Result = 21 ErrIrsOutOfRange Result = 22 ErrIrsNrhsNotSupportedForRefineGmres Result = 23 ErrIrsInfosNotInitialized Result = 25 ErrIrsInfosNotDestroyed Result = 26 ErrIrsMatrixSingular Result = 30 ErrInvalidWorkspace Result = 31 )
cusolver error codes from cusolverDn.h.
type StorevMode ¶
type StorevMode int32
StorevMode specifies how the vectors which define the elementary reflectors are stored.
const ( CublasStorevColumnwise StorevMode = 0 CublasStorevRowwise StorevMode = 1 )
func (StorevMode) String ¶
func (e StorevMode) String() string
String returns the constant name, or a numeric representation for unknown values.
type SyevjInfo ¶
type SyevjInfo uintptr
SyevjInfo is an opaque handle for syevjInfo_t.
func CreateSyevjInfo ¶
CreateSyevjInfo creates and initializes the structure of syevj, syevjBatched and sygvj to default values.
- info: The pointer to the structure of syevj
Errors:
- ErrAllocFailed: The resources could not be allocated.
Wraps cusolverDnCreateSyevjInfo.
func (*SyevjInfo) Close ¶
Close destroys and releases any memory required by the structure.
If s is zero, Close returns nil. Otherwise Close sets s to zero when the call succeeds and leaves it unchanged when it fails. Only s is zeroed: a copy of it still refers to the released object.
Wraps cusolverDnDestroySyevjInfo.
func (SyevjInfo) XsyevjSetMaxSweeps ¶
XsyevjSetMaxSweeps configures maximum number of sweeps in syevj.
The default value is 100.
- maxSweeps: Maximum number of sweeps
Wraps cusolverDnXsyevjSetMaxSweeps.
func (SyevjInfo) XsyevjSetSortEig ¶
XsyevjSetSortEig sets whether the batched Jacobi eigensolver sorts the eigenvalues it computes.
If sortEig is zero, the eigenvalues are not sorted.
This function only works for syevjBatched. syevj and sygvj always sort eigenvalues in ascending order. By default, eigenvalues are always sorted in ascending order.
- sortEig: If sortEig is zero, the eigenvalues are not sorted
Wraps cusolverDnXsyevjSetSortEig.
func (SyevjInfo) XsyevjSetTolerance ¶
XsyevjSetTolerance configures tolerance of syevj.
- tolerance: Accuracy of numerical eigenvalues
Wraps cusolverDnXsyevjSetTolerance.
type SymbolError ¶
SymbolError reports that a symbol is not callable.
Err distinguishes the two ways that happens. A nil Err means the loaded library does not export the symbol, which is what an installation older than the symbol looks like. A non-nil Err means the library does export it and the binding itself failed; the library is not at fault.
func (*SymbolError) Error ¶
func (e *SymbolError) Error() string
Error reports the uncallable library symbol and, when the symbol was present but could not be bound, why.
func (*SymbolError) Unwrap ¶
func (e *SymbolError) Unwrap() error
Unwrap returns the reason the symbol could not be bound, or nil when the loaded library does not export it.
type VersionMismatchError ¶
type VersionMismatchError struct {
Path string // the library that was opened
Want int // major version these bindings were generated for
Got int // major version the library reports
Raw int // the version value the library reported, undecoded
}
VersionMismatchError reports that the shared library that opened is not from the version train cusolver was generated for. dlsym matches on name alone, so a library from a neighbouring train opens and resolves nearly every symbol; asking it its own version is what tells the two apart.
func (*VersionMismatchError) Error ¶
func (e *VersionMismatchError) Error() string
Error reports which library was opened and the two majors that disagree.
A decoder is only a decoder for the version schemes it was measured against, and a library from a train that predates the scheme can report a value it does not decode. Naming a major of 0 in that case would attribute to the library a claim it never made, so the raw value is reported instead.