|
3 | 3 | function copy_input(::typeof(eig_full), A::AbstractMatrix) |
4 | 4 | return copy!(similar(A, float(eltype(A))), A) |
5 | 5 | end |
6 | | -function copy_input(::typeof(eig_vals), A) |
7 | | - return copy_input(eig_full, A) |
8 | | -end |
| 6 | +copy_input(::typeof(eig_vals), A) = copy_input(eig_full, A) |
9 | 7 | copy_input(::typeof(eig_trunc), A) = copy_input(eig_full, A) |
10 | 8 |
|
11 | 9 | copy_input(::typeof(eig_full), A::Diagonal) = copy(A) |
@@ -67,7 +65,7 @@ function initialize_output(::typeof(eig_vals!), A::AbstractMatrix, ::AbstractAlg |
67 | 65 | D = similar(A, Tc, n) |
68 | 66 | return D |
69 | 67 | end |
70 | | -function initialize_output(::typeof(eig_trunc!), A::AbstractMatrix, alg::TruncatedAlgorithm) |
| 68 | +function initialize_output(::typeof(eig_trunc!), A, alg::TruncatedAlgorithm) |
71 | 69 | return initialize_output(eig_full!, A, alg.alg) |
72 | 70 | end |
73 | 71 |
|
@@ -108,7 +106,7 @@ function eig_vals!(A::AbstractMatrix, D, alg::LAPACK_EigAlgorithm) |
108 | 106 | return D |
109 | 107 | end |
110 | 108 |
|
111 | | -function eig_trunc!(A::AbstractMatrix, DV, alg::TruncatedAlgorithm) |
| 109 | +function eig_trunc!(A, DV, alg::TruncatedAlgorithm) |
112 | 110 | D, V = eig_full!(A, DV, alg.alg) |
113 | 111 | return first(truncate(eig_trunc!, (D, V), alg.trunc)) |
114 | 112 | end |
|
131 | 129 |
|
132 | 130 | # GPU logic |
133 | 131 | # --------- |
134 | | -_gpu_geev!(A::AbstractMatrix, D, V) = throw(MethodError(_gpu_geev!, (A, D, V))) |
| 132 | +_gpu_geev!(A, D, V) = throw(MethodError(_gpu_geev!, (A, D, V))) |
135 | 133 |
|
136 | 134 | function eig_full!(A::AbstractMatrix, DV, alg::GPU_EigAlgorithm) |
137 | 135 | check_input(eig_full!, A, DV, alg) |
|
0 commit comments