pRC
multi-purpose Tensor Train library for C++
Loading...
Searching...
No Matches
zero.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_TENSOR_TRAIN_OPERATOR_ZERO_H
4#define pRC_TENSOR_TRAIN_OPERATOR_ZERO_H
5
9
10namespace pRC
11{
12 template<class T>
13 struct Zero<T, If<TensorTrain::IsOperatorView<T>>> : Zero<ResultOf<Eval, T>>
14 {
15 };
16
17 template<class T>
18 struct Zero<T, If<TensorTrain::IsOperator<T>>>
19 {
20 constexpr auto operator()()
21 {
22 auto const f = []<Index C>()
23 {
25 };
26
27 using F = RemoveConstReference<decltype(f)>;
28 using M = typename T::M;
29 using N = typename T::N;
30 using Ranks = typename T::Ranks;
31
32 return TensorTrain::OperatorViews::Enumerate<typename T::Type, M, N,
33 Ranks, F>(f);
34 }
35 };
36}
37#endif // pRC_TENSOR_TRAIN_OPERATOR_ZERO_H
Definition cholesky.hpp:18
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
RemoveConst< RemoveReference< T > > RemoveConstReference
Definition type_traits.hpp:62
Size Index
Definition type_traits.hpp:21
constexpr auto operator()()
Definition zero.hpp:20
Definition type_traits.hpp:268