diff --git a/include/ginkgo/core/base/combination.hpp b/include/ginkgo/core/base/combination.hpp index a9fb4d565ae..19ce24896ab 100644 --- a/include/ginkgo/core/base/combination.hpp +++ b/include/ginkgo/core/base/combination.hpp @@ -38,6 +38,19 @@ class Combination : public EnableLinOp>, using value_type = ValueType; using transposed_type = Combination; + /** + * Creates an empty linear combination with given size. + * + * @param exec Executor associated to the linear combination + */ + explicit Combination(std::shared_ptr exec, + const gko::dim<2>& size) + : EnableLinOp(exec) + { + this->set_size(size); + } + + /** * Returns a list of coefficients of the combination. * @@ -91,7 +104,6 @@ class Combination : public EnableLinOp>, */ Combination(Combination&&); -protected: void add_operators() {} template @@ -112,6 +124,7 @@ class Combination : public EnableLinOp>, add_operators(std::forward(rest)...); } +protected: /** * Creates an empty linear combination (0x0 operator). *