VTK  9.4.20241114
vtkDIYDataExchanger.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
18#ifndef vtkDIYDataExchanger_h
19#define vtkDIYDataExchanger_h
20
21#include "vtkObject.h"
22#include "vtkParallelDIYModule.h" // for export macros
23#include "vtkSmartPointer.h" // for vtkSmartPointer
24
25#include <vector> // for std::vector
26
27VTK_ABI_NAMESPACE_BEGIN
28class vtkDataSet;
30
31class VTKPARALLELDIY_EXPORT vtkDIYDataExchanger : public vtkObject
32{
33public:
36 void PrintSelf(ostream& os, vtkIndent indent) override;
37
39
44 vtkGetObjectMacro(Controller, vtkMultiProcessController);
46
76 bool AllToAll(const std::vector<vtkSmartPointer<vtkDataSet>>& sendBuffer,
77 const std::vector<int>& sendCounts, std::vector<vtkSmartPointer<vtkDataSet>>& recvBuffer,
78 std::vector<int>& recvCounts);
79
80protected:
83
84private:
86 void operator=(const vtkDIYDataExchanger&) = delete;
87
88 vtkMultiProcessController* Controller;
89};
90
91VTK_ABI_NAMESPACE_END
92#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:108
Multiprocessing communication superclass.
abstract base class for most VTK objects
Definition vtkObject.h:162
Hold a reference to a vtkObjectBase instance.