+ static const void* smpi_get_in_place_buf(const void* inplacebuf, const void* otherbuf,std::unique_ptr<unsigned char[]>& tmp_sendbuf, int count, MPI_Datatype datatype){
+ if (inplacebuf == MPI_IN_PLACE) {
+ tmp_sendbuf.reset(new unsigned char[count * datatype->get_extent()]);
+ simgrid::smpi::Datatype::copy(otherbuf, count, datatype, tmp_sendbuf.get(), count, datatype);
+ return tmp_sendbuf.get();
+ }else{
+ return inplacebuf;
+ }
+}