Skip to content
Snippets Groups Projects
Commit 174e8e0c authored by James Willis's avatar James Willis
Browse files

Call doself_subset_density when macro defined.

parent 72911669
No related branches found
No related tags found
1 merge request!445Doself subset vec
...@@ -34,15 +34,23 @@ ...@@ -34,15 +34,23 @@
#define DOSELF1 runner_doself1_density_vec #define DOSELF1 runner_doself1_density_vec
#define DOSELF1_SUBSET runner_doself_subset_density_vec #define DOSELF1_SUBSET runner_doself_subset_density_vec
#define DOPAIR1 runner_dopair1_branch_density #define DOPAIR1 runner_dopair1_branch_density
#define DOSELF1_NAME "runner_doself1_density_vec" #ifdef DOSELF_SUBSET
#define DOSELF1_NAME "runner_doself_subset_density_vec"
#else
#define DOSELF1_NAME "runner_doself_density_vec"
#endif
#define DOPAIR1_NAME "runner_dopair1_density_vec" #define DOPAIR1_NAME "runner_dopair1_density_vec"
#endif #endif
#ifndef DOSELF1 #ifndef DOSELF1
#define DOSELF1 runner_doself1_density #define DOSELF1 runner_doself1_density
#define DOSELF1_SUBSET runner_doself_subset_density #define DOSELF1_SUBSET runner_doself_subset_density
#ifdef DOSELF_SUBSET
#define DOSELF1_NAME "runner_doself1_subset_density"
#else
#define DOSELF1_NAME "runner_doself1_density" #define DOSELF1_NAME "runner_doself1_density"
#endif #endif
#endif
#ifndef DOPAIR1 #ifndef DOPAIR1
#define DOPAIR1 runner_dopair1_branch_density #define DOPAIR1 runner_dopair1_branch_density
...@@ -470,11 +478,11 @@ int main(int argc, char *argv[]) { ...@@ -470,11 +478,11 @@ int main(int argc, char *argv[]) {
DOPAIR1(&runner, main_cell, cells[j]); DOPAIR1(&runner, main_cell, cells[j]);
const ticks sub_toc = getticks(); timings[j] += getticks() - sub_tic;
timings[j] += sub_toc - sub_tic;
} }
} }
#ifdef DOSELF_SUBSET
int *pid = NULL; int *pid = NULL;
int count = 0; int count = 0;
if ((pid = malloc(sizeof(int) * main_cell->count)) == NULL) if ((pid = malloc(sizeof(int) * main_cell->count)) == NULL)
...@@ -484,15 +492,18 @@ int main(int argc, char *argv[]) { ...@@ -484,15 +492,18 @@ int main(int argc, char *argv[]) {
pid[count] = k; pid[count] = k;
++count; ++count;
} }
#endif
/* And now the self-interaction */ /* And now the self-interaction */
const ticks self_tic = getticks(); const ticks self_tic = getticks();
#ifdef DOSELF_SUBSET
DOSELF1_SUBSET(&runner, main_cell, main_cell->parts, pid, count); DOSELF1_SUBSET(&runner, main_cell, main_cell->parts, pid, count);
#else
DOSELF1(&runner, main_cell);
#endif
const ticks self_toc = getticks(); timings[13] += getticks() - self_tic;
timings[13] += self_toc - self_tic;
#endif #endif
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment