diff --git a/src/cache.h b/src/cache.h index 70c63f72a45d730c826f039f535e7e8c5d467f64..11d64206d61423895eeab22a0dbca3f07eb87ada 100644 --- a/src/cache.h +++ b/src/cache.h @@ -235,7 +235,7 @@ __attribute__((always_inline)) INLINE void cache_read_particles( } /** - * @brief Populate cache by reading in the particles in unsorted order. + * @brief Populate cache for force interactions by reading in the particles in unsorted order. * * @param ci The #cell. * @param ci_cache The cache. diff --git a/src/hydro/Gadget2/hydro_iact.h b/src/hydro/Gadget2/hydro_iact.h index 7000898dbca82558ad633000c9f8cb788e8b5ddb..e36c2e73404b7b0d0a8af23e63e8f70dd7078117 100644 --- a/src/hydro/Gadget2/hydro_iact.h +++ b/src/hydro/Gadget2/hydro_iact.h @@ -466,7 +466,6 @@ runner_iact_nonsym_2_vec_density(float *R2, float *Dx, float *Dy, float *Dz, vector *curlvySum, vector *curlvzSum, mask_t mask, mask_t mask2, short mask_cond) { - vector r, ri, r2, ui, wi, wi_dx; vector mj; vector dx, dy, dz, dvx, dvy, dvz; @@ -1171,6 +1170,10 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_vec_force( #ifdef WITH_VECTORIZATION static const vector const_viscosity_alpha_fac = FILL_VEC(-0.25f * const_viscosity_alpha); +/** + * @brief Force interaction computed using 1 vector + * (non-symmetric vectorized version). + */ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_1_vec_force( vector *r2, vector *dx, vector *dy, vector *dz, vector vix, vector viy, @@ -1289,6 +1292,10 @@ runner_iact_nonsym_1_vec_force( #endif } +/** + * @brief Force interaction computed using 2 interleaved vectors + * (non-symmetric vectorized version). + */ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_2_vec_force( float *R2, float *Dx, float *Dy, float *Dz, vector vix, vector viy, diff --git a/src/kernel_hydro.h b/src/kernel_hydro.h index 2e0f457d05c926fc1efa4fd334e7c8cc69189133..4936d570c4d4d1288c5050084c04b0d6e1344970 100644 --- a/src/kernel_hydro.h +++ b/src/kernel_hydro.h @@ -436,8 +436,6 @@ static const vector cubic_2_dwdx_const_c2 = FILL_VEC(-3.f); static const vector cond = FILL_VEC(0.5f); #endif -/*TODO: Comment kernels for each region */ - /** * @brief Computes the kernel function and its derivative for two particles * using vectors. Does not return zero if $u > \\gamma = H/h$, should only diff --git a/tests/test125cells.c b/tests/test125cells.c index 023ce145846a30baf79a42877199e6a3028cd75c..4b25804f829eb8f48a0dbe141fd050591faefc3c 100644 --- a/tests/test125cells.c +++ b/tests/test125cells.c @@ -726,6 +726,7 @@ int main(int argc, char *argv[]) { /* And now the self-interaction for the main cell */ DOSELF2(&runner, main_cell); + self_force_time += getticks() - self_tic; timings[26] += getticks() - self_tic; #endif @@ -742,14 +743,6 @@ int main(int argc, char *argv[]) { } } - for (size_t n = 0; n < 100 * runs; ++n) { - ticks self_tic = getticks(); - - DOSELF2(&runner, main_cell); - - self_force_time += getticks() - self_tic; - } - /* Output timing */ ticks corner_time = timings[0] + timings[2] + timings[6] + timings[8] + timings[17] + timings[19] + timings[23] + timings[25]; @@ -765,7 +758,7 @@ int main(int argc, char *argv[]) { message("Edge calculations took : %15lli ticks.", edge_time / runs); message("Face calculations took : %15lli ticks.", face_time / runs); message("Self calculations took : %15lli ticks.", - self_force_time / 100 * runs); + self_force_time / runs); message("SWIFT calculation took : %15lli ticks.", time / runs); for (int j = 0; j < 125; ++j)