14#if defined(__GNUC__) && !defined(__clang__)
15#pragma GCC diagnostic push
16#pragma GCC diagnostic ignored "-Wunused-function"
17#elif defined(__clang__)
18#pragma clang diagnostic push
19#pragma clang diagnostic ignored "-Wunused-function"
20#pragma clang diagnostic ignored "-Wunused-template"
23VTK_ABI_NAMESPACE_BEGIN
37 std::vector<vtkMultiProcessStream> all_streams;
38 if (controller->
AllGather(stream, all_streams))
40 for (
auto& s : all_streams)
61 return controller->
Broadcast(stream, root) != 0;
83 else if (arrays.size() == 1)
89 for (
auto& array : arrays)
91 numTuples += array->GetNumberOfTuples();
96 result->CopyInformation(arrays[0]->GetInformation());
97 result->SetName(arrays[0]->GetName());
98 result->SetNumberOfComponents(arrays[0]->GetNumberOfComponents());
99 result->SetNumberOfTuples(numTuples);
101 for (
auto& array : arrays)
103 const auto count = array->GetNumberOfTuples();
104 result->InsertTuples(offset, count, 0, array);
108 assert(offset == numTuples);
115#if defined(__GNUC__) && !defined(__clang__)
116#pragma GCC diagnostic pop
117#elif defined(__clang__)
118#pragma clang diagnostic pop
Multiprocessing communication superclass.
int GetNumberOfProcesses()
Set the number of processes you will be using.
int Broadcast(int *data, vtkIdType length, int srcProcessId)
Broadcast sends the array in the process with id srcProcessId to all of the other processes.
int GetLocalProcessId()
Tells you which process [0, NumProcess) you are in.
int AllGather(const int *sendBuffer, int *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
stream used to pass data across processes using vtkMultiProcessController.
Hold a reference to a vtkObjectBase instance.
void TakeReference(T *t)
Transfer ownership of one reference to the given VTK object to this smart pointer.