OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
vector_dist_expression< prp, vector > Class Template Reference

Main class that encapsulate a vector properties operand to be used for expressions construction. More...

Detailed Description

template<unsigned int prp, typename vector>
class vector_dist_expression< prp, vector >

Main class that encapsulate a vector properties operand to be used for expressions construction.

Template Parameters
prpproperty involved
vectorinvolved

Definition at line 905 of file vector_dist_operators.hpp.

#include <vector_dist_operators.hpp>

Public Types

typedef has_vector_kernel< vector >::type is_ker
 
typedef vector vtype
 The type of the internal vector.
 
typedef boost::mpl::bool_< false > is_sort
 result for is sort
 
typedef void NN_type
 NN_type.
 

Public Member Functions

void setVarId (int var_id)
 
 vector_dist_expression (vector &v)
 constructor for an external vector
 
 ~vector_dist_expression ()
 constructor for an external vector
 
void * getNN () const
 get the NN object
 
__device__ __host__ const vector & getVector () const
 Return the vector on which is acting.
 
__device__ __host__ vector & getVector ()
 Return the vector on which is acting.
 
void set_vector_dist_ker_list (vector_dist_ker_list< vector > &vdkl, bool is_sort)
 set vector_dist_ker_list
 
void init () const
 This function must be called before value.
 
__host__ __device__ auto value (const vect_dist_key_dx &k) const -> decltype(pos_or_propR< vector, prp >::value(v.v, k))
 Evaluate the expression.
 
__host__ __device__ auto value (const vect_dist_key_dx &k) -> decltype(pos_or_propR< vector, prp >::value(v.v, k))
 Evaluate the expression.
 
__host__ __device__ auto value (const unsigned int &k) const -> decltype(pos_or_propR< vector, prp >::value(v.v, k))
 Evaluate the expression.
 
__host__ __device__ auto value (const unsigned int &k) -> decltype(pos_or_propR< vector, prp >::value(v.v, k))
 Evaluate the expression.
 
auto get (const vect_dist_key_dx &key) const -> decltype(value(key))
 
template<unsigned int prp2>
vector & operator= (const vector_dist_expression< prp2, vector > &v_exp)
 Fill the vector property with the evaluated expression.
 
template<typename T , typename memory , template< typename > class layout_base>
vector & operator= (const vector_dist_expression< 0, openfpm::vector< aggregate< T >, memory, layout_base > > &v_exp)
 Fill the vector property with the evaluated expression.
 
template<typename T >
vector & operator= (const vector_dist_expression< 0, openfpm::vector_gpu< aggregate< T > > > &v_exp)
 Fill the vector property with the evaluated expression.
 
template<typename exp1 , typename exp2 , unsigned int op>
vector & operator= (const vector_dist_expression_op< exp1, exp2, op > &v_exp)
 Fill the vector property with the evaluated expression.
 
vector & operator= (double d)
 Fill the vector property with the double.
 
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< vector_dist_expression< prp, vector >, boost::mpl::int_< 1 >, VECT_COMP > operator[] (int comp)
 

Data Fields

int var_id = 0
 

Static Public Attributes

static const unsigned int prop = prp
 Property id of the point.
 

Private Attributes

v_mem_mutable< typename vector_expression_transform< vector >::type > v
 The vector.
 
vector_dist_ker_list< vector > * vdl
 

Member Typedef Documentation

◆ is_ker

template<unsigned int prp, typename vector >
typedef has_vector_kernel<vector>::type vector_dist_expression< prp, vector >::is_ker

Definition at line 914 of file vector_dist_operators.hpp.

◆ is_sort

template<unsigned int prp, typename vector >
typedef boost::mpl::bool_<false> vector_dist_expression< prp, vector >::is_sort

result for is sort

Definition at line 920 of file vector_dist_operators.hpp.

◆ NN_type

template<unsigned int prp, typename vector >
typedef void vector_dist_expression< prp, vector >::NN_type

NN_type.

Definition at line 923 of file vector_dist_operators.hpp.

◆ vtype

template<unsigned int prp, typename vector >
typedef vector vector_dist_expression< prp, vector >::vtype

The type of the internal vector.

Definition at line 917 of file vector_dist_operators.hpp.

Constructor & Destructor Documentation

◆ vector_dist_expression()

template<unsigned int prp, typename vector >
vector_dist_expression< prp, vector >::vector_dist_expression ( vector &  v)
inline

constructor for an external vector

Definition at line 936 of file vector_dist_operators.hpp.

◆ ~vector_dist_expression()

template<unsigned int prp, typename vector >
vector_dist_expression< prp, vector >::~vector_dist_expression ( )
inline

constructor for an external vector

Definition at line 941 of file vector_dist_operators.hpp.

Member Function Documentation

◆ get()

template<unsigned int prp, typename vector >
auto vector_dist_expression< prp, vector >::get ( const vect_dist_key_dx key) const -> decltype(value(key))
inline

Definition at line 1048 of file vector_dist_operators.hpp.

◆ getNN()

template<unsigned int prp, typename vector >
void * vector_dist_expression< prp, vector >::getNN ( ) const
inline

get the NN object

Returns
the NN object

Definition at line 952 of file vector_dist_operators.hpp.

◆ getVector() [1/2]

template<unsigned int prp, typename vector >
__device__ __host__ vector & vector_dist_expression< prp, vector >::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 976 of file vector_dist_operators.hpp.

◆ getVector() [2/2]

template<unsigned int prp, typename vector >
__device__ __host__ const vector & vector_dist_expression< prp, vector >::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 964 of file vector_dist_operators.hpp.

◆ init()

template<unsigned int prp, typename vector >
void vector_dist_expression< prp, vector >::init ( ) const
inline

This function must be called before value.

it initialize the expression if needed

Definition at line 997 of file vector_dist_operators.hpp.

◆ operator=() [1/5]

template<unsigned int prp, typename vector >
template<typename T , typename memory , template< typename > class layout_base>
vector & vector_dist_expression< prp, vector >::operator= ( const vector_dist_expression< 0, openfpm::vector< aggregate< T >, memory, layout_base > > &  v_exp)
inline

Fill the vector property with the evaluated expression.

Parameters
v_expexpression to evaluate
Returns
itself

Definition at line 1091 of file vector_dist_operators.hpp.

◆ operator=() [2/5]

template<unsigned int prp, typename vector >
template<typename T >
vector & vector_dist_expression< prp, vector >::operator= ( const vector_dist_expression< 0, openfpm::vector_gpu< aggregate< T > > > &  v_exp)
inline

Fill the vector property with the evaluated expression.

Parameters
v_expexpression to evaluate
Returns
itself

Definition at line 1110 of file vector_dist_operators.hpp.

◆ operator=() [3/5]

template<unsigned int prp, typename vector >
template<unsigned int prp2>
vector & vector_dist_expression< prp, vector >::operator= ( const vector_dist_expression< prp2, vector > &  v_exp)
inline

Fill the vector property with the evaluated expression.

Parameters
v_expexpression to evaluate
Returns
itself

Definition at line 1060 of file vector_dist_operators.hpp.

◆ operator=() [4/5]

template<unsigned int prp, typename vector >
template<typename exp1 , typename exp2 , unsigned int op>
vector & vector_dist_expression< prp, vector >::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 1130 of file vector_dist_operators.hpp.

◆ operator=() [5/5]

template<unsigned int prp, typename vector >
vector & vector_dist_expression< prp, vector >::operator= ( double  d)
inline

Fill the vector property with the double.

Parameters
dvalue to fill
Returns
the internal vector

Definition at line 1165 of file vector_dist_operators.hpp.

◆ operator[]()

template<unsigned int prp, typename vector >
vector_dist_expression_op< vector_dist_expression< prp, vector >, boost::mpl::int_< 1 >, VECT_COMP > vector_dist_expression< prp, vector >::operator[] ( int  comp)
inline

Definition at line 1194 of file vector_dist_operators.hpp.

◆ set_vector_dist_ker_list()

template<unsigned int prp, typename vector >
void vector_dist_expression< prp, vector >::set_vector_dist_ker_list ( vector_dist_ker_list< vector > &  vdkl,
bool  is_sort 
)
inline

set vector_dist_ker_list

Parameters
vdklvector_dist_ker_list

Definition at line 986 of file vector_dist_operators.hpp.

◆ setVarId()

template<unsigned int prp, typename vector >
void vector_dist_expression< prp, vector >::setVarId ( int  var_id)
inline

Definition at line 930 of file vector_dist_operators.hpp.

◆ value() [1/4]

template<unsigned int prp, typename vector >
__host__ __device__ auto vector_dist_expression< prp, vector >::value ( const unsigned int &  k) -> decltype(pos_or_propR<vector,prp>::value(v.v,k))
inline

Evaluate the expression.

Parameters
kwhere to evaluate the expression
Returns
the result of the expression

Definition at line 1043 of file vector_dist_operators.hpp.

◆ value() [2/4]

template<unsigned int prp, typename vector >
__host__ __device__ auto vector_dist_expression< prp, vector >::value ( const unsigned int &  k) const -> decltype(pos_or_propR<vector,prp>::value(v.v,k))
inline

Evaluate the expression.

Parameters
kwhere to evaluate the expression
Returns
the result of the expression

Definition at line 1031 of file vector_dist_operators.hpp.

◆ value() [3/4]

template<unsigned int prp, typename vector >
__host__ __device__ auto vector_dist_expression< prp, vector >::value ( const vect_dist_key_dx k) -> decltype(pos_or_propR<vector,prp>::value(v.v,k))
inline

Evaluate the expression.

Parameters
kwhere to evaluate the expression
Returns
the result of the expression

Definition at line 1019 of file vector_dist_operators.hpp.

◆ value() [4/4]

template<unsigned int prp, typename vector >
__host__ __device__ auto vector_dist_expression< prp, vector >::value ( const vect_dist_key_dx k) const -> decltype(pos_or_propR<vector,prp>::value(v.v,k))
inline

Evaluate the expression.

Parameters
kwhere to evaluate the expression
Returns
the result of the expression

Definition at line 1007 of file vector_dist_operators.hpp.

◆ value_nz()

template<unsigned int prp, typename vector >
template<typename Sys_eqs , typename pmap_type , typename unordered_map_type , typename coeff_type >
void vector_dist_expression< prp, vector >::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 1189 of file vector_dist_operators.hpp.

Field Documentation

◆ prop

template<unsigned int prp, typename vector >
const unsigned int vector_dist_expression< prp, vector >::prop = prp
static

Property id of the point.

Definition at line 926 of file vector_dist_operators.hpp.

◆ v

template<unsigned int prp, typename vector >
v_mem_mutable<typename vector_expression_transform<vector>::type> vector_dist_expression< prp, vector >::v
mutableprivate

The vector.

Definition at line 908 of file vector_dist_operators.hpp.

◆ var_id

template<unsigned int prp, typename vector >
int vector_dist_expression< prp, vector >::var_id = 0

Definition at line 928 of file vector_dist_operators.hpp.

◆ vdl

template<unsigned int prp, typename vector >
vector_dist_ker_list<vector>* vector_dist_expression< prp, vector >::vdl
private

Definition at line 910 of file vector_dist_operators.hpp.


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