00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00043 #ifndef __vtkThreadedStreamingPipeline_h
00044 #define __vtkThreadedStreamingPipeline_h
00045
00046 #include "vtkCompositeDataPipeline.h"
00047
00048 class vtkComputingResources;
00049 class vtkExecutionScheduler;
00050 class vtkExecutiveCollection;
00051
00052 class VTK_FILTERING_EXPORT vtkThreadedStreamingPipeline : public vtkCompositeDataPipeline
00053 {
00054 public:
00055 static vtkThreadedStreamingPipeline* New();
00056 vtkTypeMacro(vtkThreadedStreamingPipeline,vtkCompositeDataPipeline);
00057 void PrintSelf(ostream &os, vtkIndent indent);
00058
00060 static vtkInformationIntegerKey* AUTO_PROPAGATE();
00061
00063 static vtkInformationObjectBaseKey* EXTRA_INFORMATION();
00064
00066
00068 enum
00069 {
00070 PROCESSING_UNIT_NONE = 0,
00071 PROCESSING_UNIT_CPU = 1,
00072 PROCESSING_UNIT_GPU = 2
00073 };
00074
00076
00078 static void SetMultiThreadedEnabled(bool enabled);
00079
00081 static void SetAutoPropagatePush(bool enabled);
00082
00085 static void Pull(vtkExecutiveCollection *execs);
00086
00089 static void Pull(vtkExecutiveCollection *execs, vtkInformation *info);
00090
00093 static void Push(vtkExecutiveCollection *execs);
00094
00097 static void Push(vtkExecutiveCollection *execs, vtkInformation *info);
00098
00101 static void Pull(vtkExecutive *exec);
00102
00105 static void Pull(vtkExecutive *exec, vtkInformation *info);
00106
00109 static void Push(vtkExecutive *exec);
00110
00113 static void Push(vtkExecutive *exec, vtkInformation *info);
00114
00116 void Pull();
00117
00119 void Pull(vtkInformation *info);
00120
00122 void Push();
00123
00125 void Push(vtkInformation *info);
00126
00128 void ReleaseInputs();
00129
00131
00133 virtual int ProcessRequest(vtkInformation* request,
00134 vtkInformationVector** inInfo,
00135 vtkInformationVector* outInfo);
00137
00139 int ForceUpdateData(int processingUnit, vtkInformation *info);
00140
00142 void UpdateRequestDataTimeFromSource();
00143
00145 vtkComputingResources *GetResources();
00146
00147 float LastDataRequestTime;
00148 float LastDataRequestTimeFromSource;
00149 vtkInformation *ForceDataRequest;
00150 vtkComputingResources *Resources;
00151 vtkExecutionScheduler *Scheduler;
00152
00153 protected:
00154 vtkThreadedStreamingPipeline();
00155 ~vtkThreadedStreamingPipeline();
00156
00157 virtual int ForwardUpstream(vtkInformation* request);
00158 virtual int ForwardUpstream(int i, int j, vtkInformation* request);
00159
00160 private:
00161 vtkThreadedStreamingPipeline(const vtkThreadedStreamingPipeline&);
00162 void operator=(const vtkThreadedStreamingPipeline&);
00163 };
00164
00165 #endif