A request is inactive only if it is persistant. Therefore, we don't need
2 sequential ifs, we can reach the same result with 2 embedded ifs. This commit was SVN r12132.
Этот коммит содержится в:
родитель
e116a37482
Коммит
6a4cf1fef5
@ -20,7 +20,6 @@
|
|||||||
#include "ompi/constants.h"
|
#include "ompi/constants.h"
|
||||||
#include "ompi/request/request.h"
|
#include "ompi/request/request.h"
|
||||||
|
|
||||||
|
|
||||||
int ompi_request_wait(
|
int ompi_request_wait(
|
||||||
ompi_request_t ** req_ptr,
|
ompi_request_t ** req_ptr,
|
||||||
ompi_status_public_t * status)
|
ompi_status_public_t * status)
|
||||||
@ -58,10 +57,10 @@ finished:
|
|||||||
status->_count = req->req_status._count;
|
status->_count = req->req_status._count;
|
||||||
status->_cancelled = req->req_status._cancelled;
|
status->_cancelled = req->req_status._cancelled;
|
||||||
}
|
}
|
||||||
if( req->req_state == OMPI_REQUEST_INACTIVE ) {
|
|
||||||
return OMPI_SUCCESS;
|
|
||||||
}
|
|
||||||
if( req->req_persistent ) {
|
if( req->req_persistent ) {
|
||||||
|
if( req->req_state == OMPI_REQUEST_INACTIVE ) {
|
||||||
|
return OMPI_SUCCESS;
|
||||||
|
}
|
||||||
req->req_state = OMPI_REQUEST_INACTIVE;
|
req->req_state = OMPI_REQUEST_INACTIVE;
|
||||||
return req->req_status.MPI_ERROR;
|
return req->req_status.MPI_ERROR;
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user