Commit 301d41f8 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Prevent FPE in in task_overlap(). But that FPE should not be there in the first place...

parent db0dc02c
...@@ -266,6 +266,9 @@ float task_overlap(const struct task *restrict ta, ...@@ -266,6 +266,9 @@ float task_overlap(const struct task *restrict ta,
if (tb->ci != NULL) size_union += tb->ci->hydro.count; if (tb->ci != NULL) size_union += tb->ci->hydro.count;
if (tb->cj != NULL) size_union += tb->cj->hydro.count; if (tb->cj != NULL) size_union += tb->cj->hydro.count;
// MATTHIEU: This should not be necessary
if (size_union == 0) return 0.f;
/* Compute the intersection of the cell data. */ /* Compute the intersection of the cell data. */
const size_t size_intersect = task_cell_overlap_part(ta->ci, tb->ci) + const size_t size_intersect = task_cell_overlap_part(ta->ci, tb->ci) +
task_cell_overlap_part(ta->ci, tb->cj) + task_cell_overlap_part(ta->ci, tb->cj) +
......
Supports Markdown
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