OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
point_expression< openfpm::detail::multi_array::sub_array_openfpm< T, 1, vmpl > > Class Template Reference

Specialization for views. More...

Detailed Description

template<typename T, typename vmpl>
class point_expression< openfpm::detail::multi_array::sub_array_openfpm< T, 1, vmpl > >

Specialization for views.

Template Parameters
Ttype of the array
dimdimensionality of the array

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

template<typename orig , typename exp1 , typename exp2 , unsigned int op>
__device__ __host__ point_expression< openfpm::detail::multi_array::sub_array_openfpm< T, 1, vmpl > > & operator= (const point_expression_op< orig, exp1, exp2, op > &p_exp)
 Operator= for point expression.
 
__device__ __host__ point_expression (const openfpm::detail::multi_array::sub_array_openfpm< T, 1, vmpl > &d)
 construct from an array of dimension dim
 
__device__ __host__ void init () const
 This function must be called before value.
 
__device__ __host__ T & operator[] (int k)
 Same as value()
 
__device__ __host__ T & operator[] (int k) const
 Same as value()
 
__device__ __host__ T & value (const int k)
 Evaluate the expression at coordinate k.
 
__device__ __host__ T & value (const int k) const
 Evaluate the expression at coordinate k.
 

Static Public Attributes

static const unsigned int nvals = subar_dim<vmpl>::type::value
 this operation produce a vector as result of size dims
 

Private Attributes

openfpm::detail::multi_array::sub_array_openfpm< T, 1, vmpl > d
 array view of dimension dim
 

Member Typedef Documentation

◆ coord_type

template<typename T , typename vmpl >
typedef T point_expression< openfpm::detail::multi_array::sub_array_openfpm< T, 1, vmpl > >::coord_type

The type of the internal vector.

Definition at line 2043 of file Point_operators.hpp.

◆ has_init

template<typename T , typename vmpl >
typedef int point_expression< openfpm::detail::multi_array::sub_array_openfpm< T, 1, vmpl > >::has_init

indicate that init must be called before value

Definition at line 2034 of file Point_operators.hpp.

◆ is_expression

template<typename T , typename vmpl >
typedef int point_expression< openfpm::detail::multi_array::sub_array_openfpm< T, 1, vmpl > >::is_expression

indicate that this class encapsulate an expression

Definition at line 2037 of file Point_operators.hpp.

Constructor & Destructor Documentation

◆ point_expression()

template<typename T , typename vmpl >
__device__ __host__ point_expression< openfpm::detail::multi_array::sub_array_openfpm< T, 1, vmpl > >::point_expression ( const openfpm::detail::multi_array::sub_array_openfpm< T, 1, vmpl > &  d)
inline

construct from an array of dimension dim

Parameters
darray

Definition at line 2074 of file Point_operators.hpp.

Member Function Documentation

◆ init()

template<typename T , typename vmpl >
__device__ __host__ void point_expression< openfpm::detail::multi_array::sub_array_openfpm< T, 1, vmpl > >::init ( ) const
inline

This function must be called before value.

it calculate the scalar product before return the values

Definition at line 2084 of file Point_operators.hpp.

◆ operator=()

template<typename T , typename vmpl >
template<typename orig , typename exp1 , typename exp2 , unsigned int op>
__device__ __host__ point_expression< openfpm::detail::multi_array::sub_array_openfpm< T, 1, vmpl > > & point_expression< openfpm::detail::multi_array::sub_array_openfpm< T, 1, vmpl > >::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 2059 of file Point_operators.hpp.

◆ operator[]() [1/2]

template<typename T , typename vmpl >
__device__ __host__ T & point_expression< openfpm::detail::multi_array::sub_array_openfpm< T, 1, vmpl > >::operator[] ( int  k)
inline

Same as value()

Parameters
kcoordinate

Definition at line 2093 of file Point_operators.hpp.

◆ operator[]() [2/2]

template<typename T , typename vmpl >
__device__ __host__ T & point_expression< openfpm::detail::multi_array::sub_array_openfpm< T, 1, vmpl > >::operator[] ( int  k) const
inline

Same as value()

Parameters
kcoordinate

Definition at line 2103 of file Point_operators.hpp.

◆ value() [1/2]

template<typename T , typename vmpl >
__device__ __host__ T & point_expression< openfpm::detail::multi_array::sub_array_openfpm< T, 1, vmpl > >::value ( const int  k)
inline

Evaluate the expression at coordinate k.

It just return the value set in the constructor

Parameters
kcoordinate
Returns
the value

Definition at line 2117 of file Point_operators.hpp.

◆ value() [2/2]

template<typename T , typename vmpl >
__device__ __host__ T & point_expression< openfpm::detail::multi_array::sub_array_openfpm< T, 1, vmpl > >::value ( const int  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 2131 of file Point_operators.hpp.

Field Documentation

◆ d

template<typename T , typename vmpl >
openfpm::detail::multi_array::sub_array_openfpm<T,1,vmpl> point_expression< openfpm::detail::multi_array::sub_array_openfpm< T, 1, vmpl > >::d
mutableprivate

array view of dimension dim

Definition at line 2029 of file Point_operators.hpp.

◆ nvals

template<typename T , typename vmpl >
const unsigned int point_expression< openfpm::detail::multi_array::sub_array_openfpm< T, 1, vmpl > >::nvals = subar_dim<vmpl>::type::value
static

this operation produce a vector as result of size dims

Definition at line 2040 of file Point_operators.hpp.


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