VTK  9.7.1
vtkStreamingDemandDrivenPipeline.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
20 #ifndef vtkStreamingDemandDrivenPipeline_h
21 #define vtkStreamingDemandDrivenPipeline_h
22 
23 #include "vtkCommonExecutionModelModule.h" // For export macro
25 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
26 
27 #define VTK_UPDATE_EXTENT_COMBINE 1
28 #define VTK_UPDATE_EXTENT_REPLACE 2
29 
30 VTK_ABI_NAMESPACE_BEGIN
41 
42 class VTKCOMMONEXECUTIONMODEL_EXPORT VTK_MARSHALAUTO vtkStreamingDemandDrivenPipeline
44 {
45 public:
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
55  vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
56 
58 
61  vtkTypeBool Update() override;
62  vtkTypeBool Update(int port) override;
63  virtual vtkTypeBool UpdateWholeExtent();
65 
88  virtual vtkTypeBool Update(int port, vtkInformationVector* requests);
89 
95  int PropagateUpdateExtent(int outputPort);
96 
98 
102  int PropagateTime(int outputPort);
103  int UpdateTimeDependentInformation(int outputPort);
105 
107 
112  static int SetWholeExtent(vtkInformation*, VTK_FUTURE_CONST int extent[6]);
113  static void GetWholeExtent(vtkInformation*, int extent[6]);
114  static int* GetWholeExtent(vtkInformation*) VTK_SIZEHINT(6);
116 
118 
126  int SetRequestExactExtent(int port, int flag);
127  int GetRequestExactExtent(int port);
129 
134  static vtkInformationRequestKey* REQUEST_UPDATE_EXTENT();
135 
140  static vtkInformationRequestKey* REQUEST_UPDATE_TIME();
145  static vtkInformationRequestKey* REQUEST_TIME_DEPENDENT_INFORMATION();
146 
152  static vtkInformationIntegerKey* CONTINUE_EXECUTING();
153 
158  static vtkInformationIntegerKey* UPDATE_EXTENT_INITIALIZED();
162  static vtkInformationIntegerVectorKey* UPDATE_EXTENT();
166  static vtkInformationIntegerKey* UPDATE_PIECE_NUMBER();
170  static vtkInformationIntegerKey* UPDATE_NUMBER_OF_PIECES();
174  static vtkInformationIntegerKey* UPDATE_NUMBER_OF_GHOST_LEVELS();
175 
181  static vtkInformationIntegerVectorKey* COMBINED_UPDATE_EXTENT();
182 
187  static vtkInformationIntegerVectorKey* WHOLE_EXTENT();
188 
195  static vtkInformationIntegerKey* UNRESTRICTED_UPDATE_EXTENT();
196 
201  static vtkInformationIntegerKey* EXACT_EXTENT();
202 
207  static vtkInformationDoubleVectorKey* TIME_STEPS();
208 
213  static vtkInformationDoubleVectorKey* TIME_RANGE();
214 
219  static vtkInformationDoubleKey* UPDATE_TIME_STEP();
220 
227  static vtkInformationIntegerKey* TIME_DEPENDENT_INFORMATION();
228 
233  static vtkInformationDoubleVectorKey* BOUNDS();
234 
248  static vtkInformationIntegerKey* NO_PRIOR_TEMPORAL_ACCESS();
249 
254  {
259  NO_PRIOR_TEMPORAL_ACCESS_CONTINUE = 1,
260 
266  NO_PRIOR_TEMPORAL_ACCESS_RESET = 2
267  };
268 
270 
273  static void GetUpdateExtent(vtkInformation*, int extent[6]);
274  static int* GetUpdateExtent(vtkInformation*);
277 
282  static int GetUpdatePiece(vtkInformation*);
283  static int GetUpdateNumberOfPieces(vtkInformation*);
284  static int GetUpdateGhostLevel(vtkInformation*);
286 
287 protected:
290 
301  static vtkInformationDoubleKey* PREVIOUS_UPDATE_TIME_STEP();
302 
303  // Does the time request correspond to what is in the data?
304  // Returns 0 if yes, 1 otherwise.
305  virtual int NeedToExecuteBasedOnTime(vtkInformation* outInfo, vtkDataObject* dataObject);
306 
307  // Setup default information on the output after the algorithm
308  // executes information.
309  int ExecuteInformation(vtkInformation* request, vtkInformationVector** inInfoVec,
310  vtkInformationVector* outInfoVec) override;
311 
312  // Copy information for the given request.
314  vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec) override;
315 
316  // Helper to check output information before propagating it to inputs.
317  virtual int VerifyOutputInformation(
318  int outputPort, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
319 
320  // Override this check to account for update extent.
321  int NeedToExecuteData(
322  int outputPort, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec) override;
323 
324  // Override these to handle the continue-executing option.
325  void ExecuteDataStart(vtkInformation* request, vtkInformationVector** inInfoVec,
326  vtkInformationVector* outInfoVec) override;
327  void ExecuteDataEnd(vtkInformation* request, vtkInformationVector** inInfoVec,
328  vtkInformationVector* outInfoVec) override;
329 
330  // Override this to handle cropping and ghost levels.
331  void MarkOutputsGenerated(vtkInformation* request, vtkInformationVector** inInfoVec,
332  vtkInformationVector* outInfoVec) override;
333 
334  // Remove update/whole extent when resetting pipeline information.
335  void ResetPipelineInformation(int port, vtkInformation*) override;
336 
337  // Flag for when an algorithm returns with CONTINUE_EXECUTING in the
338  // request.
340 
345 
346  // did the most recent PUE do anything ?
348 
349 private:
351  void operator=(const vtkStreamingDemandDrivenPipeline&) = delete;
352 };
353 
354 VTK_ABI_NAMESPACE_END
355 #endif
Key for unsigned long values in vtkInformation.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
NO_PRIOR_TEMPORAL_ACCESS_STATES
States that the information key NO_PRIOR_TEMPORAL_ACCESS can have.
Store vtkAlgorithm input/output information.
virtual void MarkOutputsGenerated(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
Key for string values in vtkInformation.
vtkTypeBool Update() override
Bring the algorithm's outputs up-to-date.
virtual void ExecuteDataStart(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
virtual int ExecuteInformation(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
int vtkTypeBool
Definition: vtkABI.h:64
Key for double vector values.
a simple class to control print indentation
Definition: vtkIndent.h:28
Key for pointer to pointer.
Key for integer values in vtkInformation.
Executive supporting on-demand execution.
Iterates over keys of an information object.
virtual void CopyDefaultInformation(vtkInformation *request, int direction, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Key for vtkObjectBase values.
virtual int NeedToExecuteData(int outputPort, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
void ResetPipelineInformation(int, vtkInformation *) override
#define VTK_SIZEHINT(...)
static vtkDemandDrivenPipeline * New()
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo) override
Generalized interface for asking the executive to fulfill update requests.
Key for double values in vtkInformation.
Store zero or more vtkInformation instances.
#define VTK_MARSHALAUTO
Executive supporting partial updates.
virtual void ExecuteDataEnd(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
general representation of visualization data
Definition: vtkDataObject.h:55
Key for vtkIdType values in vtkInformation.