OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
point_expression< T > Class Template Reference

Main class that encapsulate a constant number used in a point expression. More...

Detailed Description

template<typename T>
class point_expression< T >

Main class that encapsulate a constant number used in a point expression.

Definition at line 263 of file Point_operators.hpp.

#include <Point_operators.hpp>

Public Types

typedef int has_init
 indicate that init must be called before value
 
typedef int is_expression
 indicate that this class encapsulate an expression
 
typedef T coord_type
 

Public Member Functions

__device__ __host__ point_expression (T &d)
 constructor from a value More...
 
__device__ __host__ void init () const
 This function must be called before value. More...
 
__device__ __host__ const T & value (const int k) const
 Evaluate the expression. More...
 
__device__ __host__ T & value (const int k)
 Evaluate the expression. More...
 

Static Public Attributes

static const unsigned int nvals = 1
 this operation produce a vector as result of size dims
 

Private Attributes

d
 constant
 

Constructor & Destructor Documentation

◆ point_expression()

template<typename T>
__device__ __host__ point_expression< T >::point_expression ( T &  d)
inline

constructor from a value

Parameters
dvalue

Definition at line 286 of file Point_operators.hpp.

Member Function Documentation

◆ init()

template<typename T>
__device__ __host__ void point_expression< T >::init ( ) const
inline

This function must be called before value.

it calculate the scalar product before return the values

Definition at line 295 of file Point_operators.hpp.

◆ value() [1/2]

template<typename T>
__device__ __host__ const T& point_expression< T >::value ( const int  k) const
inline

Evaluate the expression.

Parameters
kcoordinate to evaluate
Returns
It just return the velue set in the constructor

Definition at line 306 of file Point_operators.hpp.

◆ value() [2/2]

template<typename T>
__device__ __host__ T& point_expression< T >::value ( const int  k)
inline

Evaluate the expression.

Parameters
kcoordinate to evaluate
Returns
It just return the velue set in the constructor

Definition at line 318 of file Point_operators.hpp.


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