VTK: Rendering/ParallelLIC/vtkPPainterCommunicator.h Source File

| VTK 9.3.1

vtkPPainterCommunicator.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
14 #ifndef vtkPPainterCommunicator_h
15 #define vtkPPainterCommunicator_h
16
17 #include "vtkPainterCommunicator.h"
18 #include "vtkRenderingParallelLICModule.h" // for export macro
19
20 VTK_ABI_NAMESPACE_BEGIN
21 class vtkPPainterCommunicatorInternals;
22 class vtkMPICommunicatorOpaqueComm;
23
24 class VTKRENDERINGPARALLELLIC_EXPORT vtkPPainterCommunicator : public vtkPainterCommunicator
25 {
26 public:
27 vtkPPainterCommunicator();
28 ~vtkPPainterCommunicator() override;
29
33 vtkPPainterCommunicator(const vtkPPainterCommunicator& other)
34 : vtkPainterCommunicator(other)
35 {
36 this->Copy(&other, false);
37 }
38
39 vtkPPainterCommunicator& operator=(const vtkPPainterCommunicator& other)
40 {
41 this->Copy(&other, false);
42 return *this;
43 }
44
48 void Copy(const vtkPainterCommunicator* other, bool ownership) override;
49
53 void Duplicate(const vtkPainterCommunicator* other) override;
54
56
59 int GetRank() override;
60 int GetSize() override;
61 bool GetIsNull() override;
63
65
68 int GetWorldRank() override;
69 int GetWorldSize() override;
71
75 bool GetMPIInitialized() override { return vtkPPainterCommunicator::MPIInitialized(); }
76 bool GetMPIFinalized() override { return vtkPPainterCommunicator::MPIFinalized(); }
77
78 static bool MPIInitialized();
79 static bool MPIFinalized();
80
82
88 void SetCommunicator(vtkMPICommunicatorOpaqueComm* comm);
89 void GetCommunicator(vtkMPICommunicatorOpaqueComm* comm);
90 void* GetCommunicator();
92
100 void SubsetCommunicator(vtkMPICommunicatorOpaqueComm* comm, int include);
101
106 static vtkMPICommunicatorOpaqueComm* GetGlobalCommunicator();
107
108 private:
109 // PImpl for MPI datatypes
110 vtkPPainterCommunicatorInternals* Internals;
111 };
112
113 VTK_ABI_NAMESPACE_END
114 #endif
115 // VTK-HeaderTest-Exclude: vtkPPainterCommunicator.h
vtkPPainterCommunicator
Definition: vtkPPainterCommunicator.h:25
vtkPPainterCommunicator::GetSize
int GetSize() override
Query MPI for information about the communicator.
vtkPPainterCommunicator::GetGlobalCommunicator
static vtkMPICommunicatorOpaqueComm * GetGlobalCommunicator()
Get VTK's world communicator.
vtkPPainterCommunicator::GetCommunicator
void * GetCommunicator()
Set/Get the communicator.
vtkPPainterCommunicator::GetMPIFinalized
bool GetMPIFinalized() override
Definition: vtkPPainterCommunicator.h:76
vtkPPainterCommunicator::GetWorldSize
int GetWorldSize() override
Query MPI for information about the world communicator.
vtkPPainterCommunicator::Copy
void Copy(const vtkPainterCommunicator *other, bool ownership) override
Copy the communicator.
vtkPPainterCommunicator::vtkPPainterCommunicator
vtkPPainterCommunicator(const vtkPPainterCommunicator &other)
Copier and assignment operators.
Definition: vtkPPainterCommunicator.h:33
vtkPPainterCommunicator::Duplicate
void Duplicate(const vtkPainterCommunicator *other) override
Duplicate the communicator.
vtkPPainterCommunicator::operator=
vtkPPainterCommunicator & operator=(const vtkPPainterCommunicator &other)
Definition: vtkPPainterCommunicator.h:39
vtkPPainterCommunicator::MPIFinalized
static bool MPIFinalized()
vtkPPainterCommunicator::vtkPPainterCommunicator
vtkPPainterCommunicator()
vtkPPainterCommunicator::SubsetCommunicator
void SubsetCommunicator(vtkMPICommunicatorOpaqueComm *comm, int include)
Creates a new communicator with/without the calling processes as indicated by the passed in flag,...
vtkPPainterCommunicator::MPIInitialized
static bool MPIInitialized()
vtkPPainterCommunicator::SetCommunicator
void SetCommunicator(vtkMPICommunicatorOpaqueComm *comm)
Set/Get the communicator.
vtkPPainterCommunicator::GetRank
int GetRank() override
Query MPI for information about the communicator.
vtkPPainterCommunicator::GetCommunicator
void GetCommunicator(vtkMPICommunicatorOpaqueComm *comm)
Set/Get the communicator.
vtkPPainterCommunicator::GetWorldRank
int GetWorldRank() override
Query MPI for information about the world communicator.
vtkPPainterCommunicator::GetMPIInitialized
bool GetMPIInitialized() override
Query MPI state.
Definition: vtkPPainterCommunicator.h:75
vtkPPainterCommunicator::GetIsNull
bool GetIsNull() override
Query MPI for information about the communicator.
vtkPPainterCommunicator::~vtkPPainterCommunicator
~vtkPPainterCommunicator() override
vtkPainterCommunicator
A communicator that can safely be used inside a painter.
Definition: vtkPainterCommunicator.h:20
vtkPainterCommunicator::Copy
virtual void Copy(const vtkPainterCommunicator *, bool)
Copy the communicator, the flag indicates if ownership should be assumed.
Definition: vtkPainterCommunicator.h:42
vtkPainterCommunicator.h