More changes
authorIsaac Dooley <idooley2@illinois.edu>
Wed, 13 Jun 2007 21:31:12 +0000 (21:31 +0000)
committerIsaac Dooley <idooley2@illinois.edu>
Wed, 13 Jun 2007 21:31:12 +0000 (21:31 +0000)
examples/bigsim/tools/rewritelog/EventInterpolator.h
examples/bigsim/tools/rewritelog/interpolatelog.C

index 7f40f503cbd3f0723715e535ba8773f687649eeb..3bfb3029899e0ceabd68b0974e0120aa98589165 100644 (file)
@@ -101,12 +101,12 @@ public:
        /** Compute average timing for the provided event signature(name&parameters) */
     double lookupExactMean(const pair<funcIdentifier,vector<double> > &p);
        /** Compute average timing for the the provided event signature(name&parameters)*/
-       double lookupExactMean(const funcIdentifier& func, const vector<double> &p);
+    double lookupExactMean(const funcIdentifier& func, const vector<double> &p);
 
-       void analyzeExactVariances();
+    void analyzeExactVariances();
 
-       /** Get the new timing exactly if possible otherwise predict it */
-       double getNewTiming(const unsigned pe, const unsigned eventid);
+    /** Get the new timing exactly if possible otherwise predict it */
+    double getNewTiming(const unsigned pe, const unsigned eventid);
 
     double get_chisqr(funcIdentifier funcname){if(work[funcname]!=NULL) return chisqr[funcname]; else return -1.0;}
 
index 90ef3bc42fd8b7de262d9546e3af19ff6c1ae12d..ca2dc876a0a474425f8e9edde271ac248a8f74c6 100644 (file)
@@ -36,7 +36,9 @@
 #define sec_per_cycle 0.00000000025
 
 // Scale the duration of all unknown events by this factor
-#define time_factor (1.0/2.0)
+// 0.5 means the new event durations will be twice as fast as the durations in the bgTrace files
+#define time_dilation_factor 0.5
+
 
 // Set these for more output:
 //#define DEBUG
@@ -218,7 +220,7 @@ int main()
                                  }
                                  // If event is not in parameter file then we just scale its duration by a simple constant
                                  else {
-                                       middle_piece = middle_piece*time_factor ;
+                                       middle_piece = middle_piece*time_dilation_factor ;
                                  }
 
 
@@ -231,9 +233,9 @@ int main()
                                        new_bracketed_times_sum += middle_piece;
                                  }
 
-                                 // Scale the begin and end pieces by time_factor;
-                                 begin_piece = begin_piece*time_factor;
-                                 end_piece = end_piece*time_factor;
+                                 // Scale the begin and end pieces by time_dilation_factor;
+                                 begin_piece = begin_piece*time_dilation_factor;
+                                 end_piece = end_piece*time_dilation_factor;
 
                                  assert(begin_piece >= 0.0);
                                  assert(middle_piece >= 0.0);