ginkgo/core/reorder/amd.hpp Source File

ginkgo/core/reorder/amd.hpp Source File#

Reference API: ginkgo/core/reorder/amd.hpp Source File
Reference API
amd.hpp
1// SPDX-FileCopyrightText: 2017 - 2024 The Ginkgo authors
2//
3// SPDX-License-Identifier: BSD-3-Clause
4
5#ifndef GKO_PUBLIC_CORE_REORDER_AMD_HPP_
6#define GKO_PUBLIC_CORE_REORDER_AMD_HPP_
7
8
9#include <memory>
10
11#include <ginkgo/core/base/abstract_factory.hpp>
12#include <ginkgo/core/base/lin_op.hpp>
13#include <ginkgo/core/base/polymorphic_object.hpp>
14#include <ginkgo/core/base/types.hpp>
15#include <ginkgo/core/matrix/permutation.hpp>
16
17
18namespace gko {
19namespace experimental {
25namespace reorder {
26
27
35template <typename IndexType = int32>
36class Amd : public EnablePolymorphicObject<Amd<IndexType>, LinOpFactory>,
37 public EnablePolymorphicAssignment<Amd<IndexType>> {
38public:
39 struct parameters_type;
40 friend class EnablePolymorphicObject<Amd<IndexType>, LinOpFactory>;
41 friend class enable_parameters_type<parameters_type, Amd<IndexType>>;
42
43 using index_type = IndexType;
45
47 : public enable_parameters_type<parameters_type, Amd<IndexType>> {
53
60 };
61
67 const parameters_type& get_parameters() { return parameters_; }
68
76 std::unique_ptr<permutation_type> generate(
77 std::shared_ptr<const LinOp> system_matrix) const;
78
80 static parameters_type build() { return {}; }
81
82protected:
83 explicit Amd(std::shared_ptr<const Executor> exec,
84 const parameters_type& params = {});
85
86 std::unique_ptr<LinOp> generate_impl(
87 std::shared_ptr<const LinOp> system_matrix) const override;
88
89 parameters_type parameters_;
90};
91
92
93} // namespace reorder
94} // namespace experimental
95} // namespace gko
96
97
98#endif // GKO_PUBLIC_CORE_REORDER_AMD_HPP_
Definition polymorphic_object.hpp:743
Definition polymorphic_object.hpp:668
Definition lin_op.hpp:385
Definition abstract_factory.hpp:211
Definition amd.hpp:37
static parameters_type build()
Definition amd.hpp:80
std::unique_ptr< permutation_type > generate(std::shared_ptr< const LinOp > system_matrix) const
const parameters_type & get_parameters()
Definition amd.hpp:67
Definition permutation.hpp:111
#define GKO_FACTORY_PARAMETER_SCALAR(_name, _default)
Definition abstract_factory.hpp:445
The Ginkgo namespace.
Definition abstract_factory.hpp:20