Skip to content

Commit 9d04ffb

Browse files
committed
move helper functions
1 parent 3ced35f commit 9d04ffb

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/common/gauge.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ This is achieved by ensuring that the entry with the largest magnitude in `V` or
88
is real and positive.
99
""" gaugefix!
1010

11+
# Helper functions
12+
_argmaxabs(x) = reduce(_largest, x; init = zero(eltype(x)))
13+
_largest(x, y) = abs(x) < abs(y) ? y : x
1114

1215
function gaugefix!(::Union{typeof(eig_full!), typeof(eigh_full!), typeof(gen_eig_full!)}, V::AbstractMatrix)
1316
for j in axes(V, 2)

src/implementations/svd.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,6 @@ function initialize_output(::typeof(svd_vals!), A::Diagonal, ::DiagonalAlgorithm
105105
return eltype(A) <: Real ? diagview(A) : similar(A, real(eltype(A)), size(A, 1))
106106
end
107107

108-
# Helper functions used by gauge.jl
109-
_argmaxabs(x) = reduce(_largest, x; init = zero(eltype(x)))
110-
_largest(x, y) = abs(x) < abs(y) ? y : x
111-
112108
# ==========================
113109
# IMPLEMENTATIONS
114110
# ==========================

0 commit comments

Comments
 (0)