Enabled multithreaded elimination by default
parent
f9eb5b6e2c
commit
b0659da607
|
|
@ -291,9 +291,12 @@ namespace gtsam {
|
|||
boost::shared_ptr<BayesTreeType> result = boost::make_shared<BayesTreeType>();
|
||||
EliminationData<This> rootsContainer(0, roots_.size());
|
||||
EliminationPostOrderVisitor<This> visitorPost(function, result->nodes_);
|
||||
//tbb::task_scheduler_init init(1);
|
||||
treeTraversal::DepthFirstForest/*Parallel*/(*this, rootsContainer,
|
||||
eliminationPreOrderVisitor<This>, visitorPost/*, 10*/);
|
||||
#ifdef ENABLE_TIMING
|
||||
// In timing mode, use a single thread only, timing outline is not thread-safe.
|
||||
tbb::task_scheduler_init init(1);
|
||||
#endif
|
||||
treeTraversal::DepthFirstForestParallel(*this, rootsContainer,
|
||||
eliminationPreOrderVisitor<This>, visitorPost, 10);
|
||||
|
||||
// Create BayesTree from roots stored in the dummy BayesTree node.
|
||||
result->roots_.insert(result->roots_.end(), rootsContainer.bayesTreeNode->children.begin(), rootsContainer.bayesTreeNode->children.end());
|
||||
|
|
|
|||
Loading…
Reference in New Issue