pRC
multi-purpose Tensor Train library for C++
Loading...
Searching...
No Matches
linearize.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_TENSOR_FUNCTIONS_LINEARIZE_H
4#define pRC_CORE_TENSOR_FUNCTIONS_LINEARIZE_H
5
8
9namespace pRC
10{
21 template<class X, class R = RemoveReference<X>, If<IsTensorish<R>> = 0,
22 If<IsSatisfied<(typename R::Dimension{} > 0)>> = 0,
23 If<IsInvocable<Reshape<R::Sizes::size()>, X>> = 0>
24 static inline constexpr auto linearize(X &&a)
25 {
27 }
28}
29#endif // pRC_CORE_TENSOR_FUNCTIONS_LINEARIZE_H
Definition cholesky.hpp:18
static constexpr auto linearize(X &&a)
Linearizes a Tensor into a vector.
Definition linearize.hpp:24
std::enable_if_t< B{}, int > If
Definition type_traits.hpp:68
std::is_invocable< F, Args... > IsInvocable
Definition type_traits.hpp:134
static constexpr Conditional< IsSatisfied< C >, RemoveConstReference< X >, X > copy(X &&a)
Definition copy.hpp:13