SarahWeiii / CoACD

[SIGGRAPH2022] Approximate Convex Decomposition for 3D Meshes with Collision-Aware Concavity and Tree Search
https://colin97.github.io/CoACD/
MIT License
457 stars 59 forks source link

Parallelization via OpenMP support #6

Closed Abde5 closed 1 year ago

Abde5 commented 1 year ago

Dear Wei, Liu, Ling and Su,

Reading the Discussion chapter of your paper, we took the freedom to implement a parallelization of CoACD.

We did so by parallelizing part of the Compute problem (each CoACD iteration is perfectly parallelizable) and the merge (the cost matrix computing has been parallelized). We attempted to implement a more complex parallelization system with OpenMP tasks; however, it did not give good results compared to a basic parallelization of the for routines.

The Merge loop has been simplified in order to keep it a single loop.

With empirical tests, we have observed that we achieve speedups from 1.2 to 3.8 for the smaller concavity thresholds.

chrome_yjWLeCmtUX

Please be free to try it out and I would be glad to answer any questions about the implementation.

This work is being contributed by Altheria Solutions.

Abde5 commented 1 year ago

@olitheolix to be honest, the PR did not even compile on Windows 😅

I didn't PR with the latest commit in my local branch, thanks for fixing the problem, tho!

SarahWeiii commented 1 year ago

Hi @Abde5 , Thank you for the contribution, I have tested the parallelization on Ubuntu 20.04 and will merge it into the main branch.