}
}
-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;
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<int*>(blocklens),const_cast<MPI_Aint*>(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,
}
}
-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 {
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<int*>(blocklens), const_cast<MPI_Aint*>(indices), const_cast<MPI_Datatype*>(old_types), new_type);
+ return PMPI_Type_struct(count, blocklens, indices, old_types, new_type);
}
}
MPI_Datatype PMPI_Type_f2c(MPI_Fint datatype){
+ if(datatype==-1)
+ return MPI_DATATYPE_NULL;
return static_cast<MPI_Datatype>(simgrid::smpi::F2C::f2c(datatype));
}
MPI_Fint PMPI_Type_c2f(MPI_Datatype datatype){
+ if(datatype==MPI_DATATYPE_NULL)
+ return -1;
return datatype->c2f();
}