-
-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
r.neighbors: fix integer overflow #2853
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
[...] but maybe other modules that were recently parallelized also need some attention.
Here is a list of modules with OpenMP support:
- r.mfilter [new]
- r.neighbors [new]
- r.patch [new]
- r.proj
- r.resamp.filter [new]
- r.resamp.interp [new]
- r.series [new]
- r.series.accumulate
- r.sim
- r.slope.aspect [new]
- r.sun
- r.univar [new]
- v.surf.rst
Evaluation of the other modules could be worth an issue? For |
Wouldn't hurt, at least for this "region cell no > INT_MAX" situation.
Benchmark suggests otherwise: https://grass.osgeo.org/grass82/manuals/r.neighbors.html |
(will be backported in #2856) |
No obvious improvement from 5 MB onwards? Looks like there is no benefit by caching large parts of the output. |
Now I see what you mean, yes, you're quite right. |
Note that in the code |
…SGeo#2853) * r.neighbors, r.resamp.filter, r.resamp.interp: fix integer overflow
Fix integer overflow for regions with more than INT_MAX cells.
A very similar cast to
size_t
is already inr.series
, but maybe other modules that were recently parallelized also need some attention.