5#ifndef GKO_PUBLIC_CORE_BASE_TYPE_TRAITS_HPP_
6#define GKO_PUBLIC_CORE_BASE_TYPE_TRAITS_HPP_
10#include <ginkgo/core/base/lin_op.hpp>
16template <
typename Type>
17constexpr bool is_ginkgo_linop = std::is_base_of_v<LinOp, Type>;
21template <
typename Type>
22struct factory_type_impl {
23 using type =
typename Type::Factory;
28struct factory_type_impl<LinOp> {
29 using type = LinOpFactory;
33template <
typename Type>
34using factory_type =
typename factory_type_impl<Type>::type;
38template <
typename Type,
typename =
void>
39struct transposed_type_impl {
40 using type =
typename Type::transposed_type;
45struct transposed_type_impl<LinOp, void> {
51template <
typename Type>
52struct transposed_type_impl<Type, std::enable_if_t<!is_ginkgo_linop<Type>>> {
57template <
typename Type>
58using transposed_type =
typename transposed_type_impl<Type>::type;
62template <
typename Type,
typename =
void>
63struct get_value_type_impl {
64 using type =
typename Type::value_type;
69template <
typename Type>
70struct get_value_type_impl<Type, std::enable_if_t<!is_ginkgo_linop<Type>>> {
75template <
typename Type>
76using get_value_type =
typename get_value_type_impl<Type>::type;
The Ginkgo namespace.
Definition abstract_factory.hpp:20