Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MPI_Address gets const too.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sat, 27 Apr 2019 12:53:01 +0000 (14:53 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sat, 27 Apr 2019 12:53:01 +0000 (14:53 +0200)
include/smpi/smpi.h
src/smpi/bindings/smpi_mpi.cpp
src/smpi/bindings/smpi_pmpi.cpp

index 06c2cab..e55d9c1 100644 (file)
@@ -417,7 +417,7 @@ MPI_CALL(XBT_PUBLIC int, MPI_Free_mem, (void* base));
 MPI_CALL(XBT_PUBLIC double, MPI_Wtime, (void));
 MPI_CALL(XBT_PUBLIC double, MPI_Wtick, (void));
 
-MPI_CALL(XBT_PUBLIC int, MPI_Address, (void* location, MPI_Aint* address));
+MPI_CALL(XBT_PUBLIC int, MPI_Address, (const void* location, MPI_Aint* address));
 MPI_CALL(XBT_PUBLIC int, MPI_Get_address, (const void* location, MPI_Aint* address));
 MPI_CALL(XBT_PUBLIC int, MPI_Error_class, (int errorcode, int* errorclass));
 
index d5c632c..d0081a6 100644 (file)
@@ -73,7 +73,7 @@ WRAPPED_PMPI_CALL_NORETURN(double, MPI_Wtick,(void),())
 WRAPPED_PMPI_CALL_NORETURN(double, MPI_Wtime,(void),())
 WRAPPED_PMPI_CALL(int,MPI_Abort,(MPI_Comm comm, int errorcode),(comm, errorcode))
 WRAPPED_PMPI_CALL(int,MPI_Accumulate,(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank,MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win),( origin_addr,origin_count, origin_datatype,target_rank,target_disp, target_count,target_datatype,op, win))
-WRAPPED_PMPI_CALL(int,MPI_Address,(void *location, MPI_Aint * address),(location, address))
+WRAPPED_PMPI_CALL(int, MPI_Address, (const void* location, MPI_Aint* address), (location, address))
 WRAPPED_PMPI_CALL(int,MPI_Allgather,(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm),(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm))
 WRAPPED_PMPI_CALL(int,MPI_Allgatherv,(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs,MPI_Datatype recvtype, MPI_Comm comm),(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm))
 WRAPPED_PMPI_CALL(int,MPI_Alloc_mem,(MPI_Aint size, MPI_Info info, void *baseptr),(size, info, baseptr))
index cbddb4d..b4a47dd 100644 (file)
@@ -142,7 +142,7 @@ double PMPI_Wtick()
   return sg_maxmin_precision;
 }
 
-int PMPI_Address(void *location, MPI_Aint * address)
+int PMPI_Address(const void* location, MPI_Aint* address)
 {
   if (address==nullptr) {
     return MPI_ERR_ARG;
@@ -154,7 +154,7 @@ int PMPI_Address(void *location, MPI_Aint * address)
 
 int PMPI_Get_address(const void *location, MPI_Aint * address)
 {
-  return PMPI_Address(const_cast<void*>(location), address);
+  return PMPI_Address(location, address);
 }
 
 int PMPI_Get_processor_name(char *name, int *resultlen)