cMHN 1.2
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>
12 requires TensorTrain::IsTensorView<RemoveReference<X>>
13 static inline constexpr decltype(auto) view(X &&a)
14 {
15 return as(forward<X>(a));
16 }
17
18 template<class T, class N, class R>
19 static inline constexpr auto view(TensorTrain::Tensor<T, N, R> const &a)
20 {
22 }
23
24 template<class T, class N, class R>
25 static inline constexpr auto view(TensorTrain::Tensor<T, N, R> &a)
26 {
28 }
29
30 template<class T, class N, class R>
31 static inline constexpr auto view(
32 TensorTrain::Tensor<T, N, R> const &&) = delete;
33}
34#endif // pRC_TENSOR_TRAIN_TENSOR_FUNCTIONS_VIEW_H
Definition declarations.hpp:16
ReferenceToConst(Tensor< T, N, Ranks > const &) -> ReferenceToConst< T, N, Ranks >
Reference(Tensor< T, N, Ranks > &) -> Reference< T, N, Ranks >
Definition cholesky.hpp:10
static constexpr decltype(auto) view(X &&a)
Definition view.hpp:13
static constexpr RemoveConst< X > as(X &&a)
Definition basics.hpp:83