Ginkgo  Generated from pipelines/1589998975 branch based on develop. Ginkgo version 1.10.0
A numerical linear algebra library targeting many-core architectures
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 
14 namespace gko {
15 namespace preconditioner {
16 namespace detail {
17 
18 
19 // true_type if ExplicitType is an instantiation of TemplateType.
20 template <typename ExplicitType, template <typename...> class TemplateType>
21 struct is_instantiation_of : std::false_type {};
22 
23 template <template <typename...> class Type, typename... Param>
24 struct is_instantiation_of<Type<Param...>, Type> : std::true_type {};
25 
26 // LowerIsai will be treated as Isai<...> so it does not match LowerIsai<...>
27 template <typename ValueType, typename IndexType>
28 struct 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_
gko
The Ginkgo namespace.
Definition: abstract_factory.hpp:20