Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove some bad casts
authordegomme <augustin.degomme@unibas.ch>
Wed, 27 Apr 2016 08:32:27 +0000 (10:32 +0200)
committerdegomme <augustin.degomme@unibas.ch>
Wed, 27 Apr 2016 08:56:41 +0000 (10:56 +0200)
src/smpi/smpi_mpi_dt.cpp

index 3463eb8..3002836 100644 (file)
@@ -488,11 +488,11 @@ void unserialize_contiguous(const void *contiguous_vector, void *noncontiguous_v
 }
 
 void free_contiguous(MPI_Datatype* d){
-  smpi_datatype_unuse(((s_smpi_mpi_indexed_t *)(*d)->substruct)->old_type);
+  smpi_datatype_unuse(((s_smpi_mpi_contiguous_t *)(*d)->substruct)->old_type);
 }
 
 void use_contiguous(MPI_Datatype* d){
-  smpi_datatype_use(((s_smpi_mpi_indexed_t *)(*d)->substruct)->old_type);
+  smpi_datatype_use(((s_smpi_mpi_contiguous_t *)(*d)->substruct)->old_type);
 }
 
 /* Create a Sub type contiguous to be able to serialize and unserialize it the structure s_smpi_mpi_contiguous_t is
@@ -650,11 +650,11 @@ s_smpi_mpi_hvector_t* smpi_datatype_hvector_create( MPI_Aint block_stride, int b
 
 //do nothing for vector types
 void free_hvector(MPI_Datatype* d){
-  smpi_datatype_unuse(((s_smpi_mpi_indexed_t *)(*d)->substruct)->old_type);
+  smpi_datatype_unuse(((s_smpi_mpi_hvector_t *)(*d)->substruct)->old_type);
 }
 
 void use_hvector(MPI_Datatype* d){
-  smpi_datatype_use(((s_smpi_mpi_indexed_t *)(*d)->substruct)->old_type);
+  smpi_datatype_use(((s_smpi_mpi_hvector_t *)(*d)->substruct)->old_type);
 }
 
 int smpi_datatype_hvector(int count, int blocklen, MPI_Aint stride, MPI_Datatype old_type, MPI_Datatype* new_type)
@@ -915,7 +915,7 @@ void free_hindexed(MPI_Datatype* type){
 }
 
 void use_hindexed(MPI_Datatype* type){
-  smpi_datatype_use(((s_smpi_mpi_indexed_t *)(*type)->substruct)->old_type);
+  smpi_datatype_use(((s_smpi_mpi_hindexed_t *)(*type)->substruct)->old_type);
 }
 
 /* Create a Sub type hindexed to be able to serialize and unserialize it the structure s_smpi_mpi_hindexed_t is derived