|
Ginkgo
Generated from pipelines/1556235455 branch based on develop. Ginkgo version 1.9.0
A numerical linear algebra library targeting many-core architectures
|
5 #ifndef GKO_PUBLIC_CORE_MATRIX_ROW_GATHERER_HPP_
6 #define GKO_PUBLIC_CORE_MATRIX_ROW_GATHERER_HPP_
14 #include <ginkgo/core/base/array.hpp>
15 #include <ginkgo/core/base/exception.hpp>
16 #include <ginkgo/core/base/exception_helpers.hpp>
17 #include <ginkgo/core/base/executor.hpp>
18 #include <ginkgo/core/base/lin_op.hpp>
19 #include <ginkgo/core/base/types.hpp>
20 #include <ginkgo/core/base/utils.hpp>
42 template <
typename IndexType =
int32>
47 using index_type = IndexType;
76 static std::unique_ptr<RowGatherer>
create(
77 std::shared_ptr<const Executor> exec,
const dim<2>& size = {});
93 static std::unique_ptr<RowGatherer>
create(
94 std::shared_ptr<const Executor> exec,
const dim<2>& size,
108 std::shared_ptr<const Executor> exec,
const dim<2>& size,
109 gko::detail::const_array_view<IndexType>&& row_idxs);
112 RowGatherer(std::shared_ptr<const Executor> exec,
const dim<2>& size = {});
114 RowGatherer(std::shared_ptr<const Executor> exec,
const dim<2>& size,
115 array<index_type> row_idxs);
117 void apply_impl(
const LinOp* in,
LinOp* out)
const override;
119 void apply_impl(
const LinOp* alpha,
const LinOp* in,
const LinOp* beta,
120 LinOp* out)
const override;
131 #endif // GKO_PUBLIC_CORE_MATRIX_ROW_GATHERER_HPP_
Definition: lin_op.hpp:117
RowGatherer is a matrix "format" which stores the gather indices arrays which can be used to gather r...
Definition: row_gatherer.hpp:43
The Ginkgo namespace.
Definition: abstract_factory.hpp:20
static std::unique_ptr< const RowGatherer > create_const(std::shared_ptr< const Executor > exec, const dim< 2 > &size, gko::detail::const_array_view< IndexType > &&row_idxs)
Creates a constant (immutable) RowGatherer matrix from a constant array.
value_type * get_data() noexcept
Returns a pointer to the block of memory used to store the elements of the array.
Definition: array.hpp:673
static std::unique_ptr< RowGatherer > create(std::shared_ptr< const Executor > exec, const dim< 2 > &size={})
Creates uninitialized RowGatherer arrays of the specified size.
const value_type * get_const_data() const noexcept
Returns a constant pointer to the block of memory used to store the elements of the array.
Definition: array.hpp:682
index_type * get_row_idxs() noexcept
Returns a pointer to the row index array for gathering.
Definition: row_gatherer.hpp:54
const index_type * get_const_row_idxs() const noexcept
Returns a pointer to the row index array for gathering.
Definition: row_gatherer.hpp:63
The EnableLinOp mixin can be used to provide sensible default implementations of the majority of the ...
Definition: lin_op.hpp:877
LinOp(const LinOp &)=default
Copy-constructs a LinOp.
This mixin inherits from (a subclass of) PolymorphicObject and provides a base implementation of a ne...
Definition: polymorphic_object.hpp:661