Documentation 6b54b78464
Loading...
Searching...
No Matches
VecExpr::CVectorView< Scalar > Class Template Reference

How a CSysVector is captured inside an expression: a bare pointer to whichever storage the expression is going to be evaluated from. More...

#include <CSysVector.hpp>

Inheritance diagram for VecExpr::CVectorView< Scalar >:
[legend]

Public Member Functions

 CVectorView (const CSysVector< Scalar > &vector)
 
const Scalar & operator[] (size_t i) const
 
- Public Member Functions inherited from VecExpr::CVecExpr< CVectorView< Scalar >, Scalar >
const CVectorView< Scalar > & derived () const
 Cast the expression to Derived, usually to allow evaluation via operator[].
 

Static Public Attributes

static constexpr bool StoreAsRef = false
 

Detailed Description

template<class Scalar>
class VecExpr::CVectorView< Scalar >

How a CSysVector is captured inside an expression: a bare pointer to whichever storage the expression is going to be evaluated from.

Note
Capturing by value (rather than a reference to the vector) is what makes an arbitrary expression tree trivially copyable, and therefore passable by value to the assignment kernel. The choice of storage is fixed when the expression is built, which is sound because there is no fallback: while UseDeviceExpressions() holds, every expression is evaluated by a kernel.

Constructor & Destructor Documentation

◆ CVectorView()

template<class Scalar >
VecExpr::CVectorView< Scalar >::CVectorView ( const CSysVector< Scalar > &  vector)

Member Function Documentation

◆ operator[]()

template<class Scalar >
const Scalar & VecExpr::CVectorView< Scalar >::operator[] ( size_t  i) const
inline

Member Data Documentation

◆ StoreAsRef

template<class Scalar >
constexpr bool VecExpr::CVectorView< Scalar >::StoreAsRef = false
staticconstexpr

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