Skip to content

Conversation

@mvieth
Copy link
Member

@mvieth mvieth commented Jun 9, 2023

Previously, if a downstream project used PCL_NO_PRECOMPILE or if it used a PCL class which includes OpenMP code, but PCL does not make an instantiation of that class, OpenMP was not available. In other words, when PCL code using OpenMP was compiled when building PCL, OpenMP was available. However when PCL code using OpenMP was compiled in the downstream/user project (e.g. in the two mentioned cases), OpenMP was not available. The fix is to search for OpenMP again in PCLConfig.cmake

Fixes #5717

Previously, if a downstream project used PCL_NO_PRECOMPILE or if it used a PCL class which includes OpenMP code, but PCL does not make an instantiation of that class, OpenMP was not available.
In other words, when PCL code using OpenMP was compiled when building PCL, OpenMP was available. However when PCL code using OpenMP was compiled in the downstream/user project (e.g. in the two mentioned cases), OpenMP was not available.
The fix is to search for OpenMP again in PCLConfig.cmake
@larshg
Copy link
Contributor

larshg commented Jun 10, 2023

I think we should add:

io:

#pragma omp parallel for \

Segmentation:

Surface:

#pragma omp parallel for \

Tracking:

#ifndef PCL_TRACKING_IMPL_PARTICLE_OMP_FILTER_H_

Or do you assume they will be added due to public linking of OpenMP flags/libraries?

@mvieth
Copy link
Member Author

mvieth commented Jun 11, 2023

@larshg Good point, I added them.

@mvieth mvieth merged commit cf46790 into PointCloudLibrary:master Jun 12, 2023
@mvieth mvieth deleted the PCLConfig_openmp branch June 12, 2023 13:20
@mvieth mvieth added the changelog: fix Meta-information for changelog generation label Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: fix Meta-information for changelog generation module: cmake

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[NormalEstimationOMP] appearantly running with just one thread

2 participants