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

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

#include <optimized_expr.hpp>

Public Types

using expr_t = Expr
 The wrapped expression type.
 
using value_type = value_t< Expr >
 The value type.
 

Public Member Functions

 optimized_expr (Expr l)
 Construt a new optimized expression around the given ETL expression. More...
 
 optimized_expr (const optimized_expr &e)=default
 
 optimized_expr (optimized_expr &&e) noexcept=default
 
optimized_exproperator= (const optimized_expr &e)=delete
 
optimized_exproperator= (optimized_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< optimized_expr >
 
std::ostream & operator<< (std::ostream &os, const optimized_expr &expr)
 Prints the type of the optimized expression to the stream. More...
 

Detailed Description

template<typename Expr>
struct etl::optimized_expr< Expr >

A wrapper for expressions that need to be optimized.

Constructor & Destructor Documentation

◆ optimized_expr()

template<typename Expr >
etl::optimized_expr< Expr >::optimized_expr ( Expr  l)
inlineexplicit

Construt a new optimized expression around the given ETL expression.

Parameters
lThe ETL expression

Member Function Documentation

◆ alias()

template<typename Expr >
template<typename E >
bool etl::optimized_expr< Expr >::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 >
template<typename L >
void etl::optimized_expr< Expr >::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 >
template<typename L >
void etl::optimized_expr< Expr >::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 >
template<typename L >
void etl::optimized_expr< Expr >::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 >
template<typename L >
void etl::optimized_expr< Expr >::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 >
template<typename L >
void etl::optimized_expr< Expr >::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 >
template<typename L >
void etl::optimized_expr< Expr >::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 >
std::ostream& operator<< ( std::ostream &  os,
const optimized_expr< Expr > &  expr 
)
friend

Prints the type of the optimized 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: