69 if( num_vecs != 2 || vecs == NULL )
71 if( num_targ_vecs != 1 || targ_vecs == NULL )
73 if( targ_vecs[0].sub_dim != vecs[0].sub_dim
74 || targ_vecs[0].sub_dim != vecs[1].sub_dim )
87 z_val = targ_vecs[0].
values;
100 if( z_val_s == 1 && v0_val_s == 1 && v1_val_s == 1 ) {
102 for( k = 0; k < sub_dim; ++k )
103 *z_val++ += alpha*(*v0_val++)*(*v1_val++);
107 for( k = 0; k < sub_dim; ++k, z_val+=z_val_s, v0_val+=v0_val_s, v1_val+=v1_val_s )
108 *z_val += alpha*(*v0_val)*(*v1_val);
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
int RTOp_TOp_ele_wise_prod_construct(RTOp_value_type alpha, struct RTOp_RTOp *op)
#define RTOp_ERR_INCOMPATIBLE_VECS
const RTOp_value_type * values
const struct RTOp_RTOp_vtbl_t RTOp_TOp_ele_wise_prod_vtbl
#define RTOp_ERR_INVALID_NUM_VECS
const struct RTOp_obj_type_vtbl_t RTOp_obj_null_vtbl
int RTOp_TOp_ele_wise_prod_destroy(struct RTOp_RTOp *op)
int RTOp_TOp_ele_wise_prod_set_alpha(RTOp_value_type alpha, struct RTOp_RTOp *op)
const struct RTOp_RTOp_vtbl_t * vtbl
static int RTOp_TOp_ele_wise_prod_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)
#define RTOp_ERR_INVALID_NUM_TARG_VECS
const struct RTOp_obj_type_vtbl_t RTOp_obj_value_vtbl
Teuchos_Ordinal RTOp_index_type