[llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/Prolangs-C++/life/Makefile life.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Oct 4 19:44:18 PDT 2004
Changes in directory llvm-test/MultiSource/Benchmarks/Prolangs-C++/life:
Makefile added (r1.1)
life.cpp updated: 1.1 -> 1.2
---
Log message:
MAke this benchmakr build, work and take a reasonable amount of time
---
Diffs of the changes: (+11 -6)
Index: llvm-test/MultiSource/Benchmarks/Prolangs-C++/life/Makefile
diff -c /dev/null llvm-test/MultiSource/Benchmarks/Prolangs-C++/life/Makefile:1.1
*** /dev/null Mon Oct 4 21:44:15 2004
--- llvm-test/MultiSource/Benchmarks/Prolangs-C++/life/Makefile Mon Oct 4 21:44:05 2004
***************
*** 0 ****
--- 1,6 ----
+ LEVEL = ../../../..
+
+ PROG = life
+ LDFLAGS = -lstdc++
+ include $(LEVEL)/MultiSource/Makefile.multisrc
+
Index: llvm-test/MultiSource/Benchmarks/Prolangs-C++/life/life.cpp
diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C++/life/life.cpp:1.1 llvm-test/MultiSource/Benchmarks/Prolangs-C++/life/life.cpp:1.2
--- llvm-test/MultiSource/Benchmarks/Prolangs-C++/life/life.cpp:1.1 Mon Oct 4 15:01:14 2004
+++ llvm-test/MultiSource/Benchmarks/Prolangs-C++/life/life.cpp Mon Oct 4 21:44:05 2004
@@ -4,7 +4,7 @@
const int N=40, STATES=4; // size of square board
const int DRAB=3;
const int DFOX=8;
-const int CYCLES=10;
+const int CYCLES=10000;
enum state { EMPTY, GRASS, RABBIT, FOX };
class living; // forward decl
@@ -141,8 +141,8 @@
{
int i,j;
- for (i = 1; i < N; ++i)
- for (j = 1; j < N; ++j)
+ for (i = 1; i < N-1; ++i)
+ for (j = 1; j < N-1; ++j)
delete (w[i][j]);
}
@@ -150,8 +150,8 @@
{
int i,j;
- for (i = 1; i < N; ++i)
- for (j = 1; j < N; ++j) {
+ for (i = 0; i < N; ++i)
+ for (j = 0; j < N; ++j) {
if (i == j) w[i][j] = new fox(i,j);
else if (i < j) w[i][j] = new rabbit(i,j);
else w[i][j] = new grass(i,j);
@@ -164,7 +164,6 @@
int i;
init(odd);
- init(even);
eden(even);
More information about the llvm-commits
mailing list