Go to the documentation of this file.
26 #ifndef TILEDARRAY_EXPR_TRACE_H__INCLUDED
27 #define TILEDARRAY_EXPR_TRACE_H__INCLUDED
33 namespace expressions {
37 template <
typename,
bool>
62 for (
unsigned int i = 0u; i < tab_; ++i) {
71 void inc() { ++tab_; }
74 void dec() { --tab_; }
94 : os_(os), target_indices_(target_annotation) {}
100 : os_(other.os_), target_indices_(other.target_indices_) {}
107 template <
typename D>
110 os_ << target_indices_ <<
" =\n";
114 expr.
derived().print(expr_stream, target_indices_);
129 template <
typename A,
bool Alias>
138 #endif // TILEDARRAY_EXPR_TRACE_H__INCLUDED
void inc()
Increment the number of tabs.
ExprTraceTarget(std::ostream &os, const std::string &target_annotation)
Constructor.
ExprOStream(const ExprOStream &other)
Copy constructor.
Expression wrapper for array objects.
Base class for expression evaluation.
auto rank(const DistArray< Tile, Policy > &a)
World & get_default_world()
Expression output stream.
void dec()
Decrement the number of tabs.
std::ostream & get_stream() const
Output stream accessor.
const std::string & annotation() const
Tensor annotation accessor.
ExprTraceTarget(const ExprTraceTarget &other)
Copy constructor.
std::ostream & operator<<(const T &t)
Output operator.
std::ostream & operator<<(const Expr< D > &expr) const
Start the expression trace.
ExprOStream(std::ostream &os)
Constructor.
ExprTraceTarget operator<<(std::ostream &os, const TsrExpr< A, Alias > &tsr)
Expression trace factory function.
derived_type & derived()
Cast this object to its derived type.