27 template <
typename Expr>
63 bool alias(
const E& other)
const noexcept {
64 return value.alias(other);
94 value.assign_add_to(lhs);
103 template <
typename L>
109 value.assign_sub_to(lhs);
118 template <
typename L>
124 value.assign_mul_to(lhs);
133 template <
typename L>
139 value.assign_div_to(lhs);
148 template <
typename L>
154 value.assign_mod_to(lhs);
166 return os <<
"parallel(" << expr.value <<
")";
174 template <
typename Expr>
friend std::ostream & operator<<(std::ostream &os, const parallel_expr &expr)
Prints the type of the optimized expression to the stream.
Definition: parallel_expr.hpp:165
Contains traits for wrapper expressions.
void assign_to(L &&lhs) const
Assign to the given left-hand-side expression.
Definition: parallel_expr.hpp:74
parallel_expr(Expr l)
Construt a new optimized expression around the given ETL expression.
Definition: parallel_expr.hpp:45
bool parallel
Force parallel execution.
Definition: context.hpp:28
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
A wrapper for expressions that is to be executed in parallel.
Definition: parallel_expr.hpp:28
void assign_add_to(L &&lhs) const
Add to the given left-hand-side expression.
Definition: parallel_expr.hpp:89
void assign_sub_to(L &&lhs) const
Sub from the given left-hand-side expression.
Definition: parallel_expr.hpp:104
void assign_div_to(L &&lhs) const
Divide the given left-hand-side expression.
Definition: parallel_expr.hpp:134
void assign_mod_to(L &&lhs) const
Modulo the given left-hand-side expression.
Definition: parallel_expr.hpp:149
value_t< Expr > value_type
The value type.
Definition: parallel_expr.hpp:30
Expr expr_t
The wrapped expression type.
Definition: parallel_expr.hpp:29
typename decay_traits< E >::value_type value_t
Traits to extract the value type out of an ETL type.
Definition: tmp.hpp:81
bool alias(const E &other) const noexcept
Test if this expression aliases with the given expression.
Definition: parallel_expr.hpp:63
Traits for wrapper expressions.
Definition: wrapper_traits.hpp:21
void assign_mul_to(L &&lhs) const
Multiply the given left-hand-side expression.
Definition: parallel_expr.hpp:119