A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add gatherv test
[simgrid.git]
/
src
/
smpi
/
mpi
/
smpi_status.cpp
diff --git
a/src/smpi/mpi/smpi_status.cpp
b/src/smpi/mpi/smpi_status.cpp
index 6d637c521caa6ea013d1ebad32c8674a7df73603..675fb2e4fe2c935bd238c72eed70d48ba1fb7350 100644
(file)
--- a/
src/smpi/mpi/smpi_status.cpp
+++ b/
src/smpi/mpi/smpi_status.cpp
@@
-1,15
+1,13
@@
-/* Copyright (c) 2007-20
17
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-20
23
. 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. */
-#include "private.h"
-#include "src/simix/smx_private.hpp"
-#include "smpi_datatype.hpp"
#include "smpi_status.hpp"
#include "smpi_status.hpp"
+#include "private.hpp"
+#include "smpi_datatype.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
void Status::empty(MPI_Status * status)
{
void Status::empty(MPI_Status * status)
{
@@
-18,13
+16,28
@@
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::
get_count(MPI_Status * status, MPI_Datatype datatype
)
+int Status::
cancelled(const MPI_Status * status
)
{
{
- return status->c
ount / datatype->size()
;
+ return status->c
ancelled!=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, const Datatype* datatype)
+{
+ return status->count / datatype->size();
+}
+
+} // namespace simgrid::smpi