Ginkgo  Generated from pipelines/1571899447 branch based on develop. Ginkgo version 1.9.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 <type_traits>
10 
11 #include <ginkgo/core/stop/criterion.hpp>
12 
13 
14 namespace gko {
15 namespace solver {
16 
17 
29 template <typename SolverType, typename = void>
30 struct has_with_criteria : std::false_type {};
31 
39 template <typename SolverType>
40 struct has_with_criteria<SolverType,
41  std::void_t<decltype(SolverType::build().with_criteria(
42  std::shared_ptr<const stop::CriterionFactory>()))>>
43  : std::true_type {};
44 
45 
46 } // namespace solver
47 } // namespace gko
48 
49 #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:30
gko
The Ginkgo namespace.
Definition: abstract_factory.hpp:20