Skip to content

Commit 38806ed

Browse files
committed
Pass check through for _cholesky_large
1 parent c811a45 commit 38806ed

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/cholesky.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ end
2323

2424
@generated function _cholesky(::Size{S}, A::StaticMatrix{M,M}, check::Bool) where {S,M}
2525
@assert (M,M) == S
26-
M > 24 && return :(_cholesky_large(Size{$S}(), A))
26+
M > 24 && return :(_cholesky_large(Size{$S}(), A, check))
2727
q = Expr(:block, :(info = 0), :(failure = false))
2828
for n 1:M
2929
for m n:M
@@ -61,8 +61,10 @@ end
6161
end
6262

6363
# Otherwise default algorithm returning wrapped SizedArray
64-
@inline _cholesky_large(::Size{S}, A::StaticArray) where {S} =
65-
Cholesky(similar_type(A)(cholesky(Hermitian(Matrix(A))).U), 'U', 0)
64+
@inline function _cholesky_large(::Size{S}, A::StaticArray, check::Bool) where {S}
65+
C = cholesky(Hermitian(Matrix(A)); check=check)
66+
Cholesky(similar_type(A)(C.U), 'U', C.info)
67+
end
6668

6769
LinearAlgebra.hermitian_type(::Type{SA}) where {T, S, SA<:SArray{S,T}} = Hermitian{T,SA}
6870

0 commit comments

Comments
 (0)