JuliaLinearAlgebra / ArrayLayouts.jl

A Julia package for describing array layouts and more general fast linear algebra
https://julialinearalgebra.github.io/ArrayLayouts.jl/
MIT License
54 stars 10 forks source link

Issue with passed layout in default `cholesky!_layout` method for Symmetric matrices #244

Closed DanielVandH closed 1 week ago

DanielVandH commented 3 weeks ago

https://github.com/JuliaLinearAlgebra/ArrayLayouts.jl/blob/a77697d30fb4c954f05a4bb101e6c2e2f8e13a39/src/factorizations.jl#L382-L386

Should the call to _chol! be passing MemoryLayout(A.data) instead of simply layout? Something similar is done for reversecholesky here

https://github.com/JuliaLinearAlgebra/MatrixFactorizations.jl/blob/d3f30bb62fc282e9a3873a858f2823339888e143/src/reversecholesky.jl#L113-L117

which I think is more correct?

jishnub commented 3 weeks ago

I think the idea is that layout represents the desired memory layout that has already been computed? Does this lead to issues somewhere?

DanielVandH commented 3 weeks ago

It doesn't lead to any issues that I've seen, I only noticed it while implementing the two methods elsewhere and saw the difference, so I wasn't sure if it was intentional or not.