67 assert( num_indexes );
131 assert( num_chars == 0 );
132 assert( value_data );
133 assert( index_data );
168 if( *obj_data == NULL ) {
180 if( num_indexes > 8 ) assert( num_values == num_indexes - 8 );
191 if( num_indexes > 8 )
197 assert( num_chars == 0 );
198 assert( value_data );
199 assert( index_data );
202 *values++ = value_data[k];
211 if( num_indexes > 8 ) {
212 for( j = 0; j < num_values; ++j )
258 if( num_targ_vecs != 1 )
284 z_sub_dim = targ_vecs[0].
sub_dim;
285 z_val = targ_vecs[0].
values;
292 if( v_global_offset + v_sub_dim < z_global_offset + 1
293 || z_global_offset + z_sub_dim < v_global_offset + 1 )
300 if( v_global_offset <= z_global_offset ) {
301 if( v_global_offset + v_sub_dim >= z_global_offset + z_sub_dim )
302 num_overlap = z_sub_dim;
304 num_overlap = (v_global_offset + v_sub_dim) - z_global_offset;
307 if( z_global_offset + z_sub_dim >= v_global_offset + v_sub_dim )
308 num_overlap = v_sub_dim;
310 num_overlap = (z_global_offset + z_sub_dim) - v_global_offset;
314 if( v_ind != NULL ) {
317 if( v_global_offset >= z_global_offset )
318 z_val += (v_global_offset - z_global_offset) * z_val_s;
319 for( k = 0; k < num_overlap; ++k, z_val += z_val_s )
322 z_val = targ_vecs[0].
values;
323 for( k = 0; k < v_sub_nz; ++k, v_val += v_val_s, v_ind += v_ind_s ) {
324 i = v_global_offset + v_l_off + (*v_ind);
325 if( z_global_offset < i && i <= z_global_offset + z_sub_dim )
326 z_val[ z_val_s * (i - z_global_offset - 1) ] = *v_val;
333 if( v_global_offset <= z_global_offset )
334 v_val += (z_global_offset - v_global_offset) * v_val_s;
336 z_val += (v_global_offset - z_global_offset) * z_val_s;
337 for( k = 0; k < num_overlap; ++k, v_val += v_val_s, z_val += z_val_s )
350 ,
"RTOp_TOp_set_sub_vector"
static int op_create(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, RTOp_ReductTarget *obj)
const struct RTOp_RTOp_vtbl_t RTOp_TOp_set_sub_vector_vtbl
int RTOp_TOp_set_sub_vector_destroy(struct RTOp_RTOp *op)
static int op_free(const struct RTOp_obj_type_vtbl_t *vtbl, const void *dummy, void **obj_data)
int(* obj_create)(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, void **obj)
const RTOp_index_type * indices
const struct RTOp_obj_type_vtbl_t * obj_data_vtbl
void RTOp_sparse_sub_vector_null(struct RTOp_SparseSubVector *sub_vec)
static int RTOp_TOp_set_sub_vector_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 RTOp_TOp_set_sub_vector_construct(const struct RTOp_SparseSubVector *sub_vec, struct RTOp_RTOp *op)
static int load_op_state(const struct RTOp_obj_type_vtbl_t *vtbl, const void *dummy, int num_values, const RTOp_value_type value_data[], int num_indexes, const RTOp_index_type index_data[], int num_chars, const RTOp_char_type char_data[], void **obj_data)
#define RTOp_ERR_INVALID_NUM_VECS
RTOp_index_type global_offset
const struct RTOp_obj_type_vtbl_t RTOp_obj_null_vtbl
static int extract_op_state(const struct RTOp_obj_type_vtbl_t *vtbl, const void *dummy, void *obj_data, int num_values, RTOp_value_type value_data[], int num_indexes, RTOp_index_type index_data[], int num_chars, RTOp_char_type char_data[])
struct RTOp_SparseSubVector sub_vec
static struct RTOp_obj_type_vtbl_t instance_obj_vtbl
const struct RTOp_RTOp_vtbl_t * vtbl
static int get_op_type_num_entries(const struct RTOp_obj_type_vtbl_t *vtbl, const void *obj_data, int *num_values, int *num_indexes, int *num_chars)
RTOp_index_type global_offset
const RTOp_value_type * values
#define RTOp_ERR_INVALID_NUM_TARG_VECS
int RTOp_TOp_set_sub_vector_set_sub_vec(const struct RTOp_SparseSubVector *sub_vec, struct RTOp_RTOp *op)
Teuchos_Ordinal RTOp_index_type
#define RTOp_REDUCT_OBJ_NULL