SpatialOps
SpatialOps::BinaryMatOp< OpT > Class Template Reference

fwd declaration as this is a specialized T parameter More...

#include <MatVecOps.h>

Inheritance diagram for SpatialOps::BinaryMatOp< OpT >:

Public Types

typedef OpT::LeftT LeftT
 the left operand on the right hand side
 
typedef OpT::RightT RightT
 the right operand on the right hand side
 
typedef OpT::ResultT ResultT
 the result on the left hand side
 

Public Member Functions

 BinaryMatOp (const LeftT &left, const RightT &right)
 Construct an object from a rhs. More...
 
void eval (ResultT *const result) const
 obtain a pointer to the lhs and call the operator::launch method More...
 

Detailed Description

template<typename OpT>
class SpatialOps::BinaryMatOp< OpT >

fwd declaration as this is a specialized T parameter

Wraps RHS of a binary operator

Author
Michael Brown
Date
April 2016
Template Parameters
OpTThe operation that this object represents

This object is built from the RHS information and uses the template parameter to do the assignment(s). The purpose is to overload result.operator =(RHS) for an intuitive interface, e.g. x = mat.solve(rhs), while allowing generic operations defined by the template parameter. It has a lifespan of one line, it is destroyed once the operator completes its work.

Definition at line 90 of file MatVecOps.h.

Constructor & Destructor Documentation

◆ BinaryMatOp()

template<typename OpT>
SpatialOps::BinaryMatOp< OpT >::BinaryMatOp ( const LeftT left,
const RightT right 
)
inline

Construct an object from a rhs.

Template Parameters
OpTthe operation that will be performed
Parameters
leftLeft operand, the type is defined by the OpT parameter
rightRight operand, the type is defined by the OpT parameter

Here we grab pointers to the rhs elements for use by the operator.

Definition at line 105 of file MatVecOps.h.

References SpatialOps::BinaryMatOp< OpT >::eval().

Here is the call graph for this function:

Member Function Documentation

◆ eval()

template<typename OpT >
void SpatialOps::BinaryMatOp< OpT >::eval ( ResultT *const  result) const

obtain a pointer to the lhs and call the operator::launch method

Parameters
resultResultT* const
Returns
void

This is the interface for the lhs of the assignment operation. The pointers to the lhs and rhs operands are given to the operator using the OpT::launch method

Definition at line 1040 of file MatVecOps.h.

Referenced by SpatialOps::BinaryMatOp< OpT >::BinaryMatOp(), SpatialOps::BinaryMatScalarOp< OpT >::BinaryMatScalarOp(), SpatialOps::BinaryRetMatUnaryOp< OpT >::BinaryRetMatUnaryOp(), SpatialOps::MatUnaryOp< OpT >::MatUnaryOp(), and SpatialOps::MatVecOp< DotProduct< FieldT > >::MatVecOp().

Here is the caller graph for this function:

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