Skip to content

Commit

Permalink
fixes constness of apply overload return value
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelKoch committed Jul 22, 2021
1 parent 5d8ea82 commit 24c355b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions include/ginkgo/core/base/lin_op.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -864,23 +864,23 @@ class EnableValueTypedLinOp
return this->apply(alpha, b, dense_beta.get(), x);
}

const ConcreteLinOp *apply(const ValueType alpha, const LinOp *b,
const ValueType beta, LinOp *x)
ConcreteLinOp *apply(const ValueType alpha, const LinOp *b,
const ValueType beta, LinOp *x)
{
auto dense_alpha = scalar_to_dense(alpha, this->get_executor());
auto dense_beta = scalar_to_dense(beta, this->get_executor());
return this->apply(dense_alpha.get(), b, dense_beta.get(), x);
}

const ConcreteLinOp *apply(const ValueType alpha, const LinOp *b,
const LinOp *beta, LinOp *x)
ConcreteLinOp *apply(const ValueType alpha, const LinOp *b,
const LinOp *beta, LinOp *x)
{
auto dense_alpha = scalar_to_dense(alpha, this->get_executor());
return this->apply(dense_alpha.get(), b, beta, x);
}

const ConcreteLinOp *apply(const LinOp *alpha, const LinOp *b,
const ValueType beta, LinOp *x)
ConcreteLinOp *apply(const LinOp *alpha, const LinOp *b,
const ValueType beta, LinOp *x)
{
auto dense_beta = scalar_to_dense(beta, this->get_executor());
return this->apply(alpha, b, dense_beta.get(), x);
Expand Down

0 comments on commit 24c355b

Please sign in to comment.