carl  24.04
Computer ARithmetic Library
CoCoAAdaptorStatistics.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 #ifdef CARL_DEVOPTION_Statistics
6 
7 namespace carl {
8 namespace cocoa {
9 
10 class CoCoAAdaptorStatistics : public statistics::Statistics {
11 public:
12  statistics::Timer gcd;
13  statistics::Timer factorize;
14  statistics::Timer gbasis;
15  void collect() {
16  Statistics::addKeyValuePair("gcd", gcd);
17  Statistics::addKeyValuePair("factorize", factorize);
18  Statistics::addKeyValuePair("gbasis", gbasis);
19  }
20 };
21 
22 static auto& statistics() {
23  static CARL_INIT_STATISTICS(CoCoAAdaptorStatistics, stats, "cocoa");
24  return stats;
25 }
26 
27 }
28 }
29 #endif
A small wrapper that makes using statistics easier in carl.
#define CARL_INIT_STATISTICS(class, variable, name)
carl is the main namespace for the library.
cln::cl_I gcd(const cln::cl_I &a, const cln::cl_I &b)
Calculate the greatest common divisor of two integers.
Definition: operations.h:310