VisionCpp  0.0.1
visioncpp::internal::Evaluator< OPT, Output_Index, Offset, LC, LR, Expr, Loc, Params > Struct Template Reference

the root of the expression tree. More...

Collaboration diagram for visioncpp::internal::Evaluator< OPT, Output_Index, Offset, LC, LR, Expr, Loc, Params >:

Detailed Description

template<size_t OPT, size_t Output_Index, size_t Offset, size_t LC, size_t LR, typename Expr, typename Loc, typename... Params>
struct visioncpp::internal::Evaluator< OPT, Output_Index, Offset, LC, LR, Expr, Loc, Params >

the root of the expression tree.

It is used to avoid extra creation of the shared memory for the LHS of the root node. The are two types of nodes that can be the root of the expression tree. ParallelCopy and assign. An expression tree can be evaluated in three ways, depending on the type of operation it represents. A global operation node represents that the operation requires to access the entire input or non-linear area of input to calculate an element of the output; a neighbour operation node requires to access a linear area of the input in order to calculate the output; and a point operation node requires a corresponding elements of the input to calculate an elements of the output. Therefore, we have tree types of Operations. GlobalNeighbourOP, NeighbourOP, PointOP. Thus, 6 specialisation of Evaluator template struct has been provided. In an expression tree with the mixed types of nodes following rules will be applied.
1) If an expression tree contains a combination of point and neighbour operations nodes, the neighbour operation will be used for the evaluation of the expression tree without splitting the expression tree into small sub-trees. In this case only one kernel will be executed.
2)If an expression tree has global operation node in the middle of the tree, the expression tree will be split in to 3 sub-trees. One before the global operation node; one is the global operation node; and one is the nodes after global expression node.
3) If the global operation is the root of the expression tree, the expression will be split in to two sub-trees.
4) If the child of the global operation node is a leaf node, the child will not be split in to a sub-tree. The eval struct has been specialised based on the operation types of the expression tree, in order to call the appropriate function.
These specialisation of Evaluator class are located in eval_root/eval_assign.hpp and eval_root/eval_partial_assign.hpp files. Typical usage:

Template parameters:

Parameters
Offsetthe starting offset of the output shared
memoriesinside the input tuple.
Output_Indexthe required step from offset in order to
accessthe output memory of the current expression
LHSthe left-hand size expression
RHSthen right-hand size expression
internal::ops_categorythe type of the operation
LCthe shared memory column size
LRthe shared memory row size
Colsoutput memory column size
Rowsoutput memory row size
LVLthe depth of the subexpression root in the expression tree
LfTypethe type of the output memory
LocCoordinate of accessing a particular location
Paramsthe input/output memories

eval function parameters:

Parameters
cOffsetCoordinate of accessing a particular location.
ttuple of input/output memories
Returns
void.

Definition at line 195 of file evaluator.hpp.


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