@@ -467,16 +467,23 @@ Returns the number.
467467"""
468468bunchkaufman_instance (a:: Any ) = bunchkaufman (a, check = false )
469469
470+ @static if VERSION < v " 1.7beta"
471+ const DEFAULT_CHOLESKY_PIVOT = Val (false )
472+ else
473+ const DEFAULT_CHOLESKY_PIVOT = LinearAlgebra. NoPivot ()
474+ end
475+
470476"""
471477cholesky_instance(A, pivot = LinearAlgebra.RowMaximum()) -> cholesky_factorization_instance
472478
473479Returns an instance of the Cholesky factorization object with the correct type
474480cheaply.
475481"""
476- function cholesky_instance (A:: Matrix{T} , pivot = LinearAlgebra . NoPivot () ) where {T}
482+ function cholesky_instance (A:: Matrix{T} , pivot = DEFAULT_CHOLESKY_PIVOT ) where {T}
477483 return cholesky (similar (A, 0 , 0 ), pivot, check = false )
478484end
479- function cholesky_instance (A:: Union{SparseMatrixCSC,Symmetric{<:Number,<:SparseMatrixCSC}} , pivot = LinearAlgebra. RowMaximum ())
485+
486+ function cholesky_instance (A:: Union{SparseMatrixCSC,Symmetric{<:Number,<:SparseMatrixCSC}} , pivot = DEFAULT_CHOLESKY_PIVOT)
480487 cholesky (sparse (similar (A, 1 , 1 )), check = false )
481488end
482489
@@ -485,15 +492,15 @@ cholesky_instance(a::Number, pivot = LinearAlgebra.RowMaximum()) -> a
485492
486493Returns the number.
487494"""
488- cholesky_instance (a:: Number , pivot = LinearAlgebra . RowMaximum () ) = a
495+ cholesky_instance (a:: Number , pivot = DEFAULT_CHOLESKY_PIVOT ) = a
489496
490497"""
491498cholesky_instance(a::Any, pivot = LinearAlgebra.RowMaximum()) -> cholesky(a, check=false)
492499
493500Slow fallback which gets the instance via factorization. Should get
494501specialized for new matrix types.
495502"""
496- cholesky_instance (a:: Any , pivot = LinearAlgebra . RowMaximum () ) = cholesky (a, pivot, check = false )
503+ cholesky_instance (a:: Any , pivot = DEFAULT_CHOLESKY_PIVOT ) = cholesky (a, pivot, check = false )
497504
498505"""
499506ldlt_instance(A) -> ldlt_factorization_instance
0 commit comments