1 /* Copyright (c) 2007-2022. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 #include "smpi_status.hpp"
8 #include "smpi_datatype.hpp"
13 void Status::empty(MPI_Status * status)
15 if(status != MPI_STATUS_IGNORE) {
16 status->MPI_SOURCE = MPI_ANY_SOURCE;
17 status->MPI_TAG = MPI_ANY_TAG;
18 status->MPI_ERROR = MPI_SUCCESS;
24 int Status::cancelled(const MPI_Status * status)
26 return status->cancelled!=0;
29 void Status::set_cancelled(MPI_Status * status, int flag)
31 status->cancelled=flag;
34 void Status::set_elements(MPI_Status* status, const Datatype*, int count)
39 int Status::get_count(const MPI_Status* status, const Datatype* datatype)
41 return status->count / datatype->size();