lround does not exist in VC++.
authorGengbin Zheng <gzheng@illinois.edu>
Fri, 28 May 2010 06:49:50 +0000 (01:49 -0500)
committerGengbin Zheng <gzheng@illinois.edu>
Fri, 28 May 2010 06:49:50 +0000 (01:49 -0500)
src/ck-cp/controlPoints.C

index 536484169037b1e7ccbe547c2a40899ef95de9c2..e4373aeefa0b4508491d44b875cf03ab801b1723 100644 (file)
@@ -1691,6 +1691,9 @@ void controlPointManager::generatePlan() {
       const double ldbStepsTime = times[0] + times[1];
       const double lbcost = ldbStepsTime - 2.0*avg; // An approximation of the 
       
+#if defined(_WIN32) && ! defined(__CYGWIN__)
+#define lround(x)        ((long)(x+0.5))
+#endif
       int newval = lround(sqrt(2.0*lbcost/m));