JuliaSparse / KLU.jl

Julia Wrapper for the KLU sparse matrix solver from SuiteSparse
https://klu.juliasparse.org/
MIT License
26 stars 6 forks source link

Implicit promotion from F32 to F64 #9

Closed mzy2240 closed 1 year ago

mzy2240 commented 1 year ago
factor = klu(A);

When A is a sparse matrix of Float32 type, feeding into klu will result in a Float64 factorized matrix. Is it possible to stick to Float32 for the whole symbolic and numerical factorization process?

rayegun commented 1 year ago

No, unfortunately Float64 and ComplexF64 are the only supported numeric types. See Section 5 of https://fossies.org/linux/SuiteSparse/KLU/Doc/KLU_UserGuide.pdf. I'll have a port of KLU to Julia native out as soon as I find time to polish it. Which will support any numeric type.

I'll leave this open for now to remind me to ping here when I release the port.

mzy2240 commented 1 year ago

Did not aware that KLU only supports double. Sorry for the unreasonable request and definitely looking forward to the Julia native implementation!