Fix vector initialization in NormalEstimationOMP
The vectors nn_indices and nn_dists in NormalEstimationOMP::computeFeatures must be initialized to the correct size. They are initialized at the beginning of the function but the OpenMP parallel for loop basically generates a new pair of vectors for each thread. These vectors are initialized with the default constructor which means that they have zero size. To fix this I used 'firstprivate' for the vectors instead of 'private' this causes that the copy constructor is called instead of the default constructor.
Showing
想要评论请 注册 或 登录