diff --git a/gtsam/hybrid/HybridBayesNet.cpp b/gtsam/hybrid/HybridBayesNet.cpp index e052ae04c..46fc771da 100644 --- a/gtsam/hybrid/HybridBayesNet.cpp +++ b/gtsam/hybrid/HybridBayesNet.cpp @@ -72,6 +72,10 @@ HybridBayesNet HybridBayesNet::prune( // If we have a dead mode threshold and discrete variables left after pruning, // then we run dead mode removal. if (deadModeThreshold.has_value() && pruned.keys().size() > 0) { +#if GTSAM_HYBRID_TIMING + gttic_(DeadModeRemoval); +#endif + DiscreteMarginals marginals(DiscreteFactorGraph{pruned}); for (auto dkey : pruned.discreteKeys()) { Vector probabilities = marginals.marginalProbabilities(dkey); @@ -108,6 +112,10 @@ HybridBayesNet HybridBayesNet::prune( std::dynamic_pointer_cast(marginals(key))); } +#if GTSAM_HYBRID_TIMING + gttoc_(DeadModeRemoval); +#endif + } else { result.emplace_shared(pruned); }