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
a7fcb197
Commit
a7fcb197
authored
8 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Apply Clang's padding advice to structures.
parent
77327b39
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/engine.c
+1
-1
1 addition, 1 deletion
src/engine.c
src/gravity/Default/gravity_part.h
+4
-4
4 additions, 4 deletions
src/gravity/Default/gravity_part.h
src/threadpool.h
+3
-3
3 additions, 3 deletions
src/threadpool.h
with
8 additions
and
8 deletions
src/engine.c
+
1
−
1
View file @
a7fcb197
...
...
@@ -2434,7 +2434,7 @@ void engine_collect_timestep(struct engine *e) {
ti_end_min
=
in_i
[
0
];
}
{
unsigned
long
long
in_ll
[
2
],
out_ll
[
2
];
long
long
in_ll
[
2
],
out_ll
[
2
];
out_ll
[
0
]
=
updates
;
out_ll
[
1
]
=
g_updates
;
if
(
MPI_Allreduce
(
out_ll
,
in_ll
,
2
,
MPI_LONG_LONG_INT
,
MPI_SUM
,
...
...
This diff is collapsed.
Click to expand it.
src/gravity/Default/gravity_part.h
+
4
−
4
View file @
a7fcb197
...
...
@@ -25,6 +25,10 @@
/* Gravity particle. */
struct
gpart
{
/* Particle ID. If negative, it is the negative offset of the #part with
which this gpart is linked. */
long
long
id_or_neg_offset
;
/* Particle position. */
double
x
[
3
];
...
...
@@ -49,10 +53,6 @@ struct gpart {
/* Particle time of end of time-step. */
int
ti_end
;
/* Particle ID. If negative, it is the negative offset of the #part with
which this gpart is linked. */
long
long
id_or_neg_offset
;
}
SWIFT_STRUCT_ALIGN
;
#endif
/* SWIFT_DEFAULT_GRAVITY_PART_H */
This diff is collapsed.
Click to expand it.
src/threadpool.h
+
3
−
3
View file @
a7fcb197
...
...
@@ -32,9 +32,6 @@ typedef void (*threadpool_map_function)(void *map_data, int num_elements,
/* Data of a threadpool. */
struct
threadpool
{
/* Number of threads in this pool. */
int
num_threads
;
/* The threads themselves. */
pthread_t
*
threads
;
...
...
@@ -48,6 +45,9 @@ struct threadpool {
map_data_chunk
;
volatile
threadpool_map_function
map_function
;
/* Number of threads in this pool. */
int
num_threads
;
/* Counter for the number of threads that are done. */
volatile
int
num_threads_waiting
,
num_threads_running
;
};
...
...
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