Skip to content

Commit

Permalink
Parallel summation
Browse files Browse the repository at this point in the history
  • Loading branch information
TLCFEM committed Jan 14, 2024
1 parent b468014 commit edda2b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Domain/MetaMat/DenseMat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ template<sp_d T> class DenseMat : public MetaMat<T> {
this->factored = false;
if(1. == scalar) arrayops::inplace_plus(memptr(), M->memptr(), this->n_elem);
else if(-1. == scalar) arrayops::inplace_minus(memptr(), M->memptr(), this->n_elem);
else for(auto I = 0llu; I < this->n_elem; ++I) memptr()[I] += scalar * M->memptr()[I];
else suanpan::for_each(this->n_elem, [&](const uword I) { memptr()[I] += scalar * M->memptr()[I]; });
}

void scale_accu(const T scalar, const triplet_form<T, uword>& M) override {
Expand Down

0 comments on commit edda2b0

Please sign in to comment.