Ginkgo  Generated from pipelines/1330831941 branch based on master. Ginkgo version 1.8.0
A numerical linear algebra library targeting many-core architectures
solver_traits.hpp
1 // SPDX-FileCopyrightText: 2017 - 2024 The Ginkgo authors
2 //
3 // SPDX-License-Identifier: BSD-3-Clause
4 
5 #ifndef GKO_PUBLIC_CORE_SOLVER_SOLVER_TRAITS_HPP_
6 #define GKO_PUBLIC_CORE_SOLVER_SOLVER_TRAITS_HPP_
7 
8 
9 #include <ginkgo/core/base/std_extensions.hpp>
10 #include <ginkgo/core/stop/criterion.hpp>
11 
12 
13 namespace gko {
14 namespace solver {
15 
16 
28 template <typename SolverType, typename = void>
29 struct has_with_criteria : std::false_type {};
30 
38 template <typename SolverType>
40  SolverType, xstd::void_t<decltype(SolverType::build().with_criteria(
41  std::shared_ptr<const stop::CriterionFactory>()))>>
42  : std::true_type {};
43 
44 
45 } // namespace solver
46 } // namespace gko
47 
48 #endif // GKO_PUBLIC_CORE_SOLVER_SOLVER_TRAITS_HPP_
gko::log::profile_event_category::solver
Solver events.
gko::solver::has_with_criteria
Helper structure to test if the Factory of SolverType has a function with_criteria.
Definition: solver_traits.hpp:29
gko
The Ginkgo namespace.
Definition: abstract_factory.hpp:20