HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
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
#include <
SYS/SYS_Compiler.h
>
17
18
class
UT_WorkBuffer
;
19
20
// Add new algorithms here. There must be a matching entry in theUsers in
21
// the UT_TimerTable.C
22
enum
UT_TimerTableUser
{
23
UT_TIMER_DEBUG
= 0,
24
25
UT_TIMER_RAY_SAMPLING
,
26
UT_TIMER_RAY_RAYTRACING
,
27
UT_TIMER_VMAT_OCCLUSION
,
28
UT_TIMER_RAY_DUMPSAMPLES
,
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
SYS_NO_DISCARD_RESULT
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:28
buf
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition:
glcorearb.h:2540
UT_AutoTimerTable::~UT_AutoTimerTable
~UT_AutoTimerTable()
Definition:
UT_TimerTable.h:51
UT_WorkBuffer
Definition:
UT_WorkBuffer.h:74
UT_MAX_TIMER_USERS
Definition:
UT_TimerTable.h:30
UT_TIMER_RAY_RAYTRACING
Definition:
UT_TimerTable.h:26
start
GLuint start
Definition:
glcorearb.h:475
UT_API.h
UT_API
#define UT_API
Definition:
UT_API.h:14
UT_AutoTimerTable::UT_AutoTimerTable
UT_AutoTimerTable(UT_TimerTableUser user)
Definition:
UT_TimerTable.h:46
SYS_NO_DISCARD_RESULT
#define SYS_NO_DISCARD_RESULT
Definition:
SYS_Compiler.h:93
UT_TIMER_RAY_SAMPLING
Definition:
UT_TimerTable.h:25
UT_TIMER_DEBUG
Definition:
UT_TimerTable.h:23
UT_TimerTableUser
UT_TimerTableUser
Definition:
UT_TimerTable.h:22
UT_AutoTimerTable
Definition:
UT_TimerTable.h:44
UT_TimerTable::start
static void start(UT_TimerTableUser user)
SYS_Compiler.h
UT_TIMER_VMAT_OCCLUSION
Definition:
UT_TimerTable.h:27
UT_TimerTable
Definition:
UT_TimerTable.h:33
UT_TimerTable::stop
static void stop(UT_TimerTableUser user)
UT
UT_TimerTable.h
Generated on Tue Dec 17 2024 03:42:23 for HDK by
1.8.6