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

Moved entry struct to runner.h for inclusion in runner_doiact_vec.h and added...

Moved entry struct to runner.h for inclusion in runner_doiact_vec.h and added #ifdef to call vectorised version of dopair1.
parent aa6bc3bf
No related branches found
No related tags found
1 merge request!320Dopair1 vectorisation merge
...@@ -61,18 +61,6 @@ ...@@ -61,18 +61,6 @@
#include "timers.h" #include "timers.h"
#include "timestep.h" #include "timestep.h"
/**
* @brief Entry in a list of sorted indices.
*/
struct entry {
/*! Distance on the axis */
float d;
/*! Particle index */
int i;
};
/* Orientation of the cell pairs */ /* Orientation of the cell pairs */
const double runner_shift[13][3] = { const double runner_shift[13][3] = {
{5.773502691896258e-01, 5.773502691896258e-01, 5.773502691896258e-01}, {5.773502691896258e-01, 5.773502691896258e-01, 5.773502691896258e-01},
...@@ -1178,8 +1166,13 @@ void *runner_main(void *data) { ...@@ -1178,8 +1166,13 @@ void *runner_main(void *data) {
break; break;
case task_type_pair: case task_type_pair:
if (t->subtype == task_subtype_density) if (t->subtype == task_subtype_density) {
#ifdef WITH_VECTORIZATION
runner_dopair1_density_vec(r, ci, cj);
#else
runner_dopair1_density(r, ci, cj); runner_dopair1_density(r, ci, cj);
#endif
}
#ifdef EXTRA_HYDRO_LOOP #ifdef EXTRA_HYDRO_LOOP
else if (t->subtype == task_subtype_gradient) else if (t->subtype == task_subtype_gradient)
runner_dopair1_gradient(r, ci, cj); runner_dopair1_gradient(r, ci, cj);
......
...@@ -52,6 +52,18 @@ struct runner { ...@@ -52,6 +52,18 @@ struct runner {
struct cache par_cache; struct cache par_cache;
}; };
/**
* @brief Entry in a list of sorted indices.
*/
struct entry {
/*! Distance on the axis */
float d;
/*! Particle index */
int i;
};
/* Function prototypes. */ /* Function prototypes. */
void runner_do_ghost(struct runner *r, struct cell *c, int timer); void runner_do_ghost(struct runner *r, struct cell *c, int timer);
void runner_do_extra_ghost(struct runner *r, struct cell *c, int timer); void runner_do_extra_ghost(struct runner *r, struct cell *c, int timer);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment