VTK
vtkThreadedStreamingPipeline.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkThreadedStreamingPipeline.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  -------------------------------------------------------------------------*/
46 #ifndef __vtkThreadedStreamingPipeline_h
47 #define __vtkThreadedStreamingPipeline_h
48 
49 #include "vtkCompositeDataPipeline.h"
50 
51 class vtkComputingResources;
53 class vtkExecutiveCollection;
54 
55 class VTK_FILTERING_EXPORT vtkThreadedStreamingPipeline : public vtkCompositeDataPipeline
56 {
57 public:
58  static vtkThreadedStreamingPipeline* New();
59  vtkTypeMacro(vtkThreadedStreamingPipeline,vtkCompositeDataPipeline);
60  void PrintSelf(ostream &os, vtkIndent indent);
61 
63  static vtkInformationIntegerKey* AUTO_PROPAGATE();
64 
66  static vtkInformationObjectBaseKey* EXTRA_INFORMATION();
67 
68 //BTX
70 
72  enum
73  {
74  PROCESSING_UNIT_NONE = 0,
75  PROCESSING_UNIT_CPU = 1,
76  PROCESSING_UNIT_GPU = 2
77  };
78 //ETX
80 
82  static void SetMultiThreadedEnabled(bool enabled);
83 
85  static void SetAutoPropagatePush(bool enabled);
86 
89  static void Pull(vtkExecutiveCollection *execs);
90 
93  static void Pull(vtkExecutiveCollection *execs, vtkInformation *info);
94 
97  static void Push(vtkExecutiveCollection *execs);
98 
101  static void Push(vtkExecutiveCollection *execs, vtkInformation *info);
102 
105  static void Pull(vtkExecutive *exec);
106 
109  static void Pull(vtkExecutive *exec, vtkInformation *info);
110 
113  static void Push(vtkExecutive *exec);
114 
117  static void Push(vtkExecutive *exec, vtkInformation *info);
118 
120  void Pull();
121 
123  void Pull(vtkInformation *info);
124 
126  void Push();
127 
129  void Push(vtkInformation *info);
130 
132  void ReleaseInputs();
133 
135 
137  virtual int ProcessRequest(vtkInformation* request,
138  vtkInformationVector** inInfo,
139  vtkInformationVector* outInfo);
141 
143  int ForceUpdateData(int processingUnit, vtkInformation *info);
144 
146  void UpdateRequestDataTimeFromSource();
147 
149  vtkComputingResources *GetResources();
150 
154  vtkComputingResources *Resources;
156 
157 protected:
160 
161  virtual int ForwardUpstream(vtkInformation* request);
162  virtual int ForwardUpstream(int i, int j, vtkInformation* request);
163 
164 private:
166  void operator=(const vtkThreadedStreamingPipeline&); // Not implemented.
167 };
168 
169 #endif
Executive supporting multi-threads.
Store vtkAlgorithm input/output information.
#define VTK_FILTERING_EXPORT
Scheduling execution with thread/computing resources distributing.
a simple class to control print indentation
Definition: vtkIndent.h:37
Key for integer values in vtkInformation.
Key for vtkObjectBase values.
Store zero or more vtkInformation instances.