JuliaApproximation / SemiclassicalOrthogonalPolynomials.jl

A Julia repository for semiclassical orthogonal polynomials
MIT License
7 stars 3 forks source link

Slow lazy multiplication of Jacobi matrices #77

Closed ioannisPApapadopoulos closed 1 year ago

ioannisPApapadopoulos commented 1 year ago

I think that the new QR/Cholesky Jacobi matrices have a lazy multiplication that hangs. Does this hang for you? @dlfivefifty @TSGut

using SemiclassicalOrthogonalPolynomials, ClassicalOrthogonalPolynomials
X = jacobimatrix(SemiclassicalJacobi(1.1,0,0,10))
X*X
ioannisPApapadopoulos commented 1 year ago

For me it seems to hang in default_blasmul!

TSGut commented 1 year ago

I'll check. In the meantime you should be able to use ApplyArray(*,X,X).

dlfivefifty commented 1 year ago

I think we just need the MemoryLayout of QRJacobiData to be lazy.

dlfivefifty commented 1 year ago

https://github.com/JuliaApproximation/ClassicalOrthogonalPolynomials.jl/blob/4789503e1c4900d54be01a55a9d2e511f6530563/src/choleskyQR.jl#L138

Make this <: LazyMatrix

TSGut commented 1 year ago

I will test that and make a PR

TSGut commented 1 year ago

This should be fixed now, let me know if it isn't.