OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
vector_dist_expression_op< exp1, exp2, VECT_SUM > Class Template Reference

Sum operation. More...

Detailed Description

template<typename exp1, typename exp2>
class vector_dist_expression_op< exp1, exp2, VECT_SUM >

Sum operation.

Template Parameters
exp1expression1
exp2expression2

Definition at line 280 of file vector_dist_operators.hpp.

#include <vector_dist_operators.hpp>

Public Types

typedef exp1::is_ker is_ker
 indicate if this vector is kernel type
 
typedef first_or_second< has_vtype< exp1 >::value, exp1, exp2 >::vtype vtype
 return the vector type on which this expression operate
 
typedef vector_is_sort_result< exp1::is_sort::value, exp2::is_sort::value >::type is_sort
 result for is sort
 
typedef nn_type_result< typenameexp1::NN_type, typenameexp2::NN_type >::type NN_type
 NN_type.
 

Public Member Functions

 vector_dist_expression_op (const exp1 &o1, const exp2 &o2)
 constructor of the expression to sum two expression
 
NN_typegetNN () const
 get the NN object
 
void init () const
 This function must be called before value.
 
template<typename r_type = typename std::remove_reference<decltype(o1.value(vect_dist_key_dx()) + o2.value(vect_dist_key_dx()))>::type>
__device__ __host__ r_type value (const vect_dist_key_dx &key) const
 Evaluate 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
 
const vtypegetVector ()
 Return the vector on which is acting.
 
const vtypegetVector () const
 Return the vector on which is acting.
 
template<typename r_type = typename std::remove_reference<decltype(o1.value(0) + o2.value(0))>::type>
__device__ __host__ r_type value (const unsigned int &key) const
 Evaluate the expression.
 

Private Attributes

const exp1 o1
 expression 1
 
const exp2 o2
 expression 2
 

Member Typedef Documentation

◆ is_ker

template<typename exp1 , typename exp2 >
typedef exp1::is_ker vector_dist_expression_op< exp1, exp2, VECT_SUM >::is_ker

indicate if this vector is kernel type

Definition at line 291 of file vector_dist_operators.hpp.

◆ is_sort

template<typename exp1 , typename exp2 >
typedef vector_is_sort_result<exp1::is_sort::value,exp2::is_sort::value>::type vector_dist_expression_op< exp1, exp2, VECT_SUM >::is_sort

result for is sort

Definition at line 297 of file vector_dist_operators.hpp.

◆ NN_type

template<typename exp1 , typename exp2 >
typedef nn_type_result<typenameexp1::NN_type,typenameexp2::NN_type>::type vector_dist_expression_op< exp1, exp2, VECT_SUM >::NN_type

NN_type.

Definition at line 300 of file vector_dist_operators.hpp.

◆ vtype

template<typename exp1 , typename exp2 >
typedef first_or_second<has_vtype<exp1>::value,exp1,exp2>::vtype vector_dist_expression_op< exp1, exp2, VECT_SUM >::vtype

return the vector type on which this expression operate

Definition at line 294 of file vector_dist_operators.hpp.

Constructor & Destructor Documentation

◆ vector_dist_expression_op()

template<typename exp1 , typename exp2 >
vector_dist_expression_op< exp1, exp2, VECT_SUM >::vector_dist_expression_op ( const exp1 &  o1,
const exp2 &  o2 
)
inline

constructor of the expression to sum two expression

Definition at line 303 of file vector_dist_operators.hpp.

Member Function Documentation

◆ getNN()

template<typename exp1 , typename exp2 >
NN_type * vector_dist_expression_op< exp1, exp2, VECT_SUM >::getNN ( ) const
inline

get the NN object

Returns
the NN object

Definition at line 312 of file vector_dist_operators.hpp.

◆ getVector() [1/2]

template<typename exp1 , typename exp2 >
const vtype & vector_dist_expression_op< exp1, exp2, VECT_SUM >::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 355 of file vector_dist_operators.hpp.

◆ getVector() [2/2]

template<typename exp1 , typename exp2 >
const vtype & vector_dist_expression_op< exp1, exp2, VECT_SUM >::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 367 of file vector_dist_operators.hpp.

◆ init()

template<typename exp1 , typename exp2 >
void vector_dist_expression_op< exp1, exp2, VECT_SUM >::init ( ) const
inline

This function must be called before value.

it initialize the expression if needed

Definition at line 322 of file vector_dist_operators.hpp.

◆ value() [1/2]

template<typename exp1 , typename exp2 >
template<typename r_type = typename std::remove_reference<decltype(o1.value(0) + o2.value(0))>::type>
__device__ __host__ r_type vector_dist_expression_op< exp1, exp2, VECT_SUM >::value ( const unsigned int &  key) const
inline

Evaluate the expression.

Parameters
keywhere to evaluate the expression
Returns
return the result of the expression

Definition at line 380 of file vector_dist_operators.hpp.

◆ value() [2/2]

template<typename exp1 , typename exp2 >
template<typename r_type = typename std::remove_reference<decltype(o1.value(vect_dist_key_dx()) + o2.value(vect_dist_key_dx()))>::type>
__device__ __host__ r_type vector_dist_expression_op< exp1, exp2, VECT_SUM >::value ( const vect_dist_key_dx key) const
inline

Evaluate the expression.

Parameters
keywhere to evaluate the expression
Returns
return the result of the expression

Definition at line 336 of file vector_dist_operators.hpp.

◆ value_nz()

template<typename exp1 , typename exp2 >
template<typename Sys_eqs , typename pmap_type , typename unordered_map_type , typename coeff_type >
void vector_dist_expression_op< exp1, exp2, VECT_SUM >::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 342 of file vector_dist_operators.hpp.

Field Documentation

◆ o1

template<typename exp1 , typename exp2 >
const exp1 vector_dist_expression_op< exp1, exp2, VECT_SUM >::o1
private

expression 1

Definition at line 283 of file vector_dist_operators.hpp.

◆ o2

template<typename exp1 , typename exp2 >
const exp2 vector_dist_expression_op< exp1, exp2, VECT_SUM >::o2
private

expression 2

Definition at line 286 of file vector_dist_operators.hpp.


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