aboutsummaryrefslogtreecommitdiffstats
path: root/research/experiments/036-faster-loops/bfs-run.c
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-10-04 17:39:18 +0100
committereunhhu <[email protected]>2026-10-04 17:39:18 +0100
commitaa1c8597ef5ca81ae466ca7d8fe35d903cf78e97 (patch)
tree8b4c5c1f54e0bda5e6df99629f1abeb251d33fea /research/experiments/036-faster-loops/bfs-run.c
parent602780a58c3286d6843e8ff89bd7a3093891a7ad (diff)
downloadpure-aa1c8597ef5ca81ae466ca7d8fe35d903cf78e97.tar.gz
pure-aa1c8597ef5ca81ae466ca7d8fe35d903cf78e97.zip
Wait for a counter before searching in bfs-run, and the runs of research 121
Diffstat (limited to 'research/experiments/036-faster-loops/bfs-run.c')
-rw-r--r--research/experiments/036-faster-loops/bfs-run.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/research/experiments/036-faster-loops/bfs-run.c b/research/experiments/036-faster-loops/bfs-run.c
index a3d9d79..4d5ca82 100644
--- a/research/experiments/036-faster-loops/bfs-run.c
+++ b/research/experiments/036-faster-loops/bfs-run.c
@@ -61,6 +61,11 @@ int main(int argc, char **argv) {
return 1;
}
}
+ if (getenv("BFS_WAIT")) { /* loaded: a counter attaches, then a line on stdin starts the searches */
+ fprintf(stderr, "loaded\n");
+ fflush(stderr);
+ (void)getchar();
+ }
double *took = malloc(rounds * sizeof(*took));
for (size_t r = 0; r < rounds; ++r) {
uint32_t from = (uint32_t)(next() % nodes), to = (uint32_t)(next() % nodes);