pRC
multi-purpose Tensor Train library for C++
Loading...
Searching...
No Matches
print.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_TENSOR_TRAIN_COMMON_FUNCTIONS_PRINT_H
4#define pRC_TENSOR_TRAIN_COMMON_FUNCTIONS_PRINT_H
5
10
11namespace pRC
12{
13 template<class X, class S, class R = RemoveReference<X>,
14 If<Any<TensorTrain::IsTensorish<R>, TensorTrain::IsOperatorish<R>>> = 0>
15 static inline void print(X &&arg, S &&stream)
16 {
18 print(":\n", stream);
19
20 range<Context::CompileTime, typename R::Dimension{}>(
21 [&arg, &stream](auto const c)
22 {
23 print(arg.template core<c>(), stream);
24 });
25 }
26}
27#endif // pRC_TENSOR_TRAIN_COMMON_FUNCTIONS_PRINT_H
Definition cholesky.hpp:18
static constexpr auto arg(Complex< T > const &a)
Definition arg.hpp:12
std::invoke_result_t< F, Args... > ResultOf
Definition type_traits.hpp:140
static auto print(String< N > const &string, std::FILE *stream)
Definition print.hpp:18
static constexpr auto range(F &&f, Xs &&...args)
Definition range.hpp:16
static constexpr Conditional< IsSatisfied< C >, RemoveConstReference< X >, X > copy(X &&a)
Definition copy.hpp:13
static constexpr auto name()
Definition type_name.hpp:11