VTK  9.2.6
vtkDIYDataExchanger.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDIYDataExchanger.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 =========================================================================*/
30 #ifndef vtkDIYDataExchanger_h
31 #define vtkDIYDataExchanger_h
32 
33 #include "vtkObject.h"
34 #include "vtkParallelDIYModule.h" // for export macros
35 #include "vtkSmartPointer.h" // for vtkSmartPointer
36 
37 #include <vector> // for std::vector
38 
39 class vtkDataSet;
41 
42 class VTKPARALLELDIY_EXPORT vtkDIYDataExchanger : public vtkObject
43 {
44 public:
45  static vtkDIYDataExchanger* New();
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
50 
54  void SetController(vtkMultiProcessController*);
55  vtkGetObjectMacro(Controller, vtkMultiProcessController);
57 
87  bool AllToAll(const std::vector<vtkSmartPointer<vtkDataSet>>& sendBuffer,
88  const std::vector<int>& sendCounts, std::vector<vtkSmartPointer<vtkDataSet>>& recvBuffer,
89  std::vector<int>& recvCounts);
90 
91 protected:
93  ~vtkDIYDataExchanger() override;
94 
95 private:
97  void operator=(const vtkDIYDataExchanger&) = delete;
98 
99  vtkMultiProcessController* Controller;
100 };
101 
102 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:62
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
a simple class to control print indentation
Definition: vtkIndent.h:39
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
exchange data-object among ranks.
Multiprocessing communication superclass.