From fcebd6977a128be05437ea64b6d37e2277581497 Mon Sep 17 00:00:00 2001 From: James Willis <james.s.willis@durham.ac.uk> Date: Thu, 1 Dec 2016 14:19:37 +0000 Subject: [PATCH] Added vectorisation guards. --- src/hydro/Gadget2/hydro_iact.h | 2 ++ src/runner_doiact_vec.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/hydro/Gadget2/hydro_iact.h b/src/hydro/Gadget2/hydro_iact.h index b112184e89..3da92d0c94 100644 --- a/src/hydro/Gadget2/hydro_iact.h +++ b/src/hydro/Gadget2/hydro_iact.h @@ -382,6 +382,7 @@ runner_iact_nonsym_vec_density(float *R2, float *Dx, float *Hi, float *Hj, #endif } +#ifdef WITH_VECTORIZATION /** * @brief Density interaction computed using 2 interleaved vectors (non-symmetric vectorized version). */ @@ -505,6 +506,7 @@ runner_iact_nonsym_2_vec_density(float *R2, float *Dx, float *Dy, float *Dz, vec curlvzSum->v += vec_and(vec_mul(mj2.v, vec_mul(curlvrz2.v, wi_dx2.v)),mask2.v); #endif } +#endif /** * @brief Force loop diff --git a/src/runner_doiact_vec.c b/src/runner_doiact_vec.c index 6c2bd2e63a..8911c43209 100644 --- a/src/runner_doiact_vec.c +++ b/src/runner_doiact_vec.c @@ -27,6 +27,7 @@ #define NUM_VEC_PROC 2 #define C2_CACHE_SIZE (NUM_VEC_PROC * VEC_SIZE * 6) + (NUM_VEC_PROC * VEC_SIZE) +#ifdef WITH_VECTORIZATION __attribute__((always_inline)) INLINE static void calcRemInteractions(const struct cache *const cell_cache, float *r2q, float *dxq, float *dyq, float *dzq, float *mq, float *vxq, float *vyq, float *vzq, const int icount, vector *rhoSum, vector *rho_dhSum, vector *wcountSum, vector *wcount_dhSum, vector *div_vSum, vector *curlvxSum,vector *curlvySum, vector *curlvzSum, vector v_hi_inv, vector v_vix, vector v_viy, vector v_viz, int *icount_align) { #ifdef HAVE_AVX512_F @@ -153,6 +154,7 @@ __attribute__((always_inline)) INLINE static void storeInteractions(const int ma #endif } +#endif /** * @brief Compute the cell self-interaction (non-symmetric) vec. -- GitLab