Merged requested to merge feat/multihreading into master
Enable optional multi-threading for SLAM using OpenMP (Ceres multi-threading is also based on OpenMP).
Add OpenMP dependency.
Some steps can be performed in different threads to increase runtime performance:
- Keypoints extraction can be efficiently parallelized by running independent extraction on each scanLine in different threads.
- SLAM ICP for-loops on each keypoint can also be parallelized.
- SLAM Ceres optimization can also be parallized by computing residuals and jacobians on different threads.
- Keypoints maps update, maps loading or KD-trees constructions can be performed in independent sections.
Tests achieved a speedup of approximately x2 using at most 4 threads, even if these 4 threads are not requested 100% of the time.