Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: ['1']
julia-version: ['lts','1','pre']
threads:
- '1'
- '3'
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
- uses: actions/cache@v4
Expand Down
15 changes: 14 additions & 1 deletion src/lu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ function lu(A::AbstractMatrix, pivot = Val(true), thread = Val(false); kwargs...
end

const CUSTOMIZABLE_PIVOT = VERSION >= v"1.8.0-DEV.1507"
# Julia 1.11+ uses negative info for NoPivot() failures
const NOPIVOT_NEGATIVE_INFO = VERSION >= v"1.11.0-DEV"

struct NotIPIV <: AbstractVector{BlasInt}
len::Int
Expand Down Expand Up @@ -235,7 +237,14 @@ function reckernel!(A::AbstractMatrix{T}, pivot::Val{Pivot}, m, n, ipiv, info, b
# A21 <- P2 A21
Pivot && apply_permutation!(P2, A21, thread)

info != previnfo && (info += n1)
if info != previnfo
# Handle negative info for NoPivot (Julia 1.11+ convention)
if NOPIVOT_NEGATIVE_INFO && info < 0
info -= n1
else
info += n1
end
end
if Pivot
@turbo warn_check_args=false for i in 1:n2
P2[i] += n1
Expand Down Expand Up @@ -303,6 +312,10 @@ function _generic_lufact!(A, ::Val{Pivot}, ipiv, info) where {Pivot}
end
elseif info == 0
info = k
# Julia 1.11+ convention: negative info for NoPivot
if !Pivot && NOPIVOT_NEGATIVE_INFO
info = -info
end
end
k == minmn && break
# Update the rest
Expand Down
Loading