LTL  2.0.x
Public Types | Public Member Functions | List of all members
ltl::ltl::ExprLiteralNode< T > Class Template Reference

Node in the expression parse tree representing a literal number. More...

Inherits ltl::ltl::LTLIterator.

Public Types

typedef T value_type
 the result data type is the type of the constant More...
 
enum  { dims =0 }
 The number of dimensions. More...
 
enum  { numIndexIter = 0 }
 The number of ltl::IndexIter index iterators (always 0) More...
 
enum  { numConvolution = 0 }
 The number of convolution operations (always 0) More...
 
enum  { isVectorizable = 1 }
 Constants are vectorizable: splat the constant across the vector. More...
 

Public Member Functions

 ExprLiteralNode (const T f)
 Constructor: store the constant, splat if we are vectorizing. More...
 
value_type readAtOffsetDim (const int, const int) const
 
value_type readAtOffset (const int) const
 
value_type readAtOffset (const int, const int) const
 
value_type readAtOffset (const int, const int, const int) const
 
bool isStorageContiguous () const
 always true More...
 
bool isStride1 () const
 always true More...
 
template<int N>
bool isConformable (const Shape< N > &) const
 always true More...
 
void reset ()
 
void advance () const
 Implement the iterator interface: do nothing for advancing. More...
 
void advance (const int) const
 
void advance (const int, const int) const
 
void advanceWithStride1 () const
 
void advanceDim () const
 
void advanceDim (const int) const
 
void operator++ () const
 
value_type operator* () const
 Evaluate by simply returning the constant. More...
 
value_type readWithoutStride (const int) const
 
value_type readWithStride (const int) const
 
value_type readWithStride (const int, const int) const
 
int boundary_l (const int) const
 
int boundary_u (const int) const
 

Detailed Description

template<typename T>
class ltl::ltl::ExprLiteralNode< T >

Node in the expression parse tree representing a literal number.

This class represents a literal number in the parse tree of an expression so that expressions can involve literal constants in the usual way.

Like all parse tree elements, this class implements the iterator interface, simply doing nothing for all methods except dereferencing, for which it returns the literal constant it holds.

Member Typedef Documentation

◆ value_type

template<typename T >
typedef T ltl::ltl::ExprLiteralNode< T >::value_type

the result data type is the type of the constant

Member Enumeration Documentation

◆ anonymous enum

template<typename T >
anonymous enum

The number of dimensions.

Enumerator
dims 

◆ anonymous enum

template<typename T >
anonymous enum

The number of ltl::IndexIter index iterators (always 0)

Enumerator
numIndexIter 

◆ anonymous enum

template<typename T >
anonymous enum

The number of convolution operations (always 0)

Enumerator
numConvolution 

◆ anonymous enum

template<typename T >
anonymous enum

Constants are vectorizable: splat the constant across the vector.

Enumerator
isVectorizable 

Constructor & Destructor Documentation

◆ ExprLiteralNode()

template<typename T >
ltl::ltl::ExprLiteralNode< T >::ExprLiteralNode ( const T  f)
inline

Constructor: store the constant, splat if we are vectorizing.

Member Function Documentation

◆ advance() [1/3]

template<typename T >
void ltl::ltl::ExprLiteralNode< T >::advance ( ) const
inline

Implement the iterator interface: do nothing for advancing.

◆ advance() [2/3]

template<typename T >
void ltl::ltl::ExprLiteralNode< T >::advance ( const int  ) const
inline

◆ advance() [3/3]

template<typename T >
void ltl::ltl::ExprLiteralNode< T >::advance ( const int  ,
const int   
) const
inline

◆ advanceWithStride1()

template<typename T >
void ltl::ltl::ExprLiteralNode< T >::advanceWithStride1 ( ) const
inline

◆ advanceDim() [1/2]

template<typename T >
void ltl::ltl::ExprLiteralNode< T >::advanceDim ( ) const
inline

◆ advanceDim() [2/2]

template<typename T >
void ltl::ltl::ExprLiteralNode< T >::advanceDim ( const int  ) const
inline

◆ operator++()

template<typename T >
void ltl::ltl::ExprLiteralNode< T >::operator++ ( ) const
inline

◆ operator*()

template<typename T >
value_type ltl::ltl::ExprLiteralNode< T >::operator* ( ) const
inline

Evaluate by simply returning the constant.

◆ readWithoutStride()

template<typename T >
value_type ltl::ltl::ExprLiteralNode< T >::readWithoutStride ( const int  ) const
inline

◆ readWithStride() [1/2]

template<typename T >
value_type ltl::ltl::ExprLiteralNode< T >::readWithStride ( const int  ) const
inline

◆ readWithStride() [2/2]

template<typename T >
value_type ltl::ltl::ExprLiteralNode< T >::readWithStride ( const int  ,
const int   
) const
inline

◆ readAtOffsetDim()

template<typename T >
value_type ltl::ltl::ExprLiteralNode< T >::readAtOffsetDim ( const int  ,
const int   
) const
inline

compute and return the value of the subexpression in the parse tree below us at an offset in dimension 1, 2, and/or 3. Used for evaluating convolutions

◆ readAtOffset() [1/3]

template<typename T >
value_type ltl::ltl::ExprLiteralNode< T >::readAtOffset ( const int  ) const
inline

◆ readAtOffset() [2/3]

template<typename T >
value_type ltl::ltl::ExprLiteralNode< T >::readAtOffset ( const int  ,
const int   
) const
inline

◆ readAtOffset() [3/3]

template<typename T >
value_type ltl::ltl::ExprLiteralNode< T >::readAtOffset ( const int  ,
const int  ,
const int   
) const
inline

◆ boundary_l()

template<typename T >
int ltl::ltl::ExprLiteralNode< T >::boundary_l ( const int  ) const
inline

◆ boundary_u()

template<typename T >
int ltl::ltl::ExprLiteralNode< T >::boundary_u ( const int  ) const
inline

◆ isStorageContiguous()

template<typename T >
bool ltl::ltl::ExprLiteralNode< T >::isStorageContiguous ( void  ) const
inline

always true

◆ isStride1()

template<typename T >
bool ltl::ltl::ExprLiteralNode< T >::isStride1 ( ) const
inline

always true

◆ isConformable()

template<typename T >
template<int N>
bool ltl::ltl::ExprLiteralNode< T >::isConformable ( const Shape< N > &  ) const
inline

always true

◆ reset()

template<typename T >
void ltl::ltl::ExprLiteralNode< T >::reset ( )
inline