timing guards for HybridSmoother

release/4.3a0
Varun Agrawal 2025-01-29 01:40:49 -05:00
parent 847df02c17
commit 12ba0b70b8
1 changed files with 12 additions and 0 deletions

View File

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