-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
reference and parallelization #10
Comments
Sure :-): Here are the Papers used for the implementation: @Article{malandain2002, and @inproceedings{barequet2001, What parallelization concerns: But I think one straight forward way of some parallelization would be to run the exhaustive grid search (7) in parallel, that would be easy so each thread (OpenMP) could do: one projection into a direction, 2d convex hull, minimal area rectangle and construct the bounding box. with MPI: hmm, hm... probably in the same fashion (for a start), there is some communication involved, either communicating point indices (if every process has the point cloud) or communication whole point data. Another thing there are lots of 2d projections of the 3d points and -> that means if we can reduce run time of https://github.com/gabyx/ApproxMVBB/blob/master/include/ApproxMVBB/ProjectedPointSet.hpp There is another interesting paper which is claimed to be even faster and would be cool if that could be implemented in this library as well: @Article{chang2011, It is based on optimization with the Nelder-Mead simplex (dont know if that is straight forward to parallelize, its a genetic opt. aglorithm. |
Rotating Calipers in 3d? or in 2d? |
Hi gabyx! Thanks for your detailed reply :) I think the algorithm I parallelized is exhaustive grid search you mentioned. Rotating Calipers in 2D is only used at computing 2D minimal area rectangle. All of the three papers above is interesting. I will devour them and then come back to you. Thank you. |
Hi, I made considerable improvements to the library, fixed some small bugs, also I added unit tests. They should hopefully turn out to be correct. if they dont, then its numerically inaccuracy: visualizing the tests if the fail is always the first thing to do =) regards |
The library has now some openmp support, one place where openmp is commented out yet still makes some problems (more investigations needed), but so far its a huge improvement for speed. |
Curious under what circumstances you got the huge speed improvement in the openmp parallelization (around the grid search). Unfortunately my testing is done in MSVC and WSL (not native linux), so I may be missing some of the benefits (side note: I had to re-write the parallelization for MSVC because it is stuck on openmp 2.0 and doesn't support user-defined reductions... I can make a PR for it if you want us poor souls that have to use MSVC) Grid search: 5 MSVC Single threaded: ~20000 msec WSL Single threaded: ~9000 msec |
Strange Benchmark: Did you use full optimization and release? |
For WSL it was -03 -DNDEBUG (for MSVC it is /O2 /Ob2 /D "NDEBUG"). Code being timed is below where the input cloud has 100,000 points (generated randomly from a uniform distribution in the range of -100.0 to 100.0).
I'm not aware of any OpenMP MACRO that can be used... I just check if WIN32 and use the OpenMP 2.0 style critical section. I will push the PR... but by supporting OpenMP 2.0 it makes the code much uglier compared to user-defined reductions :) |
see #38 |
Could you test this? |
Strange is, that its so slow with OpenMp 4 in WSL? its twice as slow lol |
Honestly I never did a relevant profiling... Needs further investigation. Maybe profile the code ? |
Hi gabyx. Thanks for offering your work. It is valuable for me.
Can you offer the reference paper of your implementation? I think it would be helpful to understand your code by my own. Question 2 is - do you think ApproxMVBB is easy to parallelization by means of OpenMP/MPI etc. ? In my experiment, the speed using ApproxMVBB almostly equals to the speed of rotating calipers method with parallelization.
The text was updated successfully, but these errors were encountered: