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/ptl/ptl.h"
|
|
|
|
#include "mca/pml/base/pml_base_request.h"
|
2004-01-14 06:42:02 +03:00
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
extern ompi_class_t mca_ptl_base_recv_request_t_class;
|
2004-02-04 00:33:29 +03:00
|
|
|
struct mca_ptl_base_recv_frag_t;
|
2004-01-14 06:42:02 +03:00
|
|
|
|
2004-03-26 17:15:20 +03:00
|
|
|
/**
|
|
|
|
* Base type for receive requests.
|
|
|
|
*/
|
2004-02-12 23:55:10 +03:00
|
|
|
struct mca_ptl_base_recv_request_t {
|
2004-03-31 21:00:38 +04:00
|
|
|
mca_pml_base_request_t super; /**< base request */
|
2004-05-20 17:45:34 +04:00
|
|
|
size_t req_bytes_packed; /**< size of message being received */
|
2004-03-31 21:00:38 +04:00
|
|
|
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
|
|
|
};
|
|
|
|
typedef struct mca_ptl_base_recv_request_t mca_ptl_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-05-19 01:06:11 +04:00
|
|
|
#define MCA_PTL_BASE_RECV_REQUEST_INIT( \
|
|
|
|
request, \
|
|
|
|
addr, \
|
|
|
|
count, \
|
|
|
|
datatype, \
|
|
|
|
src, \
|
|
|
|
tag, \
|
|
|
|
comm, \
|
|
|
|
persistent) \
|
|
|
|
{ \
|
2004-05-20 17:45:34 +04:00
|
|
|
request->req_bytes_packed = 0; \
|
2004-05-19 01:06:11 +04:00
|
|
|
request->req_bytes_received = 0; \
|
|
|
|
request->req_bytes_delivered = 0; \
|
|
|
|
request->super.req_sequence = 0; \
|
|
|
|
request->super.req_addr = addr; \
|
|
|
|
request->super.req_count = count; \
|
|
|
|
request->super.req_datatype = datatype; \
|
|
|
|
request->super.req_peer = src; \
|
|
|
|
request->super.req_tag = tag; \
|
|
|
|
request->super.req_comm = comm; \
|
|
|
|
request->super.req_proc = NULL; \
|
|
|
|
request->super.req_persistent = persistent; \
|
|
|
|
request->super.req_mpi_done = false; \
|
|
|
|
request->super.req_pml_done = false; \
|
|
|
|
request->super.req_free_called = false; \
|
2004-01-29 22:27:39 +03:00
|
|
|
}
|
2004-03-17 20:28:11 +03:00
|
|
|
|
2004-03-26 17:15:20 +03:00
|
|
|
/**
|
|
|
|
* Attempt to match the request against the unexpected fragment list
|
|
|
|
* for all source ranks w/in the communicator.
|
|
|
|
*
|
|
|
|
* @param request (IN) Request to match.
|
|
|
|
*/
|
|
|
|
void mca_ptl_base_recv_request_match_wild(mca_ptl_base_recv_request_t* request);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Attempt to match the request against the unexpected fragment list
|
|
|
|
* for a specific source rank.
|
|
|
|
*
|
|
|
|
* @param request (IN) Request to match.
|
|
|
|
*/
|
|
|
|
void mca_ptl_base_recv_request_match_specific(mca_ptl_base_recv_request_t* request);
|
|
|
|
|
2004-01-14 06:42:02 +03:00
|
|
|
#endif
|
|
|
|
|