Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill a useless function
[simgrid.git] / src / smpi / smpi_mpi_dt.cpp
index 9b75129..5f66b31 100644 (file)
@@ -13,6 +13,7 @@
 #include "smpi_mpi_dt_private.h"
 #include "mc/mc.h"
 #include "xbt/replay.h"
+#include <xbt/ex.hpp>
 #include "simgrid/modelchecker.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_mpi_dt, smpi, "Logging specific to SMPI (datatype)");
@@ -24,12 +25,12 @@ int type_keyval_id=0;//avoid collisions
   static s_smpi_mpi_datatype_t mpi_##name = {         \
     (char*) # name,                                   \
     sizeof(type),   /* size */                        \
-    0,              /*was 1 sizeof_substruct*/             \
+    0,              /*was 1 sizeof_substruct*/        \
     0,              /* lb */                          \
     sizeof(type),   /* ub = lb + size */              \
     DT_FLAG_BASIC,  /* flags */                       \
-    nullptr,           /* attributes */                  \
-    nullptr,           /* pointer on extended struct*/   \
+    nullptr,        /* attributes */                  \
+    nullptr,        /* pointer on extended struct*/   \
     0               /* in_use counter */              \
   };                                                  \
 const MPI_Datatype name = &mpi_##name;
@@ -38,12 +39,12 @@ const MPI_Datatype name = &mpi_##name;
   static s_smpi_mpi_datatype_t mpi_##name = {         \
     (char*) # name,                                   \
     0,              /* size */                        \
-    0,              /* was 1 sizeof_substruct*/            \
+    0,              /* was 1 sizeof_substruct*/       \
     0,              /* lb */                          \
     0,              /* ub = lb + size */              \
     DT_FLAG_BASIC,  /* flags */                       \
-    nullptr,           /* attributes */                  \
-    nullptr,           /* pointer on extended struct*/   \
+    nullptr,        /* attributes */                  \
+    nullptr,        /* pointer on extended struct*/   \
     0               /* in_use counter */              \
   };                                                  \
 const MPI_Datatype name = &mpi_##name;
@@ -287,7 +288,7 @@ int smpi_datatype_copy(void *sendbuf, int sendcount, MPI_Datatype sendtype,
  *  Copies noncontiguous data into contiguous memory.
  *  @param contiguous_vector - output vector
  *  @param noncontiguous_vector - input vector
- *  @param type - pointer contening :
+ *  @param type - pointer containing :
  *      - stride - stride of between noncontiguous data
  *      - block_length - the width or height of blocked matrix
  *      - count - the number of rows of matrix
@@ -495,7 +496,7 @@ void use_contiguous(MPI_Datatype* d){
 }
 
 /* Create a Sub type contiguous to be able to serialize and unserialize it the structure s_smpi_mpi_contiguous_t is
- * erived from s_smpi_subtype which required the functions unserialize and serialize */
+ * derived from s_smpi_subtype which required the functions unserialize and serialize */
 s_smpi_mpi_contiguous_t* smpi_datatype_contiguous_create( MPI_Aint lb, int block_count, MPI_Datatype old_type,
                                                   int size_oldtype){
   if(block_count==0)
@@ -549,7 +550,7 @@ int smpi_datatype_vector(int count, int blocklen, int stride, MPI_Datatype old_t
                          DT_FLAG_VECTOR);
     retval=MPI_SUCCESS;
   }else{
-    /* in this situation the data are contignous thus it's not required to serialize and unserialize it*/
+    /* in this situation the data are contiguous thus it's not required to serialize and unserialize it*/
     smpi_datatype_create(new_type, count * blocklen * smpi_datatype_size(old_type), 0, ((count -1) * stride + blocklen)*
                          smpi_datatype_size(old_type), 0, nullptr, DT_FLAG_VECTOR|DT_FLAG_CONTIGUOUS);
     retval=MPI_SUCCESS;
@@ -929,8 +930,7 @@ s_smpi_mpi_hindexed_t* smpi_datatype_hindexed_create( int* block_lengths, MPI_Ai
   new_t->base.subtype_use = &use_hindexed;
   new_t->block_lengths= xbt_new(int, block_count);
   new_t->block_indices= xbt_new(MPI_Aint, block_count);
-  int i;
-  for(i=0;i<block_count;i++){
+  for(int i=0;i<block_count;i++){
     new_t->block_lengths[i]=block_lengths[i];
     new_t->block_indices[i]=block_indices[i];
   }