@@ -173,18 +173,24 @@ function init_cacheval(alg::QRFactorization, A, b, u, Pl, Pr,
173173 ArrayInterface. qr_instance (convert (AbstractMatrix, A), alg. pivot)
174174end
175175
176+ const PREALLOCATED_QR_ColumnNorm = ArrayInterface. qr_instance (rand (1 , 1 ), ColumnNorm ())
177+
178+ function init_cacheval (alg:: QRFactorization{ColumnNorm} , A:: Matrix{Float64} , b, u, Pl, Pr,
179+ maxiters:: Int , abstol, reltol, verbose:: Bool , assumptions:: OperatorAssumptions )
180+ return PREALLOCATED_QR_ColumnNorm
181+ end
182+
176183function init_cacheval (alg:: QRFactorization , A:: Union{<:Adjoint, <:Transpose} , b, u, Pl, Pr,
177184 maxiters:: Int , abstol, reltol, verbose:: Bool , assumptions:: OperatorAssumptions )
178185 A isa GPUArraysCore. AnyGPUArray && return qr (A)
179186 return qr (A, alg. pivot)
180187end
181188
182- const PREALLOCATED_QR = ArrayInterface. qr_instance (rand (1 , 1 ))
189+ const PREALLOCATED_QR_NoPivot = ArrayInterface. qr_instance (rand (1 , 1 ))
183190
184191function init_cacheval (alg:: QRFactorization{NoPivot} , A:: Matrix{Float64} , b, u, Pl, Pr,
185- maxiters:: Int , abstol, reltol, verbose:: Bool ,
186- assumptions:: OperatorAssumptions )
187- PREALLOCATED_QR
192+ maxiters:: Int , abstol, reltol, verbose:: Bool , assumptions:: OperatorAssumptions )
193+ return PREALLOCATED_QR_NoPivot
188194end
189195
190196function init_cacheval (alg:: QRFactorization , A:: AbstractSciMLOperator , b, u, Pl, Pr,
@@ -1010,7 +1016,16 @@ function init_cacheval(alg::NormalCholeskyFactorization, A, b, u, Pl, Pr,
10101016 maxiters:: Int , abstol, reltol, verbose:: Bool ,
10111017 assumptions:: OperatorAssumptions )
10121018 A_ = convert (AbstractMatrix, A)
1013- return ArrayInterface. cholesky_instance (Symmetric (Matrix {eltype(A)} (undef,0 ,0 )), alg. pivot)
1019+ MType = ArrayInterface. parameterless_type (A_)
1020+ return ArrayInterface. cholesky_instance (Symmetric (MType {eltype(A), 2} (undef,0 ,0 )), alg. pivot)
1021+ end
1022+
1023+ const PREALLOCATED_NORMALCHOLESKY = ArrayInterface. cholesky_instance (
1024+ Symmetric (rand (1 , 1 )), NoPivot ())
1025+
1026+ function init_cacheval (alg:: NormalCholeskyFactorization , A:: Matrix , b, u, Pl, Pr,
1027+ maxiters:: Int , abstol, reltol, verbose:: Bool , assumptions:: OperatorAssumptions )
1028+ return PREALLOCATED_NORMALCHOLESKY
10141029end
10151030
10161031function init_cacheval (alg:: NormalCholeskyFactorization ,
0 commit comments