VTK  9.0.3
vtkPPainterCommunicator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPPainterCommunicator.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
26 #ifndef vtkPPainterCommunicator_h
27 #define vtkPPainterCommunicator_h
28 
29 #include "vtkPainterCommunicator.h"
30 #include "vtkRenderingParallelLICModule.h" // for export macro
31 
32 class vtkPPainterCommunicatorInternals;
33 class vtkMPICommunicatorOpaqueComm;
34 
35 class VTKRENDERINGPARALLELLIC_EXPORT vtkPPainterCommunicator : public vtkPainterCommunicator
36 {
37 public:
40 
45  : vtkPainterCommunicator(other)
46  {
47  this->Copy(&other, false);
48  }
49 
51  {
52  this->Copy(&other, false);
53  return *this;
54  }
55 
59  virtual void Copy(const vtkPainterCommunicator* other, bool ownership);
60 
64  virtual void Duplicate(const vtkPainterCommunicator* other);
65 
67 
70  virtual int GetRank();
71  virtual int GetSize();
72  virtual bool GetIsNull();
74 
76 
79  virtual int GetWorldRank();
80  virtual int GetWorldSize();
82 
86  virtual bool GetMPIInitialized() { return this->MPIInitialized(); }
87  virtual bool GetMPIFinalized() { return this->MPIFinalized(); }
88 
89  static bool MPIInitialized();
90  static bool MPIFinalized();
91 
93 
99  void SetCommunicator(vtkMPICommunicatorOpaqueComm* comm);
100  void GetCommunicator(vtkMPICommunicatorOpaqueComm* comm);
103 
111  void SubsetCommunicator(vtkMPICommunicatorOpaqueComm* comm, int include);
112 
117  static vtkMPICommunicatorOpaqueComm* GetGlobalCommunicator();
118 
119 private:
120  // PImpl for MPI datatypes
121  vtkPPainterCommunicatorInternals* Internals;
122 };
123 
124 #endif
125 // VTK-HeaderTest-Exclude: vtkPPainterCommunicator.h
virtual bool GetIsNull()
static vtkMPICommunicatorOpaqueComm * GetGlobalCommunicator()
Get VTK's world communicator.
virtual int GetWorldSize()
virtual void Copy(const vtkPainterCommunicator *other, bool ownership)
Copy the communicator.
vtkPPainterCommunicator(const vtkPPainterCommunicator &other)
Copier and assignment operators.
virtual int GetWorldRank()
Querry MPI for information about the world communicator.
vtkPPainterCommunicator & operator=(const vtkPPainterCommunicator &other)
virtual void Duplicate(const vtkPainterCommunicator *other)
Duplicate the communicator.
virtual bool GetMPIInitialized()
Querry MPI state.
static bool MPIFinalized()
void SubsetCommunicator(vtkMPICommunicatorOpaqueComm *comm, int include)
Creates a new communicator with/without the calling processes as indicated by the passed in flag,...
virtual int GetRank()
Querry MPI for information about the communicator.
static bool MPIInitialized()
void SetCommunicator(vtkMPICommunicatorOpaqueComm *comm)
Set/Get the communicator.
void GetCommunicator(vtkMPICommunicatorOpaqueComm *comm)
virtual ~vtkPPainterCommunicator()
A communicator that can safely be used inside a painter.
virtual void Copy(const vtkPainterCommunicator *, bool)
Copy the communicator, the flag indicates if ownership should be assumed.