summaryrefslogtreecommitdiff
path: root/src/run.cpp
diff options
context:
space:
mode:
authorTim Besard <tim.besard@gmail.com>2011-12-01 22:10:44 +0100
committerTim Besard <tim.besard@gmail.com>2011-12-01 22:10:44 +0100
commit51875ef36ab6dfeba2e801da16214a230580b1d9 (patch)
tree8c38eccb17aa871a64b970d3507c6c95cc3b4101 /src/run.cpp
parent858386857dbfae9aa58589f2c584bb50da4b4e5a (diff)
Added a TODO.
Diffstat (limited to 'src/run.cpp')
-rw-r--r--src/run.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/run.cpp b/src/run.cpp
index c78f89a..c3e2495 100644
--- a/src/run.cpp
+++ b/src/run.cpp
@@ -116,7 +116,13 @@ int Run::run() {
this->exp->prefetch_hint);
// calculate the number of iterations
- if (this->exp->iterations <= 0) {
+ /*
+ * As soon as the thread count rises, this calculation HUGELY
+ * differs between runs. What does cause this? Threads are already
+ * limited to certain CPUs, so it's not caused by excessive switching.
+ * Strange cache behaviour?
+ */
+ if (0 == this->exp->iterations) {
volatile static double istart = 0;
volatile static double istop = 0;
volatile static double elapsed = 0;
@@ -155,6 +161,7 @@ int Run::run() {
} else {
this->exp->iterations = std::max(1.0, 0.9999 + iters / elapsed);
}
+ //printf("Tested %d iterations: took %f seconds; scheduling %d iterations\n", iters, elapsed, this->exp->iterations);
}
this->bp->barrier();
}