Which methods are thread safe?
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- computer-graphics
Research direction
Start with the provided VectorHeatMethodSolver example, especially scalarDiffuse and its use inside tbb::parallel_for. Compare behavior with and without the initial scalarDiffuse call, then trace the solver routines involved. Done means establishing and documenting which routines are thread safe or identifying the changes needed for the example and the GCVT Lloyd loop.
Written by the indexing model from the issue text.
Description
As far as I can tell, some methods that seem like they'd be thread safe aren't.
I think this is because under the hood some quantities are being precomputed and saved. So for example, applying a VectorHeatMethodSolver object vSolver on dummy data before calling vSolver in a parallel routine seems to make it thread safe.
Is this true?
Here is a small example illustrating what I mean:
std::unique_ptr<ManifoldSurfaceMesh> mesh;
std::unique_ptr<VertexPositionGeometry> geometry;
std::tie(mesh, geometry) = readManifoldSurfaceMesh("filename.obj");
VertexData<double> rhs(mesh, 0.2);
VectorHeatMethodSolver vSolver(geom, 1);
vSolver.scalarDiffuse(rhs); // comment out this line to cause problems
tbb::parallel_for(
tbb::blocked_range<size_t>(0, 100),
[&](tbb::blocked_range<size_t> rng)
{
for (size_t i = rng.begin(); i < rng.end(); i++)
vSolver.scalarDiffuse(rhs);
}
);
In general is there a way to tell which routines are thread safe, or can be made thread safe?
(My main motivation here was to parallelize the outer loop inside each Lloyd iteration of a GCVT routine.)
- Dominant language
- C++
- Stars
- 1.3k
- Forks
- 183
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nmwsharp/geometry-central
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
nmwsharp/geometry-central#256 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
nmwsharp/geometry-central#255 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
nmwsharp/geometry-central#253 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 57/100
nmwsharp/geometry-central#247 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
nmwsharp/geometry-central#246 ·
All issues in nmwsharp/geometry-central
Similar issues
-
Website Doc Typo Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 92/100
autowarefoundation/autoware_universe#13413 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
automated-analysis bug memory-safety
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100