You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PCL_WARN ("[pcl::NormalEstimationOMP::setNumberOfThreads] Parallelization is requested, but OpenMP is not available! Continuing without parallelization.\n");
60
-
#endif// _OPENMP
53
+
if (num_threads_ != 1) {
54
+
PCL_WARN("OpenMP is not available. Keeping number of threads unchanged at 1\n");
PCL_WARN ("[pcl::PrincipalCurvaturesEstimation::setNumberOfThreads] Parallelization is requested, but OpenMP is not available! Continuing without parallelization.\n");
62
-
#endif// _OPENMP
55
+
if (num_threads_ != 1) {
56
+
PCL_WARN("OpenMP is not available. Keeping number of threads unchanged at 1\n");
Copy file name to clipboardExpand all lines: features/include/pcl/features/normal_3d_omp.h
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -71,25 +71,25 @@ namespace pcl
71
71
72
72
public:
73
73
/** \brief Initialize the scheduler and set the number of threads to use.
74
-
* \param nr_threads the number of hardware threads to use (0 sets the value back to automatic)
74
+
* \param num_threads the number of hardware threads to use (0 sets the value back to automatic)
75
75
* \param chunk_size PCL will use dynamic scheduling with this chunk size. Setting it too low will lead to more parallelization overhead. Setting it too high will lead to a worse balancing between the threads.
76
76
*/
77
-
NormalEstimationOMP (unsignedintnr_threads = 0, int chunk_size = 256): chunk_size_(chunk_size)
77
+
NormalEstimationOMP (unsignedintnum_threads = 0, int chunk_size = 256): chunk_size_(chunk_size)
78
78
{
79
79
feature_name_ = "NormalEstimationOMP";
80
80
81
-
setNumberOfThreads(nr_threads);
81
+
setNumberOfThreads(num_threads);
82
82
}
83
83
84
84
/** \brief Initialize the scheduler and set the number of threads to use.
85
-
* \param nr_threads the number of hardware threads to use (0 sets the value back to automatic)
85
+
* \param num_threads the number of hardware threads to use (0 sets the value back to automatic)
86
86
*/
87
87
void
88
-
setNumberOfThreads (unsignedintnr_threads = 0);
88
+
setNumberOfThreads (unsignedintnum_threads = 0);
89
89
90
90
protected:
91
91
/** \brief The number of threads the scheduler should use. */
92
-
unsignedintthreads_;
92
+
unsignedintnum_threads_{1};
93
93
94
94
/** \brief Chunk size for (dynamic) scheduling. */
0 commit comments