VTK
vtkProcessGroup.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 /*=========================================================================
3 
4  Program: Visualization Toolkit
5  Module: vtkProcessGroup.h
6 
7  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
8  All rights reserved.
9  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
10 
11  This software is distributed WITHOUT ANY WARRANTY; without even
12  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13  PURPOSE. See the above copyright notice for more information.
14 
15 =========================================================================*/
16 /*----------------------------------------------------------------------------
17  Copyright (c) Sandia Corporation
18  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
19 ----------------------------------------------------------------------------*/
20 
47 #ifndef vtkProcessGroup_h
48 #define vtkProcessGroup_h
49 
50 #include "vtkParallelCoreModule.h" // For export macro
51 #include "vtkObject.h"
52 
54 class vtkCommunicator;
55 
57 {
58 public:
60  static vtkProcessGroup *New();
61  virtual void PrintSelf(ostream &os, vtkIndent indent);
62 
64 
68  void Initialize(vtkCommunicator *communicator);
70 
72 
75 
81  void SetCommunicator(vtkCommunicator *communicator);
82 
84 
86  vtkGetMacro(NumberOfProcessIds, int);
88 
93  int GetProcessId(int pos) { return this->ProcessIds[pos]; }
94 
98 
103  int FindProcessId(int processId);
104 
107  int AddProcessId(int processId);
108 
113  int RemoveProcessId(int processId);
114 
118 
121 
122 protected:
124  virtual ~vtkProcessGroup();
125 
128 
130 
131 private:
132  vtkProcessGroup(const vtkProcessGroup &); // Not implemented
133  void operator=(const vtkProcessGroup &); // Not implemented
134 };
135 
136 #endif //vtkProcessGroup_h
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkgl::group
GLboolean GLuint group
Definition: vtkgl.h:18647
vtkProcessGroup::NumberOfProcessIds
int NumberOfProcessIds
Definition: vtkProcessGroup.h:127
vtkCommunicator
Used to send/receive messages in a multiprocess environment.
Definition: vtkCommunicator.h:52
vtkProcessGroup::RemoveAllProcessIds
void RemoveAllProcessIds()
vtkProcessGroup::FindProcessId
int FindProcessId(int processId)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkProcessGroup::Initialize
void Initialize(vtkCommunicator *communicator)
vtkProcessGroup::GetProcessId
int GetProcessId(int pos)
Definition: vtkProcessGroup.h:93
vtkMultiProcessController
Multiprocessing communication superclass.
Definition: vtkMultiProcessController.h:85
vtkProcessGroup::ProcessIds
int * ProcessIds
Definition: vtkProcessGroup.h:126
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkProcessGroup::vtkProcessGroup
vtkProcessGroup()
vtkParallelCoreModule.h
vtkProcessGroup::~vtkProcessGroup
virtual ~vtkProcessGroup()
VTKPARALLELCORE_EXPORT
#define VTKPARALLELCORE_EXPORT
Definition: vtkParallelCoreModule.h:15
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkProcessGroup::Communicator
vtkCommunicator * Communicator
Definition: vtkProcessGroup.h:129
vtkObject.h
vtkProcessGroup::SetCommunicator
void SetCommunicator(vtkCommunicator *communicator)
vtkProcessGroup
A subgroup of processes from a communicator.
Definition: vtkProcessGroup.h:57
vtkProcessGroup::New
static vtkProcessGroup * New()
vtkProcessGroup::Initialize
void Initialize(vtkMultiProcessController *controller)
vtkProcessGroup::Copy
void Copy(vtkProcessGroup *group)
vtkProcessGroup::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkProcessGroup::GetLocalProcessId
int GetLocalProcessId()
vtkProcessGroup::RemoveProcessId
int RemoveProcessId(int processId)
vtkProcessGroup::AddProcessId
int AddProcessId(int processId)