Expression Templates Library (ETL)
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
etl::dyn_convmtx2_transformer< T > Struct Template Reference

Transform that applies a convmtx2 transformation on a matrix. More...

#include <transformers.hpp>

Collaboration diagram for etl::dyn_convmtx2_transformer< T >:
Collaboration graph
[legend]

Public Types

using sub_type = T
 The type on which the expression works.
 
using value_type = value_t< T >
 The type of valuie.
 

Public Member Functions

 dyn_convmtx2_transformer (sub_type sub, size_t k1, size_t k2)
 
value_type operator[] (size_t i) const
 Returns the value at the given index. More...
 
value_type read_flat (size_t i) const noexcept
 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

sub_type sub
 The subexpression.
 
const size_t k1
 The first dimension of the kernel.
 
const size_t k2
 The second dimension of the kernel.
 
size_t i1
 The first dimension of the input.
 
size_t i2
 The second dimension of the input.
 
size_t inner_paddings
 The inner padding sum.
 
size_t inner_padding
 The inner padding.
 

Static Public Attributes

static constexpr bool gpu_computable = false
 

Detailed Description

template<etl_2d T>
struct etl::dyn_convmtx2_transformer< T >

Transform that applies a convmtx2 transformation on a matrix.

Template Parameters
TThe type on which the transformer is applied

Member Function Documentation

◆ alias()

template<etl_2d T>
template<typename E >
bool etl::dyn_convmtx2_transformer< T >::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<etl_2d T>
value_type etl::dyn_convmtx2_transformer< T >::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<etl_2d T>
value_type etl::dyn_convmtx2_transformer< T >::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<etl_2d T>
value_type etl::dyn_convmtx2_transformer< T >::read_flat ( size_t  i) const
inlinenoexcept

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<etl_2d T>
void etl::dyn_convmtx2_transformer< T >::visit ( detail::evaluator_visitor visitor) const
inline

Apply the given visitor to this expression and its descendants.

Parameters
visitorThe visitor to apply

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