Expression Templates Library (ETL)
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
etl::mm_mul_transformer< L, R > Struct Template Reference

Transform that applies a lazy matrix multiplication to two matrices. More...

#include <transformers.hpp>

Public Types

using left_type = L
 The left side type.
 
using right_type = R
 The right side type.
 
using value_type = value_t< L >
 The value type.
 

Public Member Functions

 mm_mul_transformer (left_type left, right_type right)
 Construct a new transformer around the given expressions. More...
 
value_type operator[] (size_t i) const
 Returns the value at the given index. More...
 
value_type read_flat (size_t i) const
 Returns the value at the given index This function never has side effects. More...
 
value_type operator() (size_t i, size_t j) const
 Access to the value at the given (i, j) position. More...
 
template<typename E >
bool alias (const E &rhs) const noexcept
 Test if this expression aliases with the given expression. More...
 
void visit (detail::evaluator_visitor &visitor) const
 Apply the given visitor to this expression and its descendants. More...
 
void ensure_cpu_up_to_date () const
 Ensures that the GPU memory is allocated and that the GPU memory is up to date (to undefined value).
 
void ensure_gpu_up_to_date () const
 Copy back from the GPU to the expression memory if necessary.
 

Public Attributes

left_type left
 The left expression.
 
right_type right
 The right expression.
 

Static Public Attributes

static constexpr bool gpu_computable = false
 

Friends

std::ostream & operator<< (std::ostream &os, const mm_mul_transformer &transformer)
 Display the transformer on the given stream. More...
 

Detailed Description

template<typename L, typename R>
struct etl::mm_mul_transformer< L, R >

Transform that applies a lazy matrix multiplication to two matrices.

Template Parameters
LThe left type on which the transformer is applied
RThe right type on which the transformer is applied

Constructor & Destructor Documentation

◆ mm_mul_transformer()

template<typename L, typename R>
etl::mm_mul_transformer< L, R >::mm_mul_transformer ( left_type  left,
right_type  right 
)
inline

Construct a new transformer around the given expressions.

Parameters
leftThe left hand side sub expression
rightThe right hand side sub expression

Member Function Documentation

◆ alias()

template<typename L, typename R>
template<typename E >
bool etl::mm_mul_transformer< L, R >::alias ( const E &  rhs) const
inlinenoexcept

Test if this expression aliases with the given expression.

Parameters
rhsThe other expression to test
Returns
true if the two expressions aliases, false otherwise

◆ operator()()

template<typename L, typename R>
value_type etl::mm_mul_transformer< L, R >::operator() ( size_t  i,
size_t  j 
) const
inline

Access to the value at the given (i, j) position.

Parameters
iThe first index
jThe second index
Returns
The value at the position (i, j)

◆ operator[]()

template<typename L, typename R>
value_type etl::mm_mul_transformer< L, R >::operator[] ( size_t  i) const
inline

Returns the value at the given index.

Parameters
iThe index
Returns
the value at the given index.

◆ read_flat()

template<typename L, typename R>
value_type etl::mm_mul_transformer< L, R >::read_flat ( size_t  i) const
inline

Returns the value at the given index This function never has side effects.

Parameters
iThe index
Returns
the value at the given index.

◆ visit()

template<typename L, typename R>
void etl::mm_mul_transformer< L, R >::visit ( detail::evaluator_visitor visitor) const
inline

Apply the given visitor to this expression and its descendants.

Parameters
visitorThe visitor to apply

Friends And Related Function Documentation

◆ operator<<

template<typename L, typename R>
std::ostream& operator<< ( std::ostream &  os,
const mm_mul_transformer< L, R > &  transformer 
)
friend

Display the transformer on the given stream.

Parameters
osThe output stream
transformerThe transformer to print
Returns
the output stream

The documentation for this struct was generated from the following file: