X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7e3052a90110227b0628cfde015552c1dd154563..17d305e0f3a8c6f813bda1aacad5891d67fd1e3c:/src/smpi/bindings/smpi_pmpi.cpp diff --git a/src/smpi/bindings/smpi_pmpi.cpp b/src/smpi/bindings/smpi_pmpi.cpp index 2b8f28e299..7b406659c5 100644 --- a/src/smpi/bindings/smpi_pmpi.cpp +++ b/src/smpi/bindings/smpi_pmpi.cpp @@ -244,3 +244,18 @@ MPI_Fint PMPI_Errhandler_c2f(MPI_Errhandler errhan){ return -1; return errhan->c2f(); } + +int PMPI_Buffer_attach(void *buf, int size){ + if(buf==nullptr) + return MPI_ERR_BUFFER; + if(size<0) + return MPI_ERR_ARG; + smpi_process()->set_bsend_buffer(buf, size); + return MPI_SUCCESS; +} + +int PMPI_Buffer_detach(void* buffer, int* size){ + smpi_process()->bsend_buffer((void**)buffer, size); + smpi_process()->set_bsend_buffer(nullptr, 0); + return MPI_SUCCESS; +}