VTK
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  { this->Copy(&other, false); }
46 
48  { this->Copy(&other, false); return *this; }
49 
53  virtual void Copy(const vtkPainterCommunicator *other, bool ownership);
54 
58  virtual void Duplicate(const vtkPainterCommunicator *other);
59 
61 
64  virtual int GetRank();
65  virtual int GetSize();
66  virtual bool GetIsNull();
68 
70 
73  virtual int GetWorldRank();
74  virtual int GetWorldSize();
76 
80  virtual bool GetMPIInitialized(){ return this->MPIInitialized(); }
81  virtual bool GetMPIFinalized(){ return this->MPIFinalized(); }
82 
83  static bool MPIInitialized();
84  static bool MPIFinalized();
85 
87 
93  void SetCommunicator(vtkMPICommunicatorOpaqueComm *comm);
94  void GetCommunicator(vtkMPICommunicatorOpaqueComm *comm);
95  void *GetCommunicator();
97 
105  void SubsetCommunicator(vtkMPICommunicatorOpaqueComm *comm, int include);
106 
111  static vtkMPICommunicatorOpaqueComm *GetGlobalCommunicator();
112 
113 private:
114  // PImpl for MPI datatypes
115  vtkPPainterCommunicatorInternals *Internals;
116 };
117 
118 #endif
119 // 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.