MOOCHO (Single Doxygen Collection) Version of the Day
Classes | Defines | Functions | Variables
RTOp_ROp_get_sub_vector.c File Reference
#include "RTOp_ROp_get_sub_vector.h"
#include "RTOp_obj_free_free.h"
#include <stdlib.h>
Include dependency graph for RTOp_ROp_get_sub_vector.c:

Go to the source code of this file.

Classes

struct  RTOp_ROp_get_sub_vector_rng_t

Defines

#define MY_MIN(a, b)   a < b ? a : b

Functions

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)
static int obj_create (const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, RTOp_ReductTarget *obj)
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[])
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)
static int get_targ_type_num_entries (const struct RTOp_obj_type_vtbl_t *vtbl, const void *obj_data, int *num_values, int *num_indexes, int *num_chars)
static int targ_obj_create (const struct RTOp_obj_type_vtbl_t *vtbl, const void *obj_data, RTOp_ReductTarget *targ_obj)
static int targ_obj_reinit (const struct RTOp_obj_type_vtbl_t *vtbl, const void *obj_data, RTOp_ReductTarget targ_obj)
static int targ_obj_free (const struct RTOp_obj_type_vtbl_t *vtbl, const void *obj_data, RTOp_ReductTarget *targ_obj)
static int targ_extract_state (const struct RTOp_obj_type_vtbl_t *vtbl, const void *obj_data, void *targ_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[])
static int targ_load_state (const struct RTOp_obj_type_vtbl_t *vtbl, const void *obj_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 **targ_obj)
static int RTOp_ROp_get_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)
static 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)
static void CALL_API external_reduct_op (void *in_targ_array, void *inout_targ_array, int *len, RTOp_Datatype *datatype)
static 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_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 targ_obj)

Variables

static struct RTOp_obj_type_vtbl_t instance_obj_vtbl
static struct RTOp_obj_type_vtbl_t targ_obj_vtbl
struct RTOp_RTOp_vtbl_t RTOp_ROp_get_sub_vector_vtbl

Define Documentation

#define MY_MIN (   a,
 
)    a < b ? a : b

Definition at line 36 of file RTOp_ROp_get_sub_vector.c.


Function Documentation

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 
) [static]

Definition at line 45 of file RTOp_ROp_get_sub_vector.c.

static int obj_create ( const struct RTOp_obj_type_vtbl_t vtbl,
const void *  instance_data,
RTOp_ReductTarget obj 
) [static]

Definition at line 62 of file RTOp_ROp_get_sub_vector.c.

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[] 
) [static]

Definition at line 70 of file RTOp_ROp_get_sub_vector.c.

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 
) [static]

Definition at line 93 of file RTOp_ROp_get_sub_vector.c.

static int get_targ_type_num_entries ( const struct RTOp_obj_type_vtbl_t vtbl,
const void *  obj_data,
int *  num_values,
int *  num_indexes,
int *  num_chars 
) [static]

Definition at line 130 of file RTOp_ROp_get_sub_vector.c.

static int targ_obj_create ( const struct RTOp_obj_type_vtbl_t vtbl,
const void *  obj_data,
RTOp_ReductTarget targ_obj 
) [static]

Definition at line 150 of file RTOp_ROp_get_sub_vector.c.

static int targ_obj_reinit ( const struct RTOp_obj_type_vtbl_t vtbl,
const void *  obj_data,
RTOp_ReductTarget  targ_obj 
) [static]

Definition at line 177 of file RTOp_ROp_get_sub_vector.c.

static int targ_obj_free ( const struct RTOp_obj_type_vtbl_t vtbl,
const void *  obj_data,
RTOp_ReductTarget targ_obj 
) [static]

Definition at line 201 of file RTOp_ROp_get_sub_vector.c.

static int targ_extract_state ( const struct RTOp_obj_type_vtbl_t vtbl,
const void *  obj_data,
void *  targ_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[] 
) [static]

Definition at line 224 of file RTOp_ROp_get_sub_vector.c.

static int targ_load_state ( const struct RTOp_obj_type_vtbl_t vtbl,
const void *  obj_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 **  targ_obj 
) [static]

Definition at line 260 of file RTOp_ROp_get_sub_vector.c.

static int RTOp_ROp_get_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 
) [static]

Definition at line 316 of file RTOp_ROp_get_sub_vector.c.

static 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 
) [static]

Definition at line 381 of file RTOp_ROp_get_sub_vector.c.

static void CALL_API external_reduct_op ( void *  in_targ_array,
void *  inout_targ_array,
int *  len,
RTOp_Datatype datatype 
) [static]

Definition at line 413 of file RTOp_ROp_get_sub_vector.c.

static 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 
) [static]

Definition at line 455 of file RTOp_ROp_get_sub_vector.c.

int RTOp_ROp_get_sub_vector_construct ( RTOp_index_type  l,
RTOp_index_type  u,
struct RTOp_RTOp op 
)

Definition at line 476 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 488 of file RTOp_ROp_get_sub_vector.c.

int RTOp_ROp_get_sub_vector_destroy ( struct RTOp_RTOp op)

Definition at line 500 of file RTOp_ROp_get_sub_vector.c.

struct RTOp_SubVector RTOp_ROp_get_sub_vector_val ( RTOp_ReductTarget  reduct_obj) [read]

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.

Parameters:
reduct_obj[in/out] On input, this object must at least be initialized and may or may not have been through any reduction operations.
Returns:
The returned sub-vector object does not own any memory. technically, reduct_obj owns the memory. However, to transfer memory over the client, call free(reduct_obj) and then set reduct_obj == RTOp_REDUCT_OBJ_NULL to avoid future mistakes.

Definition at line 511 of file RTOp_ROp_get_sub_vector.c.


Variable Documentation

Initial value:

Definition at line 465 of file RTOp_ROp_get_sub_vector.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines