33#ifndef GKO_PUBLIC_CORE_REORDER_REORDERING_BASE_HPP_
34#define GKO_PUBLIC_CORE_REORDER_REORDERING_BASE_HPP_
40#include <ginkgo/core/base/abstract_factory.hpp>
41#include <ginkgo/core/base/array.hpp>
42#include <ginkgo/core/base/executor.hpp>
43#include <ginkgo/core/base/lin_op.hpp>
44#include <ginkgo/core/base/polymorphic_object.hpp>
45#include <ginkgo/core/base/utils.hpp>
62template <
typename IndexType =
int32>
66 using index_type = IndexType;
70 return permutation_array_;
76 permutation_array_{exec}
95 std::shared_ptr<LinOp> system_matrix;
98 : system_matrix{system_matrix}
106template <
typename IndexType =
int32>
152#define GKO_ENABLE_REORDERING_BASE_FACTORY(_reordering_base, _parameters_name, \
155 const _parameters_name##_type& get_##_parameters_name() const \
157 return _parameters_name##_; \
160 class _factory_name \
161 : public ::gko::reorder::EnableDefaultReorderingBaseFactory< \
162 _factory_name, _reordering_base, _parameters_name##_type, \
164 friend class ::gko::EnablePolymorphicObject< \
165 _factory_name, ::gko::reorder::ReorderingBaseFactory<IndexType>>; \
166 friend class ::gko::enable_parameters_type<_parameters_name##_type, \
168 explicit _factory_name(std::shared_ptr<const ::gko::Executor> exec) \
169 : ::gko::reorder::EnableDefaultReorderingBaseFactory< \
170 _factory_name, _reordering_base, _parameters_name##_type, \
171 IndexType>(std::move(exec)) \
173 explicit _factory_name(std::shared_ptr<const ::gko::Executor> exec, \
174 const _parameters_name##_type& parameters) \
175 : ::gko::reorder::EnableDefaultReorderingBaseFactory< \
176 _factory_name, _reordering_base, _parameters_name##_type, \
177 IndexType>(std::move(exec), parameters) \
180 friend ::gko::reorder::EnableDefaultReorderingBaseFactory< \
181 _factory_name, _reordering_base, _parameters_name##_type, IndexType>; \
184 _parameters_name##_type _parameters_name##_; \
187 static_assert(true, \
188 "This assert is used to counter the false positive extra " \
189 "semi-colon warnings")
The AbstractFactory is a generic interface template that enables easy implementation of the abstract ...
Definition abstract_factory.hpp:75
This mixin inherits from (a subclass of) PolymorphicObject and provides a base implementation of a ne...
Definition polymorphic_object.hpp:374
This mixin provides a default implementation of a concrete factory.
Definition abstract_factory.hpp:154
An array is a container which encapsulates fixed-sized arrays, stored on the Executor tied to the arr...
Definition array.hpp:187
The ReorderingBase class is a base class for all the reordering algorithms.
Definition reordering_base.hpp:64
The Ginkgo namespace.
Definition abstract_factory.hpp:48
constexpr T one()
Returns the multiplicative identity for T.
Definition math.hpp:803
std::int32_t int32
32-bit signed integral type.
Definition types.hpp:137
This struct is used to pass parameters to the EnableDefaultReorderingBaseFactory::generate() method.
Definition reordering_base.hpp:94