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 }
gttoc
#define gttoc(label)
Definition: timing.h:296
timing.h
Timing utilities.
tictoc_finishedIteration
#define tictoc_finishedIteration()
Definition: timing.h:299
gttoc_
#define gttoc_(label)
Definition: timing.h:250
gttic_
#define gttic_(label)
Definition: timing.h:245
gtsam::tictoc_finishedIteration_
void tictoc_finishedIteration_()
Definition: timing.h:264
main
int main(int argc, char *argv[])
Definition: timeTest.cpp:22
gtsam::tictoc_print_
void tictoc_print_()
Definition: timing.h:268
gtsam
traits
Definition: SFMdata.h:40
i
int i
Definition: BiCGSTAB_step_by_step.cpp:9
gttic
#define gttic(label)
Definition: timing.h:295


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:09:14