thread safety on query functions

Jason Remillard remillard.jason at gmail.com
Wed Nov 18 14:01:53 UTC 2009


Hi,

Sorry if this has been asked before, but I was not able to figure out
how to search over the list archives.

I would like to build up a kdtree, then spawn multiple threads via
openmp that will do parallel queries on the tree. The find,
find_nearest, find_within_range, and visit_within_range are all
declared as const. However, are they really const?
 - Does calling them modify the state of the tree in anyway?
 - Any cached data in the tree?
 - Any intermediate data stored in the nodes?

If the search functions write to any tree data then concurrent calls
will not work.

Thanks
Jason.



More information about the libkdtree-devel mailing list