Commit 2c089f60 authored by Hamdi Sahloul's avatar Hamdi Sahloul

Thread-safe vector insertion while using OpenMP

parent 53e34260
......@@ -645,7 +645,12 @@ void PPF3DDetector::match(const Mat& pc, std::vector<Pose3DPtr>& results, const
Pose3DPtr pose(new Pose3D(alpha, refIndMax, maxVotes));
pose->updatePose(rawPose);
poseList.push_back(pose);
#if defined (_OPENMP)
#pragma omp critical
#endif
{
poseList.push_back(pose);
}
#if defined (_OPENMP)
free(accumulator);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment