MOOCHO (Single Doxygen Collection)
Version of the Day
|
#include "RTOp.h"
Go to the source code of this file.
const struct RTOp_RTOp_vtbl_t | RTOp_ROp_get_sub_vector_vtbl |
int | RTOp_ROp_get_sub_vector_construct (RTOp_index_type l, RTOp_index_type u, struct RTOp_RTOp *op) |
int | RTOp_ROp_get_sub_vector_set_range (RTOp_index_type l, RTOp_index_type u, struct RTOp_RTOp *op) |
int | RTOp_ROp_get_sub_vector_destroy (struct RTOp_RTOp *op) |
struct RTOp_SubVector | RTOp_ROp_get_sub_vector_val (RTOp_ReductTarget reduct_obj) |
Reduction operator for extracting a sub-vector out of the whole vector.
sub_vec <- v[0](l,u)
This operator is only defined to allow one vector argument (num_vecs == 1
) v[0]
. Using a reduction operator to extract a sub-vector will be reasonably efficient for some types of vector subclasses (e.g. serial vectors) but very slow for others (e.g. out-of-core and parallel vectors). It would be better for vector subclasses to implement this operation directly but if they don't you can use this operator to extract the required sub-vector.
This operator class works by allocating a dense sub-vector and then initializing the values to zero. During the reduction of a single vector chunk, nonzero values are set. After the global reduction is performed, the vector is compacted (i.e. the zero elements are removed if present) by the RTOp_ROp_get_sub_vector_val<tt>(...) function.
Definition in file RTOp_ROp_get_sub_vector.h.
int RTOp_ROp_get_sub_vector_construct | ( | RTOp_index_type | l, |
RTOp_index_type | u, | ||
struct RTOp_RTOp * | op | ||
) |
Definition at line 489 of file RTOp_ROp_get_sub_vector.c.
int RTOp_ROp_get_sub_vector_set_range | ( | RTOp_index_type | l, |
RTOp_index_type | u, | ||
struct RTOp_RTOp * | op | ||
) |
Definition at line 501 of file RTOp_ROp_get_sub_vector.c.
int RTOp_ROp_get_sub_vector_destroy | ( | struct RTOp_RTOp * | op | ) |
Definition at line 513 of file RTOp_ROp_get_sub_vector.c.
struct RTOp_SubVector RTOp_ROp_get_sub_vector_val | ( | RTOp_ReductTarget | reduct_obj | ) |
Get the sub-vector.
This function should only be called after the complete reduction operation has been finished. However, RTOp_reduct_obj_free(...)
should still be called to delete the reduct_obj
once it is finished being used.
reduct_obj | [in/out] On input, this object must at least be initialized and may or may not have been through any reduction operations. |
free(reduct_obj)
and then set reduct_obj == RTOp_REDUCT_OBJ_NULL
to avoid future mistakes. Definition at line 524 of file RTOp_ROp_get_sub_vector.c.
const struct RTOp_RTOp_vtbl_t RTOp_ROp_get_sub_vector_vtbl |
Definition at line 478 of file RTOp_ROp_get_sub_vector.c.