VTK: Common/ExecutionModel/vtkExtentSplitter.h Source File

| VTK 9.3.1

vtkExtentSplitter.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
17 #ifndef vtkExtentSplitter_h
18 #define vtkExtentSplitter_h
19
20 #include "vtkCommonExecutionModelModule.h" // For export macro
21 #include "vtkObject.h"
22
23 VTK_ABI_NAMESPACE_BEGIN
24 class vtkExtentSplitterInternals;
25
26 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkExtentSplitter : public vtkObject
27 {
28 public:
29 vtkTypeMacro(vtkExtentSplitter, vtkObject);
30 void PrintSelf(ostream& os, vtkIndent indent) override;
31 static vtkExtentSplitter* New();
32
34
39 void AddExtentSource(int id, int priority, int x0, int x1, int y0, int y1, int z0, int z1);
40 void AddExtentSource(int id, int priority, int* extent);
41 void RemoveExtentSource(int id);
42 void RemoveAllExtentSources();
44
46
50 void AddExtent(int x0, int x1, int y0, int y1, int z0, int z1);
51 void AddExtent(int* extent);
53
60 int ComputeSubExtents();
61
67 int GetNumberOfSubExtents();
68
70
76 int* GetSubExtent(int index) VTK_SIZEHINT(6);
77 void GetSubExtent(int index, int* extent);
79
85 int GetSubExtentSource(int index);
86
88
95 vtkGetMacro(PointMode, vtkTypeBool);
96 vtkSetMacro(PointMode, vtkTypeBool);
97 vtkBooleanMacro(PointMode, vtkTypeBool);
99
100 protected:
101 vtkExtentSplitter();
102 ~vtkExtentSplitter() override;
103
104 // Internal utility methods.
105 void SplitExtent(int* extent, int* subextent);
106 int IntersectExtents(const int* extent1, const int* extent2, int* result);
107 int Min(int a, int b);
108 int Max(int a, int b);
109
110 // Internal implementation data.
111 vtkExtentSplitterInternals* Internal;
112
113 // On if reading only all points (but not always all cells) is
114 // necessary. Used for reading volumes of planar slices storing
115 // only point data.
116 vtkTypeBool PointMode;
117
118 private:
119 vtkExtentSplitter(const vtkExtentSplitter&) = delete;
120 void operator=(const vtkExtentSplitter&) = delete;
121 };
122
123 VTK_ABI_NAMESPACE_END
124 #endif
vtkExtentSplitter
Split an extent across other extents.
Definition: vtkExtentSplitter.h:27
vtkExtentSplitter::~vtkExtentSplitter
~vtkExtentSplitter() override
vtkExtentSplitter::Internal
vtkExtentSplitterInternals * Internal
Definition: vtkExtentSplitter.h:111
vtkExtentSplitter::Min
int Min(int a, int b)
vtkExtentSplitter::RemoveExtentSource
void RemoveExtentSource(int id)
Add/Remove a source providing the given extent.
vtkExtentSplitter::New
static vtkExtentSplitter * New()
vtkExtentSplitter::SplitExtent
void SplitExtent(int *extent, int *subextent)
vtkExtentSplitter::AddExtent
void AddExtent(int *extent)
Add an extent to the queue of extents to be split among the available sources.
vtkExtentSplitter::ComputeSubExtents
int ComputeSubExtents()
Split the extents currently in the queue among the available sources.
vtkExtentSplitter::GetSubExtent
int * GetSubExtent(int index)
Get the sub-extent associated with the given index.
vtkExtentSplitter::Max
int Max(int a, int b)
vtkExtentSplitter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkExtentSplitter::AddExtent
void AddExtent(int x0, int x1, int y0, int y1, int z0, int z1)
Add an extent to the queue of extents to be split among the available sources.
vtkExtentSplitter::PointMode
vtkTypeBool PointMode
Definition: vtkExtentSplitter.h:116
vtkExtentSplitter::AddExtentSource
void AddExtentSource(int id, int priority, int x0, int x1, int y0, int y1, int z0, int z1)
Add/Remove a source providing the given extent.
vtkExtentSplitter::AddExtentSource
void AddExtentSource(int id, int priority, int *extent)
Add/Remove a source providing the given extent.
vtkExtentSplitter::GetSubExtentSource
int GetSubExtentSource(int index)
Get the id of the source from which the sub-extent associated with the given index should be read.
vtkExtentSplitter::vtkExtentSplitter
vtkExtentSplitter()
vtkExtentSplitter::IntersectExtents
int IntersectExtents(const int *extent1, const int *extent2, int *result)
vtkExtentSplitter::GetSubExtent
void GetSubExtent(int index, int *extent)
Get the sub-extent associated with the given index.
vtkExtentSplitter::GetNumberOfSubExtents
int GetNumberOfSubExtents()
Get the number of sub-extents into which the original set of extents have been split across the avail...
vtkExtentSplitter::RemoveAllExtentSources
void RemoveAllExtentSources()
Add/Remove a source providing the given extent.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:61
vtkX3D::priority
@ priority
Definition: vtkX3D.h:450
vtkX3D::extent
@ extent
Definition: vtkX3D.h:345
vtkX3D::index
@ index
Definition: vtkX3D.h:246
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
vtkObject.h
VTK_SIZEHINT
#define VTK_SIZEHINT(...)
Definition: vtkWrappingHints.h:36