OpenMPI  0.1.1
op_example_module_max.c File Reference

This is the max module source code. More...

#include "ompi_config.h"
#include "opal/class/opal_object.h"
#include "opal/util/output.h"
#include "ompi/constants.h"
#include "ompi/op/op.h"
#include "ompi/mca/op/op.h"
#include "ompi/mca/op/base/base.h"
#include "ompi/mca/op/example/op_example.h"

Data Structures

struct  module_max_t
 Derive a struct from the base op module struct, allowing us to cache some module-specific information for MAX. More...
 

Functions

static void module_max_constructor (module_max_t *m)
 "Constructor" for the max module class
 
static void module_max_destructor (module_max_t *m)
 "Destructor" for the max module class
 
static OBJ_CLASS_INSTANCE (module_max_t, ompi_op_base_module_t, module_max_constructor, module_max_destructor)
 Setup the class for the max module, listing: More...
 
static void max_float (void *in, void *out, int *count, ompi_datatype_t **type, ompi_op_base_module_t *module)
 Max function for C float.
 
static void max_double (void *in, void *out, int *count, ompi_datatype_t **type, ompi_op_base_module_t *module)
 Max function for C double.
 
static void max_real (void *in, void *out, int *count, ompi_datatype_t **type, ompi_op_base_module_t *module)
 Max function for Fortran REAL.
 
static void max_double_precision (void *in, void *out, int *count, ompi_datatype_t **type, ompi_op_base_module_t *module)
 Max function for Fortran DOUBLE PRECISION.
 
ompi_op_base_module_tompi_op_example_setup_max (ompi_op_t *op)
 Setup function for MPI_MAX. More...
 

Detailed Description

This is the max module source code.

It contains the "setup" functions that will create a module for the MPI_MAX MPI_Op.

Function Documentation

static OBJ_CLASS_INSTANCE ( module_max_t  ,
ompi_op_base_module_t  ,
module_max_constructor  ,
module_max_destructor   
)
static

Setup the class for the max module, listing:

  • the name of the class
  • the "parent" of the class
  • function pointer for the constructor (or NULL)
  • function pointer for the destructor (or NULL)
ompi_op_base_module_t* ompi_op_example_setup_max ( ompi_op_t op)

Setup function for MPI_MAX.

Setup for MPI_MAX and return a module.

If we get here, we can assume that a) the hardware is present, b) the MPI thread scenario is what we want, and c) the MAX operation is supported. So this function's job is to create a module and fill in function pointers for the functions that this hardware supports.

References ompi_op_example_component_t::double_supported, ompi_op_t::intrinsic, max_double(), max_double_precision(), max_float(), max_real(), mca_op_example_component, ompi_op_t::o_func, OBJ_RETAIN, OMPI_OP_BASE_TYPE_DOUBLE, OMPI_OP_BASE_TYPE_DOUBLE_PRECISION, OMPI_OP_BASE_TYPE_FLOAT, OMPI_OP_BASE_TYPE_REAL, and ompi_op_base_module_1_0_0_t::opm_fns.