Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't use generated function implimentation of naivemul for sparse matrices #175

Merged
merged 1 commit into from
Jun 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/exp_generic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
B::StridedMatrix{T}) where {T <: LinearAlgebra.BlasFloat}
mul!(C, A, B)
end
function naivemul!(C::AbstractSparseMatrix, A::AbstractSparseMatrix,

Check warning on line 9 in src/exp_generic.jl

View check run for this annotation

Codecov / codecov/patch

src/exp_generic.jl#L9

Added line #L9 was not covered by tests
B::AbstractSparseMatrix)
mul!(C, A, B)

Check warning on line 11 in src/exp_generic.jl

View check run for this annotation

Codecov / codecov/patch

src/exp_generic.jl#L11

Added line #L11 was not covered by tests
end
function naivemul!(C, A, B)
Maxis, Naxis = axes(C)
# TODO: heuristically pick `Nunroll` and `Munroll` using `sizeof(T)`, and maybe based on size of register file as well.
Expand Down Expand Up @@ -136,7 +140,7 @@
(Vk === Val{13}() && x isa AbstractMatrix && ismutable(x)) &&
return exp_generic_mutable(x, s, Val{13}())
if s >= 1
return exponential!(x / (2^s), method)^(2^s)
return exponential!(x / (2^s), method, cache)^(2^s)

Check warning on line 143 in src/exp_generic.jl

View check run for this annotation

Codecov / codecov/patch

src/exp_generic.jl#L143

Added line #L143 was not covered by tests
else
return exp_pade_p(x, Vk, Vk) / exp_pade_q(x, Vk, Vk)
end
Expand Down
Loading