Skip to content

Commit

Permalink
fix in-place sparse matrix code
Browse files Browse the repository at this point in the history
  • Loading branch information
shashi committed Mar 13, 2021
1 parent 9cac075 commit 5a42da6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/build_function.jl
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,10 @@ function set_array(s::MultithreadedForm, closed_args, out, outputidxs, rhss, che
SpawnFetch{MultithreadedForm}(first.(arrays), last.(arrays), @inline noop(args...) = nothing)
end

function _set_array(out, outputidxs, rhss::AbstractSparseArray, checkbounds, skipzeros)
_set_array(LiteralExpr(:($out.nzval)), nothing, rhss.nzval, checkbounds, skipzeros)
end

function _set_array(out, outputidxs, rhss::AbstractArray, checkbounds, skipzeros)
if outputidxs === nothing
outputidxs = collect(eachindex(rhss))
Expand Down

0 comments on commit 5a42da6

Please sign in to comment.