add timing for hybrid pruning

release/4.3a0
Varun Agrawal 2025-01-27 18:42:43 -05:00
parent 292e749756
commit 471efb1f1a
1 changed files with 7 additions and 0 deletions

View File

@ -49,6 +49,9 @@ bool HybridBayesNet::equals(const This &bn, double tol) const {
// search to find the K-best leaves and then create a single pruned conditional.
HybridBayesNet HybridBayesNet::prune(
size_t maxNrLeaves, const std::optional<double> &deadModeThreshold) const {
#if GTSAM_HYBRID_TIMING
gttic_(HybridPruning);
#endif
// Collect all the discrete conditionals. Could be small if already pruned.
const DiscreteBayesNet marginal = discreteMarginal();
@ -152,6 +155,10 @@ HybridBayesNet HybridBayesNet::prune(
// We ignore DiscreteConditional as they are already pruned and added.
}
#if GTSAM_HYBRID_TIMING
gttoc_(HybridPruning);
#endif
return result;
}