TRIQS/nda 1.3.0
Multi-dimensional array library for C++
Loading...
Searching...
No Matches

Detailed Description

Various internally used type traits and overloads of the operator<< to output lazy objects to a std::ostream.

Typedefs

template<class T >
using nda::clef::expr_storage_t = typename detail::expr_storage_impl<T>::type
 Type trait to determine how a type should be stored in an expression tree, i.e. either by reference or by value?
 

Functions

template<typename Tag , typename L >
requires std::is_base_of_v<tags::unary_op, Tag>
std::ostream & nda::clef::operator<< (std::ostream &sout, expr< Tag, L > const &ex)
 Print an nda::clef::tags::unary_op expression to std::ostream.
 
template<typename Tag , typename L , typename R >
requires std::is_base_of_v<tags::binary_op, Tag>
std::ostream & nda::clef::operator<< (std::ostream &sout, expr< Tag, L, R > const &ex)
 Print an nda::clef::tags::binary_op expression to std::ostream.
 
template<typename... Ts>
std::ostream & nda::clef::operator<< (std::ostream &sout, expr< tags::function, Ts... > const &ex)
 Print an nda::clef::tags::function expression to std::ostream.
 
template<typename C , typename A , typename B >
std::ostream & nda::clef::operator<< (std::ostream &sout, expr< tags::if_else, C, A, B > const &ex)
 Print an nda::clef::tags::if_else expression to std::ostream.
 
template<typename T >
std::ostream & nda::clef::operator<< (std::ostream &sout, expr< tags::negate, T > const &ex)
 Print an nda::clef::tags::negate expression to std::ostream.
 
template<typename T >
std::ostream & nda::clef::operator<< (std::ostream &sout, expr< tags::subscript, T > const &ex)
 Print an nda::clef::tags::subscript expression to std::ostream.
 
template<typename... Ts>
std::ostream & nda::clef::operator<< (std::ostream &sout, expr< tags::subscript, Ts... > const &ex)
 Print a general nda::clef::tags::subscript expression to std::ostream.
 
template<typename T >
std::ostream & nda::clef::operator<< (std::ostream &sout, expr< tags::terminal, T > const &ex)
 Print an nda::clef::tags::terminal expression to std::ostream.
 
template<typename Expr , int... Is>
std::ostream & nda::clef::operator<< (std::ostream &sout, make_fun_impl< Expr, Is... > const &f)
 Print an nda::clef::make_fun_impl object to std::ostream.
 
template<int N>
std::ostream & nda::clef::operator<< (std::ostream &sout, placeholder< N >)
 Print an nda::clef::placeholder to a std::ostream.
 
template<typename T >
std::ostream & nda::clef::operator<< (std::ostream &sout, std::reference_wrapper< T > const &wrapper)
 Print the value contained in a std::reference_wrapper to std::ostream.
 
template<typename Tuple >
std::ostream & nda::clef::print_tuple (std::ostream &sout, Tuple const &t)
 Print a std::tuple to std::ostream.
 
template<typename T0 , typename... Ts>
std::ostream & nda::clef::variadic_print (std::ostream &sout, T0 &&t0, Ts &&...ts)
 Print a variadic list of arguments to std::ostream.
 

Variables

template<typename T >
constexpr bool nda::clef::force_copy_in_expr = detail::force_copy_in_expr_impl<T>
 Constexpr variable that is true if objects of type T should be forced to be copied into an expression tree.
 
template<typename... Ts>
constexpr bool nda::clef::is_any_lazy = (is_lazy<Ts> or ...)
 Constexpr variable that is true if any of the given types is lazy.
 
template<typename... Ts>
constexpr bool nda::clef::is_clef_expression = is_any_lazy<Ts...>
 Alias template for nda::clef::is_any_lazy.
 
template<typename T >
constexpr bool nda::clef::is_function = detail::is_function_impl<T>
 Constexpr variable that is true if the type T is an nda::clef::make_fun_impl type.
 
template<typename T >
constexpr bool nda::clef::is_lazy = detail::is_lazy_impl<T>
 Constexpr variable that is true if the type T is a lazy type.
 

Typedef Documentation

◆ expr_storage_t

template<class T >
using nda::clef::expr_storage_t = typename detail::expr_storage_impl<T>::type

#include <nda/clef/utils.hpp>

Type trait to determine how a type should be stored in an expression tree, i.e. either by reference or by value?

Rvalue references are copied/moved into the expression tree. Lvalue references are stored as a std::reference_wrapper, unless the compile-time value of nda::clef::force_copy_in_expr is true.

Template Parameters
TType to be stored.

Definition at line 149 of file utils.hpp.

Function Documentation

◆ operator<<() [1/11]

template<typename Tag , typename L >
requires std::is_base_of_v<tags::unary_op, Tag>
std::ostream & nda::clef::operator<< ( std::ostream & sout,
expr< Tag, L > const & ex )

#include <nda/clef/io.hpp>

Print an nda::clef::tags::unary_op expression to std::ostream.

Template Parameters
TagType of the unary operation.
LType of the child expression.
Parameters
soutstd::ostream object to print to.
exnda::clef::expr object to print.
Returns
Reference to the std::ostream.

Definition at line 130 of file io.hpp.

◆ operator<<() [2/11]

template<typename Tag , typename L , typename R >
requires std::is_base_of_v<tags::binary_op, Tag>
std::ostream & nda::clef::operator<< ( std::ostream & sout,
expr< Tag, L, R > const & ex )

#include <nda/clef/io.hpp>

Print an nda::clef::tags::binary_op expression to std::ostream.

