VisionWorks Toolkit Reference

December 18, 2015 | 1.2 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvx_timer.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012-2015, NVIDIA CORPORATION. All rights reserved.
3  *
4  * NVIDIA Corporation and its licensors retain all intellectual property
5  * and proprietary rights in and to this software, related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA Corporation is strictly prohibited.
9  */
10 
16 #ifndef NVX_TIMER_HPP
17 #define NVX_TIMER_HPP
18 
19 #include "nvx.h"
20 
24 namespace nvx {
25 
34 class NVX_CXX_API Timer
35 {
36 public:
46  Timer(bool _dumpStatistics=false, const char* _name = "");
47 
51  ~Timer();
52 
56  void tic();
57 
63  double toc();
64 
65 private:
66  char name[255];
67  vx_perf_t perf;
68  bool dumpStatistics;
69 };
70 
71 }
72 
83 #define NVX_TIMER(suffix, str) static nvx::Timer timer_##suffix(true, str); timer_##suffix.tic()
84 
91 #define NVX_TIMEROFF(suffix) (void)timer_##suffix.toc()
92 
93 #endif
The performance measurement structure.
Definition: vx_types.h:1348
NVIDIA VisionWorks Framework and Primitives API.
Timer class interface.
Definition: nvx_timer.hpp:34