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

Multiplication operation. More...

Detailed Description

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

Multiplication operation.

Template Parameters
origoriginal type
exp1expression1
exp2expression2
opoperation

Definition at line 602 of file Point_operators.hpp.

#include <Point_operators.hpp>

Public Types

typedef first_or_second_pt< has_coordtype< exp1 >::value, exp1, exp2 >::coord_type coord_type
 The type of the internal vector.
 
typedef orig orig_type
 base type of the expression
 
typedef int has_init
 indicate that init must be called before value
 
typedef int is_expression
 indicate that this class encapsulate an expression
 
typedef orig::coord_type return_type
 return type of the expression
 

Public Member Functions

__device__ __host__ point_expression_op (const exp1 &o1, const exp2 &o2)
 constructor from 2 expressions
 
__device__ __host__ void init () const
 This function must be called before value.
 
template<typename r_type = typename best_conv<typename std::remove_reference<decltype(o1.value(0))>::type, typename std::remove_reference<decltype(o2.value(0))>::type>::type>
__device__ __host__ r_type value (size_t k) const
 Evaluate the expression.
 
template<typename T , typename test = typename boost::disable_if_c< std::is_same<T,orig>::value >::type>
__device__ __host__ operator T () const
 cast to other type
 

Static Public Attributes

static const unsigned int nvals = 1
 this operation produce a scalar as result
 

Private Attributes

const exp1 o1
 first expression
 
const exp2 o2
 second expression
 
std::remove_const< typenameorig::coord_type >::type scal
 the expression produce a scalar
 

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_MUL_POINT >::coord_type

The type of the internal vector.

Definition at line 615 of file Point_operators.hpp.

◆ has_init

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

indicate that init must be called before value

Definition at line 621 of file Point_operators.hpp.

◆ is_expression

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

indicate that this class encapsulate an expression

Definition at line 624 of file Point_operators.hpp.

◆ orig_type

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

base type of the expression

Definition at line 618 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_MUL_POINT >::return_type

return type of the expression

Definition at line 627 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_MUL_POINT >::point_expression_op ( const exp1 &  o1,
const exp2 &  o2 
)
inline

constructor from 2 expressions

Parameters
o1expression 1
o2expression 2

Definition at line 638 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_MUL_POINT >::init ( ) const
inline

This function must be called before value.

it calculate the scalar product before return the values

Definition at line 647 of file Point_operators.hpp.

◆ operator T()

template<typename orig , typename exp1 , typename exp2 >
template<typename T , typename test = typename boost::disable_if_c< std::is_same<T,orig>::value >::type>
__device__ __host__ point_expression_op< orig, exp1, exp2, POINT_MUL_POINT >::operator T ( ) const
inline

cast to other type

Definition at line 672 of file Point_operators.hpp.

◆ value()

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

Evaluate the expression.

Parameters
kwhere to evaluate the expression
Returns
the expression value

Definition at line 665 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_MUL_POINT >::nvals = 1
static

this operation produce a scalar as result

Definition at line 630 of file Point_operators.hpp.

◆ o1

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

first expression

Definition at line 605 of file Point_operators.hpp.

◆ o2

template<typename orig , typename exp1 , typename exp2 >
const exp2 point_expression_op< orig, exp1, exp2, POINT_MUL_POINT >::o2
private

second expression

Definition at line 607 of file Point_operators.hpp.

◆ scal

template<typename orig , typename exp1 , typename exp2 >
std::remove_const<typenameorig::coord_type>::type point_expression_op< orig, exp1, exp2, POINT_MUL_POINT >::scal
mutableprivate

the expression produce a scalar

Definition at line 610 of file Point_operators.hpp.


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