Template Parameters
TagType of the binary operation.
LType of the child expression #1.
RType of the child expression #2.
Parameters
soutstd::ostream object to print to.
exnda::clef::expr object to print.
Returns
Reference to the std::ostream.

Definition at line 146 of file io.hpp.

◆ operator<<() [3/11]

template<typename... Ts>
std::ostream & nda::clef::operator<< ( std::ostream & sout,
expr< tags::function, Ts... > const & ex )

#include <nda/clef/io.hpp>

Print an nda::clef::tags::function expression to std::ostream.

Template Parameters
TsTypes of the arguments of the function.
Parameters
soutstd::ostream object to print to.
exnda::clef::expr object to print.
Returns
Reference to the std::ostream.

Definition at line 174 of file io.hpp.

◆ operator<<() [4/11]

template<typename C , typename A , typename B >
std::ostream & nda::clef::operator<< ( std::ostream & sout,
expr< tags::if_else, C, A, B > const & ex )

#include <nda/clef/io.hpp>

Print an nda::clef::tags::if_else expression to std::ostream.

Template Parameters
CType of the condition expression.
AType of the return type when the condition is true.
BType of the return type when the condition is false.
Parameters
soutstd::ostream object to print to.
exnda::clef::expr object to print.
Returns
Reference to the std::ostream.

Definition at line 161 of file io.hpp.

◆ operator<<() [5/11]

template<typename T >
std::ostream & nda::clef::operator<< ( std::ostream & sout,
expr< tags::negate, T > const & ex )

#include <nda/clef/io.hpp>

Print an nda::clef::tags::negate expression to std::ostream.

Template Parameters
TType of the child node.
Parameters
soutstd::ostream object to print to.
exnda::clef::expr object to print.
Returns
Reference to the std::ostream.

Definition at line 232 of file io.hpp.

◆ operator<<() [6/11]

template<typename T >
std::ostream & nda::clef::operator<< ( std::ostream & sout,
expr< tags::subscript, T > const & ex )

#include <nda/clef/io.hpp>

Print an nda::clef::tags::subscript expression to std::ostream.

Template Parameters
TType of the child node.
Parameters
soutstd::ostream object to print to.
exnda::clef::expr object to print.
Returns
Reference to the std::ostream.

Definition at line 219 of file io.hpp.

◆ operator<<() [7/11]

template<typename... Ts>
std::ostream & nda::clef::operator<< ( std::ostream & sout,
expr< tags::subscript, Ts... > const & ex )

#include <nda/clef/io.hpp>

Print a general nda::clef::tags::subscript expression to std::ostream.

Template Parameters
TsTypes of the subscript arguments.
Parameters
soutstd::ostream object to print to.
exnda::clef::expr object to print.
Returns
Reference to the std::ostream.

Definition at line 190 of file io.hpp.

◆ operator<<() [8/11]

template<typename T >
std::ostream & nda::clef::operator<< ( std::ostream & sout,
expr< tags::terminal, T > const & ex )

#include <nda/clef/io.hpp>

Print an nda::clef::tags::terminal expression to std::ostream.

Template Parameters
TType of the terminal child node.
Parameters
soutstd::ostream object to print to.
exnda::clef::expr object to print.
Returns
Reference to the std::ostream.

Definition at line 206 of file io.hpp.

◆ operator<<() [9/11]

template<typename Expr , int... Is>
std::ostream & nda::clef::operator<< ( std::ostream & sout,
make_fun_impl< Expr, Is... > const & f )

#include <nda/clef/io.hpp>

Print an nda::clef::make_fun_impl object to std::ostream.

Template Parameters
ExprType of the expression.
IsInteger labels of the placeholders in the expression.
Parameters
soutstd::ostream object to print to.
fnda::clef::make_fun_impl object to print.
Returns
Reference to the std::ostream.

Definition at line 246 of file io.hpp.

◆ operator<<() [10/11]

template<int N>
std::ostream & nda::clef::operator<< ( std::ostream & sout,
placeholder< N >  )

#include <nda/clef/io.hpp>

Print an nda::clef::placeholder to a std::ostream.

Template Parameters
NInteger label of the placeholder.
Parameters
soutstd::ostream object to print to.
Returns
Reference to the std::ostream.

Definition at line 47 of file io.hpp.

◆ operator<<() [11/11]

template<typename T >
std::ostream & nda::clef::operator<< ( std::ostream & sout,
std::reference_wrapper< T > const & wrapper )

#include <nda/clef/io.hpp>

Print the value contained in a std::reference_wrapper to std::ostream.

Template Parameters
TValue type of the std::reference_wrapper.
Parameters
soutstd::ostream object to print to.
wrapperstd::reference_wrapper object to print.
Returns
Reference to the std::ostream.

Definition at line 60 of file io.hpp.

◆ print_tuple()

template<typename Tuple >
std::ostream & nda::clef::print_tuple ( std::ostream & sout,
Tuple const & t )

#include <nda/clef/io.hpp>

Print a std::tuple to std::ostream.

Template Parameters
TupleType of the std::tuple to print.
Parameters
soutstd::ostream object to print to.
tstd::tuple object to print.
Returns
Reference to the std::ostream.

Definition at line 114 of file io.hpp.

◆ variadic_print()

template<typename T0 , typename... Ts>
std::ostream & nda::clef::variadic_print ( std::ostream & sout,
T0 && t0,
Ts &&... ts )

#include <nda/clef/io.hpp>

Print a variadic list of arguments to std::ostream.

Template Parameters
T0Type of the first argument.
TsTypes of the remaining arguments.
Parameters
soutstd::ostream object to print to.
t0First argument to print.
tsRemaining arguments to print.
Returns
Reference to the std::ostream.

Definition at line 78 of file io.hpp.