X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4d140762b2b9c8746cdd3b0680a7167867ba0ad9..6038a0eddc2058959ed48f00fe9db9d4ee9d49e6:/src/smpi/mpi/smpi_datatype.cpp diff --git a/src/smpi/mpi/smpi_datatype.cpp b/src/smpi/mpi/smpi_datatype.cpp index 565ec99448..4237217359 100644 --- a/src/smpi/mpi/smpi_datatype.cpp +++ b/src/smpi/mpi/smpi_datatype.cpp @@ -5,7 +5,6 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "simgrid/modelchecker.h" -#include "private.h" #include "private.hpp" #include "smpi_datatype_derived.hpp" #include "smpi_op.hpp" @@ -190,11 +189,15 @@ void Datatype::commit() flags_ |= DT_FLAG_COMMITED; } - bool Datatype::is_valid(){ return (flags_ & DT_FLAG_COMMITED); } +bool Datatype::is_basic() +{ + return (flags_ & DT_FLAG_BASIC); +} + size_t Datatype::size(){ return size_; } @@ -280,9 +283,9 @@ int Datatype::copy(void *sendbuf, int sendcount, MPI_Datatype sendtype, if (not smpi_process()->replaying()) memcpy(recvbuf, sendbuf, count); } else if (not(sendtype->flags() & DT_FLAG_DERIVED)) { - recvtype->unserialize( sendbuf, recvbuf, recvcount/recvtype->size(), MPI_REPLACE); + recvtype->unserialize(sendbuf, recvbuf, count / recvtype->size(), MPI_REPLACE); } else if (not(recvtype->flags() & DT_FLAG_DERIVED)) { - sendtype->serialize(sendbuf, recvbuf, sendcount/sendtype->size()); + sendtype->serialize(sendbuf, recvbuf, count / sendtype->size()); }else{ void * buf_tmp = xbt_malloc(count);