Expression Templates Library (ETL)
Public Types | Public Member Functions | Friends | List of all members
etl::timed_expr< Expr, R > Struct Template Referencefinal

A wrapper for expressions that need to be timed. More...

#include <timed_expr.hpp>

Public Types

using clock_resolution = R
 The clock resolution.
 
using expr_t = Expr
 The wrapped expression type.
 
using value_type = value_t< Expr >
 The value type.
 

Public Member Functions

 timed_expr (Expr l)
 Construt a new timed expression around the given ETL expression. More...
 
 timed_expr (const timed_expr &e)=default
 
 timed_expr (timed_expr &&e) noexcept=default
 
timed_exproperator= (const timed_expr &e)=delete
 
timed_exproperator= (timed_expr &&e)=delete
 
template<typename E >
bool alias (const E &other) const noexcept
 Test if this expression aliases with the given expression. More...
 
template<typename L >
void assign_to (L &&lhs) const
 Assign to the given left-hand-side expression. More...
 
template<typename L >
void assign_add_to (L &&lhs) const
 Add to the given left-hand-side expression. More...
 
template<typename L >
void assign_sub_to (L &&lhs) const
 Sub from the given left-hand-side expression. More...
 
template<typename L >
void assign_mul_to (L &&lhs) const
 Multiply the given left-hand-side expression. More...
 
template<typename L >
void assign_div_to (L &&lhs) const
 Divide the given left-hand-side expression. More...
 
template<typename L >
void assign_mod_to (L &&lhs) const
 Modulo the given left-hand-side expression. More...
 

Friends

struct wrapper_traits< timed_expr >
 
std::ostream & operator<< (std::ostream &os, const timed_expr &expr)
 Prints the type of the timed expression to the stream. More...
 

Detailed Description

template<typename Expr, typename R>
struct etl::timed_expr< Expr, R >

A wrapper for expressions that need to be timed.

Constructor & Destructor Documentation

◆ timed_expr()

template<typename Expr , typename R >
etl::timed_expr< Expr, R >::timed_expr ( Expr  l)
inlineexplicit

Construt a new timed expression around the given ETL expression.

Parameters
lThe ETL expression

Member Function Documentation

◆ alias()

template<typename Expr , typename R >
template<typename E >
bool etl::timed_expr< Expr, R >::alias ( const E &  other) const
inlinenoexcept

Test if this expression aliases with the given expression.

Parameters
otherThe other expression to test
Returns
true if the two expressions aliases, false otherwise

◆ assign_add_to()

template<typename Expr , typename R >
template<typename L >
void etl::timed_expr< Expr, R >::assign_add_to ( L &&  lhs) const
inline

Add to the given left-hand-side expression.

Parameters
lhsThe expression to which assign

◆ assign_div_to()

template<typename Expr , typename R >
template<typename L >
void etl::timed_expr< Expr, R >::assign_div_to ( L &&  lhs) const
inline

Divide the given left-hand-side expression.

Parameters
lhsThe expression to which assign

◆ assign_mod_to()

template<typename Expr , typename R >
template<typename L >
void etl::timed_expr< Expr, R >::assign_mod_to ( L &&  lhs) const
inline

Modulo the given left-hand-side expression.

Parameters
lhsThe expression to which assign

◆ assign_mul_to()

template<typename Expr , typename R >
template<typename L >
void etl::timed_expr< Expr, R >::assign_mul_to ( L &&  lhs) const
inline

Multiply the given left-hand-side expression.

Parameters
lhsThe expression to which assign

◆ assign_sub_to()

template<typename Expr , typename R >
template<typename L >
void etl::timed_expr< Expr, R >::assign_sub_to ( L &&  lhs) const
inline

Sub from the given left-hand-side expression.

Parameters
lhsThe expression to which assign

◆ assign_to()

template<typename Expr , typename R >
template<typename L >
void etl::timed_expr< Expr, R >::assign_to ( L &&  lhs) const
inline

Assign to the given left-hand-side expression.

Parameters
lhsThe expression to which assign

Friends And Related Function Documentation

◆ operator<<

template<typename Expr , typename R >
std::ostream& operator<< ( std::ostream &  os,
const timed_expr< Expr, R > &  expr 
)
friend

Prints the type of the timed expression to the stream.

Parameters
osThe output stream
exprThe expression to print
Returns
the output stream

The documentation for this struct was generated from the following file: