OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
vector_dist_expression_op< exp1, boost::mpl::int_< n >, VECT_COMP > Class Template Reference

it take an expression and take the component More...

Detailed Description

template<typename exp1, int n>
class vector_dist_expression_op< exp1, boost::mpl::int_< n >, VECT_COMP >

it take an expression and take the component

Definition at line 1687 of file vector_dist_operators.hpp.

#include <vector_dist_operators.hpp>

Public Types

typedef std::false_type is_ker
 
typedef boost::mpl::bool_< false > is_sort
 result for is sort
 
typedef boost::mpl::bool_< false > NN_type
 result for is sort
 
typedef exp1::vtype vtype
 
typedef pos_or_propL< vtype, exp1::prop >::property_act property_act
 property on which this view is acting
 

Public Member Functions

 vector_dist_expression_op (const exp1 &o1, int(&comp)[n], int var_id)
 constructor from an expresssion
 
__device__ __host__ const vtype & getVector () const
 Return the vector on which is acting.
 
__device__ __host__ vtype & getVector ()
 Return the vector on which is acting.
 
void init () const
 initialize the expression tree
 
__host__ __device__ auto value (const vect_dist_key_dx &key) const -> decltype(get_vector_dist_expression_op< n, n==rank_gen< property_act >::type::value >::get(o1, vect_dist_key_dx(0), comp))
 Return the result of the expression.
 
__host__ __device__ auto value (const vect_dist_key_dx &key) -> decltype(get_vector_dist_expression_op< n, n==rank_gen< property_act >::type::value >::get(o1, vect_dist_key_dx(0), comp))
 Return the result of the expression.
 
auto get (const vect_dist_key_dx &key) const -> decltype(value(key))
 Return the result of the expression.
 
template<typename Sys_eqs , typename pmap_type , typename unordered_map_type , typename coeff_type >
void value_nz (pmap_type &p_map, const vect_dist_key_dx &key, unordered_map_type &cols, coeff_type &coeff, unsigned int comp_) const
 
vector_dist_expression_op< exp1, boost::mpl::int_< 2 >, VECT_COMP > operator[] (int comp_)
 
template<typename T , typename memory >
vtype & operator= (const vector_dist_expression< 0, openfpm::vector< aggregate< T >, memory > > &v_exp)
 Fill the vector property with the evaluated expression.
 
template<unsigned int prp2>
vtype & operator= (const vector_dist_expression< prp2, vtype > &v_exp)
 Fill the vector property with the evaluated expression.
 
template<typename exp1_ , typename exp2_ , unsigned int op>
vtype & operator= (const vector_dist_expression_op< exp1_, exp2_, op > &v_exp)
 Fill the vector property with the evaluated expression.
 
vtype & operator= (double d)
 Fill the vector property with the double.
 

Private Types

typedef vector_dist_expression_op< exp1, boost::mpl::int_< n >, VECT_COMP > myself
 

Private Member Functions

void setVarId (int var_id)
 

Private Attributes

exp1 o1
 expression 1
 
int comp [n]
 component
 
int var_id = 0
 

Member Typedef Documentation

◆ is_ker

template<typename exp1 , int n>
typedef std::false_type vector_dist_expression_op< exp1, boost::mpl::int_< n >, VECT_COMP >::is_ker

Definition at line 1705 of file vector_dist_operators.hpp.

◆ is_sort

template<typename exp1 , int n>
typedef boost::mpl::bool_<false> vector_dist_expression_op< exp1, boost::mpl::int_< n >, VECT_COMP >::is_sort

result for is sort

Definition at line 1708 of file vector_dist_operators.hpp.

◆ myself

template<typename exp1 , int n>
typedef vector_dist_expression_op<exp1,boost::mpl::int_<n>,VECT_COMP> vector_dist_expression_op< exp1, boost::mpl::int_< n >, VECT_COMP >::myself
private

Definition at line 1701 of file vector_dist_operators.hpp.

◆ NN_type

template<typename exp1 , int n>
typedef boost::mpl::bool_<false> vector_dist_expression_op< exp1, boost::mpl::int_< n >, VECT_COMP >::NN_type

result for is sort

Definition at line 1711 of file vector_dist_operators.hpp.

◆ property_act

template<typename exp1 , int n>
typedef pos_or_propL<vtype,exp1::prop>::property_act vector_dist_expression_op< exp1, boost::mpl::int_< n >, VECT_COMP >::property_act

property on which this view is acting

Definition at line 1756 of file vector_dist_operators.hpp.

◆ vtype

template<typename exp1 , int n>
typedef exp1::vtype vector_dist_expression_op< exp1, boost::mpl::int_< n >, VECT_COMP >::vtype

Definition at line 1713 of file vector_dist_operators.hpp.

Constructor & Destructor Documentation

◆ vector_dist_expression_op()

template<typename exp1 , int n>
vector_dist_expression_op< exp1, boost::mpl::int_< n >, VECT_COMP >::vector_dist_expression_op ( const exp1 &  o1,
int(&)  comp[n],
int  var_id 
)
inline

constructor from an expresssion

Definition at line 1717 of file vector_dist_operators.hpp.

Member Function Documentation

◆ get()

template<typename exp1 , int n>
auto vector_dist_expression_op< exp1, boost::mpl::int_< n >, VECT_COMP >::get ( const vect_dist_key_dx key) const -> decltype(value(key))
inline

Return the result of the expression.

Note
this function must be deactivated on transitional objects. Suppose we are slicing a tensor of rank 2 an object of rank 1 is implicitly created for such object we have to deactivate this function because ill-formed
Parameters
keypoint where to evaluate

Definition at line 1798 of file vector_dist_operators.hpp.

◆ getVector() [1/2]

template<typename exp1 , int n>
__device__ __host__ vtype & vector_dist_expression_op< exp1, boost::mpl::int_< n >, VECT_COMP >::getVector ( )
inline

Return the vector on which is acting.

It return the vector used in getVExpr, to get this object

Returns
the vector

Definition at line 1743 of file vector_dist_operators.hpp.

◆ getVector() [2/2]

template<typename exp1 , int n>
__device__ __host__ const vtype & vector_dist_expression_op< exp1, boost::mpl::int_< n >, VECT_COMP >::getVector ( ) const
inline

Return the vector on which is acting.

It return the vector used in getVExpr, to get this object

Returns
the vector

Definition at line 1731 of file vector_dist_operators.hpp.

◆ init()

template<typename exp1 , int n>
void vector_dist_expression_op< exp1, boost::mpl::int_< n >, VECT_COMP >::init ( ) const
inline

initialize the expression tree

Definition at line 1749 of file vector_dist_operators.hpp.

◆ operator=() [1/4]

template<typename exp1 , int n>
template<typename T , typename memory >
vtype & vector_dist_expression_op< exp1, boost::mpl::int_< n >, VECT_COMP >::operator= ( const vector_dist_expression< 0, openfpm::vector< aggregate< T >, memory > > &  v_exp)
inline

Fill the vector property with the evaluated expression.

Parameters
v_expexpression to evaluate
Returns
itself

Definition at line 1838 of file vector_dist_operators.hpp.

◆ operator=() [2/4]

template<typename exp1 , int n>
template<unsigned int prp2>
vtype & vector_dist_expression_op< exp1, boost::mpl::int_< n >, VECT_COMP >::operator= ( const vector_dist_expression< prp2, vtype > &  v_exp)
inline

Fill the vector property with the evaluated expression.

Parameters
v_expexpression to evaluate
Returns
itself

Definition at line 1871 of file vector_dist_operators.hpp.

◆ operator=() [3/4]

template<typename exp1 , int n>
template<typename exp1_ , typename exp2_ , unsigned int op>
vtype & vector_dist_expression_op< exp1, boost::mpl::int_< n >, VECT_COMP >::operator= ( const vector_dist_expression_op< exp1_, exp2_, op > &  v_exp)
inline

Fill the vector property with the evaluated expression.

Parameters
v_expexpression to evaluate
Returns
itself

Definition at line 1903 of file vector_dist_operators.hpp.

◆ operator=() [4/4]

template<typename exp1 , int n>
vtype & vector_dist_expression_op< exp1, boost::mpl::int_< n >, VECT_COMP >::operator= ( double  d)
inline

Fill the vector property with the double.

Parameters
dvalue to fill
Returns
the internal vector

Definition at line 1934 of file vector_dist_operators.hpp.

◆ operator[]()

template<typename exp1 , int n>
vector_dist_expression_op< exp1, boost::mpl::int_< 2 >, VECT_COMP > vector_dist_expression_op< exp1, boost::mpl::int_< n >, VECT_COMP >::operator[] ( int  comp_)
inline

Definition at line 1818 of file vector_dist_operators.hpp.

◆ setVarId()

template<typename exp1 , int n>
void vector_dist_expression_op< exp1, boost::mpl::int_< n >, VECT_COMP >::setVarId ( int  var_id)
inlineprivate

Definition at line 1696 of file vector_dist_operators.hpp.

◆ value() [1/2]

template<typename exp1 , int n>
__host__ __device__ auto vector_dist_expression_op< exp1, boost::mpl::int_< n >, VECT_COMP >::value ( const vect_dist_key_dx key) -> decltype(get_vector_dist_expression_op<n,n == rank_gen<property_act>::type::value>::get(o1,vect_dist_key_dx(0),comp))
inline

Return the result of the expression.

Note
this function must be deactivated on transitional objects. Suppose we are slicing a tensor of rank 2 an object of rank 1 is implicitly created for such object we have to deactivate this function because ill-formed
Parameters
keypoint where to evaluate

Definition at line 1783 of file vector_dist_operators.hpp.

◆ value() [2/2]

template<typename exp1 , int n>
__host__ __device__ auto vector_dist_expression_op< exp1, boost::mpl::int_< n >, VECT_COMP >::value ( const vect_dist_key_dx key) const -> decltype(get_vector_dist_expression_op<n,n == rank_gen<property_act>::type::value>::get(o1,vect_dist_key_dx(0),comp))
inline

Return the result of the expression.

Note
this function must be deactivated on transitional objects. Suppose we are slicing a tensor of rank 2 an object of rank 1 is implicitly created for such object we have to deactivate this function because ill-formed
Parameters
keypoint where to evaluate

Definition at line 1768 of file vector_dist_operators.hpp.

◆ value_nz()

template<typename exp1 , int n>
template<typename Sys_eqs , typename pmap_type , typename unordered_map_type , typename coeff_type >
void vector_dist_expression_op< exp1, boost::mpl::int_< n >, VECT_COMP >::value_nz ( pmap_type &  p_map,
const vect_dist_key_dx key,
unordered_map_type &  cols,
coeff_type &  coeff,
unsigned int  comp_ 
) const
inline

Definition at line 1804 of file vector_dist_operators.hpp.

Field Documentation

◆ comp

template<typename exp1 , int n>
int vector_dist_expression_op< exp1, boost::mpl::int_< n >, VECT_COMP >::comp[n]
private

component

Definition at line 1693 of file vector_dist_operators.hpp.

◆ o1

template<typename exp1 , int n>
exp1 vector_dist_expression_op< exp1, boost::mpl::int_< n >, VECT_COMP >::o1
private

expression 1

Definition at line 1690 of file vector_dist_operators.hpp.

◆ var_id

template<typename exp1 , int n>
int vector_dist_expression_op< exp1, boost::mpl::int_< n >, VECT_COMP >::var_id = 0
private

Definition at line 1695 of file vector_dist_operators.hpp.


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