10 #include "etl/expr/base_temporary_expr.hpp" 24 template <etl_expr A, etl_expr B>
66 #ifdef ETL_MANUAL_SELECT 82 std::cerr <<
"Forced selection to BLAS outer implementation, but not possible for this expression" << std::endl;
83 return select_default_outer_impl<C>();
94 return select_default_outer_impl<C>();
105 template <etl_expr C>
107 return select_default_outer_impl<C>();
116 template <etl_expr C>
123 constexpr_select
auto impl = select_outer_impl<C>();
140 template <etl_expr L>
149 template <etl_expr L>
158 template <etl_expr L>
167 template <etl_expr L>
176 template <etl_expr L>
188 return os <<
"out(" << expr.
_a <<
", " << expr.
_b <<
")";
196 template <
typename A,
typename B>
205 static constexpr
bool is_etl =
true;
210 static constexpr
bool is_linear =
false;
212 static constexpr
bool is_value =
false;
213 static constexpr
bool is_direct =
true;
214 static constexpr
bool is_generator =
false;
215 static constexpr
bool is_padded =
false;
216 static constexpr
bool is_aligned =
true;
217 static constexpr
bool is_temporary =
true;
226 template <vector_mode_t V>
227 static constexpr
bool vectorizable =
true;
234 static constexpr
size_t dim() {
265 static constexpr
size_t size() {
292 template <etl_expr A, etl_expr B>
304 template <etl_expr A, etl_expr B, etl_expr C>
BLAS implementation of the outer product.
std::decay_t< B > right_expr_t
The right sub expression type.
Definition: outer_product_expr.hpp:200
static constexpr etl::outer_impl select_outer_impl()
Select the outer product implementation for an expression of type A and B.
Definition: outer_product_expr.hpp:106
void assign_mod_to(L &&lhs) const
Modulo the given left-hand-side expression.
Definition: outer_product_expr.hpp:177
A transposition expression.
Definition: outer_product_expr.hpp:25
std::decay_t< A > left_expr_t
The left sub expression type.
Definition: outer_product_expr.hpp:199
B _b
The sub expression reference.
Definition: base_temporary_expr.hpp:534
outer_impl
Enumeration describing the different implementations of outer product.
Definition: outer_impl.hpp:21
value_t< A > value_type
The type of value of the expression.
Definition: outer_product_expr.hpp:26
constexpr bool is_magic_view
Traits indicating if the given ETL type is a magic view expression.
Definition: traits.hpp:311
void assign_div_to(L &&lhs) const
Divide the given left-hand-side expression.
Definition: outer_product_expr.hpp:168
A _a
The sub expression reference.
Definition: base_temporary_expr.hpp:533
static constexpr size_t dim()
Returns the DDth dimension of the expression.
Definition: outer_product_expr.hpp:234
order
Storage order of a matrix.
Definition: order.hpp:15
constexpr bool cuda_enabled
Indicates if CUDA is available.
Definition: config.hpp:94
BLAS implementation of the outer product.
static size_t dim(const expr_t &e, size_t d)
Returns the dth dimension of the expression.
Definition: outer_product_expr.hpp:244
Abstract base class for temporary binary expression.
Definition: base_temporary_expr.hpp:529
std::add_lvalue_reference_t< B > b()
Returns the sub expression.
Definition: base_temporary_expr.hpp:593
static constexpr size_t size()
Returns the size of the expression.
Definition: outer_product_expr.hpp:265
constexpr bool is_fast
Traits to test if the given ETL expresion type is fast (sizes known at compile-time) ...
Definition: traits.hpp:588
value_t< A > value_type
The value type of the expression.
Definition: outer_product_expr.hpp:203
Standard implementation of the outer product.
static constexpr auto storage_order
The sub storage order.
Definition: outer_product_expr.hpp:31
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
auto dim(E &&value, size_t i) -> detail::identity_helper< E, dim_view< detail::build_identity_type< E >, D >>
Return a view representing the ith Dth dimension.
Definition: view_expression_builder.hpp:25
static constexpr size_t dimensions()
Returns the number of dimensions of the expression.
Definition: outer_product_expr.hpp:273
std::conditional_t< is_etl_value< T >, const std::decay_t< T > &, std::decay_t< T > > build_type
Helper to build the type for a sub expression.
Definition: expression_helpers.hpp:24
Standard implementation of the outer product.
void assign_mul_to(L &&lhs) const
Multiply the given left-hand-side expression.
Definition: outer_product_expr.hpp:159
outer_product_expr(A a, B b)
Construct a new expression.
Definition: outer_product_expr.hpp:43
void std_mod_evaluate(Expr &&expr, Result &&result)
Compound modulo evaluation of the expr into result.
Definition: evaluator.hpp:1271
void assign_to(C &&c) const
Assign to a matrix of the same storage order.
Definition: outer_product_expr.hpp:117
void std_mul_evaluate(Expr &&expr, Result &&result)
Compound multiply evaluation of the expr into result.
Definition: evaluator.hpp:1233
constexpr bool is_transformer
Traits indicating if the given ETL type is a transformer expression.
Definition: traits.hpp:297
void assign_sub_to(L &&lhs) const
Sub from the given left-hand-side expression.
Definition: outer_product_expr.hpp:150
static size_t size(const expr_t &e)
Returns the size of the expression.
Definition: outer_product_expr.hpp:257
constexpr bool is_view
Traits indicating if the given ETL type is a view expression.
Definition: traits.hpp:304
static constexpr bool is_fast
Indicates if T is a fast structure.
Definition: traits_base.hpp:25
void std_sub_evaluate(Expr &&expr, Result &&result)
Compound subtract evaluation of the expr into result.
Definition: evaluator.hpp:1214
decltype(auto) smart_forward(E &expr)
Smart forwarding for a temporary expression.
Definition: helpers.hpp:323
constexpr bool cblas_enabled
Indicates if a BLAS library is available for ETL.
Definition: config.hpp:76
static constexpr bool gpu_computable
Indicates if the temporary expression can be directly evaluated using only GPU.
Definition: outer_product_expr.hpp:37
constexpr bool is_thread_safe
Traits to test if the given ETL expresion type is thread safe.
Definition: traits.hpp:687
static constexpr etl::outer_impl select_default_outer_impl()
Select the outer product implementation for an expression of type A and B.
Definition: outer_product_expr.hpp:58
outer_product_expr< detail::build_type< A >, detail::build_type< B > > outer(A &&a, B &&b)
Outer product multiplication of two matrices.
Definition: outer_product_expr.hpp:293
typename decay_traits< E >::value_type value_t
Traits to extract the value type out of an ETL type.
Definition: tmp.hpp:81
void assign_add_to(L &&lhs) const
Add to the given left-hand-side expression.
Definition: outer_product_expr.hpp:141
void std_div_evaluate(Expr &&expr, Result &&result)
Compound divide evaluation of the expr into result.
Definition: evaluator.hpp:1252
static constexpr int complexity() noexcept
Estimate the complexity of computation.
Definition: outer_product_expr.hpp:281
void inc_counter([[maybe_unused]] const char *name)
Increase the given counter.
Definition: counters.hpp:25
friend std::ostream & operator<<(std::ostream &os, const outer_product_expr &expr)
Print a representation of the expression on the given stream.
Definition: outer_product_expr.hpp:187
std::add_lvalue_reference_t< A > a()
Returns the sub expression.
Definition: base_temporary_expr.hpp:577
void std_add_evaluate(Expr &&expr, Result &&result)
Compound add evaluation of the expr into result.
Definition: evaluator.hpp:1195