File tree Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -105,30 +105,16 @@ end
105
105
106
106
# reusing LU object
107
107
# lu!(F::LU,A) should be dispatched on the type of matrix stored in the LU factorization.
108
- # but special care needs to be done in the HermOrSym case
109
- function _lu_copy! (A,x)
110
- copyto! (A, x)
111
- end
112
-
113
- function lu_copy! (A,x:: HermOrSym )
114
- copytri! (A. data, x. uplo, isa (x, Hermitian))
115
- @inbounds if isa (x, Hermitian) # realify diagonal
116
- for i in axes (x, 1 )
117
- A[i,i] = x[i,i]
118
- end
119
- end
120
- return A
121
- end
122
108
123
109
function lu! (F:: LU{<:Any,<:StridedMatrix{<:BlasFloat}} , A; check:: Bool = true , allowsingular:: Bool = false )
124
- lu_copy ! (F. factors,A)
110
+ copyto ! (F. factors,A)
125
111
lpt = LAPACK. getrf! (F. factors, F. ipiv; check)
126
112
check && _check_lu_success (lpt[3 ], allowsingular)
127
113
return F
128
114
end
129
115
130
116
function lu! (F:: LU{<:Any,<:AbstractMatrix} , A; check:: Bool = true , allowsingular:: Bool = false )
131
- lu_copy ! (F. factors,A)
117
+ copyto ! (F. factors,A)
132
118
generic_lufact! (F. factors, lupivottype (eltype (A)), F. ipiv; check, allowsingular)
133
119
return F
134
120
end
You can’t perform that action at this time.
0 commit comments