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

Abstract repeat Transformer that repeats the expression to the right. More...

#include <rep_transformers.hpp>

Collaboration diagram for etl::rep_transformer< T, D >:
Collaboration graph
[legend]

Public Types

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

Public Member Functions

 rep_transformer (sub_type expr)
 Construct a new transformer around the given expression. More...
 
template<typename... Sizes>
value_type operator() (Sizes... args) const
 Access to the value at the given (args...) position. More...
 
template<typename E >
bool alias (const E &rhs) const noexcept
 Test if this expression aliases with the given expression. More...
 
template<typename V >
void visit (V &&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.
 

Static Public Attributes

static constexpr bool gpu_computable = false
 

Protected Attributes

sub_type sub
 The subexpression.
 

Detailed Description

template<typename T, typename D>
struct etl::rep_transformer< T, D >

Abstract repeat Transformer that repeats the expression to the right.

Template Parameters
TThe type on which the transformer is applied

Constructor & Destructor Documentation

◆ rep_transformer()

template<typename T, typename D>
etl::rep_transformer< T, D >::rep_transformer ( sub_type  expr)
inlineexplicit

Construct a new transformer around the given expression.

Parameters
exprThe sub expression

Member Function Documentation

◆ alias()

template<typename T, typename D>
template<typename E >
bool etl::rep_transformer< T, D >::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 T, typename D>
template<typename... Sizes>
value_type etl::rep_transformer< T, D >::operator() ( Sizes...  args) const
inline

Access to the value at the given (args...) position.

Parameters
argsThe indices
Returns
The value at the position (args...)

◆ visit()

template<typename T, typename D>
template<typename V >
void etl::rep_transformer< T, D >::visit ( V &&  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: