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

Point square norm operation. More...

Detailed Description

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

Point square norm operation.

Template Parameters
origoriginal type
exp1expression1
exp2expression2
opoperation

Definition at line 245 of file Point_operators_functions.hpp.

#include <Point_operators_functions.hpp>

Public Types

typedef orig orig_type
 
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
 
typedef exp1::coord_type coord_type
 

Public Member Functions

__device__ __host__ point_expression_op (const exp1 &o1)
 constructor from an expression
 
__device__ __host__ void init () const
 This function must be called before value.
 
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 >
__device__ __host__ operator T () const
 Cast operator.
 

Static Public Attributes

static const unsigned int nvals = 1
 this operation produce a vector as result of size dims
 

Private Attributes

const exp1 o1
 expression
 
std::remove_const< typenameorig::coord_type >::type scal
 result of the expression
 

Member Typedef Documentation

◆ coord_type

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

Definition at line 269 of file Point_operators_functions.hpp.

◆ has_init

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

indicate that init must be called before value

Definition at line 258 of file Point_operators_functions.hpp.

◆ is_expression

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

indicate that this class encapsulate an expression

Definition at line 261 of file Point_operators_functions.hpp.

◆ orig_type

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

Definition at line 255 of file Point_operators_functions.hpp.

◆ return_type

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

return type of the expression

Definition at line 264 of file Point_operators_functions.hpp.

Constructor & Destructor Documentation

◆ point_expression_op()

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

constructor from an expression

Definition at line 272 of file Point_operators_functions.hpp.

Member Function Documentation

◆ init()

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

This function must be called before value.

it calculate the scalar product before return the values

Definition at line 281 of file Point_operators_functions.hpp.

◆ operator T()

template<typename orig , typename exp1 , typename exp2 >
template<typename T >
__device__ __host__ point_expression_op< orig, exp1, exp2, POINT_NORM2 >::operator T ( ) const
inline

Cast operator.

Definition at line 302 of file Point_operators_functions.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_NORM2 >::value ( size_t  k) const
inline

Evaluate the expression.

Parameters
keywhere to evaluate the expression

Definition at line 296 of file Point_operators_functions.hpp.

Field Documentation

◆ nvals

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

this operation produce a vector as result of size dims

Definition at line 267 of file Point_operators_functions.hpp.

◆ o1

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

expression

Definition at line 248 of file Point_operators_functions.hpp.

◆ scal

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

result of the expression

Definition at line 251 of file Point_operators_functions.hpp.


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