-
-
Notifications
You must be signed in to change notification settings - Fork 307
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.resamp.filter: implement parallelization with OpenMP #1759
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.
Didn't test the performance, but the code and generated output looks good.
raster/r.resamp.filter/main.c
Outdated
static DCELL **bufs; | ||
static DCELL ***bufs; | ||
static int bufrows; | ||
static int nprocs; |
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.
Delete this line if not used.
main.c:169:12: warning: ‘nprocs’ defined but not used [-Wunused-variable]
static int nprocs;
} parm; | ||
struct | ||
{ | ||
struct Flag *nulls; | ||
} flag; | ||
char title[64]; | ||
int i; | ||
int i, t; | ||
int nprocs; |
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.
Or did you mean to use the static nprocs
above?
2c9f530
to
46c607d
Compare
46c607d
to
6b73d25
Compare
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.
Code looks good to me and test succeeds on Mac.
Great!
Minor suggestion though:
--- a/raster/r.resamp.filter/main.c
+++ b/raster/r.resamp.filter/main.c
@@ -107,7 +107,7 @@ static const struct filter_type menu[] = {
{"hann", f_hann, 0},
{"hamming", f_hamming, 0},
{"blackman", f_blackman, 0},
- {NULL},
+ {NULL, NULL, 0},
};
Thank you for the review, I will merge now. #2692 needs to be again updated. |
Done. |
Checklists before merging: