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
00046 #ifndef __vtkThreadedStreamingPipeline_h
00047 #define __vtkThreadedStreamingPipeline_h
00048
00049 #include "vtkCompositeDataPipeline.h"
00050
00051 class vtkComputingResources;
00052 class vtkExecutionScheduler;
00053 class vtkExecutiveCollection;
00054
00055 class VTK_FILTERING_EXPORT vtkThreadedStreamingPipeline : public vtkCompositeDataPipeline
00056 {
00057 public:
00058 static vtkThreadedStreamingPipeline* New();
00059 vtkTypeMacro(vtkThreadedStreamingPipeline,vtkCompositeDataPipeline);
00060 void PrintSelf(ostream &os, vtkIndent indent);
00061
00063 static vtkInformationIntegerKey* AUTO_PROPAGATE();
00064
00066 static vtkInformationObjectBaseKey* EXTRA_INFORMATION();
00067
00068
00070
00072 enum
00073 {
00074 PROCESSING_UNIT_NONE = 0,
00075 PROCESSING_UNIT_CPU = 1,
00076 PROCESSING_UNIT_GPU = 2
00077 };
00078
00080
00082 static void SetMultiThreadedEnabled(bool enabled);
00083
00085 static void SetAutoPropagatePush(bool enabled);
00086
00089 static void Pull(vtkExecutiveCollection *execs);
00090
00093 static void Pull(vtkExecutiveCollection *execs, vtkInformation *info);
00094
00097 static void Push(vtkExecutiveCollection *execs);
00098
00101 static void Push(vtkExecutiveCollection *execs, vtkInformation *info);
00102
00105 static void Pull(vtkExecutive *exec);
00106
00109 static void Pull(vtkExecutive *exec, vtkInformation *info);
00110
00113 static void Push(vtkExecutive *exec);
00114
00117 static void Push(vtkExecutive *exec, vtkInformation *info);
00118
00120 void Pull();
00121
00123 void Pull(vtkInformation *info);
00124
00126 void Push();
00127
00129 void Push(vtkInformation *info);
00130
00132 void ReleaseInputs();
00133
00135
00137 virtual int ProcessRequest(vtkInformation* request,
00138 vtkInformationVector** inInfo,
00139 vtkInformationVector* outInfo);
00141
00143 int ForceUpdateData(int processingUnit, vtkInformation *info);
00144
00146 void UpdateRequestDataTimeFromSource();
00147
00149 vtkComputingResources *GetResources();
00150
00151 float LastDataRequestTime;
00152 float LastDataRequestTimeFromSource;
00153 vtkInformation *ForceDataRequest;
00154 vtkComputingResources *Resources;
00155 vtkExecutionScheduler *Scheduler;
00156
00157 protected:
00158 vtkThreadedStreamingPipeline();
00159 ~vtkThreadedStreamingPipeline();
00160
00161 virtual int ForwardUpstream(vtkInformation* request);
00162 virtual int ForwardUpstream(int i, int j, vtkInformation* request);
00163
00164 private:
00165 vtkThreadedStreamingPipeline(const vtkThreadedStreamingPipeline&);
00166 void operator=(const vtkThreadedStreamingPipeline&);
00167 };
00168
00169 #endif