OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
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
 
__device__ __host__ void init () const
 This function must be called before value.
 
__device__ __host__ const T & value (const int k) const
 Evaluate the expression.
 
__device__ __host__ T & value (const int k)
 Evaluate the expression.
 

Static Public Attributes

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

Private Attributes

d
 constant
 

Member Typedef Documentation

◆ coord_type

template<typename T >
typedef T point_expression< T >::coord_type

Definition at line 279 of file Point_operators.hpp.

◆ has_init

template<typename T >
typedef int point_expression< T >::has_init

indicate that init must be called before value

Definition at line 271 of file Point_operators.hpp.

◆ is_expression

template<typename T >
typedef int point_expression< T >::is_expression

indicate that this class encapsulate an expression

Definition at line 274 of file Point_operators.hpp.

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__ 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.

◆ value() [2/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.

Field Documentation

◆ d

template<typename T >
T point_expression< T >::d
private

constant

Definition at line 266 of file Point_operators.hpp.

◆ nvals

template<typename T >
const unsigned int point_expression< T >::nvals = 1
static

this operation produce a vector as result of size dims

Definition at line 277 of file Point_operators.hpp.


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