@@ -58,6 +58,41 @@ submodule (stdlib_linalg) stdlib_linalg_eigenvalues
58
58
59
59
end subroutine handle_geev_info
60
60
61
+ !> Process GGEV output flags
62
+ pure subroutine handle_ggev_info(err,info,shapea,shapeb)
63
+ !> Error handler
64
+ type(linalg_state_type), intent(inout) :: err
65
+ !> GEEV return flag
66
+ integer(ilp), intent(in) :: info
67
+ !> Input matrix size
68
+ integer(ilp), intent(in) :: shapea(2),shapeb(2)
69
+
70
+ select case (info)
71
+ case (0)
72
+ ! Success!
73
+ err%state = LINALG_SUCCESS
74
+ case (-1)
75
+ err = linalg_state_type(this,LINALG_INTERNAL_ERROR,'Invalid task ID: left eigenvectors.')
76
+ case (-2)
77
+ err = linalg_state_type(this,LINALG_INTERNAL_ERROR,'Invalid task ID: right eigenvectors.')
78
+ case (-5,-3)
79
+ err = linalg_state_type(this,LINALG_VALUE_ERROR,'invalid matrix size: a=',shapea)
80
+ case (-7)
81
+ err = linalg_state_type(this,LINALG_VALUE_ERROR,'invalid matrix size: b=',shapeb)
82
+ case (-12)
83
+ err = linalg_state_type(this,LINALG_VALUE_ERROR,'insufficient left vector matrix size.')
84
+ case (-14)
85
+ err = linalg_state_type(this,LINALG_VALUE_ERROR,'insufficient right vector matrix size.')
86
+ case (-16)
87
+ err = linalg_state_type(this,LINALG_INTERNAL_ERROR,'Insufficient work array size.')
88
+ case (1:)
89
+ err = linalg_state_type(this,LINALG_ERROR,'Eigenvalue computation did not converge.')
90
+ case default
91
+ err = linalg_state_type(this,LINALG_INTERNAL_ERROR,'Unknown error returned by ggev.')
92
+ end select
93
+
94
+ end subroutine handle_ggev_info
95
+
61
96
!> Process SYEV/HEEV output flags
62
97
elemental subroutine handle_heev_info(err,info,m,n)
63
98
!> Error handler
0 commit comments