RTOpPack: Extra C/C++ Code for Vector Reduction/Transformation Operators  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
RTOp_ROp_get_ele.h File Reference
#include "RTOp.h"
Include dependency graph for RTOp_ROp_get_ele.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Detailed Description

Reduction operator for looking up the value of an element.

targ_obj <- v[0](i)

This operator is only defined to allow one vector argument (num_vecs == 1) v[0] but it can handle sparse and dense vectors. Using a reduction operator to lookup and an element will be reasonably efficient for some types of vector subclasses (i.e. dense and sparse serial and parallel vectors) but very slow for others (i.e. out-of-core vectors). It would be better for vector subclasses to implement this operation directly but if they don't you can use this operation to lookup an element. Of course the user should not abuse this operation in order to access a bunch of elements in a vector. To do so would be very inefficient. This is what reduction operators where designed to avoid.

Definition in file RTOp_ROp_get_ele.h.