MOOCHO (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Macros | 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
 

Macros

#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
 
const struct RTOp_RTOp_vtbl_t RTOp_ROp_get_sub_vector_vtbl
 

Macro Definition Documentation

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

Definition at line 49 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 58 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 75 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 83 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 106 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 143 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 163 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 190 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 214 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 237 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 273 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 329 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 394 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 426 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 468 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 489 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 501 of file RTOp_ROp_get_sub_vector.c.

int RTOp_ROp_get_sub_vector_destroy ( struct RTOp_RTOp op)

Definition at line 513 of file RTOp_ROp_get_sub_vector.c.

struct RTOp_SubVector RTOp_ROp_get_sub_vector_val ( RTOp_ReductTarget  reduct_obj)

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 524 of file RTOp_ROp_get_sub_vector.c.

Variable Documentation

struct RTOp_obj_type_vtbl_t instance_obj_vtbl
static
Initial value:
=
{
,NULL
}
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 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 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)
int RTOp_obj_free_free(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, void **obj)

Definition at line 131 of file RTOp_ROp_get_sub_vector.c.

struct RTOp_obj_type_vtbl_t targ_obj_vtbl
static
Initial value:
=
{
}
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 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 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_free(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_create(const struct RTOp_obj_type_vtbl_t *vtbl, const void *obj_data, RTOp_ReductTarget *targ_obj)

Definition at line 317 of file RTOp_ROp_get_sub_vector.c.

const struct RTOp_RTOp_vtbl_t RTOp_ROp_get_sub_vector_vtbl
Initial value:
=
{
,"RTOp_ROp_get_sub_vector"
,NULL
}
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 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 struct RTOp_obj_type_vtbl_t targ_obj_vtbl
static struct RTOp_obj_type_vtbl_t instance_obj_vtbl
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)

Definition at line 478 of file RTOp_ROp_get_sub_vector.c.