VTK  9.3.20240724
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
22VTK_ABI_NAMESPACE_BEGIN
25
26class VTKCOMMONEXECUTIONMODEL_EXPORT vtkExtentTranslator : public vtkObject
27{
28public:
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
102
103protected:
106
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
130
131private:
133 void operator=(const vtkExtentTranslator&) = delete;
134};
135
136VTK_ABI_NAMESPACE_END
137#endif
Generates a structured extent from unstructured.
int SplitExtentByPoints(int piece, int numPieces, int *extent, int splitMode)
Returns 0 if no data exist for a piece.
static vtkInformationIntegerRequestKey * UPDATE_SPLIT_MODE()
Key used to request a particular split mode.
void SetSplitModeToBlock()
How should the streamer break up extents.
int SplitExtent(int piece, int numPieces, int *extent, int splitMode)
Returns 0 if no data exist for a piece.
virtual int PieceToExtentThreadSafe(int piece, int numPieces, int ghostLevel, int *wholeExtent, int *resultExtent, int splitMode, int byPoints)
These are the main methods that should be called.
static vtkExtentTranslator * New()
virtual int PieceToExtentByPoints()
These are the main methods that should be called.
void SetSplitPath(int len, int *splitpath)
By default the translator creates N structured subextents by repeatedly splitting the largest current...
virtual int PieceToExtent()
These are the main methods that should be called.
static vtkInformationIntegerKey * DATA_SPLIT_MODE()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkExtentTranslator() override
a simple class to control print indentation
Definition vtkIndent.h:108
Key for integer values in vtkInformation.
key that can used to request integer values from the pipeline vtkInformationIntegerRequestKey is a vt...
abstract base class for most VTK objects
Definition vtkObject.h:162