Skip to content

Commit 8fccedb

Browse files
committed
More simplifications
1 parent af7c9af commit 8fccedb

File tree

4 files changed

+2
-12
lines changed

4 files changed

+2
-12
lines changed

src/algorithms.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,10 @@ macro functiondef(f)
190190
end
191191

192192
# define fallbacks for algorithm selection
193-
@inline function select_algorithm(::typeof($f), ::Type{A}, alg::Alg;
194-
kwargs...) where {Alg,A}
193+
@inline function select_algorithm(::typeof($f), A, alg::Alg; kwargs...) where {Alg}
195194
return select_algorithm($f!, A, alg; kwargs...)
196195
end
197-
@inline function default_algorithm(::typeof($f), ::Type{A}; kwargs...) where {A}
196+
@inline function default_algorithm(::typeof($f), A; kwargs...)
198197
return default_algorithm($f!, A; kwargs...)
199198
end
200199

src/interface/eig.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,3 @@ function select_algorithm(::typeof(eig_trunc!), A, alg; trunc=nothing, kwargs...
103103
alg_eig = select_algorithm(eig_full!, A, alg; kwargs...)
104104
return TruncatedAlgorithm(alg_eig, select_truncation(trunc))
105105
end
106-
function select_algorithm(::typeof(eig_trunc), A, alg; trunc=nothing, kwargs...)
107-
return select_algorithm(eig_trunc!, A, alg; trunc, kwargs...)
108-
end

src/interface/eigh.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,3 @@ function select_algorithm(::typeof(eigh_trunc!), A, alg; trunc=nothing, kwargs..
104104
alg_eigh = select_algorithm(eigh_full!, A, alg; kwargs...)
105105
return TruncatedAlgorithm(alg_eigh, select_truncation(trunc))
106106
end
107-
function select_algorithm(::typeof(eigh_trunc), A, alg; trunc=nothing, kwargs...)
108-
return select_algorithm(eigh_trunc!, A, alg; trunc, kwargs...)
109-
end

src/interface/svd.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,3 @@ function select_algorithm(::typeof(svd_trunc!), A, alg; trunc=nothing, kwargs...
108108
alg_svd = select_algorithm(svd_compact!, A, alg; kwargs...)
109109
return TruncatedAlgorithm(alg_svd, select_truncation(trunc))
110110
end
111-
function select_algorithm(::typeof(svd_trunc), A, alg; trunc=nothing, kwargs...)
112-
return select_algorithm(svd_trunc!, A, alg; trunc, kwargs...)
113-
end

0 commit comments

Comments
 (0)