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

Simple unary op for stateful operations. More...

#include <unary_expr.hpp>

Public Types

using op = Sub
 The sub operator type.
 

Static Public Member Functions

static constexpr int complexity ()
 Estimate the complexity of operator. More...
 

Static Public Attributes

static constexpr bool linear = Sub::linear
 Indicates if the operator is linear.
 
static constexpr bool thread_safe = Sub::thread_safe
 Indicates if the operator is thread safe.
 
template<vector_mode_t V>
static constexpr bool vectorizable = Sub::template vectorizable<V>
 Indicates if the expression is vectorizable using the given vector mode. More...
 
template<typename E >
static constexpr bool gpu_computable = Sub::template gpu_computable<E>
 Indicates if the operator can be computed on GPU.
 

Detailed Description

template<typename Sub>
struct etl::stateful_op< Sub >

Simple unary op for stateful operations.

The sub operation (the real unary operation) is constructed from the arguments of the unary_expr constructor. Such an unary expr does not apply the operator but delegates to its sub expression.

Member Function Documentation

◆ complexity()

template<typename Sub >
static constexpr int etl::stateful_op< Sub >::complexity ( )
inlinestatic

Estimate the complexity of operator.

Returns
An estimation of the complexity of the operator

Member Data Documentation

◆ vectorizable

template<typename Sub >
template<vector_mode_t V>
constexpr bool etl::stateful_op< Sub >::vectorizable = Sub::template vectorizable<V>
static

Indicates if the expression is vectorizable using the given vector mode.

Template Parameters
VThe vector mode

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