Skip to content

Commit 3f67259

Browse files
authored
Merge pull request #56 from chriselrod/alloc
Remove allocations
2 parents 64ddbc4 + 9ab72c2 commit 3f67259

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lu.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ function lu!(A::AbstractMatrix{T}, ipiv::AbstractVector{<:Integer},
6161
mnmin = min(m, n)
6262
if recurse(A) && mnmin > threshold
6363
if T <: Union{Float32, Float64}
64-
GC.@preserve ipiv A begin info = recurse!(PtrArray(A), pivot, m, n, mnmin,
64+
GC.@preserve ipiv A begin info = recurse!(view(PtrArray(A), axes(A)...), pivot,
65+
m, n, mnmin,
6566
PtrArray(ipiv), info, blocksize,
6667
thread) end
6768
else
@@ -165,6 +166,7 @@ function reckernel!(A::AbstractMatrix{T}, pivot::Val{Pivot}, m, n, ipiv, info, b
165166
# [P2]
166167
P1 = @view ipiv[1:n1]
167168
P2 = @view ipiv[(n1 + 1):n]
169+
168170
# ========================================
169171

170172
# [ A11 ] [ L11 ]

0 commit comments

Comments
 (0)