PointCloudLibrary/pcl — pull request #785 by mohawkjohn (2014-07-02 20:14:18+00:00)
Title: Reduced space usage for Moving Least Squares

The `mls_results_` vector did not need to be allocated for most of the Moving Least Squares methods. However, a reference to an entry in this vector was needed for calls to `computeMLSPointNormal`, which is why it was being allocated in full. This commit causes the vector to be resized to 1 for those methods that don't need the full version, and then a reference to entry 0 is passed. The decision was made not to modify
`computeMLSPointNormal` because it needs to be thread-safe and I do not
have the means to test the OpenMP version of the code. Identical
modifications were made to `MovingLeastSquaresOMP::performProcessing` as
to `MovingLeastSquares::performProcessing`.

Tests which do not depend on OpenMP still pass. I cannot speak to those tests which require OpenMP.

While this requires to additional comparisons per loop iteration, I believe these will be optimized out.