22 template <
typename Expr>
58 bool alias(
const E& other)
const noexcept {
59 return value.alias(other);
89 value.assign_add_to(lhs);
104 value.assign_sub_to(lhs);
113 template <
typename L>
119 value.assign_mul_to(lhs);
128 template <
typename L>
134 value.assign_div_to(lhs);
143 template <
typename L>
149 value.assign_mod_to(lhs);
161 return os <<
"serial(" << expr.value <<
")";
169 template <
typename Expr>
Contains traits for wrapper expressions.
friend std::ostream & operator<<(std::ostream &os, const serial_expr &expr)
Prints the type of the optimized expression to the stream.
Definition: serial_expr.hpp:160
bool serial
Force serial execution.
Definition: context.hpp:27
serial_expr(Expr l)
Construt a new optimized expression around the given ETL expression.
Definition: serial_expr.hpp:40
void assign_div_to(L &&lhs) const
Divide the given left-hand-side expression.
Definition: serial_expr.hpp:129
void assign_add_to(L &&lhs) const
Add to the given left-hand-side expression.
Definition: serial_expr.hpp:84
bool alias(const E &other) const noexcept
Test if this expression aliases with the given expression.
Definition: serial_expr.hpp:58
Traits to get information about ETL types.
Definition: tmp.hpp:68
Root namespace for the ETL library.
Definition: adapter.hpp:15
context & local_context()
Return the configuration context of the current thread.
Definition: context.hpp:50
void assign_sub_to(L &&lhs) const
Sub from the given left-hand-side expression.
Definition: serial_expr.hpp:99
value_t< Expr > value_type
The value type.
Definition: serial_expr.hpp:25
void assign_mod_to(L &&lhs) const
Modulo the given left-hand-side expression.
Definition: serial_expr.hpp:144
A wrapper for expressions that is forced to be serial.
Definition: serial_expr.hpp:23
void assign_mul_to(L &&lhs) const
Multiply the given left-hand-side expression.
Definition: serial_expr.hpp:114
Expr expr_t
The wrapped expression type.
Definition: serial_expr.hpp:24
typename decay_traits< E >::value_type value_t
Traits to extract the value type out of an ETL type.
Definition: tmp.hpp:81
Traits for wrapper expressions.
Definition: wrapper_traits.hpp:21
void assign_to(L &&lhs) const
Assign to the given left-hand-side expression.
Definition: serial_expr.hpp:69