VTK
dox
Filters
Core
vtkExecutionTimer.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkAppendFilter.h
5
6
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7
All rights reserved.
8
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10
This software is distributed WITHOUT ANY WARRANTY; without even
11
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12
PURPOSE. See the above copyright notice for more information.
13
14
=========================================================================*/
15
35
#ifndef vtkExecutionTimer_h
36
#define vtkExecutionTimer_h
37
38
#include "
vtkObject.h
"
39
#include "vtkFiltersCoreModule.h"
// For export macro
40
41
class
vtkAlgorithm
;
42
class
vtkCallbackCommand
;
43
44
class
VTKFILTERSCORE_EXPORT
vtkExecutionTimer
:
public
vtkObject
45
{
46
public
:
47
vtkTypeMacro(
vtkExecutionTimer
,
vtkObject
);
48
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
49
54
static
vtkExecutionTimer
*
New
();
55
57
63
void
SetFilter(
vtkAlgorithm
* filter);
64
vtkGetObjectMacro(Filter,
vtkAlgorithm
);
66
68
73
vtkGetMacro(ElapsedCPUTime,
double
);
75
77
82
vtkGetMacro(ElapsedWallClockTime,
double
);
84
85
protected
:
86
vtkExecutionTimer
();
87
~
vtkExecutionTimer
()
override
;
88
89
// This is the observer that will catch StartEvent and hand off to
90
// EventRelay
91
vtkCallbackCommand
*
Callback
;
92
93
// This is the filter that will be timed
94
vtkAlgorithm
*
Filter
;
95
96
// These are where we keep track of the timestamps for start/end
97
double
CPUStartTime
;
98
double
CPUEndTime
;
99
100
double
WallClockStartTime
;
101
double
WallClockEndTime
;
102
103
double
ElapsedCPUTime
;
104
double
ElapsedWallClockTime
;
105
107
112
void
StartTimer();
113
void
StopTimer();
115
120
virtual
void
TimerFinished();
121
127
static
void
EventRelay(
vtkObject
* caller,
unsigned
long
eventId,
void
* clientData,
void
* callData);
128
129
private
:
130
vtkExecutionTimer
(
const
vtkExecutionTimer
&) =
delete
;
131
void
operator=(
const
vtkExecutionTimer
&) =
delete
;
132
133
};
134
135
#endif
vtkAlgorithm
Superclass for all sources, filters, and sinks in VTK.
Definition:
vtkAlgorithm.h:59
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkObject
abstract base class for most VTK objects
Definition:
vtkObject.h:59
vtkExecutionTimer::CPUEndTime
double CPUEndTime
Definition:
vtkExecutionTimer.h:98
vtkExecutionTimer::WallClockEndTime
double WallClockEndTime
Definition:
vtkExecutionTimer.h:101
vtkExecutionTimer::Filter
vtkAlgorithm * Filter
Definition:
vtkExecutionTimer.h:94
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:39
vtkObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkObject.h
vtkExecutionTimer::ElapsedCPUTime
double ElapsedCPUTime
Definition:
vtkExecutionTimer.h:103
vtkExecutionTimer
Time filter execution.
Definition:
vtkExecutionTimer.h:44
vtkCallbackCommand
supports function callbacks
Definition:
vtkCallbackCommand.h:50
vtkExecutionTimer::ElapsedWallClockTime
double ElapsedWallClockTime
Definition:
vtkExecutionTimer.h:104
vtkExecutionTimer::CPUStartTime
double CPUStartTime
Definition:
vtkExecutionTimer.h:97
vtkExecutionTimer::WallClockStartTime
double WallClockStartTime
Definition:
vtkExecutionTimer.h:100
vtkExecutionTimer::Callback
vtkCallbackCommand * Callback
Definition:
vtkExecutionTimer.h:91
Generated by
1.8.16