From 47e76ff03b77a007ca166e07b8aa7a2a042e49e3 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Tue, 31 Dec 2024 14:27:20 -0500 Subject: [PATCH] remove GTSAM_HYBRID_TIMING guards --- gtsam/discrete/DiscreteFactorGraph.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/gtsam/discrete/DiscreteFactorGraph.cpp b/gtsam/discrete/DiscreteFactorGraph.cpp index 2037dd951..2b63be660 100644 --- a/gtsam/discrete/DiscreteFactorGraph.cpp +++ b/gtsam/discrete/DiscreteFactorGraph.cpp @@ -121,25 +121,13 @@ namespace gtsam { static DecisionTreeFactor ProductAndNormalize( const DiscreteFactorGraph& factors) { // PRODUCT: multiply all factors -#if GTSAM_HYBRID_TIMING - gttic_(DiscreteProduct); -#endif DecisionTreeFactor product = factors.product(); -#if GTSAM_HYBRID_TIMING - gttoc_(DiscreteProduct); -#endif // Max over all the potentials by pretending all keys are frontal: auto normalizer = product.max(product.size()); -#if GTSAM_HYBRID_TIMING - gttic_(DiscreteNormalize); -#endif // Normalize the product factor to prevent underflow. product = product / (*normalizer); -#if GTSAM_HYBRID_TIMING - gttoc_(DiscreteNormalize); -#endif return product; } @@ -230,13 +218,7 @@ namespace gtsam { DecisionTreeFactor product = ProductAndNormalize(factors); // sum out frontals, this is the factor on the separator -#if GTSAM_HYBRID_TIMING - gttic_(EliminateDiscreteSum); -#endif DecisionTreeFactor::shared_ptr sum = product.sum(frontalKeys); -#if GTSAM_HYBRID_TIMING - gttoc_(EliminateDiscreteSum); -#endif // Ordering keys for the conditional so that frontalKeys are really in front Ordering orderedKeys; @@ -246,14 +228,8 @@ namespace gtsam { sum->keys().end()); // now divide product/sum to get conditional -#if GTSAM_HYBRID_TIMING - gttic_(EliminateDiscreteToDiscreteConditional); -#endif auto conditional = std::make_shared(product, *sum, orderedKeys); -#if GTSAM_HYBRID_TIMING - gttoc_(EliminateDiscreteToDiscreteConditional); -#endif return {conditional, sum}; }