Let DistributedTree execute user payload
Created by: Rombur
In the distributed case, I'd like to add a way to execute code from the user before returning the result of the query. Right now, the workflow for something like PointSearch
in DTK is the following:
- do a distributed search with a spatial query
- send the points found to the target processors
- perform some computations
- move the results back
The goal is that the user should not need to deal with communications. At first, this will be limited to spacial predicates.
We need to add two capabilities to the current implementation of queryDispatch():
- Execute user code
- Move user data back to the calling processors.
The first point can be done using a functor that is called after bottom_tree.query()
and before communicateResultsBack()
. The second point is more complicated because we need to serialize/deserialize
the data. The first implementation will rely on boost::serialization
and boost::mpi
. The object that we will communicate back will be the functor. I am not sure that returning the other like indices
, offset
, etc. is necessary.