VTK
vtkSubCommunicator.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 /*=========================================================================
3 
4  Program: Visualization Toolkit
5  Module: vtkSubCommunicator.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 
46 #ifndef vtkSubCommunicator_h
47 #define vtkSubCommunicator_h
48 
49 #include "vtkParallelCoreModule.h" // For export macro
50 #include "vtkCommunicator.h"
51 
52 class vtkProcessGroup;
53 
54 class VTKPARALLELCORE_EXPORT vtkSubCommunicator : public vtkCommunicator
55 {
56 public:
58  static vtkSubCommunicator *New();
59  void PrintSelf(ostream &os, vtkIndent indent) override;
60 
62 
65  vtkGetObjectMacro(Group, vtkProcessGroup);
66  virtual void SetGroup(vtkProcessGroup *group);
68 
70 
73  int SendVoidArray(const void *data, vtkIdType length, int type,
74  int remoteHandle, int tag) override;
75  int ReceiveVoidArray(void *data, vtkIdType length, int type,
76  int remoteHandle, int tag) override;
78 
79 protected:
81  ~vtkSubCommunicator() override;
82 
84 
85 private:
86  vtkSubCommunicator(const vtkSubCommunicator &) = delete;
87  void operator=(const vtkSubCommunicator &) = delete;
88 };
89 
90 #endif //vtkSubCommunicator_h
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkProcessGroup * Group
int vtkIdType
Definition: vtkType.h:347
virtual int ReceiveVoidArray(void *data, vtkIdType maxlength, int type, int remoteHandle, int tag)=0
Subclasses have to supply this method to receive various arrays of data.
a simple class to control print indentation
Definition: vtkIndent.h:39
A subgroup of processes from a communicator.
virtual int SendVoidArray(const void *data, vtkIdType length, int type, int remoteHandle, int tag)=0
Subclasses have to supply this method to send various arrays of data.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
Used to send/receive messages in a multiprocess environment.
Provides communication on a process group.