Skip to content
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

Small fix in OpenMP for loop #6107

Merged
merged 1 commit into from
Aug 18, 2024

Conversation

mvieth
Copy link
Member

@mvieth mvieth commented Aug 17, 2024

One compiler complained that ‘kdtree’ is predetermined ‘shared’ for ‘shared’. kdtree is a const variable, which are always shared. The solution is to remove kdtree from the shared clause (not explicitly declare it as shared again). Then we also have to remove default(none) because otherwise other compilers complain that the data sharing attribute is not explicitly defined for kdtree. Normally, default(none) is recommended because it forces the programmer to consider which variables should be shared and which ones private. But since the code is finished, it is okay to remove default(none). Basically, this solution (no default(none) and don't explicitly define the const kdtree as shared) is the only one that works with all compilers.

Related to #5903
Fixes #6098

One compiler complained that "‘kdtree’ is predetermined ‘shared’ for ‘shared’". kdtree is a const variable, which are always shared. The solution is to remove kdtree from the shared clause (not explicitly declare it as shared again).
Then we also have to remove `default(none)` because otherwise other compilers complain that the data sharing attribute is not explicitly defined for kdtree. Normally, `default(none)` is recommended because it forces the programmer to consider which variables should be shared and which ones private. But since the code is finished, it is okay to remove `default(none)`.
Basically, this solution (no `default(none)` and don't explicitly define the const `kdtree` as shared) is the only one that works with all compilers.
@mvieth mvieth added module: registration changelog: fix Meta-information for changelog generation labels Aug 17, 2024
@mvieth mvieth marked this pull request as ready for review August 17, 2024 14:56
@mvieth mvieth merged commit 0ddeb32 into PointCloudLibrary:master Aug 18, 2024
13 checks passed
@mvieth mvieth deleted the default_none_gicp branch August 18, 2024 07:59
@mvieth mvieth removed the changelog: fix Meta-information for changelog generation label Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

‘kdtree’ is predetermined ‘shared’ for ‘shared’
2 participants