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:
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
50 
55  vtkGetObjectMacro(Controller, vtkMultiProcessController);
57 
88  const std::vector<int>& sendCounts, std::vector<vtkSmartPointer<vtkDataSet>>& recvBuffer,
89  std::vector<int>& recvCounts);
90 
91 protected:
94 
95 private:
97  void operator=(const vtkDIYDataExchanger&) = delete;
98 
99  vtkMultiProcessController* Controller;
100 };
101 
102 #endif
exchange data-object among ranks.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool AllToAll(const std::vector< vtkSmartPointer< vtkDataSet >> &sendBuffer, const std::vector< int > &sendCounts, std::vector< vtkSmartPointer< vtkDataSet >> &recvBuffer, std::vector< int > &recvCounts)
Exchange data between all ranks in the process group defined by the Controller.
static vtkDIYDataExchanger * New()
~vtkDIYDataExchanger() override
void SetController(vtkMultiProcessController *)
Get/Set the controller to use.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:172
a simple class to control print indentation
Definition: vtkIndent.h:119
Multiprocessing communication superclass.
abstract base class for most VTK objects
Definition: vtkObject.h:82
@ vector
Definition: vtkX3D.h:243