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

Transform that repeats the expression to the right. More...

#include <rep_transformers.hpp>

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

Public Types

using this_type = rep_r_transformer< T, D... >
 This type.
 
using base_type = rep_transformer< T, this_type >
 The base type.
 
using sub_type = typename base_type::sub_type
 The type on which the expression works.
 
using value_type = typename base_type::value_type
 The type of value.
 
- Public Types inherited from etl::rep_transformer< T, rep_r_transformer< T, D... > >
using derived_t = rep_r_transformer< 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_r_transformer (sub_type expr)
 Construct a new transformer around the given expression. More...
 
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...
 
template<typename... Sizes, size_t... I>
value_type selected_only (const std::index_sequence< I... > &, Sizes... sizes) const
 Returns the value at the given indices inside the range.
 
- Public Member Functions inherited from etl::rep_transformer< T, rep_r_transformer< T, D... > >
 rep_transformer (sub_type expr)
 Construct a new transformer around the given expression. More...
 
value_type operator() (Sizes... args) const
 Access to the value at the given (args...) position. More...
 
bool alias (const E &rhs) const noexcept
 Test if this expression aliases with the given expression. More...
 
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
 
- Static Public Attributes inherited from etl::rep_transformer< T, rep_r_transformer< T, D... > >
static constexpr bool gpu_computable
 

Friends

struct rep_transformer< T, rep_r_transformer >
 
struct etl_traits< rep_r_transformer >
 
std::ostream & operator<< (std::ostream &os, const rep_r_transformer &transformer)
 Display the transformer on the given stream. More...
 

Additional Inherited Members

- Protected Attributes inherited from etl::rep_transformer< T, rep_r_transformer< T, D... > >
sub_type sub
 The subexpression.
 

Detailed Description

template<typename T, size_t... D>
struct etl::rep_r_transformer< T, D >

Transform that repeats the expression to the right.

Template Parameters
TThe type on which the transformer is applied
DThe new dimensions

Constructor & Destructor Documentation

◆ rep_r_transformer()

template<typename T, size_t... D>
etl::rep_r_transformer< T, D >::rep_r_transformer ( sub_type  expr)
inlineexplicit

Construct a new transformer around the given expression.

Parameters
exprThe sub expression

Member Function Documentation

◆ operator[]()

template<typename T, size_t... D>
value_type etl::rep_r_transformer< T, D >::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 T, size_t... D>
value_type etl::rep_r_transformer< T, D >::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.

Friends And Related Function Documentation

◆ operator<<

template<typename T, size_t... D>
std::ostream& operator<< ( std::ostream &  os,
const rep_r_transformer< T, D > &  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: