15 #include "etl/concepts.hpp" 24 template <etl_expr LE, etl_expr RE>
26 validate_expression(lhs, rhs);
37 template <etl_expr LE, etl_expr RE>
39 validate_expression(lhs, rhs);
50 template <etl_expr LE, etl_expr RE>
52 validate_expression(lhs, rhs);
63 template <
typename LE,
typename RE>
64 auto scale(LE&& lhs, RE&& rhs) {
65 validate_expression(lhs, rhs);
76 template <etl_expr LE, etl_expr RE>
78 validate_expression(lhs, rhs);
89 template <etl_expr LE, etl_expr RE>
91 validate_expression(lhs, rhs);
104 template <etl_expr LE, std::convertible_to<value_t<LE>> RE>
115 template <etl_expr RE, std::convertible_to<value_t<RE>> LE>
126 template <etl_expr LE, std::convertible_to<value_t<LE>> RE>
137 template <etl_expr RE, std::convertible_to<value_t<RE>> LE>
148 template <etl_expr LE, std::convertible_to<value_t<LE>> RE>
159 template <etl_expr RE, std::convertible_to<value_t<RE>> LE>
170 template <etl_expr LE, std::convertible_to<value_t<LE>> RE>
181 template <etl_expr RE, std::convertible_to<value_t<RE>> LE>
192 template <etl_expr LE, std::convertible_to<value_t<LE>> RE>
207 template <etl_expr RE, std::convertible_to<value_t<RE>> LE>
218 template <etl_expr LE, std::convertible_to<value_t<LE>> RE>
229 template <etl_expr RE, std::convertible_to<value_t<RE>> LE>
242 template <simple_lhs LE, arithmetic RE>
243 decltype(
auto) operator+=(LE&& lhs, RE rhs) {
245 return std::forward<LE>(lhs);
254 template <simple_lhs LE, etl_expr RE>
255 decltype(
auto) operator+=(LE&& lhs, const RE & rhs) {
256 validate_expression(lhs, rhs);
257 rhs.assign_add_to(lhs);
258 return std::forward<LE>(lhs);
267 template <simple_lhs LE, arithmetic RE>
268 decltype(
auto) operator-=(LE&& lhs, RE rhs) {
270 return std::forward<LE>(lhs);
279 template <simple_lhs LE, etl_expr RE>
280 decltype(
auto) operator-=(LE&& lhs, const RE & rhs) {
281 validate_expression(lhs, rhs);
282 rhs.assign_sub_to(lhs);
283 return std::forward<LE>(lhs);
292 template <simple_lhs LE, arithmetic RE>
293 decltype(
auto) operator*=(LE&& lhs, RE rhs) {
295 return std::forward<LE>(lhs);
304 template <simple_lhs LE, etl_expr RE>
305 decltype(
auto) operator*=(LE&& lhs, const RE & rhs) {
306 validate_expression(lhs, rhs);
307 rhs.assign_mul_to(lhs);
308 return std::forward<LE>(lhs);
317 template <simple_lhs LE, arithmetic RE>
318 decltype(
auto) operator>>=(LE&& lhs, RE rhs) {
320 return std::forward<LE>(lhs);
329 template <simple_lhs LE, etl_expr RE>
330 decltype(
auto) operator>>=(LE&& lhs, const RE & rhs) {
331 validate_expression(lhs, rhs);
332 rhs.assign_mul_to(lhs);
333 return std::forward<LE>(lhs);
342 template <simple_lhs LE, arithmetic RE>
343 decltype(
auto) operator/=(LE&& lhs, RE rhs) {
345 return std::forward<LE>(lhs);
354 template <simple_lhs LE, etl_expr RE>
355 decltype(
auto) operator/=(LE&& lhs, const RE & rhs) {
356 validate_expression(lhs, rhs);
357 rhs.assign_div_to(lhs);
358 return std::forward<LE>(lhs);
367 template <simple_lhs LE, arithmetic RE>
368 decltype(
auto) operator%=(LE&& lhs, RE rhs) {
370 return std::forward<LE>(lhs);
379 template <simple_lhs LE, etl_expr RE>
380 decltype(
auto) operator%=(LE&& lhs, const RE & rhs) {
381 validate_expression(lhs, rhs);
382 rhs.assign_mod_to(lhs);
383 return std::forward<LE>(lhs);
394 template <
typename LE,
typename RE>
405 template <
typename LE,
typename RE>
416 template <
typename LE,
typename RE>
427 template <
typename LE,
typename RE>
438 template <
typename LE,
typename RE>
449 template <
typename LE,
typename RE>
462 template <etl_expr LE, etl_expr RE>
473 template <etl_expr LE, std::convertible_to<value_t<LE>> RE>
484 template <etl_expr RE, std::convertible_to<value_t<RE>> LE>
495 template <etl_expr LE, etl_expr RE>
506 template <etl_expr LE, std::convertible_to<value_t<LE>> RE>
517 template <etl_expr RE, std::convertible_to<value_t<RE>> LE>
528 template <etl_expr LE, etl_expr RE>
539 template <etl_expr LE, std::convertible_to<value_t<LE>> RE>
550 template <etl_expr RE, std::convertible_to<value_t<RE>> LE>
void assign_add_to(L &&lhs) const
Add to the given left-hand-side expression.
Definition: dyn_matrix_view.hpp:217
Binary operator for elementwise logical OR computation.
Definition: logical_or.hpp:18
Binary operator for elementwise logical and computation.
Definition: logical_and.hpp:18
void assign_div_to(L &&lhs) const
Divide the given left-hand-side expression.
Definition: dyn_matrix_view.hpp:244
void assign_mul_to(L &&lhs) const
Multiply the given left-hand-side expression.
Definition: dyn_matrix_view.hpp:235
Binary operator for elementwise logical XOR computation.
Definition: logical_xor.hpp:18
Binary operator for scalar subtraction.
Definition: minus.hpp:16
auto greater(LE &&lhs, RE rhs)
Builds an expression representing the elementwise greater than comparison of lhs and rhs...
Definition: binary_expression_builder.hpp:439
Binary operator for scalar division.
Definition: div.hpp:349
auto operator*(LE &&lhs, RE rhs)
Builds an expression representing the multiplication of lhs and rhs (scalar)
Definition: binary_expression_builder.hpp:149
A binary expression.
Definition: binary_expr.hpp:18
Binary operator for scalar modulo.
Definition: mod.hpp:16
Root namespace for the ETL library.
Definition: adapter.hpp:15
auto operator+(LE &&lhs, RE &&rhs)
Builds an expression representing the addition of lhs and rhs.
Definition: binary_expression_builder.hpp:38
auto scale(LE &&lhs, RE &&rhs)
Builds an expression representing the scalar multiplication of lhs and rhs.
Definition: binary_expression_builder.hpp:64
auto not_equal(LE &&lhs, RE rhs)
Builds an expression representing the elementwise comparison of lhs and rhs.
Definition: binary_expression_builder.hpp:406
auto logical_or(LE &&lhs, RE &&rhs)
Builds an expression representing the elementwise logical or of lhs and rhs.
Definition: binary_expression_builder.hpp:529
auto operator%(LE &&lhs, RE &&rhs)
Builds an expression representing the modulo of lhs and rhs.
Definition: binary_expression_builder.hpp:90
auto operator>>(LE &&lhs, RE &&rhs)
Builds an expression representing the scalar multipliation of lhs and rhs.
Definition: binary_expression_builder.hpp:51
Represents a scalar value.
Definition: concepts_base.hpp:19
constexpr bool is_div_strict
Boolean flag indicating if division can be done by multiplication (false) or not (true) ...
Definition: config.hpp:125
Binary operator for scalar multiplication.
Definition: div.hpp:13
void assign_mod_to(L &&lhs) const
Modulo the given left-hand-side expression.
Definition: dyn_matrix_view.hpp:253
auto less(LE &&lhs, RE rhs)
Builds an expression representing the elementwise less than comparison of lhs and rhs...
Definition: binary_expression_builder.hpp:417
auto operator/(LE &&lhs, RE &&rhs)
Builds an expression representing the division of lhs and rhs.
Definition: binary_expression_builder.hpp:77
auto less_equal(LE &&lhs, RE rhs)
Builds an expression representing the elementwise less than or equals comparison of lhs and rhs...
Definition: binary_expression_builder.hpp:428
auto greater_equal(LE &&lhs, RE rhs)
Builds an expression representing the elementwise greater than or equals comparison of lhs and rhs...
Definition: binary_expression_builder.hpp:450
typename decay_traits< E >::value_type value_t
Traits to extract the value type out of an ETL type.
Definition: tmp.hpp:81
auto logical_xor(LE &&lhs, RE &&rhs)
Builds an expression representing the elementwise logical xor of lhs and rhs.
Definition: binary_expression_builder.hpp:496
auto logical_and(LE &&lhs, RE &&rhs)
Builds an expression representing the elementwise logical and of lhs and rhs.
Definition: binary_expression_builder.hpp:463
auto equal(LE &&lhs, RE rhs)
Builds an expression representing the elementwise comparison of lhs and rhs.
Definition: binary_expression_builder.hpp:395
auto operator-(LE &&lhs, RE &&rhs)
Builds an expression representing the subtraction of lhs and rhs.
Definition: binary_expression_builder.hpp:25
Binary operator for scalar addition.
Definition: plus.hpp:154
void assign_sub_to(L &&lhs) const
Sub from the given left-hand-side expression.
Definition: dyn_matrix_view.hpp:226