CMake: Added PCL_OMP option (default ON) to use OMP implementations of some PCL classes (#50)

This commit is contained in:
matlabbe
2016-07-17 21:04:11 -04:00
parent d739d04232
commit cf2bb6b599
3 changed files with 15 additions and 4 deletions

View File

@@ -33,7 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <pcl/filters/random_sample.h>
#include <pcl/filters/passthrough.h>
#include <pcl/features/normal_3d.h>
#include <pcl/features/normal_3d_omp.h>
#include <pcl/search/kdtree.h>
@@ -1308,7 +1308,7 @@ pcl::IndicesPtr normalFiltering(
typedef pcl::search::KdTree<pcl::PointXYZ> KdTree;
typedef KdTree::Ptr KdTreePtr;
pcl::NormalEstimation<pcl::PointXYZ, pcl::Normal> ne;
pcl::NormalEstimationOMP<pcl::PointXYZ, pcl::Normal> ne;
ne.setInputCloud (cloud);
if(indices->size())
{
@@ -1368,7 +1368,7 @@ pcl::IndicesPtr normalFiltering(
typedef pcl::search::KdTree<pcl::PointXYZRGB> KdTree;
typedef KdTree::Ptr KdTreePtr;
pcl::NormalEstimation<pcl::PointXYZRGB, pcl::Normal> ne;
pcl::NormalEstimationOMP<pcl::PointXYZRGB, pcl::Normal> ne;
ne.setInputCloud (cloud);
if(indices->size())
{

View File

@@ -33,7 +33,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <pcl/search/kdtree.h>
#include <pcl/surface/gp3.h>
#include <pcl/features/normal_3d_omp.h>
#include <pcl/features/normal_3d.h>
#include <pcl/surface/mls.h>
#include <pcl/surface/texture_mapping.h>
#include <pcl/features/integral_image_normal.h>
@@ -619,7 +618,11 @@ pcl::PointCloud<pcl::Normal>::Ptr computeNormals(
}
// Normal estimation*
#ifdef PCL_OMP
pcl::NormalEstimationOMP<pcl::PointXYZ, pcl::Normal> n;
#else
pcl::NormalEstimation<pcl::PointXYZ, pcl::Normal> n;
#endif
pcl::PointCloud<pcl::Normal>::Ptr normals (new pcl::PointCloud<pcl::Normal>);
n.setInputCloud (cloud);
// Commented: Keep the output normals size the same as the input cloud
@@ -660,7 +663,11 @@ pcl::PointCloud<pcl::Normal>::Ptr computeNormals(
}
// Normal estimation*
#ifdef PCL_OMP
pcl::NormalEstimationOMP<pcl::PointXYZRGB, pcl::Normal> n;
#else
pcl::NormalEstimation<pcl::PointXYZRGB, pcl::Normal> n;
#endif
pcl::PointCloud<pcl::Normal>::Ptr normals (new pcl::PointCloud<pcl::Normal>);
n.setInputCloud (cloud);
// Commented: Keep the output normals size the same as the input cloud