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
{
35
public
:
36
// Start a timer. Nested timers are ignored.
37
static
void
start
(
UT_TimerTableUser
user);
38
static
void
stop(
UT_TimerTableUser
user);
39
40
static
void
printUsage(
UT_WorkBuffer
&
buf
,
int
indent=3);
41
};
42
43
// Automatically starts and stops a timer within the scope of a
44
// UT_AutoTimerTable object.
45
class
SYS_NO_DISCARD_RESULT
UT_AutoTimerTable
46
{
47
public
:
48
UT_AutoTimerTable
(
UT_TimerTableUser
user)
49
: myUser(user)
50
{
51
UT_TimerTable::start
(myUser);
52
}
53
~UT_AutoTimerTable
()
54
{
55
UT_TimerTable::stop
(myUser);
56
}
57
58
private
:
59
UT_TimerTableUser
myUser;
60
};
61
62
#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:53
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:48
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:45
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 Wed Aug 27 2025 03:08:49 for HDK by
1.8.6