X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/15e20854c41119eb6c28a5c60eee7df325ad20de..385f6d5ce3f2aff9707045601b32a66b017d7bed:/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 7d3e0db66b..868a2a9622 100644 --- a/src/smpi/bindings/smpi_pmpi_type.cpp +++ b/src/smpi/bindings/smpi_pmpi_type.cpp @@ -196,7 +196,8 @@ int PMPI_Type_create_indexed_block(int count, int blocklength, const int* indice } } -int PMPI_Type_hindexed(int count, int* blocklens, MPI_Aint* indices, MPI_Datatype old_type, MPI_Datatype* new_type) +int PMPI_Type_hindexed(int count, const int* blocklens, const MPI_Aint* indices, MPI_Datatype old_type, + MPI_Datatype* new_type) { if (old_type == MPI_DATATYPE_NULL) { return MPI_ERR_TYPE; @@ -209,7 +210,7 @@ int PMPI_Type_hindexed(int count, int* blocklens, MPI_Aint* indices, MPI_Datatyp int PMPI_Type_create_hindexed(int count, const int* blocklens, const MPI_Aint* indices, MPI_Datatype old_type, MPI_Datatype* new_type) { - return PMPI_Type_hindexed(count, const_cast(blocklens),const_cast(indices),old_type,new_type); + return PMPI_Type_hindexed(count, blocklens, indices, old_type, new_type); } int PMPI_Type_create_hindexed_block(int count, int blocklength, const MPI_Aint* indices, MPI_Datatype old_type, @@ -228,7 +229,9 @@ int PMPI_Type_create_hindexed_block(int count, int blocklength, const MPI_Aint* } } -int PMPI_Type_struct(int count, int* blocklens, MPI_Aint* indices, MPI_Datatype* old_types, MPI_Datatype* new_type) { +int PMPI_Type_struct(int count, const int* blocklens, const MPI_Aint* indices, const MPI_Datatype* old_types, + MPI_Datatype* new_type) +{ if (count<0){ return MPI_ERR_COUNT; } else { @@ -241,7 +244,7 @@ int PMPI_Type_struct(int count, int* blocklens, MPI_Aint* indices, MPI_Datatype* int PMPI_Type_create_struct(int count, const int* blocklens, const MPI_Aint* indices, const MPI_Datatype* old_types, MPI_Datatype* new_type) { - return PMPI_Type_struct(count, const_cast(blocklens), const_cast(indices), const_cast(old_types), new_type); + return PMPI_Type_struct(count, blocklens, indices, old_types, new_type); }