Commit 4e026b8e authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Merge branch '394-only-call-vectorized-routines-when-doing-density-force' into timestep_limiter2

parent 77294849
......@@ -64,20 +64,30 @@
#include "timers.h"
#include "timestep.h"
#define DENSITY 0
#define GRADIENT 1
#define FORCE 2
#define LIMITER 3
/* Import the density loop functions. */
#define FUNCTION density
#define FUNCTION_NUM DENSITY
#include "runner_doiact.h"
/* Import the gradient loop functions (if required). */
#ifdef EXTRA_HYDRO_LOOP
#undef FUNCTION
#undef FUNCTION_NUM
#define FUNCTION gradient
#define FUNCTION_NUM GRADIENT
#include "runner_doiact.h"
#endif
/* Import the force loop functions. */
#undef FUNCTION
#undef FUNCTION_NUM
#define FUNCTION force
#define FUNCTION_NUM FORCE
#include "runner_doiact.h"
/* Import the gravity loop functions. */
......
......@@ -1086,7 +1086,7 @@ void DOPAIR1_BRANCH(struct runner *r, struct cell *ci, struct cell *cj) {
#if defined(SWIFT_USE_NAIVE_INTERACTIONS)
DOPAIR1_NAIVE(r, ci, cj);
#elif defined(WITH_VECTORIZATION) && defined(GADGET2_SPH)
#elif defined(WITH_VECTORIZATION) && defined(GADGET2_SPH) && (FUNCTION_NUM == DENSITY)
if (!sort_is_corner(sid))
runner_dopair1_density_vec(r, ci, cj, sid, shift);
else
......@@ -1571,7 +1571,7 @@ void DOPAIR2_BRANCH(struct runner *r, struct cell *ci, struct cell *cj) {
#ifdef SWIFT_USE_NAIVE_INTERACTIONS
DOPAIR2_NAIVE(r, ci, cj);
#elif defined(WITH_VECTORIZATION) && defined(GADGET2_SPH)
#elif defined(WITH_VECTORIZATION) && defined(GADGET2_SPH) && (FUNCTION_NUM == FORCE)
if (!sort_is_corner(sid))
runner_dopair2_force_vec(r, ci, cj, sid, shift);
else
......@@ -1733,7 +1733,7 @@ void DOSELF1_BRANCH(struct runner *r, struct cell *c) {
#if defined(SWIFT_USE_NAIVE_INTERACTIONS)
DOSELF1_NAIVE(r, c);
#elif defined(WITH_VECTORIZATION) && defined(GADGET2_SPH)
#elif defined(WITH_VECTORIZATION) && defined(GADGET2_SPH) && (FUNCTION_NUM == DENSITY)
runner_doself1_density_vec(r, c);
#else
DOSELF1(r, c);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment