VTK  9.0.1
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:
39  virtual ~vtkPPainterCommunicator();
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);
101  void* GetCommunicator();
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 void Copy(const vtkPainterCommunicator *, bool)
Copy the communicator, the flag indicates if ownership should be assumed.
vtkPPainterCommunicator & operator=(const vtkPPainterCommunicator &other)
virtual int GetRank()
Querry MPI about the communicator.
virtual void Duplicate(const vtkPainterCommunicator *)
Duplicate the communicator.
virtual bool GetMPIInitialized()
Querry MPI state.
virtual int GetWorldRank()
Querry MPI about the world communicator.
A communicator that can safely be used inside a painter.
vtkPPainterCommunicator(const vtkPPainterCommunicator &other)
Copier and assignment operators.