Skip to content

Commit

Permalink
make_srow only when executors are different
Browse files Browse the repository at this point in the history
  • Loading branch information
yhmtsai committed Oct 30, 2019
1 parent 0e6bac0 commit 4126b06
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions include/ginkgo/core/matrix/csr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,17 @@ class Csr : public EnableLinOp<Csr<ValueType, IndexType>>,
void convert_to(Csr<ValueType, IndexType> *result) const override
{
EnableLinOp<Csr>::convert_to(result);
result->make_srow();
if (this->get_executor() != result->get_executor()) {
result->make_srow();
}
}

void move_to(Csr<ValueType, IndexType> *result) override
{
EnableLinOp<Csr>::move_to(result);
result->make_srow();
if (this->get_executor() != result->get_executor()) {
result->make_srow();
}
}

void convert_to(Dense<ValueType> *other) const override;
Expand Down

0 comments on commit 4126b06

Please sign in to comment.