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
32class vtkPPainterCommunicatorInternals;
33class vtkMPICommunicatorOpaqueComm;
34
35class VTKRENDERINGPARALLELLIC_EXPORT vtkPPainterCommunicator : public vtkPainterCommunicator
36{
37public:
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);
97
105 void SubsetCommunicator(vtkMPICommunicatorOpaqueComm *comm, int include);
106
111 static vtkMPICommunicatorOpaqueComm *GetGlobalCommunicator();
112
113private:
114 // PImpl for MPI datatypes
115 vtkPPainterCommunicatorInternals *Internals;
116};
117
118#endif
119// VTK-HeaderTest-Exclude: vtkPPainterCommunicator.h
static vtkMPICommunicatorOpaqueComm * GetGlobalCommunicator()
Get VTK's world communicator.
virtual bool GetIsNull()
virtual int GetWorldSize()
vtkPPainterCommunicator & operator=(const vtkPPainterCommunicator &other)
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 a bout the world communicator.
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 inforrmation 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.