plasmodic / ecto

ecto is a dynamically configurable Directed Acyclic processing Graph (DAG) framework.
http://ecto.willowgarage.com/
BSD 3-Clause "New" or "Revised" License
97 stars 37 forks source link

copying, strands, black boxes and load balancing #86

Open straszheim opened 13 years ago

straszheim commented 13 years ago

Thoughts for the future: one issue (e.g. in pcl with large point clouds) is that some modules may be forced to copy a point cloud when it is not technically necessary. If you create a black box that contains a single chain where each cell has one input/output, and run all of those cells on the same strand, and then run multiple of these stranded blackboxes inside a load balancer, you get pipelining without having to do extra copies. Does this mean you'd like to be able to specify outside a cell whether it should copy any given input/output?

ethanrublee commented 13 years ago

Copying is an issue I am also noticing with opencv. cv::Mat is essentially a shared pointer type, so its not obvious that during multi threaded execution that the mats aren't copied, and images get out of sync with other data.

Possibly one could register "copy functions" that will be run only if in a multi threaded operation.

cv::Mat cvMatCopyFunc(const cv::Mat& m)
{
    return m.clone();
}
ECTO_REGISTER_COPY(cv::Mat, cvMatCopyFunc)
ethanrublee commented 12 years ago

For the sake of simplicity, cells should never work on data in place.

If this becomes a real speed issue then we should address it. Pushing for later now.