pub unsafe extern "C" fn cusolverDnIRSParamsSetRefinementSolver(
params: cusolverDnIRSParams_t,
refinement_solver: cusolverIRSRefinement_t,
) -> cusolverStatus_tExpand description
This function sets the refinement solver to be used in the Iterative Refinement Solver functions such as the cusolverDnIRSXgesv or the cusolverDnIRSXgels 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.
cusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_NOT_SET: Solver is not set, this value is what is set when creating the params structure. IRS solver will return an error.
cusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_NONE: No refinement solver; the IRS solver performs a factorization followed by a solve without any refinement. For example, if the IRS solver was cusolverDnIRSXgesv, 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 CUSOLVER_R_64F and the lowest was CUSOLVER_R_64F as well, then this is equivalent to a call to cusolverDnDgesv().
cusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_CLASSICAL: Classical iterative refinement solver. Similar to the one used in LAPACK routines.
cusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_GMRES: 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.
cusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_CLASSICAL_GMRES: 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 cusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_GMRES.
cusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_GMRES_GMRES: Similar to cusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_CLASSICAL_GMRES 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.
§Parameters
params: ThecusolverDnIRSParams_tParamsstructure.
§Return value
cusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_CLASSICAL: Classical iterative refinement solver. Similar to the one used in LAPACK routines.cusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_CLASSICAL_GMRES: 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 theGMRESis 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 likecusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_GMRES.cusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_GMRES: 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.cusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_GMRES_GMRES: Similar tocusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_CLASSICAL_GMRESwhich 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.cusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_NONE: No refinement solver; the IRS solver performs a factorization followed by a solve without any refinement. For example, if the IRS solver wascusolverDnIRSXgesv, 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 CUSOLVER_R_64F and the lowest was CUSOLVER_R_64F as well, then this is equivalent to a call tocusolverDnDgesv().cusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_NOT_SET: Solver is not set, this value is what is set when creating the params structure. IRS solver will return an error.cusolverStatus_t::CUSOLVER_STATUS_IRS_PARAMS_NOT_INITIALIZED: TheParamsstructure was not created.cusolverStatus_t::CUSOLVER_STATUS_SUCCESS: The operation completed successfully.