From 12ba0b70b83fdeaea7432cde85c552eb6e3755a0 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Wed, 29 Jan 2025 01:40:49 -0500 Subject: [PATCH] timing guards for HybridSmoother --- gtsam/hybrid/HybridSmoother.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gtsam/hybrid/HybridSmoother.cpp b/gtsam/hybrid/HybridSmoother.cpp index 45320896a..b927af0f3 100644 --- a/gtsam/hybrid/HybridSmoother.cpp +++ b/gtsam/hybrid/HybridSmoother.cpp @@ -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.