Commit 856d9ab2 authored by lhausamm's avatar lhausamm Committed by Matthieu Schaller

format

parent 868b77e5
...@@ -2311,7 +2311,7 @@ void space_synchronize_particle_positions(struct space *s) { ...@@ -2311,7 +2311,7 @@ void space_synchronize_particle_positions(struct space *s) {
} }
void space_first_init_parts_mapper(void *restrict map_data, int count, void space_first_init_parts_mapper(void *restrict map_data, int count,
void *restrict extra_data) { void *restrict extra_data) {
struct part *restrict p = (struct part *)map_data; struct part *restrict p = (struct part *)map_data;
const struct space *restrict s = (struct space *)extra_data; const struct space *restrict s = (struct space *)extra_data;
...@@ -2385,11 +2385,11 @@ void space_first_init_parts(struct space *s, int verbose) { ...@@ -2385,11 +2385,11 @@ void space_first_init_parts(struct space *s, int verbose) {
if (verbose) if (verbose)
message("took %.3f %s.", clocks_from_ticks(getticks() - tic), message("took %.3f %s.", clocks_from_ticks(getticks() - tic),
clocks_getunit()); clocks_getunit());
} }
void space_first_init_gparts_mapper(void *restrict map_data, int count, void space_first_init_gparts_mapper(void *restrict map_data, int count,
void *restrict extra_data) { void *restrict extra_data) {
struct gpart *restrict gp = (struct gpart *)map_data; struct gpart *restrict gp = (struct gpart *)map_data;
const struct space *restrict s = (struct space *)extra_data; const struct space *restrict s = (struct space *)extra_data;
...@@ -2398,7 +2398,6 @@ void space_first_init_gparts_mapper(void *restrict map_data, int count, ...@@ -2398,7 +2398,6 @@ void space_first_init_gparts_mapper(void *restrict map_data, int count,
const float a_factor_vel = cosmo->a * cosmo->a; const float a_factor_vel = cosmo->a * cosmo->a;
const struct gravity_props *grav_props = s->e->gravity_properties; const struct gravity_props *grav_props = s->e->gravity_properties;
for (int k = 0; k < count; k++) { for (int k = 0; k < count; k++) {
/* Convert velocities to internal units */ /* Convert velocities to internal units */
gp[k].v_full[0] *= a_factor_vel; gp[k].v_full[0] *= a_factor_vel;
...@@ -2438,11 +2437,11 @@ void space_first_init_gparts(struct space *s, int verbose) { ...@@ -2438,11 +2437,11 @@ void space_first_init_gparts(struct space *s, int verbose) {
if (verbose) if (verbose)
message("took %.3f %s.", clocks_from_ticks(getticks() - tic), message("took %.3f %s.", clocks_from_ticks(getticks() - tic),
clocks_getunit()); clocks_getunit());
} }
void space_first_init_sparts_mapper(void *restrict map_data, int count, void space_first_init_sparts_mapper(void *restrict map_data, int count,
void *restrict extra_data) { void *restrict extra_data) {
struct spart *restrict sp = (struct spart *)map_data; struct spart *restrict sp = (struct spart *)map_data;
const struct space *restrict s = (struct space *)extra_data; const struct space *restrict s = (struct space *)extra_data;
...@@ -2483,7 +2482,7 @@ void space_first_init_sparts_mapper(void *restrict map_data, int count, ...@@ -2483,7 +2482,7 @@ void space_first_init_sparts_mapper(void *restrict map_data, int count,
* *
* Calls star_first_init_spart() on all the particles * Calls star_first_init_spart() on all the particles
*/ */
void space_first_init_sparts(struct space *s, int verbose) { void space_first_init_sparts(struct space *s, int verbose) {
const ticks tic = getticks(); const ticks tic = getticks();
if (s->nr_sparts > 0) if (s->nr_sparts > 0)
threadpool_map(&s->e->threadpool, space_first_init_sparts_mapper, s->sparts, threadpool_map(&s->e->threadpool, space_first_init_sparts_mapper, s->sparts,
...@@ -2491,7 +2490,7 @@ void space_first_init_sparts_mapper(void *restrict map_data, int count, ...@@ -2491,7 +2490,7 @@ void space_first_init_sparts_mapper(void *restrict map_data, int count,
if (verbose) if (verbose)
message("took %.3f %s.", clocks_from_ticks(getticks() - tic), message("took %.3f %s.", clocks_from_ticks(getticks() - tic),
clocks_getunit()); clocks_getunit());
} }
void space_init_parts_mapper(void *restrict map_data, int count, void space_init_parts_mapper(void *restrict map_data, int count,
......
...@@ -221,10 +221,8 @@ void space_synchronize_particle_positions(struct space *s); ...@@ -221,10 +221,8 @@ void space_synchronize_particle_positions(struct space *s);
void space_do_parts_sort(); void space_do_parts_sort();
void space_do_gparts_sort(); void space_do_gparts_sort();
void space_do_sparts_sort(); void space_do_sparts_sort();
void space_first_init_parts(struct space *s, void space_first_init_parts(struct space *s, int verbose);
int verbose); void space_first_init_gparts(struct space *s, int verbose);
void space_first_init_gparts(struct space *s,
int verbose);
void space_first_init_sparts(struct space *s, int verbose); void space_first_init_sparts(struct space *s, int verbose);
void space_init_parts(struct space *s, int verbose); void space_init_parts(struct space *s, int verbose);
void space_init_gparts(struct space *s, int verbose); void space_init_gparts(struct space *s, int verbose);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment