tfel
Loading...
Searching...
No Matches
tfel::math::Expr< ResultType, Operation > Struct Template Reference

an Expr object allows the lazy evaluation of a mathematical operation. More...

Inheritance diagram for tfel::math::Expr< ResultType, Operation >:

Public Types

using value_type = typename Operation::value_type
 a simple alias
using size_type = typename Operation::size_type
 a simple alias

Public Member Functions

template<typename... Args>
TFEL_HOST_DEVICE constexpr Expr (Args &&... args)
TFEL_HOST_DEVICE constexpr value_type operator[] (const size_type i) const
 array like access operator
TFEL_HOST_DEVICE constexpr value_type & operator[] (const size_type i)
 array like access operator

Detailed Description

template<typename ResultType, typename Operation>
struct tfel::math::Expr< ResultType, Operation >

an Expr object allows the lazy evaluation of a mathematical operation.

Template Parameters
ResultType: the type of the result of the operation
Operation: Operation to be performed

Partial specialisation are provided for:

  • unary operations (negation, function call)
  • binary operations

Constructor & Destructor Documentation

◆ Expr()

template<typename ResultType, typename Operation>
template<typename... Args>
TFEL_HOST_DEVICE constexpr tfel::math::Expr< ResultType, Operation >::Expr ( Args &&... args)
inlineexplicitconstexpr

default constructor

Parameters
[in]args: arguments of Operation constructor

Member Function Documentation

◆ operator[]() [1/2]

template<typename ResultType, typename Operation>
TFEL_HOST_DEVICE constexpr value_type & tfel::math::Expr< ResultType, Operation >::operator[] ( const size_type i)
inlineconstexpr

array like access operator

Parameters
[in]i: index
Note
This operator is always defined, even tough it might not be valid

◆ operator[]() [2/2]

template<typename ResultType, typename Operation>
TFEL_HOST_DEVICE constexpr value_type tfel::math::Expr< ResultType, Operation >::operator[] ( const size_type i) const
inlineconstexpr

array like access operator

Parameters
[in]i: index
Note
This operator is always defined, even tough it might not be valid

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