timeTest.cpp
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2 
3  * GTSAM Copyright 2010, Georgia Tech Research Corporation,
4  * Atlanta, Georgia 30332-0415
5  * All Rights Reserved
6  * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7 
8  * See LICENSE for the license information
9 
10  * -------------------------------------------------------------------------- */
11 
18 #include <gtsam/base/timing.h>
19 
20 using namespace gtsam;
21 
22 int main(int argc, char *argv[]) {
23 
24  {
25  gttic_(top1);
26  gttic_(sub1);
27  gttic_(sub_sub_a);
28  gttoc_(sub_sub_a);
29  gttoc_(sub1);
30  gttic_(sub2);
31  gttic_(sub_sub_b);
32  gttoc_(sub_sub_b);
33  gttoc_(sub2);
34  gttoc_(top1);
35  }
36 
37  {
38  gttic_(top2);
39  gttic_(sub1);
40  gttic_(sub_sub_a);
41  gttoc_(sub_sub_a);
42  gttoc_(sub1);
43  gttic_(sub2);
44  gttic_(sub_sub_b);
45  gttoc_(sub_sub_b);
46  gttoc_(sub2);
47  gttoc_(top2);
48  }
49 
50  gttic_(top3);
51  for(size_t i=0; i<1000000; ++i) {
52  gttic_(overhead);
53  gttic_(sub_overhead);
54  gttoc_(sub_overhead);
55  gttoc_(overhead);
57  }
58  gttoc_(top3);
59 
60  gttic_(top4);
61  for(size_t i=0; i<1000000; ++i) {
62  gttic(overhead_a);
63  gttic(overhead_b);
64  gttoc(overhead_b);
65  gttoc(overhead_a);
67  }
68  gttoc_(top4);
69 
70  tictoc_print_();
71 
72  return 0;
73 }
#define gttic_(label)
Definition: timing.h:245
#define gttic(label)
Definition: timing.h:295
void tictoc_print_()
Definition: timing.h:268
int main(int argc, char *argv[])
Definition: timeTest.cpp:22
traits
Definition: chartTesting.h:28
#define gttoc(label)
Definition: timing.h:296
void tictoc_finishedIteration_()
Definition: timing.h:264
#define gttoc_(label)
Definition: timing.h:250
Timing utilities.
#define tictoc_finishedIteration()
Definition: timing.h:299


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:40:20