OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
point_expression< const T[dim]> Class Template Reference

Specialization for a const array of dimension dim. More...

Detailed Description

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

Specialization for a const array of dimension dim.

Template Parameters
Ttype of the array
dimdimensionality of the array

Definition at line 1958 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

__device__ __host__ point_expression (const T(&d)[dim])
 construct from an array of dimension dim
 
__device__ __host__ void init () const
 This function must be called before value.
 
operator[] (int n) const
 Array operator.
 
__device__ __host__ T value (const size_t k) const
 Evaluate the expression at coordinate k.
 

Static Public Attributes

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

Private Attributes

const T(& d )[dim]
 array of dimensions dim
 

Member Typedef Documentation

◆ coord_type

template<typename T , unsigned int dim>
typedef T point_expression< const T[dim]>::coord_type

The type of the internal vector.

Definition at line 1975 of file Point_operators.hpp.

◆ has_init

template<typename T , unsigned int dim>
typedef int point_expression< const T[dim]>::has_init

indicate that init must be called before value

Definition at line 1966 of file Point_operators.hpp.

◆ is_expression

template<typename T , unsigned int dim>
typedef int point_expression< const T[dim]>::is_expression

indicate that this class encapsulate an expression

Definition at line 1969 of file Point_operators.hpp.

Constructor & Destructor Documentation

◆ point_expression()

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

construct from an array of dimension dim

Parameters
darray

Definition at line 1982 of file Point_operators.hpp.

Member Function Documentation

◆ init()

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

This function must be called before value.

it calculate the scalar product before return the values

Definition at line 1992 of file Point_operators.hpp.

◆ operator[]()

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

Array operator.

Definition at line 1999 of file Point_operators.hpp.

◆ value()

template<typename T , unsigned int dim>
__device__ __host__ T point_expression< const 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 2013 of file Point_operators.hpp.

Field Documentation

◆ d

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

array of dimensions dim

Definition at line 1961 of file Point_operators.hpp.

◆ nvals

template<typename T , unsigned int dim>
const unsigned int point_expression< const T[dim]>::nvals = dim
static

this operation produce a vector as result of size dims

Definition at line 1972 of file Point_operators.hpp.


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