- 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);