JuliaLinearAlgebra / Octavian.jl

Multi-threaded BLAS-like library that provides pure Julia matrix multiplication
https://julialinearalgebra.github.io/Octavian.jl/stable/
Other
231 stars 18 forks source link

Make the `_matmul` more generic #98

Closed GiggleLiu closed 3 years ago

GiggleLiu commented 3 years ago

There is a Real type annotation added to matmul functions in recent versions.

https://github.com/JuliaLinearAlgebra/Octavian.jl/blob/5ded09521023283c723eabd4126b1e1414c1ab69/src/matmul.jl#L266-L296

This function looks generic, we do not have to throw a type error on this function for non-real input. Now, I have to copy ~100 lines of code from Octavian to TropicalGEMM to fix the broken tests because the TropicalNumber is not a Real number but using exactly the same matrix multiplication code.

Actually, as @chriselrod mentioned before, any composite type with multiple fields is not supported yet, not because the type is not Real. May I open a PR to undo this change?

chriselrod commented 3 years ago

May I open a PR to undo this change?

Okay.