Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Convert enum smpi_process_state to enum class.
[simgrid.git] / src / smpi / mpi / smpi_status.cpp
index e282a22..ed6bf53 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2018. 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. */
 
 /* 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,9 +18,15 @@ void Status::empty(MPI_Status * status)
     status->MPI_TAG = MPI_ANY_TAG;
     status->MPI_ERROR = MPI_SUCCESS;
     status->count=0;
     status->MPI_TAG = MPI_ANY_TAG;
     status->MPI_ERROR = MPI_SUCCESS;
     status->count=0;
+    status->cancelled=0;
   }
 }
 
   }
 }
 
+int Status::cancelled(MPI_Status * status)
+{
+  return status->cancelled!=0;
+}
+
 int Status::get_count(MPI_Status * status, MPI_Datatype datatype)
 {
   return status->count / datatype->size();
 int Status::get_count(MPI_Status * status, MPI_Datatype datatype)
 {
   return status->count / datatype->size();