Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of framagit.org:simgrid/simgrid
[simgrid.git] / src / smpi / colls / coll_tuned_topo.cpp
index 7138c7e..c952770 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2017. The SimGrid Team.
+/* Copyright (c) 2013-2019. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -52,10 +52,10 @@ static int calculate_num_nodes_up_to_level( int fanout, int level )
 {
     /* just use geometric progression formula for sum:
        a^0+a^1+...a^(n-1) = (a^n-1)/(a-1) */
-  if(fanout > 1)  
-   return ((pown(fanout,level) - 1)/(fanout - 1));
-  else
-   return 0; // is this right ?
+    if (fanout > 1)
+      return ((pown(fanout, level) - 1) / (fanout - 1));
+    else
+      return 0; // is this right ?
 }
 
 /*