Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
301d41f8
Commit
301d41f8
authored
Feb 14, 2019
by
Matthieu Schaller
Browse files
Prevent FPE in in task_overlap(). But that FPE should not be there in the first place...
parent
db0dc02c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/task.c
View file @
301d41f8
...
...
@@ -266,6 +266,9 @@ float task_overlap(const struct task *restrict ta,
if
(
tb
->
ci
!=
NULL
)
size_union
+=
tb
->
ci
->
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. */
const
size_t
size_intersect
=
task_cell_overlap_part
(
ta
->
ci
,
tb
->
ci
)
+
task_cell_overlap_part
(
ta
->
ci
,
tb
->
cj
)
+
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment