Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Initialize remainder.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 9 Apr 2013 20:08:37 +0000 (22:08 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 9 Apr 2013 21:44:40 +0000 (23:44 +0200)
Again, this is only to shut gcc up.

src/smpi/colls/allreduce-NTS.c
src/smpi/colls/allreduce-lr.c

index 32ca68b..a8cf48d 100644 (file)
@@ -34,12 +34,12 @@ smpi_coll_tuned_allreduce_NTS(void *sbuf, void *rbuf, int rcount,
 
   /* when communication size is not divisible by number of process: 
      call the native implementation for the remain chunk at the end of the operation */
-  else if (rcount % size != 0) {
+  if (rcount % size != 0) {
     remainder = rcount % size;
     remainder_flag = 1;
     remainder_offset = (rcount / size) * size * extent;
   } else {
-    remainder_flag = remainder_offset = 0;
+    remainder = remainder_flag = remainder_offset = 0;
   }
 
   /* size of each point-to-point communication is equal to the size of the whole message
index d526629..81cb392 100644 (file)
@@ -39,12 +39,12 @@ smpi_coll_tuned_allreduce_lr(void *sbuf, void *rbuf, int rcount,
 
   /* when communication size is not divisible by number of process: 
      call the native implementation for the remain chunk at the end of the operation */
-  else if (rcount % size != 0) {
+  if (rcount % size != 0) {
     remainder = rcount % size;
     remainder_flag = 1;
     remainder_offset = (rcount / size) * size * extent;
   } else {
-    remainder_flag = remainder_offset = 0;
+    remainder = remainder_flag = remainder_offset = 0;
   }
 
   /* size of each point-to-point communication is equal to the size of the whole message