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

Traits for wrapper expressions. More...

#include <wrapper_traits.hpp>

Public Types

using expr_t = T
 The type of the expression.
 
using sub_expr_t = std::decay_t< typename T::expr_t >
 The sub expression type.
 
using sub_traits = etl_traits< sub_expr_t >
 sub expression traits
 
using value_type = typename sub_expr_t::value_type
 The value type of the expression.
 

Static Public Member Functions

static size_t size (const expr_t &v)
 Returns the size of the given expression. More...
 
static size_t dim (const expr_t &v, size_t d)
 Returns the dth dimension of the given expression. More...
 
static constexpr size_t size ()
 Returns the size of an expression of this fast type. More...
 
template<size_t D>
static constexpr size_t dim ()
 Returns the Dth dimension of an expression of this type. More...
 
static constexpr size_t dimensions ()
 Returns the number of expressions for this type. More...
 
static constexpr int complexity () noexcept
 Estimate the complexity of computation. More...
 

Static Public Attributes

static constexpr bool is_etl = sub_traits::is_etl
 Indicates if the type is an ETL expression.
 
static constexpr bool is_transformer = sub_traits::is_transformer
 Indicates if the type is a transformer.
 
static constexpr bool is_view = sub_traits::is_view
 Indicates if the type is a view.
 
static constexpr bool is_magic_view = sub_traits::is_magic_view
 Indicates if the type is a magic view.
 
static constexpr bool is_fast = sub_traits::is_fast
 Indicates if the expression is fast.
 
static constexpr bool is_value = sub_traits::is_value
 Indicates if the expression is of value type.
 
static constexpr bool is_direct = sub_traits::is_direct
 Indicates if the expression has direct memory access.
 
static constexpr bool is_linear = sub_traits::is_linear
 Indicates if the expression is linear.
 
static constexpr bool is_thread_safe = sub_traits::is_thread_safe
 Indicates if the expression is thread safe.
 
static constexpr bool is_generator = sub_traits::is_generator
 Indicates if the expression is a generator expression.
 
static constexpr bool is_padded = sub_traits::is_padded
 Indicates if the expression is a padded.
 
static constexpr bool is_aligned = sub_traits::is_aligned
 Indicates if the expression is a padded.
 
static constexpr bool is_temporary = sub_traits::is_temporary
 Indicaes if the expression needs an evaluator visitor.
 
static constexpr bool gpu_computable = sub_traits::gpu_computable
 Indicates if the expression can be computed on GPU.
 
static constexpr order storage_order = sub_traits::storage_order
 The expression storage order.
 
template<vector_mode_t V>
static constexpr bool vectorizable = sub_traits::template vectorizable<V>
 

Detailed Description

template<typename T>
struct etl::wrapper_traits< T >

Traits for wrapper expressions.

Member Function Documentation

◆ complexity()

template<typename T>
static constexpr int etl::wrapper_traits< T >::complexity ( )
inlinestaticnoexcept

Estimate the complexity of computation.

Returns
An estimation of the complexity of the expression

◆ dim() [1/2]

template<typename T>
static size_t etl::wrapper_traits< T >::dim ( const expr_t v,
size_t  d 
)
inlinestatic

Returns the dth dimension of the given expression.

Parameters
vThe expression
dThe dimension to get
Returns
The dth dimension of the given expression

◆ dim() [2/2]

template<typename T>
template<size_t D>
static constexpr size_t etl::wrapper_traits< T >::dim ( )
inlinestatic

Returns the Dth dimension of an expression of this type.

Template Parameters
DThe dimension to get
Returns
the Dth dimension of an expression of this type

◆ dimensions()

template<typename T>
static constexpr size_t etl::wrapper_traits< T >::dimensions ( )
inlinestatic

Returns the number of expressions for this type.

Returns
the number of dimensions of this type

◆ size() [1/2]

template<typename T>
static size_t etl::wrapper_traits< T >::size ( const expr_t v)
inlinestatic

Returns the size of the given expression.

Parameters
vThe expression to get the size for
Returns
the size of the given expression

◆ size() [2/2]

template<typename T>
static constexpr size_t etl::wrapper_traits< T >::size ( )
inlinestatic

Returns the size of an expression of this fast type.

Returns
the size of an expression of this fast type.

Member Data Documentation

◆ vectorizable

template<typename T>
template<vector_mode_t V>
constexpr bool etl::wrapper_traits< T >::vectorizable = sub_traits::template vectorizable<V>
static

The vectorization type for V


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