VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Filtering
vtkExecutionScheduler.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkExecutionScheduler.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
/*-------------------------------------------------------------------------
16
Copyright (c) 2008, 2009 by SCI Institute, University of Utah.
17
18
This is part of the Parallel Dataflow System originally developed by
19
Huy T. Vo and Claudio T. Silva. For more information, see:
20
21
"Parallel Dataflow Scheme for Streaming (Un)Structured Data" by Huy
22
T. Vo, Daniel K. Osmari, Brian Summa, Joao L.D. Comba, Valerio
23
Pascucci and Claudio T. Silva, SCI Institute, University of Utah,
24
Technical Report #UUSCI-2009-004, 2009.
25
26
"Multi-Threaded Streaming Pipeline For VTK" by Huy T. Vo and Claudio
27
T. Silva, SCI Institute, University of Utah, Technical Report
28
#UUSCI-2009-005, 2009.
29
-------------------------------------------------------------------------*/
47
#ifndef __vtkExecutionScheduler_h
48
#define __vtkExecutionScheduler_h
49
50
#include "
vtkObject.h
"
51
#include "
vtkExecutionSchedulerManager.h
"
// For singleton instantiation/cleanup
52
53
class
vtkExecutive
;
54
class
vtkComputingResources
;
55
class
vtkMultiThreader
;
56
class
vtkMutexLock
;
57
class
vtkThreadMessager
;
58
class
vtkInformation
;
59
class
vtkInformationIntegerKey
;
60
class
vtkExecutiveCollection
;
61
62
class
VTK_FILTERING_EXPORT
vtkExecutionScheduler
:
public
vtkObject
63
{
64
public
:
65
static
vtkExecutionScheduler
*
New
();
66
vtkTypeMacro(
vtkExecutionScheduler
,
vtkObject
);
67
void
PrintSelf
(ostream &os,
vtkIndent
indent);
68
70
static
vtkExecutionScheduler
*GetGlobalScheduler();
71
73
static
vtkInformationIntegerKey
* TASK_PRIORITY();
74
78
void
Schedule(
vtkExecutiveCollection
*execs,
vtkInformation
*
info
);
79
83
void
SchedulePropagate(
vtkExecutiveCollection
*execs,
vtkInformation
*
info
);
84
87
void
WaitUntilDone(
vtkExecutiveCollection
*execs);
88
91
void
WaitUntilReleased(
vtkExecutiveCollection
*execs);
92
94
void
WaitUntilAllDone();
95
99
void
WaitForTaskDone(
vtkExecutive
*exec);
100
103
void
WaitForInputsReleased(
vtkExecutive
*exec);
104
107
vtkThreadMessager
* GetTaskDoneMessager(
vtkExecutive
*exec);
108
111
vtkThreadMessager
* GetInputsReleasedMessager(
vtkExecutive
*exec);
112
115
vtkMutexLock
* GetInputsReleasedLock(
vtkExecutive
*exec);
116
118
void
ReleaseResources(
vtkExecutive
*exec);
119
121
void
ReacquireResources(
vtkExecutive
*exec);
122
125
void
RescheduleNetwork(
vtkExecutive
*sink);
126
129
void
RescheduleFrom(
vtkExecutive
*sink,
vtkComputingResources
*resources);
130
131
protected
:
132
vtkExecutionScheduler
();
133
~
vtkExecutionScheduler
();
134
135
vtkComputingResources
*
Resources
;
136
vtkThreadMessager
*
ScheduleMessager
;
137
vtkThreadMessager
*
ResourceMessager
;
138
vtkMutexLock
*
ScheduleLock
;
139
vtkMultiThreader
*
ScheduleThreader
;
140
int
ScheduleThreadId
;
141
142
//BTX
143
class
implementation;
144
implementation*
const
Implementation
;
145
friend
class
implementation;
146
149
friend
void
* vtkExecutionScheduler_ScheduleThread(
void
*
data
);
150
153
friend
void
* vtkExecutionScheduler_ExecuteThread(
void
*
data
);
154
155
//ETX
156
158
159
static
void
ClassInitialize();
160
static
void
ClassFinalize();
161
friend
class
vtkExecutionSchedulerManager
;
163
164
private
:
165
vtkExecutionScheduler
(
const
vtkExecutionScheduler
&);
// Not implemented.
166
void
operator=(
const
vtkExecutionScheduler
&);
// Not implemented.
167
168
};
169
170
#endif
Generated on Wed Nov 21 2012 21:33:45 for VTK by
1.8.2