72 if( num_vecs != 1 || vecs == NULL )
74 if( num_targ_vecs != 1 || targ_vecs == NULL )
76 if( targ_vecs[0].sub_dim != vecs[0].sub_dim )
87 z_sub_dim = targ_vecs[0].
sub_dim;
88 z_val = targ_vecs[0].
values;
103 if( z_val_s == 1 && v0_val_s == 1 ) {
105 for( k = 0; k < z_sub_dim; ++k )
106 *z_val++ += alpha * (*v0_val++);
110 for( k = 0; k < z_sub_dim; ++k, z_val += z_val_s, v0_val += v0_val_s )
111 *z_val += alpha * (*v0_val);
static int RTOp_TOp_axpy_apply_op(const struct RTOp_RTOp_vtbl_t *vtbl, const void *obj_data, const int num_vecs, const struct RTOp_SubVector vecs[], const int num_targ_vecs, const struct RTOp_MutableSubVector targ_vecs[], RTOp_ReductTarget targ_obj)
int(* obj_create)(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, void **obj)
const struct RTOp_obj_type_vtbl_t * obj_data_vtbl
#define RTOp_ERR_INCOMPATIBLE_VECS
const RTOp_value_type * values
int RTOp_TOp_axpy_set_alpha(RTOp_value_type alpha, struct RTOp_RTOp *op)
const struct RTOp_RTOp_vtbl_t RTOp_TOp_axpy_vtbl
#define RTOp_ERR_INVALID_NUM_VECS
int(* obj_free)(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, void **obj)
const struct RTOp_obj_type_vtbl_t RTOp_obj_null_vtbl
int RTOp_TOp_axpy_destroy(struct RTOp_RTOp *op)
const struct RTOp_RTOp_vtbl_t * vtbl
#define RTOp_ERR_INVALID_NUM_TARG_VECS
int RTOp_TOp_axpy_construct(RTOp_value_type alpha, struct RTOp_RTOp *op)
const struct RTOp_obj_type_vtbl_t RTOp_obj_value_vtbl
Teuchos_Ordinal RTOp_index_type