VTK  9.3.20240418
vtkSubCommunicator.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
4 
30 #ifndef vtkSubCommunicator_h
31 #define vtkSubCommunicator_h
32 
33 #include "vtkCommunicator.h"
34 #include "vtkParallelCoreModule.h" // For export macro
35 
36 VTK_ABI_NAMESPACE_BEGIN
37 class vtkProcessGroup;
38 
39 class VTKPARALLELCORE_EXPORT vtkSubCommunicator : public vtkCommunicator
40 {
41 public:
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
47 
50  vtkGetObjectMacro(Group, vtkProcessGroup);
51  virtual void SetGroup(vtkProcessGroup* group);
53 
55 
59  const void* data, vtkIdType length, int type, int remoteHandle, int tag) override;
60  int ReceiveVoidArray(void* data, vtkIdType length, int type, int remoteHandle, int tag) override;
62 
63 protected:
65  ~vtkSubCommunicator() override;
66 
68 
69 private:
70  vtkSubCommunicator(const vtkSubCommunicator&) = delete;
71  void operator=(const vtkSubCommunicator&) = delete;
72 };
73 
74 VTK_ABI_NAMESPACE_END
75 #endif // vtkSubCommunicator_h
Used to send/receive messages in a multiprocess environment.
a simple class to control print indentation
Definition: vtkIndent.h:108
A subgroup of processes from a communicator.
Provides communication on a process group.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetGroup(vtkProcessGroup *group)
Set/get the group on which communication will happen.
vtkProcessGroup * Group
static vtkSubCommunicator * New()
~vtkSubCommunicator() override
int ReceiveVoidArray(void *data, vtkIdType length, int type, int remoteHandle, int tag) override
Implementation for abstract supercalss.
int SendVoidArray(const void *data, vtkIdType length, int type, int remoteHandle, int tag) override
Implementation for abstract supercalss.
@ Group
Definition: vtkX3D.h:51
@ length
Definition: vtkX3D.h:393
@ type
Definition: vtkX3D.h:516
@ data
Definition: vtkX3D.h:315
int vtkIdType
Definition: vtkType.h:315