cMHN 1.1
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
eval.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_TENSOR_FUNCTIONS_EVAL_H
4#define pRC_CORE_TENSOR_FUNCTIONS_EVAL_H
5
7
8namespace pRC
9{
10 template<class X, If<IsTensor<RemoveReference<X>>> = 0>
11 static inline constexpr X eval(X &&a)
12 {
13 return forward<X>(a);
14 }
15
16 template<class X, If<IsTensorView<RemoveReference<X>>> = 0>
17 static inline constexpr auto eval(X &&a)
18 {
19 return Tensor(forward<X>(a));
20 }
21}
22#endif // pRC_CORE_TENSOR_FUNCTIONS_EVAL_H
Definition cholesky.hpp:18
static constexpr X eval(X &&a)
Definition eval.hpp:11
static constexpr auto makeConstantSequence()
Definition sequence.hpp:402
Tensor(TensorViews::View< T, Sizes< Ns... >, F > const &) -> Tensor< T, Ns... >