@@ -86,27 +86,18 @@ See also [`eigh_full(!)`](@ref eigh_full) and [`eigh_trunc(!)`](@ref eigh_trunc)
8686
8787# Algorithm selection
8888# -------------------
89- for f in (:eigh_full , :eigh_vals )
90- f! = Symbol (f, :! )
91- @eval begin
92- function default_algorithm (:: typeof ($ f), A; kwargs... )
93- return default_algorithm ($ f!, A; kwargs... )
94- end
95- function default_algorithm (:: typeof ($ f!), A; kwargs... )
96- return default_eigh_algorithm (A; kwargs... )
97- end
98- end
89+ # Default to LAPACK for `StridedMatrix{<:BlasFloat}`
90+ function default_algorithm (:: typeof (eigh_full!), :: Type{A} ;
91+ kwargs... ) where {A<: StridedMatrix{<:BlasFloat} }
92+ return LAPACK_MultipleRelativelyRobustRepresentations (; kwargs... )
9993end
100-
101- function select_algorithm ( :: typeof (eigh_trunc), A, alg; kwargs... )
102- return select_algorithm (eigh_trunc!, A, alg ; kwargs... )
94+ function default_algorithm ( :: typeof (eigh_vals!), :: Type{A} ;
95+ kwargs... ) where {A <: StridedMatrix{<:BlasFloat} }
96+ return LAPACK_MultipleRelativelyRobustRepresentations ( ; kwargs... )
10397end
104- function select_algorithm (:: typeof (eigh_trunc!), A, alg; trunc= nothing , kwargs... )
98+
99+ function select_algorithm (:: typeof (eigh_trunc!), :: Type{A} , alg; trunc= nothing ,
100+ kwargs... ) where {A<: StridedMatrix{<:BlasFloat} }
105101 alg_eigh = select_algorithm (eigh_full!, A, alg; kwargs... )
106102 return TruncatedAlgorithm (alg_eigh, select_truncation (trunc))
107103end
108-
109- # Default to LAPACK
110- function default_eigh_algorithm (A:: StridedMatrix{T} ; kwargs... ) where {T<: BlasFloat }
111- return LAPACK_MultipleRelativelyRobustRepresentations (; kwargs... )
112- end
0 commit comments