From 6a4da17ae011a936d3876df42e6f7c0f9416e42e Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <matthieu.schaller@durham.ac.uk> Date: Thu, 30 Aug 2018 16:21:32 +0100 Subject: [PATCH] Added comments to highlight a possible superior strategy to the mesh assignment. --- src/mesh_gravity.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mesh_gravity.c b/src/mesh_gravity.c index 91707d266a..53d000af9a 100644 --- a/src/mesh_gravity.c +++ b/src/mesh_gravity.c @@ -224,6 +224,11 @@ void cell_gpart_to_mesh_CIC_mapper(void *map_data, int num, void* extra) { /* Pointer to the chunk to be processed */ int *local_cells = (int *)map_data; + //MATTHIEU: This could in principle be improved by creating a local mesh + // with just the extent required for the cell. Assignment can + // then be done without atomics. That local mesh is then added + // atomically to the global one. + /* Loop over the elements assigned to this thread */ for (int i = 0; i < num; ++i) { @@ -349,6 +354,7 @@ void mesh_to_gparts_CIC(struct gpart* gp, const double* pot, int N, double fac, * * @param mesh The #pm_mesh used to store the potential. * @param s The #space containing the particles. + * @param tp The #threadpool object used for parallelisation. * @param verbose Are we talkative? */ void pm_mesh_compute_potential(struct pm_mesh* mesh, const struct space* s, -- GitLab