|
F = lu!(Z2[1:(2*p), 1:(2*p)], check = false) # FIXME ? |
We can make this allocation free, for example, Claude gave
using LinearAlgebra
n = 8
A = rand(n, n)
ipiv = Vector{LinearAlgebra.BlasInt}(undef, n) # preallocate once
# In your hot loop:
LinearAlgebra.LAPACK.getrf!(A, ipiv) # in-place LU, no allocation
Penelopt.jl/src/linear_algebra/ldlt.jl
Line 343 in 38e5313
We can make this allocation free, for example, Claude gave