Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduced space usage for Moving Least Squares #785

Merged

Conversation

translunar
Copy link

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.

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.
@taketwo
Copy link
Member

taketwo commented Jul 2, 2014

Looks good to me.

jspricke added a commit that referenced this pull request Jul 31, 2014
Reduced space usage for Moving Least Squares
@jspricke jspricke merged commit 36a727d into PointCloudLibrary:master Jul 31, 2014
jspricke added a commit to jspricke/pcl that referenced this pull request Aug 1, 2014
import missing variables from super class MovingLeastSquares. Fixes
compiler error introduced in PointCloudLibrary#785.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants