Open RenHao116 opened 3 years ago
updateNode is not race free, but castRay is (as it's const).
Nodes are not protected themselves, because any update will eventually touch multiple nodes up the tree to the root. Parallelization is done with OpenMP (conditionally enabled via CMake) with data structures for parallelization in place (hint: search for "OMP" in the code). The update itself is not parallelized and marked as critical section.
For offline processing, is updateNode or castRay functions race-free? May I insert multiple rays or update multiple nodes in parallel? Not really familiar with Openmp or CUDA but as far as I can tell from the code, the nodes are not protected from data-racing. Please tell me if this could be useful for anyone and I may make a pull request with a concurrent Octomap. Please help me point out if this is a duplicated issue. Thanks