VTK  9.3.1
vtkExtentTranslator.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
16 #ifndef vtkExtentTranslator_h
17 #define vtkExtentTranslator_h
18 
19 #include "vtkCommonExecutionModelModule.h" // For export macro
20 #include "vtkObject.h"
21 
22 VTK_ABI_NAMESPACE_BEGIN
25 
26 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkExtentTranslator : public vtkObject
27 {
28 public:
29  static vtkExtentTranslator* New();
30 
32  void PrintSelf(ostream& os, vtkIndent indent) override;
33 
35 
39  vtkSetVector6Macro(WholeExtent, int);
40  vtkGetVector6Macro(WholeExtent, int);
41  vtkSetVector6Macro(Extent, int);
42  vtkGetVector6Macro(Extent, int);
43  vtkSetMacro(Piece, int);
44  vtkGetMacro(Piece, int);
45  vtkSetMacro(NumberOfPieces, int);
46  vtkGetMacro(NumberOfPieces, int);
47  vtkSetMacro(GhostLevel, int);
48  vtkGetMacro(GhostLevel, int);
50 
52 
59  virtual int PieceToExtent();
60  virtual int PieceToExtentByPoints();
61  virtual int PieceToExtentThreadSafe(int piece, int numPieces, int ghostLevel, int* wholeExtent,
62  int* resultExtent, int splitMode, int byPoints);
64 
76  vtkGetMacro(SplitMode, int);
77 
85  void SetSplitPath(int len, int* splitpath);
86 
87  // Don't change the numbers here - they are used in the code
88  // to indicate array indices.
89  enum Modes
90  {
91  X_SLAB_MODE = 0,
92  Y_SLAB_MODE = 1,
93  Z_SLAB_MODE = 2,
94  BLOCK_MODE = 3
95  };
96 
101  static vtkInformationIntegerRequestKey* UPDATE_SPLIT_MODE();
102 
103 protected:
105  ~vtkExtentTranslator() override;
106 
107  static vtkInformationIntegerKey* DATA_SPLIT_MODE();
108 
109  friend class vtkInformationSplitModeRequestKey;
110 
112 
117  int SplitExtent(int piece, int numPieces, int* extent, int splitMode);
118  int SplitExtentByPoints(int piece, int numPieces, int* extent, int splitMode);
120 
121  int Piece;
124  int Extent[6];
125  int WholeExtent[6];
127 
128  int* SplitPath;
129  int SplitLen;
130 
131 private:
132  vtkExtentTranslator(const vtkExtentTranslator&) = delete;
133  void operator=(const vtkExtentTranslator&) = delete;
134 };
135 
136 VTK_ABI_NAMESPACE_END
137 #endif
void SetSplitModeToBlock()
How should the streamer break up extents.
abstract base class for most VTK objects
Definition: vtkObject.h:51
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Generates a structured extent from unstructured.
a simple class to control print indentation
Definition: vtkIndent.h:28
Key for integer values in vtkInformation.
std::map< DataSetType, DataSet > Piece
Definition: VTXTypes.h:43
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
key that can used to request integer values from the pipeline vtkInformationIntegerRequestKey is a vt...