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

Specialization for an array of dimension dim as expression. More...

Detailed Description

template<typename T, unsigned int dim>
class point_expression< T[dim]>

Specialization for an array of dimension dim as expression.

Template Parameters
Ttype of the array
dimdimensionality of the array

Definition at line 1840 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
 The type of the internal vector.
 

Public Member Functions

 point_expression (T(&d)[dim])
 constructor from an array More...
 
template<typename orig , typename exp1 , typename exp2 , unsigned int op>
__device__ __host__ point_expression< T[dim]> & operator= (const point_expression_op< orig, exp1, exp2, op > &p_exp)
 Operator= for point expression. More...
 
template<typename T_ >
__device__ __host__ point_expression< T[dim]> & operator= (const point_expression< T_ > &p_exp)
 Operator= for point expression. More...
 
__device__ __host__ T & operator[] (int n)
 Array operator. More...
 
__device__ __host__ const T & operator[] (int n) const
 Array operator. More...
 
__device__ __host__ void init () const
 This function must be called before value. More...
 
__device__ __host__ T value (const size_t k) const
 Evaluate the expression at coordinate k. More...
 

Static Public Attributes

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

Private Attributes

T(& d )[dim]
 array of dimension dim
 

Constructor & Destructor Documentation

◆ point_expression()

template<typename T , unsigned int dim>
point_expression< T[dim]>::point_expression ( T(&)  d[dim])
inline

constructor from an array

Parameters
darray of dimension dim

Definition at line 1864 of file Point_operators.hpp.

Member Function Documentation

◆ init()

template<typename T , unsigned int dim>
__device__ __host__ void point_expression< T[dim]>::init ( ) const
inline

This function must be called before value.

it calculate the scalar product before return the values

Definition at line 1931 of file Point_operators.hpp.

◆ operator=() [1/2]

template<typename T , unsigned int dim>
template<typename orig , typename exp1 , typename exp2 , unsigned int op>
__device__ __host__ point_expression<T[dim]>& point_expression< T[dim]>::operator= ( const point_expression_op< orig, exp1, exp2, op > &  p_exp)
inline

Operator= for point expression.

Template Parameters
origorigin type
exp1expression 1
exp2expression 2
opoperation
Parameters
pointexpression
Returns
a point expression

Definition at line 1882 of file Point_operators.hpp.

◆ operator=() [2/2]

template<typename T , unsigned int dim>
template<typename T_ >
__device__ __host__ point_expression<T[dim]>& point_expression< T[dim]>::operator= ( const point_expression< T_ > &  p_exp)
inline

Operator= for point expression.

Parameters
pointexpression
Returns
a point expression

Definition at line 1900 of file Point_operators.hpp.

◆ operator[]() [1/2]

template<typename T , unsigned int dim>
__device__ __host__ T& point_expression< T[dim]>::operator[] ( int  n)
inline

Array operator.

Definition at line 1913 of file Point_operators.hpp.

◆ operator[]() [2/2]

template<typename T , unsigned int dim>
__device__ __host__ const T& point_expression< T[dim]>::operator[] ( int  n) const
inline

Array operator.

Definition at line 1921 of file Point_operators.hpp.

◆ value()

template<typename T , unsigned int dim>
__device__ __host__ T point_expression< T[dim]>::value ( const size_t  k) const
inline

Evaluate the expression at coordinate k.

It just return the value set in the constructor

Parameters
kcoordinate
Returns
the value

Definition at line 1944 of file Point_operators.hpp.


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