Ginkgo  Generated from pipelines/1330831941 branch based on master. Ginkgo version 1.8.0
A numerical linear algebra library targeting many-core architectures
batch_bicgstab.hpp
1 // SPDX-FileCopyrightText: 2017 - 2024 The Ginkgo authors
2 //
3 // SPDX-License-Identifier: BSD-3-Clause
4 
5 #ifndef GKO_PUBLIC_CORE_SOLVER_BATCH_BICGSTAB_HPP_
6 #define GKO_PUBLIC_CORE_SOLVER_BATCH_BICGSTAB_HPP_
7 
8 
9 #include <vector>
10 
11 
12 #include <ginkgo/core/base/batch_lin_op.hpp>
13 #include <ginkgo/core/base/batch_multi_vector.hpp>
14 #include <ginkgo/core/base/exception_helpers.hpp>
15 #include <ginkgo/core/base/lin_op.hpp>
16 #include <ginkgo/core/base/types.hpp>
17 #include <ginkgo/core/solver/batch_solver_base.hpp>
18 #include <ginkgo/core/stop/batch_stop_enum.hpp>
19 
20 
21 namespace gko {
22 namespace batch {
23 namespace solver {
24 
25 
50 template <typename ValueType = default_precision>
51 class Bicgstab final
52  : public EnableBatchSolver<Bicgstab<ValueType>, ValueType> {
53  friend class EnableBatchLinOp<Bicgstab>;
55 
56 public:
57  using value_type = ValueType;
58  using real_type = gko::remove_complex<ValueType>;
59 
60  class Factory;
61 
64  parameters_type, Factory> {};
67 
68 private:
69  explicit Bicgstab(std::shared_ptr<const Executor> exec);
70 
71  explicit Bicgstab(const Factory* factory,
72  std::shared_ptr<const BatchLinOp> system_matrix);
73 
74  void solver_apply(
76  log::detail::log_data<real_type>* log_data) const override;
77 };
78 
79 
80 } // namespace solver
81 } // namespace batch
82 } // namespace gko
83 
84 
85 #endif // GKO_PUBLIC_CORE_SOLVER_BATCH_BICGSTAB_HPP_
gko::batch::EnableBatchLinOp
The EnableBatchLinOp mixin can be used to provide sensible default implementations of the majority of...
Definition: batch_lin_op.hpp:251
gko::batch::solver::Bicgstab::Factory
Definition: batch_bicgstab.hpp:65
gko::log::profile_event_category::solver
Solver events.
gko::batch::BatchLinOp
Definition: batch_lin_op.hpp:60
gko::batch::MultiVector
MultiVector stores multiple vectors in a batched fashion and is useful for batched operations.
Definition: batch_multi_vector.hpp:53
gko::batch::solver::EnableBatchSolver
This mixin provides apply and common iterative solver functionality to all the batched solvers.
Definition: batch_solver_base.hpp:204
gko
The Ginkgo namespace.
Definition: abstract_factory.hpp:20
gko::batch::solver::Bicgstab::parameters_type
Definition: batch_bicgstab.hpp:62
gko::batch::solver::Bicgstab
BiCGSTAB or the Bi-Conjugate Gradient-Stabilized is a Krylov subspace solver.
Definition: batch_bicgstab.hpp:51
gko::batch::solver::enable_preconditioned_iterative_solver_factory_parameters
Definition: batch_solver_base.hpp:153
GKO_ENABLE_BUILD_METHOD
#define GKO_ENABLE_BUILD_METHOD(_factory_name)
Defines a build method for the factory, simplifying its construction by removing the repetitive typin...
Definition: abstract_factory.hpp:394
GKO_ENABLE_BATCH_LIN_OP_FACTORY
#define GKO_ENABLE_BATCH_LIN_OP_FACTORY(_batch_lin_op, _parameters_name, _factory_name)
This macro will generate a default implementation of a BatchLinOpFactory for the BatchLinOp subclass ...
Definition: batch_lin_op.hpp:359
gko::remove_complex
typename detail::remove_complex_s< T >::type remove_complex
Obtain the type which removed the complex of complex/scalar type or the template parameter of class b...
Definition: math.hpp:326
gko::EnablePolymorphicObject
This mixin inherits from (a subclass of) PolymorphicObject and provides a base implementation of a ne...
Definition: polymorphic_object.hpp:662