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