Skip to content
Snippets Groups Projects
Commit a7fcb197 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Apply Clang's padding advice to structures.

parent 77327b39
Branches
Tags
No related merge requests found
......@@ -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,
......
......@@ -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 */
......@@ -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;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment