@@ -28,32 +28,32 @@ function LinearAlgebra.lu!(A::DMatrix{T}, ::LinearAlgebra.NoPivot; check::Bool=t
28
28
return LinearAlgebra. LU {T,DMatrix{T},DVector{Int}} (A, ipiv, 0 )
29
29
end
30
30
31
- function searchmax_pivot! (piv_idx:: AbstractArray {Int} , piv_val:: AbstractArray {T} , A:: AbstractArray {T} , offset:: Int = 0 ) where T
31
+ function searchmax_pivot! (piv_idx:: AbstractVector {Int} , piv_val:: AbstractVector {T} , A:: AbstractMatrix {T} , offset:: Int = 0 ) where T
32
32
max_idx = argmax (abs .(A[:]))
33
33
piv_idx[1 ] = offset+ max_idx
34
34
piv_val[1 ] = A[max_idx]
35
35
end
36
36
37
- function update_ipiv! (ipivl, piv_idx:: AbstractArray {Int} , piv_val:: AbstractArray {T} , k:: Int , nb:: Int ) where T
37
+ function update_ipiv! (ipivl:: AbstractVector{Int} , piv_idx:: AbstractVector {Int} , piv_val:: AbstractVector {T} , k:: Int , nb:: Int ) where T
38
38
max_piv_idx = argmax (abs .(piv_val))
39
39
ipivl[1 ] = (max_piv_idx+ k- 2 )* nb + piv_idx[max_piv_idx]
40
40
end
41
41
42
- function swaprows_panel! (A:: AbstractArray {T} , M:: AbstractArray {T} , ipivl:: AbstractVector{Int} , m:: Int , p:: Int , nb:: Int ) where T
42
+ function swaprows_panel! (A:: AbstractMatrix {T} , M:: AbstractMatrix {T} , ipivl:: AbstractVector{Int} , m:: Int , p:: Int , nb:: Int ) where T
43
43
q = div (ipivl[1 ]- 1 ,nb) + 1
44
44
r = (ipivl[1 ]- 1 )% nb+ 1
45
45
if m == q
46
46
A[p,:], M[r,:] = M[r,:], A[p,:]
47
47
end
48
48
end
49
49
50
- function update_panel! (M:: AbstractArray {T} , A:: AbstractArray {T} , p:: Int ) where T
50
+ function update_panel! (M:: AbstractMatrix {T} , A:: AbstractMatrix {T} , p:: Int ) where T
51
51
Acinv = one (T) / A[p,p]
52
52
LinearAlgebra. BLAS. scal! (Acinv, view (M, :, p))
53
53
LinearAlgebra. BLAS. ger! (- one (T), view (M, :, p), conj .(view (A, p, p+ 1 : size (A,2 ))), view (M, :, p+ 1 : size (M,2 )))
54
54
end
55
55
56
- function swaprows_trail! (A:: AbstractArray {T} , M:: AbstractArray {T} , ipiv:: AbstractVector{Int} , m:: Int , nb:: Int ) where T
56
+ function swaprows_trail! (A:: AbstractMatrix {T} , M:: AbstractMatrix {T} , ipiv:: AbstractVector{Int} , m:: Int , nb:: Int ) where T
57
57
for p in eachindex (ipiv)
58
58
q = div (ipiv[p]- 1 ,nb) + 1
59
59
r = (ipiv[p]- 1 )% nb+ 1
0 commit comments