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

Generator from a sequence. More...

#include <sequence.hpp>

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

Public Types

using value_type = T
 The value type.
 

Public Member Functions

 sequence_generator_op (value_type start=0)
 Construct a new generator with the given sequence start. More...
 
value_type operator() ()
 Generate a new value. More...
 

Public Attributes

const value_type start
 The beginning of the sequence.
 
value_type current
 The current sequence element.
 

Static Public Attributes

static constexpr bool gpu_computable = false
 Indicates if the operator is computable on GPU.
 

Friends

std::ostream & operator<< (std::ostream &os, const sequence_generator_op &s)
 Outputs the given generator to the given stream. More...
 

Detailed Description

template<typename T = double>
struct etl::sequence_generator_op< T >

Generator from a sequence.

Constructor & Destructor Documentation

◆ sequence_generator_op()

template<typename T = double>
etl::sequence_generator_op< T >::sequence_generator_op ( value_type  start = 0)
inlineexplicit

Construct a new generator with the given sequence start.

Parameters
startThe beginning of the sequence

Member Function Documentation

◆ operator()()

template<typename T = double>
value_type etl::sequence_generator_op< T >::operator() ( )
inline

Generate a new value.

Returns
the newly generated value

Friends And Related Function Documentation

◆ operator<<

template<typename T = double>
std::ostream& operator<< ( std::ostream &  os,
const sequence_generator_op< T > &  s 
)
friend

Outputs the given generator to the given stream.

Parameters
osThe output stream
sThe generator
Returns
the output stream

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