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
utils.hpp
1// SPDX-FileCopyrightText: 2017 - 2024 The Ginkgo authors
2//
3// SPDX-License-Identifier: BSD-3-Clause
4
5#ifndef GKO_PUBLIC_CORE_PRECONDITIONER_UTILS_HPP_
6#define GKO_PUBLIC_CORE_PRECONDITIONER_UTILS_HPP_
7
8
9#include <type_traits>
10
11
12#include <ginkgo/core/preconditioner/isai.hpp>
13
14
15namespace gko {
16namespace preconditioner {
17namespace detail {
18
19
20// true_type if ExplicitType is an instantiation of TemplateType.
21template <typename ExplicitType, template <typename...> class TemplateType>
22struct is_instantiation_of : std::false_type {};
23
24template <template <typename...> class Type, typename... Param>
25struct is_instantiation_of<Type<Param...>, Type> : std::true_type {};
26
27// LowerIsai will be treated as Isai<...> so it does not match LowerIsai<...>
28template <typename ValueType, typename IndexType>
29struct is_instantiation_of<LowerIsai<ValueType, IndexType>, LowerIsai>
30 : std::true_type {};
31
32
33} // namespace detail
34} // namespace preconditioner
35} // namespace gko
36
37#endif // GKO_PUBLIC_CORE_PRECONDITIONER_UTILS_HPP_
The Ginkgo namespace.
Definition abstract_factory.hpp:20