summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
authorGereon Kremer <gereon.kremer@cs.rwth-aachen.de>2021-04-02 00:40:19 +0200
committerGitHub <noreply@github.com>2021-04-01 22:40:19 +0000
commit2d46c5c3921e027fb67fee66c3c9e62ead61438c (patch)
tree35bab7a48f8162b91d58c2465f303ab1cd3912a0 /src/base
parentef2f19f8ba2a72d43586d1f4f364822dbe389aec (diff)
Add utility classes for new statistics (#6178)
This PR introduces two new sets of classes used for the new statistics setup. The first set are the statistic values that hold the actual data and will live in the new statistics registry itself. The second set are proxy objects: they only hold a pointer to the value classes and implement all the modifiers. The code is not used yet, but replaces the code in the stats_* files in a subsequent PR.
Diffstat (limited to 'src/base')
-rw-r--r--src/base/configuration.cpp4
-rw-r--r--src/base/configuration.h9
-rw-r--r--src/base/configuration_private.h6
3 files changed, 8 insertions, 11 deletions
diff --git a/src/base/configuration.cpp b/src/base/configuration.cpp
index 5dd9c2831..561500a16 100644
--- a/src/base/configuration.cpp
+++ b/src/base/configuration.cpp
@@ -46,10 +46,6 @@ bool Configuration::isDebugBuild() {
return IS_DEBUG_BUILD;
}
-bool Configuration::isStatisticsBuild() {
- return IS_STATISTICS_BUILD;
-}
-
bool Configuration::isTracingBuild() {
return IS_TRACING_BUILD;
}
diff --git a/src/base/configuration.h b/src/base/configuration.h
index 4d7a73d4c..e277739dc 100644
--- a/src/base/configuration.h
+++ b/src/base/configuration.h
@@ -48,7 +48,14 @@ public:
static bool isDebugBuild();
- static bool isStatisticsBuild();
+ static constexpr bool isStatisticsBuild()
+ {
+#ifdef CVC4_STATISTICS_ON
+ return true;
+#else
+ return false;
+#endif
+ }
static bool isTracingBuild();
diff --git a/src/base/configuration_private.h b/src/base/configuration_private.h
index 1ec28dc4b..a39393814 100644
--- a/src/base/configuration_private.h
+++ b/src/base/configuration_private.h
@@ -30,12 +30,6 @@ namespace cvc5 {
# define IS_DEBUG_BUILD false
#endif /* CVC4_DEBUG */
-#ifdef CVC4_STATISTICS_ON
-# define IS_STATISTICS_BUILD true
-#else /* CVC4_STATISTICS_ON */
-# define IS_STATISTICS_BUILD false
-#endif /* CVC4_STATISTICS_ON */
-
#ifdef CVC4_TRACING
# define IS_TRACING_BUILD true
#else /* CVC4_TRACING */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback