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_CORE_TENSOR_ZERO_H
4#define pRC_CORE_TENSOR_ZERO_H
5
9
10namespace pRC
11{
21 template<class T>
22 struct Zero<T, If<IsTensorView<T>>> : Zero<ResultOf<Eval, T>>
23 {
24 };
25
31 template<class T>
32 struct Zero<T, If<IsTensor<T>>>
33 {
38 constexpr auto operator()()
39 {
40 auto const f = []()
41 {
43 };
44 using F = RemoveConstReference<decltype(f)>;
45 using Sizes = typename T::Sizes;
47 }
48 };
49}
50#endif // pRC_CORE_TENSOR_ZERO_H
Definition sequence.hpp:56
Definition loop.hpp:18
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
Definition type_traits.hpp:60
Definition type_traits.hpp:16
constexpr auto operator()()
Returns the zero of Tensor class T, i.e. a Tensor filled with zeros.
Definition zero.hpp:38
Definition type_traits.hpp:268