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

Speeding up triangulation #36

Closed
crabdancing opened this issue Dec 6, 2022 · 2 comments
Closed

Speeding up triangulation #36

crabdancing opened this issue Dec 6, 2022 · 2 comments

Comments

@crabdancing
Copy link

crabdancing commented Dec 6, 2022

Currently the MeshableShape implementation in Truck is quite slow if you set tol low, but the whole time, it's only using one CPU core. Given the propenderence of iterators and maps in the function, and in the tesselation one it calls, would something like rayon be a good solution to parallelizing the operation?

@ytanimura
Copy link
Contributor

ytanimura commented Dec 7, 2022

Thank you for your issue. Actually we are thinking the same thing and have completed the technical verification. We have not yet been able to merge it into the master branch because of the following minor issues that remain.

  • The struct ID, which widely used by topological algorithms, is not implemented Send and Sync because the raw pointer is used as the actual state.
  • One of the goals of truck is to run in wasm. We recognize that parallel processing on a browser has a large overlap; in the case of wasm, it is necessary to apply a branching process that does not parallelize the process.

In fact, it won't take much time. Now that we have received the issue, we will try to merge it into master within the next week or a little later.

@ytanimura
Copy link
Contributor

Now, MeshableShape::triangulation has been parallelized!

There is a benchmark that compare new algorithm to old one.

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

No branches or pull requests

2 participants