2004-01-14 06:42:02 +03:00
|
|
|
/*
|
2004-11-22 04:38:40 +03:00
|
|
|
* 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$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-01-14 06:42:02 +03:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
2004-03-26 17:15:20 +03:00
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*/
|
2004-01-14 06:42:02 +03:00
|
|
|
#ifndef MCA_PML_BASE_RECV_REQUEST_H
|
|
|
|
#define MCA_PML_BASE_RECV_REQUEST_H
|
|
|
|
|
2004-03-17 21:45:16 +03:00
|
|
|
#include "mca/pml/base/pml_base_request.h"
|
2004-10-21 02:31:03 +04:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_DECLSPEC extern ompi_class_t mca_pml_base_recv_request_t_class;
|
2004-03-26 17:15:20 +03:00
|
|
|
/**
|
|
|
|
* Base type for receive requests.
|
|
|
|
*/
|
2004-06-24 23:28:30 +04:00
|
|
|
struct mca_pml_base_recv_request_t {
|
2004-07-15 22:08:20 +04:00
|
|
|
mca_pml_base_request_t req_base; /**< base request */
|
|
|
|
size_t req_bytes_packed; /**< size of message being received */
|
|
|
|
size_t req_bytes_received; /**< number of bytes received from network */
|
|
|
|
size_t req_bytes_delivered; /**< number of bytes delivered to user */
|
2004-02-12 23:55:10 +03:00
|
|
|
};
|
2004-06-24 23:28:30 +04:00
|
|
|
typedef struct mca_pml_base_recv_request_t mca_pml_base_recv_request_t;
|
2004-01-14 06:42:02 +03:00
|
|
|
|
|
|
|
|
2004-03-26 17:15:20 +03:00
|
|
|
/**
|
|
|
|
* Initialize a receive request with call parameters.
|
|
|
|
*
|
|
|
|
* @param request (IN) Receive request.
|
|
|
|
* @param addr (IN) User buffer.
|
|
|
|
* @param count (IN) Number of elements of indicated datatype.
|
|
|
|
* @param datatype (IN) User defined datatype.
|
|
|
|
* @param src (IN) Source rank w/in the communicator.
|
|
|
|
* @param tag (IN) User defined tag.
|
|
|
|
* @param comm (IN) Communicator.
|
|
|
|
* @param persistent (IN) Is this a ersistent request.
|
|
|
|
*/
|
2004-07-15 22:08:20 +04:00
|
|
|
#define MCA_PML_BASE_RECV_REQUEST_INIT( \
|
|
|
|
request, \
|
|
|
|
addr, \
|
|
|
|
count, \
|
|
|
|
datatype, \
|
|
|
|
src, \
|
|
|
|
tag, \
|
|
|
|
comm, \
|
|
|
|
persistent) \
|
|
|
|
{ \
|
2004-10-20 02:00:19 +04:00
|
|
|
/* increment reference count on communicator */ \
|
|
|
|
OBJ_RETAIN(comm); \
|
|
|
|
\
|
2004-07-15 22:08:20 +04:00
|
|
|
OMPI_REQUEST_INIT(&(request)->req_base.req_ompi); \
|
|
|
|
(request)->req_bytes_packed = 0; \
|
|
|
|
(request)->req_base.req_sequence = 0; \
|
|
|
|
(request)->req_base.req_addr = addr; \
|
|
|
|
(request)->req_base.req_count = count; \
|
|
|
|
(request)->req_base.req_datatype = datatype; \
|
|
|
|
(request)->req_base.req_peer = src; \
|
|
|
|
(request)->req_base.req_tag = tag; \
|
|
|
|
(request)->req_base.req_comm = comm; \
|
|
|
|
(request)->req_base.req_proc = NULL; \
|
|
|
|
(request)->req_base.req_persistent = persistent; \
|
2004-10-12 19:50:01 +04:00
|
|
|
(request)->req_base.req_pml_complete = false; \
|
2004-07-15 22:08:20 +04:00
|
|
|
(request)->req_base.req_free_called = false; \
|
2004-08-05 23:35:10 +04:00
|
|
|
\
|
2004-01-29 22:27:39 +03:00
|
|
|
}
|
2004-03-17 20:28:11 +03:00
|
|
|
|
2004-10-21 02:31:03 +04:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
2004-01-14 06:42:02 +03:00
|
|
|
#endif
|
|
|
|
|