pRC
multi-purpose Tensor Train library for C++
Loading...
Searching...
No Matches
narrow.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_FUNCTORS_NARROW_H
4#define pRC_CORE_FUNCTORS_NARROW_H
5
8
9namespace pRC
10{
11 template<class F, Index... Ns>
12 struct Narrow
13 {
14 template<class... Xs,
15 If<True<decltype(narrow<F, Ns...>(declval<Xs>()...))>> = 0>
16 constexpr decltype(auto) operator()(Xs &&...args) const
17 {
18 return narrow<F, Ns...>(forward<Xs>(args)...);
19 }
20 };
21}
22#endif // pRC_CORE_FUNCTORS_NARROW_H
Definition cholesky.hpp:18
std::enable_if_t< B{}, int > If
Definition type_traits.hpp:68
static constexpr Conditional< IsSatisfied< C >, RemoveConstReference< X >, X > copy(X &&a)
Definition copy.hpp:13
Size Index
Definition type_traits.hpp:21
static constexpr auto narrow(F &&f, Xs &&...args)
Performs an operation only along given dimensions of Tensors.
Definition narrow.hpp:35
Definition narrow.hpp:13
constexpr decltype(auto) operator()(Xs &&...args) const
Definition narrow.hpp:16
Definition type_traits.hpp:38