VTK  9.1.0
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=========================================================================*/
27#ifndef vtkDIYDataExchanger_h
28#define vtkDIYDataExchanger_h
29
30#include "vtkObject.h"
31#include "vtkParallelDIYModule.h" // for export macros
32#include "vtkSmartPointer.h" // for vtkSmartPointer
33
34#include <vector> // for std::vector
35
36class vtkDataSet;
38
39class VTKPARALLELDIY_EXPORT vtkDIYDataExchanger : public vtkObject
40{
41public:
44 void PrintSelf(ostream& os, vtkIndent indent) override;
45
47
52 vtkGetObjectMacro(Controller, vtkMultiProcessController);
54
85 const std::vector<int>& sendCounts, std::vector<vtkSmartPointer<vtkDataSet>>& recvBuffer,
86 std::vector<int>& recvCounts);
87
88protected:
91
92private:
94 void operator=(const vtkDIYDataExchanger&) = delete;
95
96 vtkMultiProcessController* Controller;
97};
98
99#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.
~vtkDIYDataExchanger() override
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.
void SetController(vtkMultiProcessController *)
Get/Set the controller to use.
static vtkDIYDataExchanger * New()
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
a simple class to control print indentation
Definition: vtkIndent.h:113
Multiprocessing communication superclass.
abstract base class for most VTK objects
Definition: vtkObject.h:73
@ vector
Definition: vtkX3D.h:243