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_TOp_set_sub_vector.h File Reference
#include "RTOp.h"
#include "RTOp_SparseSubVector.h"
Include dependency graph for RTOp_TOp_set_sub_vector.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

int RTOp_TOp_set_sub_vector_construct (const struct RTOp_SparseSubVector *sub_vec, struct RTOp_RTOp *op)
 
int RTOp_TOp_set_sub_vector_set_sub_vec (const struct RTOp_SparseSubVector *sub_vec, struct RTOp_RTOp *op)
 
int RTOp_TOp_set_sub_vector_destroy (struct RTOp_RTOp *op)
 

Detailed Description

Transforamtion operator for setting a sub-vector in a whole vector.

z0 <- sub_vec

This operator is only defined to allow one vector argument (num_targ_vecs == 1) z[0]. Using a reduction operator to set a sub-vector will be reasonably efficient for some types of vector subclasses (e.g. dense and sparse serial vectors and parallel vectors with client in every process) but very slow for others (e.g. out-of-core vectors and parallel vectors where operator object must be scattered to various processes). It would be better for vector subclasses to implement this operation directly but if they don't you can use this operator to set the required sub-vector.

This operator class works by allocating an internal sub-vector as the operator object state data.

Definition in file RTOp_TOp_set_sub_vector.h.

Function Documentation

int RTOp_TOp_set_sub_vector_construct ( const struct RTOp_SparseSubVector sub_vec,
struct RTOp_RTOp op 
)

Constructor.

Note that a copy of sub_vec is not made. Therefore, the client must not disturb sub_vec while this operator object is in use!

Definition at line 357 of file RTOp_TOp_set_sub_vector.c.

int RTOp_TOp_set_sub_vector_set_sub_vec ( const struct RTOp_SparseSubVector sub_vec,
struct RTOp_RTOp op 
)

Reinitialize the range for the sub-vector to extract.

Note that a copy of sub_vec is not made. Therefore, the client must not disturb sub_vec while this operator object is in use!

Definition at line 369 of file RTOp_TOp_set_sub_vector.c.

int RTOp_TOp_set_sub_vector_destroy ( struct RTOp_RTOp op)

Destructor.

Definition at line 386 of file RTOp_TOp_set_sub_vector.c.