Ginkgo Generated from branch based on main. Ginkgo version 1.9.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#include <ginkgo/core/preconditioner/isai.hpp>
12
13
14namespace gko {
15namespace preconditioner {
16namespace detail {
17
18
19// true_type if ExplicitType is an instantiation of TemplateType.
20template <typename ExplicitType, template <typename...> class TemplateType>
21struct is_instantiation_of : std::false_type {};
22
23template <template <typename...> class Type, typename... Param>
24struct is_instantiation_of<Type<Param...>, Type> : std::true_type {};
25
26// LowerIsai will be treated as Isai<...> so it does not match LowerIsai<...>
27template <typename ValueType, typename IndexType>
28struct is_instantiation_of<LowerIsai<ValueType, IndexType>, LowerIsai>
29 : std::true_type {};
30
31
32} // namespace detail
33} // namespace preconditioner
34} // namespace gko
35
36#endif // GKO_PUBLIC_CORE_PRECONDITIONER_UTILS_HPP_
The Ginkgo namespace.
Definition abstract_factory.hpp:20