Ginkgo Generated from branch based on master. Ginkgo version 1.8.0
A numerical linear algebra library targeting many-core architectures
Loading...
Searching...
No Matches
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
13namespace gko {
14namespace solver {
15
16
28template <typename SolverType, typename = void>
29struct has_with_criteria : std::false_type {};
30
38template <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_
The Ginkgo namespace.
Definition abstract_factory.hpp:20
Helper structure to test if the Factory of SolverType has a function with_criteria.
Definition solver_traits.hpp:29