pRC
multi-purpose Tensor Train library for C++
Loading...
Searching...
No Matches
view.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_TENSOR_TRAIN_TENSOR_FUNCTIONS_VIEW_H
4#define pRC_TENSOR_TRAIN_TENSOR_FUNCTIONS_VIEW_H
5
8
9namespace pRC
10{
11 template<class X, If<TensorTrain::IsTensorView<RemoveReference<X>>> = 0>
12 static inline constexpr X view(X &&a)
13 {
14 return forward<X>(a);
15 }
16
17 template<class T, class N, class R>
18 static inline constexpr auto view(TensorTrain::Tensor<T, N, R> const &a)
19 {
21 }
22
23 template<class T, class N, class R>
24 static inline constexpr auto view(TensorTrain::Tensor<T, N, R> &a)
25 {
27 }
28
29 template<class T, class N, class R>
30 static inline constexpr auto view(
31 TensorTrain::Tensor<T, N, R> const &&) = delete;
32}
33#endif // pRC_TENSOR_TRAIN_TENSOR_FUNCTIONS_VIEW_H
Definition reference_to_const.hpp:20
Definition reference.hpp:18
Definition type_traits.hpp:17
Definition cholesky.hpp:18
static constexpr X view(X &&a)
Returns a TensorView obtained from a TensorView.
Definition view.hpp:22
static constexpr Conditional< IsSatisfied< C >, RemoveConstReference< X >, X > copy(X &&a)
Definition copy.hpp:13