60 assert( values != NULL );
86 assert( values != NULL );
110 ,
const char** op_name
135 assert( num_values );
136 assert( num_indexes );
141 , num_values, num_indexes, num_chars );
159 if(num_values) assert( value_data );
160 if(num_indexes) assert( index_data );
161 if(num_chars) assert( char_data );
165 , num_values, value_data
166 , num_indexes, index_data
167 , num_chars, char_data );
185 if(num_values) assert( value_data );
186 if(num_indexes) assert( index_data );
187 if(num_chars) assert( char_data );
191 ,num_values, value_data
192 ,num_indexes, index_data
193 ,num_chars, char_data
221 assert( num_values );
222 assert( num_indexes );
227 , num_values, num_indexes, num_chars );
296 if(num_values) assert( value_data );
297 if(num_indexes) assert( index_data );
298 if(num_chars) assert( char_data );
302 ,num_values, value_data
303 ,num_indexes, index_data
304 ,num_chars, char_data );
325 if(num_values) assert( value_data );
326 if(num_indexes) assert( index_data );
327 if(num_chars) assert( char_data );
331 ,num_values, value_data
332 ,num_indexes, index_data
333 ,num_chars, char_data
335 if(err != 0)
return err;
336 if( reduct_obj != reduct_obj_in )
343 ,
int *coord_invariant
350 assert( coord_invariant );
353 *coord_invariant = 1;
366 if(num_vecs) assert(sub_vecs);
367 if(num_targ_vecs) assert(targ_sub_vecs);
370 op->
vtbl,op->
obj_data,num_vecs,sub_vecs,num_targ_vecs,targ_sub_vecs
386 , RTOp_reduct_op_func_ptr_t* reduct_op_func_ptr )
404 #define RTOp_SERVER_MAX_NUM_ENTRIES 50
411 static RTOp_RTOp_vtbl_t_ptr
424 ,
int num_entries,
const char op_name[] )
427 for( k = 0; k < num_entries; ++k )
429 if( strcmp( op_name_tbl[k].name, op_name ) == 0 )
438 ,
int num_entries, RTOp_RTOp_vtbl_t_ptr op_vtbl )
441 for( k = 0; k < num_entries; ++k )
443 if( op_vtbl_tbl[k] == op_vtbl )
473 ,
char op_class_name[] )
485 const char op_class_name[]
504 num_values,value_data,num_indexes,index_data,num_chars,char_data
515 fprintf( file,
"Class names and vtbl pointers for RTOp_RTOp subcasses\n" );
522 ,
" class name = \"%s\"\n"
523 " looked up class name = \"%s\"\n"
525 " looked up vtbl = %p\n"
char name[RTOp_SERVER_MAX_NUM_ENTRIES+1]
int RTOp_get_reduct_type_num_entries(const struct RTOp_RTOp *op, int *num_values, int *num_indexes, int *num_chars)
int RTOp_load_op_state(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[], struct RTOp_RTOp *op)
int(* get_obj_type_num_entries)(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, int *num_values, int *num_indexes, int *num_chars)
int RTOp_load_reduct_obj_state(const struct RTOp_RTOp *op, 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[], RTOp_ReductTarget reduct_obj)
RTOp_index_type global_offset
int RTOp_reduct_obj_create(const struct RTOp_RTOp *op, RTOp_ReductTarget *reduct_obj)
void RTOp_mutable_sub_vector(RTOp_index_type global_offset, RTOp_index_type sub_dim, RTOp_value_type values[], ptrdiff_t values_stride, struct RTOp_MutableSubVector *sub_vec)
int RTOp_reduce_reduct_objs(const struct RTOp_RTOp *op, RTOp_ReductTarget in_reduct_obj, RTOp_ReductTarget inout_reduct_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
static int find_op_vtbl(const RTOp_RTOp_vtbl_t_ptr op_vtbl_tbl[], int num_entries, RTOp_RTOp_vtbl_t_ptr op_vtbl)
static int find_op_name(const struct RTOp_Server_op_class_name op_name_tbl[], int num_entries, const char op_name[])
int RTOp_extract_reduct_obj_state(const struct RTOp_RTOp *op, const RTOp_ReductTarget reduct_obj, int num_values, RTOp_value_type value_data[], int num_indexes, RTOp_index_type index_data[], int num_chars, RTOp_char_type char_data[])
int(* extract_state)(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, void *obj, int num_values, RTOp_value_type value_data[], int num_indexes, RTOp_index_type index_data[], int num_chars, RTOp_char_type char_data[])
void RTOp_sub_vector(RTOp_index_type global_offset, RTOp_index_type sub_dim, const RTOp_value_type values[], ptrdiff_t values_stride, struct RTOp_SubVector *sub_vec)
const struct RTOp_obj_type_vtbl_t * reduct_vtbl
int RTOp_reduct_obj_free(const struct RTOp_RTOp *op, RTOp_ReductTarget *reduct_obj)
int RTOp_get_op_type_num_entries(const struct RTOp_RTOp *op, int *num_values, int *num_indexes, int *num_chars)
int RTOp_get_op_name(const struct RTOp_RTOp *op, const char **op_name)
#define RTOp_SERVER_MAX_NUM_ENTRIES
int RTOp_apply_op(const struct RTOp_RTOp *op, const int num_vecs, const struct RTOp_SubVector sub_vecs[], const int num_targ_vecs, const struct RTOp_MutableSubVector targ_sub_vecs[], RTOp_ReductTarget reduct_obj)
const RTOp_value_type * values
int RTOp_Server_lookup_op_name(const struct RTOp_RTOp_vtbl_t *op_class_vtbl, char op_class_name[])
int RTOp_Server_add_op_name_vtbl(const char op_class_name[], const struct RTOp_RTOp_vtbl_t *op_class_vtbl)
int RTOp_free_op(struct RTOp_RTOp *op)
static struct RTOp_Server_op_class_name RTOp_Server_op_names[RTOp_SERVER_MAX_NUM_ENTRIES]
int RTOp_extract_op_state(const struct RTOp_RTOp *op, int num_values, RTOp_value_type value_data[], int num_indexes, RTOp_index_type index_data[], int num_chars, RTOp_char_type char_data[])
const struct RTOp_RTOp_vtbl_t * RTOp_RTOp_vtbl_t_ptr
int(* obj_free)(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, void **obj)
#define RTOp_ERR_INVALID_USAGE
#define RTOp_SERVER_INCOMPATIBLE_OPS
int(* obj_reinit)(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, void *obj)
int(* apply_op)(const struct RTOp_RTOp_vtbl_t *vtbl, const void *obj_data, const int num_vecs, const struct RTOp_SubVector sub_vecs[], const int num_targ_vecs, const struct RTOp_MutableSubVector targ_sub_vecs[], RTOp_ReductTarget reduct_obj)
int(* reduct_obj_reinit)(const struct RTOp_RTOp_vtbl_t *vtbl, const void *obj_data, RTOp_ReductTarget reduct_obj)
const struct RTOp_RTOp_vtbl_t * vtbl
#define RTOp_MAX_REDUCT_TRANS_OP_CLASS_NAME
int(* get_reduct_op)(const struct RTOp_RTOp_vtbl_t *vtbl, const void *obj_data, RTOp_reduct_op_func_ptr_t *reduct_op_func_ptr)
int RTOp_Server_construct_op(const char op_class_name[], 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[], struct RTOp_RTOp *op)
static RTOp_RTOp_vtbl_t_ptr RTOp_Server_op_vtbl[RTOp_SERVER_MAX_NUM_ENTRIES]
int(* reduce_reduct_objs)(const struct RTOp_RTOp_vtbl_t *vtbl, const void *obj_data, RTOp_ReductTarget in_reduct_obj, RTOp_ReductTarget inout_reduct_obj)
RTOp_index_type global_offset
int(* load_state)(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, 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)
void RTOp_mutable_sub_vector_null(struct RTOp_MutableSubVector *sub_vec)
int RTOp_reduct_obj_reinit(const struct RTOp_RTOp *op, RTOp_ReductTarget reduct_obj)
int RTOp_get_reduct_op(const struct RTOp_RTOp *op, RTOp_reduct_op_func_ptr_t *reduct_op_func_ptr)
static int RTOp_Server_num_ops
#define RTOp_SERVER_OP_NAME_TOO_LONG
void RTOp_Server_dump(FILE *file)
void RTOp_sub_vector_null(struct RTOp_SubVector *sub_vec)
int RTOp_coord_invariant(const struct RTOp_RTOp *op, int *coord_invariant)
Teuchos_Ordinal RTOp_index_type
#define RTOp_REDUCT_OBJ_NULL