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"
23 VTK_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)
97 result->
SetName(arrays[0]->GetName());
101 for (
auto& array : arrays)
103 const auto count = array->GetNumberOfTuples();
108 assert(offset == numTuples);
113 VTK_ABI_NAMESPACE_END
115 #if defined(__GNUC__) && !defined(__clang__)
116 #pragma GCC diagnostic pop
117 #elif defined(__clang__)
118 #pragma clang diagnostic pop
void Modified() override
Removes out-of-date PER_COMPONENT() and PER_FINITE_COMPONENT() values.
virtual void SetNumberOfTuples(vtkIdType numTuples)
Set the number of tuples (a component group) in the array.
stream used to pass data across processes using vtkMultiProcessController.
int Broadcast(int *data, vtkIdType length, int srcProcessId)
Broadcast sends the array in the process with id srcProcessId to all of the other processes...
virtual void SetName(const char *)
Set/get array's name.
virtual int CopyInformation(vtkInformation *infoFrom, vtkTypeBool deep=1)
Copy information instance.
int AllGather(const int *sendBuffer, int *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
vtkIdType GetNumberOfTuples() const
Get the number of complete tuples (a component group) in the array.
virtual void SetNumberOfComponents(int)
Set/Get the dimension (n) of the components.
void TakeReference(T *t)
Transfer ownership of one reference to the given VTK object to this smart pointer.
int GetNumberOfProcesses()
Set the number of processes you will be using.
int GetLocalProcessId()
Tells you which process [0, NumProcess) you are in.
virtual void InsertTuples(vtkIdList *dstIds, vtkIdList *srcIds, vtkAbstractArray *source)=0
Copy the tuples indexed in srcIds from the source array to the tuple locations indexed by dstIds in t...
Multiprocessing communication superclass.