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

Merged symmetric cell-monopole calls into one single task.

parent 16f35a39
No related branches found
No related tags found
No related merge requests found
...@@ -635,6 +635,7 @@ static inline int are_neighbours(struct cell *ci, struct cell *cj) { ...@@ -635,6 +635,7 @@ static inline int are_neighbours(struct cell *ci, struct cell *cj) {
static inline void iact_pair_pc(struct cell *ci, struct cell *cj) { static inline void iact_pair_pc(struct cell *ci, struct cell *cj) {
make_interact_pc(ci->parts, ci->count, ci->loc, cj); make_interact_pc(ci->parts, ci->count, ci->loc, cj);
make_interact_pc(cj->parts, cj->count, cj->loc, ci);
} }
...@@ -773,7 +774,6 @@ void iact_pair(struct cell *ci, struct cell *cj) { ...@@ -773,7 +774,6 @@ void iact_pair(struct cell *ci, struct cell *cj) {
} }
else { /* Otherwise do cell-mulitpole interactions */ else { /* Otherwise do cell-mulitpole interactions */
iact_pair_pc(cp, cps); iact_pair_pc(cp, cps);
iact_pair_pc(cps, cp);
} }
} }
} }
...@@ -945,26 +945,28 @@ void create_tasks(struct qsched *s, struct cell *ci, struct cell *cj) { ...@@ -945,26 +945,28 @@ void create_tasks(struct qsched *s, struct cell *ci, struct cell *cj) {
data[0] = ci; data[0] = ci;
data[1] = cj; data[1] = cj;
tid = qsched_addtask(s, task_type_pair_pc, task_flag_none, data, tid = qsched_addtask(s, task_type_pair_pc, task_flag_none, data,
sizeof(struct cell *) * 2, ci->count); sizeof(struct cell *) * 2, ci->count + cj->count);
/* Add the resource and dependance */ /* Add the resource and dependance */
qsched_addlock(s, tid, ci->res); qsched_addlock(s, tid, ci->res);
qsched_addlock(s, tid, cj->res);
#ifdef COM_AS_TASK #ifdef COM_AS_TASK
qsched_addunlock(s, cj->com_tid, tid); qsched_addunlock(s, cj->com_tid, tid);
qsched_addunlock(s, ci->com_tid, tid);
#endif #endif
/* Create the other task. */ /* /\* Create the other task. *\/ */
data[1] = ci; /* data[1] = ci; */
data[0] = cj; /* data[0] = cj; */
tid = qsched_addtask(s, task_type_pair_pc, task_flag_none, data, /* tid = qsched_addtask(s, task_type_pair_pc, task_flag_none, data, */
sizeof(struct cell *) * 2, cj->count); /* sizeof(struct cell *) * 2, cj->count); */
/* Add the resource and dependance */ /* /\* Add the resource and dependance *\/ */
qsched_addlock(s, tid, cj->res); /* qsched_addlock(s, tid, cj->res); */
#ifdef COM_AS_TASK /* #ifdef COM_AS_TASK */
qsched_addunlock(s, ci->com_tid, tid); /* qsched_addunlock(s, ci->com_tid, tid); */
#endif /* #endif */
} else {/* Cells are direct neighbours */ } else {/* Cells are direct neighbours */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment