HDK
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
UT_TimerTable.h
Go to the documentation of this file.
1
/*
2
* PROPRIETARY INFORMATION. This software is proprietary to
3
* Side Effects Software Inc., and is not to be reproduced,
4
* transmitted, or disclosed in any way without written permission.
5
*
6
* NAME: UT_TimerTable.h ( UT Library, C++)
7
*
8
* COMMENTS: Class to keep track of cumulative time spent in different
9
* algorithms.
10
*/
11
12
#ifndef __UT_TimerTable__
13
#define __UT_TimerTable__
14
15
#include "
UT_API.h
"
16
17
class
UT_WorkBuffer
;
18
19
// Add new algorithms here. There must be a matching entry in theUsers in
20
// the UT_TimerTable.C
21
enum
UT_TimerTableUser
{
22
UT_TIMER_DEBUG
= 0,
23
24
UT_TIMER_RAY_SAMPLING
,
25
UT_TIMER_RAY_RAYTRACING
,
26
UT_TIMER_VMAT_OCCLUSION
,
27
UT_TIMER_RAY_DUMPSAMPLES
,
28
UT_TIMER_RAY_SPUSAMPLING
,
29
30
UT_MAX_TIMER_USERS
// Sentinal
31
};
32
33
class
UT_API
UT_TimerTable
{
34
public
:
35
// Start a timer. Nested timers are ignored.
36
static
void
start
(
UT_TimerTableUser
user);
37
static
void
stop(
UT_TimerTableUser
user);
38
39
static
void
printUsage(
UT_WorkBuffer
&
buf
,
int
indent=3);
40
};
41
42
// Automatically starts and stops a timer within the scope of a
43
// UT_AutoTimerTable object.
44
class
UT_API
UT_AutoTimerTable
{
45
public
:
46
UT_AutoTimerTable
(
UT_TimerTableUser
user)
47
: myUser(user)
48
{
49
UT_TimerTable::start
(myUser);
50
}
51
~UT_AutoTimerTable
()
52
{
53
UT_TimerTable::stop
(myUser);
54
}
55
56
private
:
57
UT_TimerTableUser
myUser;
58
};
59
60
#endif
UT_TIMER_RAY_DUMPSAMPLES
Definition:
UT_TimerTable.h:27
UT_AutoTimerTable::~UT_AutoTimerTable
~UT_AutoTimerTable()
Definition:
UT_TimerTable.h:51
UT_WorkBuffer
Definition:
UT_WorkBuffer.h:59
UT_MAX_TIMER_USERS
Definition:
UT_TimerTable.h:30
UT_TIMER_RAY_RAYTRACING
Definition:
UT_TimerTable.h:25
start
GLuint start
Definition:
glcorearb.h:474
UT_API.h
UT_API
#define UT_API
Definition:
UT_API.h:12
UT_TIMER_RAY_SPUSAMPLING
Definition:
UT_TimerTable.h:28
UT_AutoTimerTable::UT_AutoTimerTable
UT_AutoTimerTable(UT_TimerTableUser user)
Definition:
UT_TimerTable.h:46
UT_TIMER_RAY_SAMPLING
Definition:
UT_TimerTable.h:24
buf
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition:
glcorearb.h:2539
UT_TIMER_DEBUG
Definition:
UT_TimerTable.h:22
UT_TimerTableUser
UT_TimerTableUser
Definition:
UT_TimerTable.h:21
UT_AutoTimerTable
Definition:
UT_TimerTable.h:44
UT_TimerTable::start
static void start(UT_TimerTableUser user)
UT_TIMER_VMAT_OCCLUSION
Definition:
UT_TimerTable.h:26
UT_TimerTable
Definition:
UT_TimerTable.h:33
UT_TimerTable::stop
static void stop(UT_TimerTableUser user)
UT
UT_TimerTable.h
Generated on Thu Apr 19 2018 03:37:02 for HDK by
1.8.6