VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkPPainterCommunicator.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00025 #ifndef __vtkPPainterCommunicator_h 00026 #define __vtkPPainterCommunicator_h 00027 00028 #include "vtkPainterCommunicator.h" 00029 #include "vtkRenderingParallelLICModule.h" // for export macro 00030 00031 class vtkPPainterCommunicatorInternals; 00032 class vtkMPICommunicatorOpaqueComm; 00033 00034 class VTKRENDERINGPARALLELLIC_EXPORT vtkPPainterCommunicator : public vtkPainterCommunicator 00035 { 00036 public: 00037 vtkPPainterCommunicator(); 00038 virtual ~vtkPPainterCommunicator(); 00039 00041 00042 vtkPPainterCommunicator(const vtkPPainterCommunicator &other) : vtkPainterCommunicator(other) 00043 { this->Copy(&other, false); } 00045 00046 vtkPPainterCommunicator &operator=(const vtkPPainterCommunicator &other) 00047 { this->Copy(&other, false); return *this; } 00048 00050 virtual void Copy(const vtkPainterCommunicator *other, bool ownership); 00051 00053 virtual void Duplicate(const vtkPainterCommunicator *other); 00054 00056 00057 virtual int GetRank(); 00058 virtual int GetSize(); 00059 virtual bool GetIsNull(); 00061 00063 00064 virtual int GetWorldRank(); 00065 virtual int GetWorldSize(); 00067 00069 00070 virtual bool GetMPIInitialized(){ return this->MPIInitialized(); } 00071 virtual bool GetMPIFinalized(){ return this->MPIFinalized(); } 00073 00074 static bool MPIInitialized(); 00075 static bool MPIFinalized(); 00076 00078 00081 void SetCommunicator(vtkMPICommunicatorOpaqueComm *comm); 00082 void GetCommunicator(vtkMPICommunicatorOpaqueComm *comm); 00083 void *GetCommunicator(); 00085 00091 void SubsetCommunicator(vtkMPICommunicatorOpaqueComm *comm, int include); 00092 00095 static vtkMPICommunicatorOpaqueComm *GetGlobalCommunicator(); 00096 00097 private: 00098 // PImpl for MPI datatypes 00099 vtkPPainterCommunicatorInternals *Internals; 00100 }; 00101 00102 #endif 00103 // VTK-HeaderTest-Exclude: vtkPPainterCommunicator.h