pRC
multi-purpose Tensor Train library for C++
Loading...
Searching...
No Matches
common.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_TENSOR_COMMON_H
4#define pRC_CORE_TENSOR_COMMON_H
5
9
10namespace pRC
11{
12 template<class TA, class TB, Index... Ns>
13 struct CommonType<Tensor<TA, Ns...>, Tensor<TB, Ns...>,
14 If<HasCommon<TA, TB>>>
15 {
17 };
18
19 template<class VA, class VB>
20 struct CommonType<VA, VB,
23 : CommonType<ResultOf<Eval, VA>, ResultOf<Eval, VB>>
24 {
25 };
26
27 template<class VA, class TB>
28 struct CommonType<VA, TB,
31 : CommonType<ResultOf<Eval, VA>, TB>
32 {
33 };
34
35 template<class TA, class VB>
36 struct CommonType<TA, VB,
39 : CommonType<TA, ResultOf<Eval, VB>>
40 {
41 };
42}
43#endif // pRC_CORE_TENSOR_COMMON_H
Class storing tensors.
Definition tensor.hpp:44
Definition cholesky.hpp:18
std::conjunction< Bs... > All
Definition type_traits.hpp:77
std::invoke_result_t< F, Args... > ResultOf
Definition type_traits.hpp:140
std::enable_if_t< B{}, int > If
Definition type_traits.hpp:68
static constexpr Conditional< IsSatisfied< C >, RemoveConstReference< X >, X > copy(X &&a)
Definition copy.hpp:13
Size Index
Definition type_traits.hpp:21
Definition common.hpp:36
Definition type_traits.hpp:159
Definition eval.hpp:11
Definition type_traits.hpp:60
Definition type_traits.hpp:16