X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/364eee0fc6ab77fddc5437ac273527bd27711724..5d738e328b0d1214fab07f81ffbc9b45406f98aa:/src/smpi/mpi/smpi_status.cpp diff --git a/src/smpi/mpi/smpi_status.cpp b/src/smpi/mpi/smpi_status.cpp index e282a2276c..b048fe74bc 100644 --- a/src/smpi/mpi/smpi_status.cpp +++ b/src/smpi/mpi/smpi_status.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2020. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -18,10 +18,26 @@ void Status::empty(MPI_Status * status) status->MPI_TAG = MPI_ANY_TAG; status->MPI_ERROR = MPI_SUCCESS; status->count=0; + status->cancelled=0; } } -int Status::get_count(MPI_Status * status, MPI_Datatype datatype) +int Status::cancelled(const MPI_Status * status) +{ + return status->cancelled!=0; +} + +void Status::set_cancelled(MPI_Status * status, int flag) +{ + status->cancelled=flag; +} + +void Status::set_elements(MPI_Status* status, const Datatype*, int count) +{ + status->count=count; +} + +int Status::get_count(const MPI_Status * status, MPI_Datatype datatype) { return status->count / datatype->size(); }