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  // FIXME: ticPush_ does not exist
25  {
26  gttic_(top1);
27  gttic_(sub1);
28  gttic_(sub_sub_a);
29  gttoc_(sub_sub_a);
30  gttoc_(sub1);
31  gttic_(sub2);
32  gttic_(sub_sub_b);
33  gttoc_(sub_sub_b);
34  gttoc_(sub2);
35  gttoc_(top1);
36  }
37 
38  {
39  gttic_(top2);
40  gttic_(sub1);
41  gttic_(sub_sub_a);
42  gttoc_(sub_sub_a);
43  gttoc_(sub1);
44  gttic_(sub2);
45  gttic_(sub_sub_b);
46  gttoc_(sub_sub_b);
47  gttoc_(sub2);
48  gttoc_(top2);
49  }
50 
51  gttic_(top3);
52  for(size_t i=0; i<1000000; ++i) {
53  gttic_(overhead);
54  gttic_(sub_overhead);
55  gttoc_(sub_overhead);
56  gttoc_(overhead);
58  }
59  gttoc_(top3);
60 
61  gttic_(top4);
62  for(size_t i=0; i<1000000; ++i) {
63  gttic(overhead_a);
64  gttic(overhead_b);
65  gttoc(overhead_b);
66  gttoc(overhead_a);
68  }
69  gttoc_(top4);
70 
71  tictoc_print_();
72 
73  return 0;
74 }
#define gttic_(label)
Definition: timing.h:230
#define gttic(label)
Definition: timing.h:280
void tictoc_print_()
Definition: timing.h:253
int main(int argc, char *argv[])
Definition: timeTest.cpp:22
traits
Definition: chartTesting.h:28
#define gttoc(label)
Definition: timing.h:281
void tictoc_finishedIteration_()
Definition: timing.h:249
#define gttoc_(label)
Definition: timing.h:235
Timing utilities.
#define tictoc_finishedIteration()
Definition: timing.h:284


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:51:04