Skip to content

Commit

Permalink
improve static performance of perm matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
GiggleLiu committed Feb 26, 2024
1 parent 32f0fe6 commit aaf1ff0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/linalg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ end
function Base.:*(A::PermMatrixCSC, B::PermMatrixCSC)
@assert basetype(A) == basetype(B)
size(A, 1) == size(B, 1) || throw(DimensionMismatch())
basetype(A)(A.perm[B.perm], [B.vals[i] * A.vals[B.perm[i]] for i in 1:size(A, 1)])
basetype(A)(A.perm[B.perm], B.vals .* view(A.vals, B.perm))
end

# to matrix
Expand Down

0 comments on commit aaf1ff0

Please sign in to comment.