1
1
openmpi/ompi/mca/osc/pt2pt/osc_pt2pt_obj_convert.h
2007-05-30 20:32:02 +00:00

52 строки
1.5 KiB
C

/*
* Copyright (c) 2004-2005 The Trustees of Indiana University.
* All rights reserved.
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
* All rights reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
/*
* utility functions for dealing with remote datatype and op structures
*/
#include "mpi.h"
#include "ompi/datatype/datatype.h"
static inline
struct ompi_datatype_t*
ompi_osc_pt2pt_datatype_create(ompi_proc_t *remote_proc, void **payload)
{
struct ompi_datatype_t *datatype =
ompi_ddt_create_from_packed_description(payload, remote_proc);
if (NULL == datatype) return NULL;
if (ompi_ddt_is_predefined(datatype)) OBJ_RETAIN(datatype);
return datatype;
}
static inline
ompi_op_t *
ompi_osc_pt2pt_op_create(int op_id)
{
ompi_op_t *op = MPI_Op_f2c(op_id);
OBJ_RETAIN(op);
return op;
}
int ompi_osc_pt2pt_process_op(ompi_osc_pt2pt_module_t *module,
ompi_osc_pt2pt_send_header_t *header,
struct ompi_datatype_t *datatype,
ompi_op_t *op,
void *inbuf,
size_t inbuflen);