X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/15935515f1a4c577e1fb0aeec4bb0f3cc4f3dcab..87e5cfdacaaaafd46c8b8d62fbc8089409468fbc:/src/smpi/bindings/smpi_pmpi_type.cpp diff --git a/src/smpi/bindings/smpi_pmpi_type.cpp b/src/smpi/bindings/smpi_pmpi_type.cpp index 7687c4031c..861394190c 100644 --- a/src/smpi/bindings/smpi_pmpi_type.cpp +++ b/src/smpi/bindings/smpi_pmpi_type.cpp @@ -263,14 +263,7 @@ int PMPI_Type_create_resized(MPI_Datatype oldtype,MPI_Aint lb, MPI_Aint extent, if (oldtype == MPI_DATATYPE_NULL) { return MPI_ERR_TYPE; } - int blocks[3] = {1, 1, 1}; - MPI_Aint disps[3] = {lb, 0, lb + extent}; - MPI_Datatype types[3] = {MPI_LB, oldtype, MPI_UB}; - - *newtype = new simgrid::smpi::Type_Struct(oldtype->size(), lb, lb + extent, DT_FLAG_DERIVED, 3, blocks, disps, types); - - (*newtype)->addflag(~DT_FLAG_COMMITED); - return MPI_SUCCESS; + return simgrid::smpi::Datatype::create_resized(oldtype, lb, extent, newtype); }