Ginkgo Generated from branch based on main. Ginkgo version 1.10.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 <type_traits>
10
11#include <ginkgo/core/stop/criterion.hpp>
12
13
14namespace gko {
15namespace solver {
16
17
29template <typename SolverType, typename = void>
30struct has_with_criteria : std::false_type {};
31
39template <typename SolverType>
40struct 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_
The ginkgo Solve namespace.
Definition bicg.hpp:28
The Ginkgo namespace.
Definition abstract_factory.hpp:20
STL namespace.
Helper structure to test if the Factory of SolverType has a function with_criteria.
Definition solver_traits.hpp:30