cMHN 1.1
C++ library for learning MHNs with pRC
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 type_traits.hpp:17
ReferenceToConst(Tensor< T, N, Ranks > const &) -> ReferenceToConst< T, N, Ranks >
Reference(Tensor< T, N, Ranks > &) -> Reference< T, N, Ranks >
Definition cholesky.hpp:18
static constexpr auto makeConstantSequence()
Definition sequence.hpp:402
static constexpr X view(X &&a)
Definition view.hpp:12