OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

Functions
osc_base_obj_convert.h File Reference

Utility functions for Open MPI object manipulation by the One-sided code. More...

`#include "ompi_config.h"`
`#include "ompi/datatype/ompi_datatype.h"`
`#include "ompi/proc/proc.h"`
`#include "ompi/op/op.h"`

Go to the source code of this file.

## Functions
static BEGIN_C_DECLS struct ompi_datatype_t * | ompi_osc_base_datatype_create (ompi_proc_t *remote_proc, void **payload)
| Create datatype based on packed payload. More...
static ompi_op_t * | ompi_osc_base_op_create (int op_id)
| Create datatype based on Fortran Index. More...
OMPI_DECLSPEC int | ompi_osc_base_get_primitive_type_info (ompi_datatype_t *datatype, ompi_datatype_t **prim_datatype, uint32_t *prim_count)
| Get the primitive datatype information for a legal one-sided accumulate datatype. More...
OMPI_DECLSPEC int | ompi_osc_base_process_op (void *outbuf, void *inbuf, size_t inbuflen, struct ompi_datatype_t *datatype, int count, ompi_op_t *op)
| Apply the operation specified from inbuf to outbut. More...

## Detailed Description

Utility functions for Open MPI object manipulation by the One-sided code.

Utility functions for creating / finding handles for Open MPI objects, usually based on indexes sent from remote peers.

## Function Documentation

static BEGIN_C_DECLS struct ompi_datatype_t* ompi_osc_base_datatype_create | ( | ompi_proc_t * | remote_proc,
|  | void ** | payload
| ) |  |
| static

Create datatype based on packed payload.

Create a useable MPI datatype based on it's packed description. The datatype is owned by the calling process and must be OBJ_RELEASEd when no longer in use.

Parameters

  remote_proc | The ompi_proc_t pointer for the remote process
  payload | A pointer to the pointer to the payload. The pointer to the payload will be moved past the datatype information upon successful return.

Return values

  NULL | A failure occrred
  non-NULL | A fully operational datatype

References OBJ_RETAIN.

OMPI_DECLSPEC int ompi_osc_base_get_primitive_type_info | ( | ompi_datatype_t * | datatype,
|  | ompi_datatype_t ** | prim_datatype,
|  | uint32_t * | prim_count
| ) |  |

Get the primitive datatype information for a legal one-sided accumulate datatype.

Get the primitive datatype information for a legal one-sided accumulate datatype. This includes the primitive datatype used to build the datatype (there can be only one) and the number of instances of that primitive datatype in the datatype (there can be many).

Parameters

  datatype | legal one-sided datatype
  prim_datatype | The primitive datatype used to build datatype
  prim_count | Number of instances of prim_datattpe in datatype

Return values

  OMPI_SUCCESS | Success

static ompi_op_t* ompi_osc_base_op_create | ( | int | op_id | ) |
| inline static

Create datatype based on Fortran Index.

Create a useable MPI datatype based on it's Fortran index, which is globally the same for predefined operations. The op handle is owned by the calling process and must be OBJ_RELEASEd when no longer in use.

Parameters

  op_id | The fortran index for the operaton

Return values

  NULL | A failure occrred
  non-NULL | An op handle

References OBJ_RETAIN.

OMPI_DECLSPEC int ompi_osc_base_process_op | ( | void * | outbuf,
|  | void * | inbuf,
|  | size_t | inbuflen,
|  | struct ompi_datatype_t * | datatype,
|  | int | count,
|  | ompi_op_t * | op
| ) |  |

Apply the operation specified from inbuf to outbut.

Apply the specified reduction operation from inbuf to outbuf. inbuf must contain count instances of datatype, in the local process's binary mode.

Return values

  OMPI_SUCCESS | Success
  OMPI_ERR_NOT_SUPPORTED | Called with op == ompi_mpi_op_replace

References opal_convertor_t::fAdvance, opal_convertor_t::master, OBJ_CONSTRUCT, OBJ_DESTRUCT, ompi_mpi_op_replace, ompi_op_reduce(), ompi_proc_local(), and opal_convertor_master_t::pFunctions.