[llvm-commits] CVS: llvm/test/Programs/SingleSource/Benchmarks/Shootout-C++/moments.cpp

Chris Lattner lattner at cs.uiuc.edu
Tue Apr 6 15:19:02 PDT 2004


Changes in directory llvm/test/Programs/SingleSource/Benchmarks/Shootout-C++:

moments.cpp updated: 1.1 -> 1.2

---
Log message:

Since we don't have the data file to use with this benchmark, just input
it manually.  This prevents it from segfaulting on every execution!


---
Diffs of the changes:  (+1 -1)

Index: llvm/test/Programs/SingleSource/Benchmarks/Shootout-C++/moments.cpp
diff -u llvm/test/Programs/SingleSource/Benchmarks/Shootout-C++/moments.cpp:1.1 llvm/test/Programs/SingleSource/Benchmarks/Shootout-C++/moments.cpp:1.2
--- llvm/test/Programs/SingleSource/Benchmarks/Shootout-C++/moments.cpp:1.1	Mon Oct  6 20:11:33 2003
+++ llvm/test/Programs/SingleSource/Benchmarks/Shootout-C++/moments.cpp	Tue Apr  6 15:18:07 2004
@@ -69,7 +69,7 @@
     vector<double> v;
     double d;
 
-    while (scanf(" %lf", &d) == 1) v.push_back(d);
+    for (unsigned i = 0; i != 500; ++i) v.push_back(i);
     moments<double> m(v.begin(), v.end());
 
     printf("n:                  %d\n", v.end() - v.begin());





More information about the llvm-commits mailing list