From e3adf2a028309d30f40a4db521c3167ad2b3efba Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <matthieu.schaller@durham.ac.uk> Date: Thu, 17 Sep 2015 22:47:25 +0200 Subject: [PATCH] Removed prefetches as they are not working and not portable. Former-commit-id: 14066337788b95fe57e1bc44f62b7487aa5efa02 --- src/runner.c | 54 ---------------------------------------------------- 1 file changed, 54 deletions(-) diff --git a/src/runner.c b/src/runner.c index 1f59b945e2..e1956ebe9a 100644 --- a/src/runner.c +++ b/src/runner.c @@ -531,17 +531,9 @@ void runner_doghost(struct runner *r, struct cell *c) { redo = 0; /* Loop over the parts in this cell. */ - __builtin_prefetch(&parts[pid[0]], 0, 1); - __builtin_prefetch(&parts[pid[0]].rho_dh, 0, 1); - __builtin_prefetch(&parts[pid[1]], 0, 1); - __builtin_prefetch(&parts[pid[1]].rho_dh, 0, 1); - __builtin_prefetch(&parts[pid[2]], 0, 1); - __builtin_prefetch(&parts[pid[2]].rho_dh, 0, 1); for (i = 0; i < count; i++) { /* Get a direct pointer on the part. */ - __builtin_prefetch(&parts[pid[i + 3]], 0, 1); - __builtin_prefetch(&parts[pid[i + 3]].rho_dh, 0, 1); p = &parts[pid[i]]; /* Is this part within the timestep? */ @@ -723,21 +715,9 @@ void runner_dokick2(struct runner *r, struct cell *c) { hdt = dt / 2; /* Loop over the particles and kick them. */ - __builtin_prefetch(&parts[0], 0, 1); - __builtin_prefetch(&parts[0].rho_dh, 0, 1); - __builtin_prefetch(&xparts[0], 0, 1); - __builtin_prefetch(&parts[1], 0, 1); - __builtin_prefetch(&parts[1].rho_dh, 0, 1); - __builtin_prefetch(&xparts[1], 0, 1); - __builtin_prefetch(&parts[2], 0, 1); - __builtin_prefetch(&parts[2].rho_dh, 0, 1); - __builtin_prefetch(&xparts[2], 0, 1); for (k = 0; k < nr_parts; k++) { /* Get a handle on the part. */ - __builtin_prefetch(&parts[k + 3], 0, 1); - __builtin_prefetch(&parts[k + 3].rho_dh, 0, 1); - __builtin_prefetch(&xparts[k + 3], 0, 1); p = &parts[k]; xp = &xparts[k]; @@ -865,21 +845,9 @@ void runner_dokick1(struct runner *r, struct cell *c) { dx_max = 0.0f; /* Loop over parts. */ - __builtin_prefetch(&parts[0], 0, 1); - __builtin_prefetch(&parts[0].rho_dh, 0, 1); - __builtin_prefetch(&xparts[0], 0, 1); - __builtin_prefetch(&parts[1], 0, 1); - __builtin_prefetch(&parts[1].rho_dh, 0, 1); - __builtin_prefetch(&xparts[1], 0, 1); - __builtin_prefetch(&parts[2], 0, 1); - __builtin_prefetch(&parts[2].rho_dh, 0, 1); - __builtin_prefetch(&xparts[2], 0, 1); for (k = 0; k < c->count; k++) { /* Get a handle on the kth particle. */ - __builtin_prefetch(&parts[k + 3], 0, 1); - __builtin_prefetch(&parts[k + 3].rho_dh, 0, 1); - __builtin_prefetch(&xparts[k + 3], 0, 1); p = &parts[k]; xp = &xparts[k]; @@ -1025,21 +993,9 @@ void runner_dokick(struct runner *r, struct cell *c, int timer) { dx_max = 0.0f; /* Loop over the particles and kick them. */ - __builtin_prefetch(&parts[0], 0, 1); - __builtin_prefetch(&parts[0].rho_dh, 0, 1); - __builtin_prefetch(&xparts[0], 0, 1); - __builtin_prefetch(&parts[1], 0, 1); - __builtin_prefetch(&parts[1].rho_dh, 0, 1); - __builtin_prefetch(&xparts[1], 0, 1); - __builtin_prefetch(&parts[2], 0, 1); - __builtin_prefetch(&parts[2].rho_dh, 0, 1); - __builtin_prefetch(&xparts[2], 0, 1); for (k = 0; k < nr_parts; k++) { /* Get a handle on the part. */ - __builtin_prefetch(&parts[k + 3], 0, 1); - __builtin_prefetch(&parts[k + 3].rho_dh, 0, 1); - __builtin_prefetch(&xparts[k + 3], 0, 1); p = &parts[k]; xp = &xparts[k]; @@ -1265,16 +1221,6 @@ void *runner_main(void *data) { /* else super = NULL; */ - /* Prefetch? */ - if (runner_prefetch && t->type != task_type_kick1 && - t->type != task_type_kick2 && t->type != task_type_ghost) { - for (int k = 0; k < ci->count; k++) - __builtin_prefetch(&ci->parts[k], 1, 3); - if (cj != NULL) - for (int k = 0; k < cj->count; k++) - __builtin_prefetch(&cj->parts[k], 1, 3); - } - /* Different types of tasks... */ switch (t->type) { case task_type_self: -- GitLab