Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Simple MPI_Win_lock and MPI_Win_unlock implementation.
[simgrid.git] / src / smpi / smpi_status.cpp
1 /* Copyright (c) 2007-2015. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #include "private.h"
8 #include "src/simix/smx_private.h"
9
10 void Status::empty(MPI_Status * status)
11 {
12   if(status != MPI_STATUS_IGNORE) {
13     status->MPI_SOURCE = MPI_ANY_SOURCE;
14     status->MPI_TAG = MPI_ANY_TAG;
15     status->MPI_ERROR = MPI_SUCCESS;
16     status->count=0;
17   }
18 }
19
20 int Status::get_count(MPI_Status * status, MPI_Datatype datatype)
21 {
22   return status->count / datatype->size();
23 }