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