timing guards for HybridSmoother
parent
847df02c17
commit
12ba0b70b8
|
@ -74,14 +74,26 @@ void HybridSmoother::update(const HybridGaussianFactorGraph &graph,
|
||||||
ordering = *given_ordering;
|
ordering = *given_ordering;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if GTSAM_HYBRID_TIMING
|
||||||
|
gttic_(HybridSmootherEliminate);
|
||||||
|
#endif
|
||||||
// Eliminate.
|
// Eliminate.
|
||||||
HybridBayesNet bayesNetFragment = *updatedGraph.eliminateSequential(ordering);
|
HybridBayesNet bayesNetFragment = *updatedGraph.eliminateSequential(ordering);
|
||||||
|
#if GTSAM_HYBRID_TIMING
|
||||||
|
gttoc_(HybridSmootherEliminate);
|
||||||
|
#endif
|
||||||
|
|
||||||
/// Prune
|
/// Prune
|
||||||
if (maxNrLeaves) {
|
if (maxNrLeaves) {
|
||||||
|
#if GTSAM_HYBRID_TIMING
|
||||||
|
gttic_(HybridSmootherPrune);
|
||||||
|
#endif
|
||||||
// `pruneBayesNet` sets the leaves with 0 in discreteFactor to nullptr in
|
// `pruneBayesNet` sets the leaves with 0 in discreteFactor to nullptr in
|
||||||
// all the conditionals with the same keys in bayesNetFragment.
|
// all the conditionals with the same keys in bayesNetFragment.
|
||||||
bayesNetFragment = bayesNetFragment.prune(*maxNrLeaves, deadModeThreshold_);
|
bayesNetFragment = bayesNetFragment.prune(*maxNrLeaves, deadModeThreshold_);
|
||||||
|
#if GTSAM_HYBRID_TIMING
|
||||||
|
gttoc_(HybridSmootherPrune);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add the partial bayes net to the posterior bayes net.
|
// Add the partial bayes net to the posterior bayes net.
|
||||||
|
|
Loading…
Reference in New Issue