Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
6a4da17a
Commit
6a4da17a
authored
6 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Added comments to highlight a possible superior strategy to the mesh assignment.
parent
dc602245
No related branches found
No related tags found
1 merge request
!604
Parallel mesh assignment and simplification of M2L kernel
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mesh_gravity.c
+6
-0
6 additions, 0 deletions
src/mesh_gravity.c
with
6 additions
and
0 deletions
src/mesh_gravity.c
+
6
−
0
View file @
6a4da17a
...
@@ -224,6 +224,11 @@ void cell_gpart_to_mesh_CIC_mapper(void *map_data, int num, void* extra) {
...
@@ -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 */
/* Pointer to the chunk to be processed */
int
*
local_cells
=
(
int
*
)
map_data
;
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 */
/* Loop over the elements assigned to this thread */
for
(
int
i
=
0
;
i
<
num
;
++
i
)
{
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,
...
@@ -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 mesh The #pm_mesh used to store the potential.
* @param s The #space containing the particles.
* @param s The #space containing the particles.
* @param tp The #threadpool object used for parallelisation.
* @param verbose Are we talkative?
* @param verbose Are we talkative?
*/
*/
void
pm_mesh_compute_potential
(
struct
pm_mesh
*
mesh
,
const
struct
space
*
s
,
void
pm_mesh_compute_potential
(
struct
pm_mesh
*
mesh
,
const
struct
space
*
s
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment