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

expression that subtract two points More...

Detailed Description

template<typename orig, typename exp1, typename exp2>
class point_expression_op< orig, exp1, exp2, POINT_SUB_UNI >

expression that subtract two points

Template Parameters
origoriginal vector
exp1expression 1
exp2expression 2

Definition at line 527 of file Point_operators.hpp.

#include <Point_operators.hpp>

Public Types

typedef orig orig_type
 original type
 
typedef int is_expression
 indicate that is an expression
 
typedef int has_init
 indicate that this class has an init function
 
typedef orig::coord_type return_type
 return type of the expression evaluation
 
typedef first_or_second_pt< has_coordtype< exp1 >::value, exp1, exp2 >::coord_type coord_type
 The type of the internal vector.
 

Public Member Functions

__device__ __host__ point_expression_op (const exp1 &o1)
 
__device__ __host__ void init () const
 initialize the the expression
 
template<typename r_type = typename std::remove_reference<decltype(o1.value(0))>::type>
__device__ __host__ r_type value (size_t k) const
 evaluate the expression
 
template<typename T , typename check = typename std::enable_if<!std::is_same<T,orig>::value >::type>
__device__ __host__ operator T () const
 casting to a type T
 

Static Public Attributes

static const unsigned int nvals = exp1::nvals
 result dimensionality of this expression
 

Private Attributes

const exp1 o1
 expression
 
orig::coord_type scal
 scalar value produced by the expression
 

Member Typedef Documentation

◆ coord_type

template<typename orig , typename exp1 , typename exp2 >
typedef first_or_second_pt<has_coordtype<exp1>::value,exp1,exp2>::coord_type point_expression_op< orig, exp1, exp2, POINT_SUB_UNI >::coord_type

The type of the internal vector.

Definition at line 553 of file Point_operators.hpp.

◆ has_init

template<typename orig , typename exp1 , typename exp2 >
typedef int point_expression_op< orig, exp1, exp2, POINT_SUB_UNI >::has_init

indicate that this class has an init function

Definition at line 544 of file Point_operators.hpp.

◆ is_expression

template<typename orig , typename exp1 , typename exp2 >
typedef int point_expression_op< orig, exp1, exp2, POINT_SUB_UNI >::is_expression

indicate that is an expression

Definition at line 541 of file Point_operators.hpp.

◆ orig_type

template<typename orig , typename exp1 , typename exp2 >
typedef orig point_expression_op< orig, exp1, exp2, POINT_SUB_UNI >::orig_type

original type

Definition at line 538 of file Point_operators.hpp.

◆ return_type

template<typename orig , typename exp1 , typename exp2 >
typedef orig::coord_type point_expression_op< orig, exp1, exp2, POINT_SUB_UNI >::return_type

return type of the expression evaluation

Definition at line 547 of file Point_operators.hpp.

Constructor & Destructor Documentation

◆ point_expression_op()

template<typename orig , typename exp1 , typename exp2 >
__device__ __host__ point_expression_op< orig, exp1, exp2, POINT_SUB_UNI >::point_expression_op ( const exp1 &  o1)
inline

constructor from expression

Parameters
o1expression1

Definition at line 560 of file Point_operators.hpp.

Member Function Documentation

◆ init()

template<typename orig , typename exp1 , typename exp2 >
__device__ __host__ void point_expression_op< orig, exp1, exp2, POINT_SUB_UNI >::init ( ) const
inline

initialize the the expression

Definition at line 565 of file Point_operators.hpp.

◆ operator T()

template<typename orig , typename exp1 , typename exp2 >
template<typename T , typename check = typename std::enable_if<!std::is_same<T,orig>::value >::type>
__device__ __host__ point_expression_op< orig, exp1, exp2, POINT_SUB_UNI >::operator T ( ) const
inline

casting to a type T

Definition at line 585 of file Point_operators.hpp.

◆ value()

template<typename orig , typename exp1 , typename exp2 >
template<typename r_type = typename std::remove_reference<decltype(o1.value(0))>::type>
__device__ __host__ r_type point_expression_op< orig, exp1, exp2, POINT_SUB_UNI >::value ( size_t  k) const
inline

evaluate the expression

Parameters
kevaluate in k
Returns
the result

Definition at line 578 of file Point_operators.hpp.

Field Documentation

◆ nvals

template<typename orig , typename exp1 , typename exp2 >
const unsigned int point_expression_op< orig, exp1, exp2, POINT_SUB_UNI >::nvals = exp1::nvals
static

result dimensionality of this expression

Definition at line 550 of file Point_operators.hpp.

◆ o1

template<typename orig , typename exp1 , typename exp2 >
const exp1 point_expression_op< orig, exp1, exp2, POINT_SUB_UNI >::o1
private

expression

Definition at line 530 of file Point_operators.hpp.

◆ scal

template<typename orig , typename exp1 , typename exp2 >
orig::coord_type point_expression_op< orig, exp1, exp2, POINT_SUB_UNI >::scal
mutableprivate

scalar value produced by the expression

Definition at line 533 of file Point_operators.hpp.


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