r.mapcalc: Support parallel computing by OpenMP - #20
Closed
cyliang368 wants to merge 88 commits into
Closed
Conversation
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…SGeo#6070) Simplified and adapted from OSGeo#4792. Fixes OSGeo#6066 (comment) The action that checks for CRLF has been failing since at least this weekend. Considering that that action has low chances of beeing fixed in a timely matter, I replaced the functionality with an .editorconfig file and validating against it with editorconfig-checker. Compared to OSGeo#4792, here I don’t attempt to make the line ending changes persist in the repo through .gitattributes, and ignore a bit more of non-ready config sections (since the functionality replaced was less detailed than what the .editorconfig I already had almost working). I made the pre-commit run always, and made it faster in consequence to not add a big impact. With hot cache, it is taking 1min-1min10, which is about the same. I knew pre-commit could be faster in CI as I already saw how fast it was in ruff’s own CI when submitting one of my PRs there once. It can still be a bit faster, but it’s enough for today. * CQ: Add initial .editorconfig file with basic settings * CI: Add EditorConfig validation to super-linter workflow * CI: Remove CRLF check from additional_checks.yml workflow * CQ: Add editorconfig-checker to pre-commit config * CI: Always run pre-commit in CI * Update .editorconfig with new whitespace settings for mswindows * CI: Run pre-commit step with uvx * CI: Add caching for pre-commit checks in workflow * Update .editorconfig for Windows batch files * CI: Remove paths-filter step from additional_checks.yml * Update additional_checks.yml step setup-uv
…ate-nix-action v3.8.2 (OSGeo#6073)
This adds JSON support to the db.columns module and keeps current output as plain. The JSON output is a list of names just like the plain output (see also discussion in OSGeo#6072 for more metadata). The following changes are included: 1. Adds a `format` option with `plain`, and `json` modes for output formatting. 2. Adds tests covering each of the new formats. 3. Adds a Python example to the documentation for parsing JSON output. Closes: OSGeo#6008 --------- Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…SGeo#6090) After comparing the .gitignore files from the main grass repo and the addons repo, I carried over some relevant exclusions here, notably the *.tmp.html exclusions, the whole point of this PR.
… no longer published (OSGeo#5942) This vendors an updated copy of PLY (Python Lex-Yacc), and removes references indicating that PLY needs to be installed. The author doesn't want to publish newer versions, and believe users should be vendoring their copy of PLY. The file is kept largely untouched, in order to update the file more easily in the future. * temporal: Vendor ply dependency par repo's instructions as no longer published * temporal: Add ply to makefile * temporal: Remove ply from requirements * temporal: Use relative ply package in grass.temporal code * temporal: Create ply subdirectory in makefile * temporal: Remove checks for ply imports in temporal modules * temporal: Remove references to ply in manual pages * checks: Ignore vendored ply from flake8 checks * checks: Ignore vendored ply from pre-commit checks * temporal: Remove optimize and nowarn keywords sent to ply.lex as removed in newer version * temporal: Remove write_tables keyword sent to ply.yacc as removed in newer version * temporal: Use debug=False for yacc constructor in TemporalOperatorParser * cmake: Add temporal/ply folder to build * checks: Ignore pylint in ply code as it is external
…files (OSGeo#6094) * chore: Add *.tmp.md to .gitignore to exclude temporary markdown files * chore: Ignore temporary files used in htmldox, latexdox and pdfdox targets
* man: Upgrade html Doxyfile to doxygen 1.9.1 defaults
Using `doxygen -u include/Make/Doxyfile_arch_html.in`
```
warning: Tag 'TCL_SUBST' at line 203 of file 'include/Make/Doxyfile_arch_html.in' has become obsolete.
This tag has been removed.
warning: Tag 'COLS_IN_ALPHA_INDEX' at line 879 of file 'include/Make/Doxyfile_arch_html.in' has become obsolete.
This tag has been removed.
warning: Tag 'PERL_PATH' at line 1593 of file 'include/Make/Doxyfile_arch_html.in' has become obsolete.
This tag has been removed.
warning: Tag 'MSCGEN_PATH' at line 1614 of file 'include/Make/Doxyfile_arch_html.in' has become obsolete.
This tag has been removed.
Configuration file 'include/Make/Doxyfile_arch_html.in' updated.
```
* man: Upgrade latex Doxyfile to doxygen 1.9.1 defaults
Using `doxygen -u include/Make/Doxyfile_arch_latex.in`
```
warning: Tag 'TCL_SUBST' at line 203 of file 'include/Make/Doxyfile_arch_latex.in' has become obsolete.
This tag has been removed.
warning: Tag 'COLS_IN_ALPHA_INDEX' at line 879 of file 'include/Make/Doxyfile_arch_latex.in' has become obsolete.
This tag has been removed.
warning: Tag 'PERL_PATH' at line 1593 of file 'include/Make/Doxyfile_arch_latex.in' has become obsolete.
This tag has been removed.
warning: Tag 'MSCGEN_PATH' at line 1614 of file 'include/Make/Doxyfile_arch_latex.in' has become obsolete.
This tag has been removed.
Configuration file 'include/Make/Doxyfile_arch_latex.in' updated.
```
In the generated example for each tool, use the first allowed value from the list of allowed values in the options field. This can be done for strings only because numbers may have ranges in the options field. Before, simply the type, i.e., string would be printed unless key_desc was defined. For r.series, this is replacing 'string' by 'average' as a value for method in the example. Apply the same to Python and CLI and sync CLI to Python which adds the fallback number values to CLI example.
Instead of checking input and file presence and absence manually, this uses parser rules for options. As a result, the generated example at the top of r.series documentation will have input instead of skipping both input and file.
…elization (OSGeo#6087) This gets rid of static variables from the r.mapcalc functions for mode and median. The static variables were there to not allocate for every row, but it complicates parallelization since that can't generally be done in parallel with static variables, see OSGeo#5742. Since the size of the array is typically very small (the number of arguments of the median() or mode() function, can be raster or number), it will use array on stack and allocate only for larger sizes. It may be slower due to more stack or heap needed, but it might be faster for cases within the threshold (using heap allocated memory instead of realloc). In any case, it will reliably work with parallelization. General solution would be using a context, but that would require a large change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.