Commit a207d0bc authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Code formatting

parent f83e83e8
...@@ -209,7 +209,8 @@ int cell_pack(struct cell *restrict c, struct pcell *restrict pc) { ...@@ -209,7 +209,8 @@ int cell_pack(struct cell *restrict c, struct pcell *restrict pc) {
* *
* @return The number of cells created. * @return The number of cells created.
*/ */
int cell_unpack(struct pcell *restrict pc, struct cell *restrict c, struct space *restrict s) { int cell_unpack(struct pcell *restrict pc, struct cell *restrict c,
struct space *restrict s) {
#ifdef WITH_MPI #ifdef WITH_MPI
...@@ -275,7 +276,8 @@ int cell_unpack(struct pcell *restrict pc, struct cell *restrict c, struct space ...@@ -275,7 +276,8 @@ int cell_unpack(struct pcell *restrict pc, struct cell *restrict c, struct space
* *
* @return The number of packed cells. * @return The number of packed cells.
*/ */
int cell_pack_end_step(struct cell *restrict c, struct pcell_step *restrict pcells) { int cell_pack_end_step(struct cell *restrict c,
struct pcell_step *restrict pcells) {
#ifdef WITH_MPI #ifdef WITH_MPI
...@@ -308,12 +310,13 @@ int cell_pack_end_step(struct cell *restrict c, struct pcell_step *restrict pcel ...@@ -308,12 +310,13 @@ int cell_pack_end_step(struct cell *restrict c, struct pcell_step *restrict pcel
* *
* @return The number of cells created. * @return The number of cells created.
*/ */
int cell_unpack_end_step(struct cell *restrict c, struct pcell_step *restrict pcells) { int cell_unpack_end_step(struct cell *restrict c,
struct pcell_step *restrict pcells) {
#ifdef WITH_MPI #ifdef WITH_MPI
/* Unpack this cell's data. */ /* Unpack this cell's data. */
c->ti_end_min = pcells[0].ti_end_min ; c->ti_end_min = pcells[0].ti_end_min;
c->dx_max_part = pcells[0].dx_max_part; c->dx_max_part = pcells[0].dx_max_part;
c->dx_max_gpart = pcells[0].dx_max_gpart; c->dx_max_gpart = pcells[0].dx_max_gpart;
......
...@@ -112,7 +112,6 @@ struct pcell { ...@@ -112,7 +112,6 @@ struct pcell {
} SWIFT_STRUCT_ALIGN; } SWIFT_STRUCT_ALIGN;
/** /**
* @brief Cell information at the end of a time-step. * @brief Cell information at the end of a time-step.
*/ */
......
...@@ -1275,9 +1275,9 @@ void scheduler_enqueue(struct scheduler *s, struct task *t) { ...@@ -1275,9 +1275,9 @@ void scheduler_enqueue(struct scheduler *s, struct task *t) {
#ifdef WITH_MPI #ifdef WITH_MPI
if (t->subtype == task_subtype_tend) { if (t->subtype == task_subtype_tend) {
t->buff = malloc(sizeof(struct pcell_step) * t->ci->pcell_size); t->buff = malloc(sizeof(struct pcell_step) * t->ci->pcell_size);
err = MPI_Irecv(t->buff, t->ci->pcell_size * sizeof(struct pcell_step), err = MPI_Irecv(
MPI_BYTE, t->ci->nodeID, t->flags, MPI_COMM_WORLD, t->buff, t->ci->pcell_size * sizeof(struct pcell_step), MPI_BYTE,
&t->req); t->ci->nodeID, t->flags, MPI_COMM_WORLD, &t->req);
} else if (t->subtype == task_subtype_xv || } else if (t->subtype == task_subtype_xv ||
t->subtype == task_subtype_rho || t->subtype == task_subtype_rho ||
t->subtype == task_subtype_gradient) { t->subtype == task_subtype_gradient) {
...@@ -1311,9 +1311,9 @@ void scheduler_enqueue(struct scheduler *s, struct task *t) { ...@@ -1311,9 +1311,9 @@ void scheduler_enqueue(struct scheduler *s, struct task *t) {
if (t->subtype == task_subtype_tend) { if (t->subtype == task_subtype_tend) {
t->buff = malloc(sizeof(struct pcell_step) * t->ci->pcell_size); t->buff = malloc(sizeof(struct pcell_step) * t->ci->pcell_size);
cell_pack_end_step(t->ci, t->buff); cell_pack_end_step(t->ci, t->buff);
err = MPI_Isend(t->buff, t->ci->pcell_size * sizeof(struct pcell_step), err = MPI_Isend(
MPI_BYTE, t->cj->nodeID, t->flags, MPI_COMM_WORLD, t->buff, t->ci->pcell_size * sizeof(struct pcell_step), MPI_BYTE,
&t->req); t->cj->nodeID, t->flags, MPI_COMM_WORLD, &t->req);
} else if (t->subtype == task_subtype_xv || } else if (t->subtype == task_subtype_xv ||
t->subtype == task_subtype_rho || t->subtype == task_subtype_rho ||
t->subtype == task_subtype_gradient) { t->subtype == task_subtype_gradient) {
......
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