VTK  9.1.0
vtkCommunicator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCommunicator.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 =========================================================================*/
32 #ifndef vtkCommunicator_h
33 #define vtkCommunicator_h
34 
35 #include "vtkObject.h"
36 #include "vtkParallelCoreModule.h" // For export macro
37 #include "vtkSmartPointer.h" // needed for vtkSmartPointer.
38 #include <vector> // needed for std::vector
39 
40 class vtkBoundingBox;
41 class vtkCharArray;
42 class vtkDataArray;
43 class vtkDataObject;
44 class vtkDataSet;
45 class vtkIdTypeArray;
46 class vtkImageData;
49 
50 class VTKPARALLELCORE_EXPORT vtkCommunicator : public vtkObject
51 {
52 
53 public:
54  vtkTypeMacro(vtkCommunicator, vtkObject);
55  void PrintSelf(ostream& os, vtkIndent indent) override;
56 
58 
63  virtual void SetNumberOfProcesses(int num);
64  vtkGetMacro(NumberOfProcesses, int);
66 
68 
71  vtkGetMacro(LocalProcessId, int);
73 
74  enum Tags
75  {
76  BROADCAST_TAG = 10,
77  GATHER_TAG = 11,
78  GATHERV_TAG = 12,
79  SCATTER_TAG = 13,
80  SCATTERV_TAG = 14,
81  REDUCE_TAG = 15,
82  BARRIER_TAG = 16
83  };
84 
86  {
96  BITWISE_XOR_OP
97  };
98 
103  class Operation
104  {
105  public:
116  virtual void Function(const void* A, void* B, vtkIdType length, int datatype) = 0;
117 
122  virtual int Commutative() = 0;
123 
124  virtual ~Operation() = default;
125  };
126 
132  int Send(vtkDataObject* data, int remoteHandle, int tag);
133 
139  int Send(vtkDataArray* data, int remoteHandle, int tag);
140 
147  virtual int SendVoidArray(
148  const void* data, vtkIdType length, int type, int remoteHandle, int tag) = 0;
149 
151 
154  int Send(const int* data, vtkIdType length, int remoteHandle, int tag)
155  {
156  return this->SendVoidArray(data, length, VTK_INT, remoteHandle, tag);
157  }
158  int Send(const unsigned int* data, vtkIdType length, int remoteHandle, int tag)
159  {
160  return this->SendVoidArray(data, length, VTK_INT, remoteHandle, tag);
161  }
162  int Send(const short* data, vtkIdType length, int remoteHandle, int tag)
163  {
164  return this->SendVoidArray(data, length, VTK_SHORT, remoteHandle, tag);
165  }
166  int Send(const unsigned short* data, vtkIdType length, int remoteHandle, int tag)
167  {
168  return this->SendVoidArray(data, length, VTK_UNSIGNED_SHORT, remoteHandle, tag);
169  }
170  int Send(const long* data, vtkIdType length, int remoteHandle, int tag)
171  {
172  return this->SendVoidArray(data, length, VTK_LONG, remoteHandle, tag);
173  }
174  int Send(const unsigned long* data, vtkIdType length, int remoteHandle, int tag)
175  {
176  return this->SendVoidArray(data, length, VTK_UNSIGNED_LONG, remoteHandle, tag);
177  }
178  int Send(const unsigned char* data, vtkIdType length, int remoteHandle, int tag)
179  {
180  return this->SendVoidArray(data, length, VTK_UNSIGNED_CHAR, remoteHandle, tag);
181  }
182  int Send(const char* data, vtkIdType length, int remoteHandle, int tag)
183  {
184  return this->SendVoidArray(data, length, VTK_CHAR, remoteHandle, tag);
185  }
186  int Send(const signed char* data, vtkIdType length, int remoteHandle, int tag)
187  {
188  return this->SendVoidArray(data, length, VTK_SIGNED_CHAR, remoteHandle, tag);
189  }
190  int Send(const float* data, vtkIdType length, int remoteHandle, int tag)
191  {
192  return this->SendVoidArray(data, length, VTK_FLOAT, remoteHandle, tag);
193  }
194  int Send(const double* data, vtkIdType length, int remoteHandle, int tag)
195  {
196  return this->SendVoidArray(data, length, VTK_DOUBLE, remoteHandle, tag);
197  }
198  int Send(const long long* data, vtkIdType length, int remoteHandle, int tag)
199  {
200  return this->SendVoidArray(data, length, VTK_LONG_LONG, remoteHandle, tag);
201  }
202  int Send(const unsigned long long* data, vtkIdType length, int remoteHandle, int tag)
203  {
204  return this->SendVoidArray(data, length, VTK_UNSIGNED_LONG_LONG, remoteHandle, tag);
205  }
207 
208  int Send(const vtkMultiProcessStream& stream, int remoteId, int tag);
209 
214  int Receive(vtkDataObject* data, int remoteHandle, int tag);
215 
220  vtkDataObject* ReceiveDataObject(int remoteHandle, int tag);
221 
226  int Receive(vtkDataArray* data, int remoteHandle, int tag);
227 
238  virtual int ReceiveVoidArray(
239  void* data, vtkIdType maxlength, int type, int remoteHandle, int tag) = 0;
240 
242 
245  int Receive(int* data, vtkIdType maxlength, int remoteHandle, int tag)
246  {
247  return this->ReceiveVoidArray(data, maxlength, VTK_INT, remoteHandle, tag);
248  }
249  int Receive(unsigned int* data, vtkIdType maxlength, int remoteHandle, int tag)
250  {
251  return this->ReceiveVoidArray(data, maxlength, VTK_INT, remoteHandle, tag);
252  }
253  int Receive(short* data, vtkIdType maxlength, int remoteHandle, int tag)
254  {
255  return this->ReceiveVoidArray(data, maxlength, VTK_SHORT, remoteHandle, tag);
256  }
257  int Receive(unsigned short* data, vtkIdType maxlength, int remoteHandle, int tag)
258  {
259  return this->ReceiveVoidArray(data, maxlength, VTK_UNSIGNED_SHORT, remoteHandle, tag);
260  }
261  int Receive(long* data, vtkIdType maxlength, int remoteHandle, int tag)
262  {
263  return this->ReceiveVoidArray(data, maxlength, VTK_LONG, remoteHandle, tag);
264  }
265  int Receive(unsigned long* data, vtkIdType maxlength, int remoteHandle, int tag)
266  {
267  return this->ReceiveVoidArray(data, maxlength, VTK_UNSIGNED_LONG, remoteHandle, tag);
268  }
269  int Receive(unsigned char* data, vtkIdType maxlength, int remoteHandle, int tag)
270  {
271  return this->ReceiveVoidArray(data, maxlength, VTK_UNSIGNED_CHAR, remoteHandle, tag);
272  }
273  int Receive(char* data, vtkIdType maxlength, int remoteHandle, int tag)
274  {
275  return this->ReceiveVoidArray(data, maxlength, VTK_CHAR, remoteHandle, tag);
276  }
277  int Receive(signed char* data, vtkIdType maxlength, int remoteHandle, int tag)
278  {
279  return this->ReceiveVoidArray(data, maxlength, VTK_SIGNED_CHAR, remoteHandle, tag);
280  }
281  int Receive(float* data, vtkIdType maxlength, int remoteHandle, int tag)
282  {
283  return this->ReceiveVoidArray(data, maxlength, VTK_FLOAT, remoteHandle, tag);
284  }
285  int Receive(double* data, vtkIdType maxlength, int remoteHandle, int tag)
286  {
287  return this->ReceiveVoidArray(data, maxlength, VTK_DOUBLE, remoteHandle, tag);
288  }
289  int Receive(long long* data, vtkIdType maxlength, int remoteHandle, int tag)
290  {
291  return this->ReceiveVoidArray(data, maxlength, VTK_LONG_LONG, remoteHandle, tag);
292  }
293  int Receive(unsigned long long* data, vtkIdType maxlength, int remoteHandle, int tag)
294  {
295  return this->ReceiveVoidArray(data, maxlength, VTK_UNSIGNED_LONG_LONG, remoteHandle, tag);
296  }
298 
299  int Receive(vtkMultiProcessStream& stream, int remoteId, int tag);
300 
302 
310  vtkGetMacro(Count, vtkIdType);
312 
313  //---------------------- Collective Operations ----------------------
314 
319  virtual void Barrier();
320 
322 
327  int Broadcast(int* data, vtkIdType length, int srcProcessId)
328  {
329  return this->BroadcastVoidArray(data, length, VTK_INT, srcProcessId);
330  }
331  int Broadcast(unsigned int* data, vtkIdType length, int srcProcessId)
332  {
333  return this->BroadcastVoidArray(data, length, VTK_UNSIGNED_INT, srcProcessId);
334  }
335  int Broadcast(short* data, vtkIdType length, int srcProcessId)
336  {
337  return this->BroadcastVoidArray(data, length, VTK_SHORT, srcProcessId);
338  }
339  int Broadcast(unsigned short* data, vtkIdType length, int srcProcessId)
340  {
341  return this->BroadcastVoidArray(data, length, VTK_UNSIGNED_SHORT, srcProcessId);
342  }
343  int Broadcast(long* data, vtkIdType length, int srcProcessId)
344  {
345  return this->BroadcastVoidArray(data, length, VTK_LONG, srcProcessId);
346  }
347  int Broadcast(unsigned long* data, vtkIdType length, int srcProcessId)
348  {
349  return this->BroadcastVoidArray(data, length, VTK_UNSIGNED_LONG, srcProcessId);
350  }
351  int Broadcast(unsigned char* data, vtkIdType length, int srcProcessId)
352  {
353  return this->BroadcastVoidArray(data, length, VTK_UNSIGNED_CHAR, srcProcessId);
354  }
355  int Broadcast(char* data, vtkIdType length, int srcProcessId)
356  {
357  return this->BroadcastVoidArray(data, length, VTK_CHAR, srcProcessId);
358  }
359  int Broadcast(signed char* data, vtkIdType length, int srcProcessId)
360  {
361  return this->BroadcastVoidArray(data, length, VTK_SIGNED_CHAR, srcProcessId);
362  }
363  int Broadcast(float* data, vtkIdType length, int srcProcessId)
364  {
365  return this->BroadcastVoidArray(data, length, VTK_FLOAT, srcProcessId);
366  }
367  int Broadcast(double* data, vtkIdType length, int srcProcessId)
368  {
369  return this->BroadcastVoidArray(data, length, VTK_DOUBLE, srcProcessId);
370  }
371  int Broadcast(long long* data, vtkIdType length, int srcProcessId)
372  {
373  return this->BroadcastVoidArray(data, length, VTK_LONG_LONG, srcProcessId);
374  }
375  int Broadcast(unsigned long long* data, vtkIdType length, int srcProcessId)
376  {
377  return this->BroadcastVoidArray(data, length, VTK_UNSIGNED_LONG_LONG, srcProcessId);
378  }
379  int Broadcast(vtkDataObject* data, int srcProcessId);
380  int Broadcast(vtkDataArray* data, int srcProcessId);
382 
383  int Broadcast(vtkMultiProcessStream& stream, int srcProcessId);
384 
386 
395  int Gather(const int* sendBuffer, int* recvBuffer, vtkIdType length, int destProcessId)
396  {
397  return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_INT, destProcessId);
398  }
399  int Gather(
400  const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length, int destProcessId)
401  {
402  return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_INT, destProcessId);
403  }
404  int Gather(const short* sendBuffer, short* recvBuffer, vtkIdType length, int destProcessId)
405  {
406  return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_SHORT, destProcessId);
407  }
408  int Gather(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
409  int destProcessId)
410  {
411  return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_SHORT, destProcessId);
412  }
413  int Gather(const long* sendBuffer, long* recvBuffer, vtkIdType length, int destProcessId)
414  {
415  return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_LONG, destProcessId);
416  }
417  int Gather(
418  const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length, int destProcessId)
419  {
420  return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG, destProcessId);
421  }
422  int Gather(
423  const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length, int destProcessId)
424  {
425  return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_CHAR, destProcessId);
426  }
427  int Gather(const char* sendBuffer, char* recvBuffer, vtkIdType length, int destProcessId)
428  {
429  return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_CHAR, destProcessId);
430  }
431  int Gather(
432  const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length, int destProcessId)
433  {
434  return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_SIGNED_CHAR, destProcessId);
435  }
436  int Gather(const float* sendBuffer, float* recvBuffer, vtkIdType length, int destProcessId)
437  {
438  return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_FLOAT, destProcessId);
439  }
440  int Gather(const double* sendBuffer, double* recvBuffer, vtkIdType length, int destProcessId)
441  {
442  return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_DOUBLE, destProcessId);
443  }
444  int Gather(
445  const long long* sendBuffer, long long* recvBuffer, vtkIdType length, int destProcessId)
446  {
447  return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_LONG_LONG, destProcessId);
448  }
449  int Gather(const unsigned long long* sendBuffer, unsigned long long* recvBuffer, vtkIdType length,
450  int destProcessId)
451  {
452  return this->GatherVoidArray(
453  sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG_LONG, destProcessId);
454  }
455  int Gather(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int destProcessId);
457 
471  int destProcessId);
472 
482  int Gather(const vtkMultiProcessStream& sendBuffer,
483  std::vector<vtkMultiProcessStream>& recvBuffer, int destProcessId);
484 
486 
497  int GatherV(const int* sendBuffer, int* recvBuffer, vtkIdType sendLength, vtkIdType* recvLengths,
498  vtkIdType* offsets, int destProcessId)
499  {
500  return this->GatherVVoidArray(
501  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_INT, destProcessId);
502  }
503  int GatherV(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType sendLength,
504  vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
505  {
506  return this->GatherVVoidArray(
507  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_INT, destProcessId);
508  }
509  int GatherV(const short* sendBuffer, short* recvBuffer, vtkIdType sendLength,
510  vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
511  {
512  return this->GatherVVoidArray(
513  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_SHORT, destProcessId);
514  }
515  int GatherV(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType sendLength,
516  vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
517  {
518  return this->GatherVVoidArray(
519  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_SHORT, destProcessId);
520  }
521  int GatherV(const long* sendBuffer, long* recvBuffer, vtkIdType sendLength,
522  vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
523  {
524  return this->GatherVVoidArray(
525  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_LONG, destProcessId);
526  }
527  int GatherV(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType sendLength,
528  vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
529  {
530  return this->GatherVVoidArray(
531  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_LONG, destProcessId);
532  }
533  int GatherV(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType sendLength,
534  vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
535  {
536  return this->GatherVVoidArray(
537  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_CHAR, destProcessId);
538  }
539  int GatherV(const char* sendBuffer, char* recvBuffer, vtkIdType sendLength,
540  vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
541  {
542  return this->GatherVVoidArray(
543  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_CHAR, destProcessId);
544  }
545  int GatherV(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType sendLength,
546  vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
547  {
548  return this->GatherVVoidArray(
549  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_SIGNED_CHAR, destProcessId);
550  }
551  int GatherV(const float* sendBuffer, float* recvBuffer, vtkIdType sendLength,
552  vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
553  {
554  return this->GatherVVoidArray(
555  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_FLOAT, destProcessId);
556  }
557  int GatherV(const double* sendBuffer, double* recvBuffer, vtkIdType sendLength,
558  vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
559  {
560  return this->GatherVVoidArray(
561  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_DOUBLE, destProcessId);
562  }
563  int GatherV(const long long* sendBuffer, long long* recvBuffer, vtkIdType sendLength,
564  vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
565  {
566  return this->GatherVVoidArray(
567  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_LONG_LONG, destProcessId);
568  }
569  int GatherV(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
570  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
571  {
572  return this->GatherVVoidArray(sendBuffer, recvBuffer, sendLength, recvLengths, offsets,
573  VTK_UNSIGNED_LONG_LONG, destProcessId);
574  }
577 
587  int GatherV(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, vtkIdType* recvLengths,
588  vtkIdType* offsets, int destProcessId);
589  int GatherV(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, vtkIdTypeArray* recvLengths,
590  vtkIdTypeArray* offsets, int destProcessId);
591  int GatherV(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int destProcessId);
593 
601  int GatherV(vtkDataObject* sendData, vtkSmartPointer<vtkDataObject>* recvData, int destProcessId);
602 
604 
611  int Scatter(const int* sendBuffer, int* recvBuffer, vtkIdType length, int srcProcessId)
612  {
613  return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_INT, srcProcessId);
614  }
615  int Scatter(
616  const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length, int srcProcessId)
617  {
618  return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_INT, srcProcessId);
619  }
620  int Scatter(const short* sendBuffer, short* recvBuffer, vtkIdType length, int srcProcessId)
621  {
622  return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_SHORT, srcProcessId);
623  }
624  int Scatter(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
625  int srcProcessId)
626  {
627  return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_SHORT, srcProcessId);
628  }
629  int Scatter(const long* sendBuffer, long* recvBuffer, vtkIdType length, int srcProcessId)
630  {
631  return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_INT, srcProcessId);
632  }
633  int Scatter(
634  const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length, int srcProcessId)
635  {
636  return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG, srcProcessId);
637  }
638  int Scatter(
639  const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length, int srcProcessId)
640  {
641  return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_CHAR, srcProcessId);
642  }
643  int Scatter(const char* sendBuffer, char* recvBuffer, vtkIdType length, int srcProcessId)
644  {
645  return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_CHAR, srcProcessId);
646  }
647  int Scatter(
648  const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length, int srcProcessId)
649  {
650  return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_SIGNED_CHAR, srcProcessId);
651  }
652  int Scatter(const float* sendBuffer, float* recvBuffer, vtkIdType length, int srcProcessId)
653  {
654  return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_FLOAT, srcProcessId);
655  }
656  int Scatter(const double* sendBuffer, double* recvBuffer, vtkIdType length, int srcProcessId)
657  {
658  return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_DOUBLE, srcProcessId);
659  }
660  int Scatter(
661  const long long* sendBuffer, long long* recvBuffer, vtkIdType length, int srcProcessId)
662  {
663  return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_LONG_LONG, srcProcessId);
664  }
665  int Scatter(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
666  vtkIdType length, int srcProcessId)
667  {
668  return this->ScatterVoidArray(
669  sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG_LONG, srcProcessId);
670  }
671  int Scatter(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int srcProcessId);
673 
675 
682  int ScatterV(const int* sendBuffer, int* recvBuffer, vtkIdType* sendLengths, vtkIdType* offsets,
683  vtkIdType recvLength, int srcProcessId)
684  {
685  return this->ScatterVVoidArray(
686  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_INT, srcProcessId);
687  }
688  int ScatterV(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType* sendLengths,
689  vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
690  {
691  return this->ScatterVVoidArray(
692  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_UNSIGNED_INT, srcProcessId);
693  }
694  int ScatterV(const short* sendBuffer, short* recvBuffer, vtkIdType* sendLengths,
695  vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
696  {
697  return this->ScatterVVoidArray(
698  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_SHORT, srcProcessId);
699  }
700  int ScatterV(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType* sendLengths,
701  vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
702  {
703  return this->ScatterVVoidArray(
704  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_UNSIGNED_SHORT, srcProcessId);
705  }
706  int ScatterV(const long* sendBuffer, long* recvBuffer, vtkIdType* sendLengths, vtkIdType* offsets,
707  vtkIdType recvLength, int srcProcessId)
708  {
709  return this->ScatterVVoidArray(
710  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_LONG, srcProcessId);
711  }
712  int ScatterV(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType* sendLengths,
713  vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
714  {
715  return this->ScatterVVoidArray(
716  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_UNSIGNED_LONG, srcProcessId);
717  }
718  int ScatterV(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType* sendLengths,
719  vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
720  {
721  return this->ScatterVVoidArray(
722  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_UNSIGNED_CHAR, srcProcessId);
723  }
724  int ScatterV(const char* sendBuffer, char* recvBuffer, vtkIdType* sendLengths, vtkIdType* offsets,
725  vtkIdType recvLength, int srcProcessId)
726  {
727  return this->ScatterVVoidArray(
728  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_CHAR, srcProcessId);
729  }
730  int ScatterV(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType* sendLengths,
731  vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
732  {
733  return this->ScatterVVoidArray(
734  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_SIGNED_CHAR, srcProcessId);
735  }
736  int ScatterV(const float* sendBuffer, float* recvBuffer, vtkIdType* sendLengths,
737  vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
738  {
739  return this->ScatterVVoidArray(
740  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_FLOAT, srcProcessId);
741  }
742  int ScatterV(const double* sendBuffer, double* recvBuffer, vtkIdType* sendLengths,
743  vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
744  {
745  return this->ScatterVVoidArray(
746  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_DOUBLE, srcProcessId);
747  }
748  int ScatterV(const long long* sendBuffer, long long* recvBuffer, vtkIdType* sendLengths,
749  vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
750  {
751  return this->ScatterVVoidArray(
752  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_LONG_LONG, srcProcessId);
753  }
754  int ScatterV(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
755  vtkIdType* sendLengths, vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
756  {
757  return this->ScatterVVoidArray(sendBuffer, recvBuffer, sendLengths, offsets, recvLength,
758  VTK_UNSIGNED_LONG_LONG, srcProcessId);
759  }
761 
763 
766  int AllGather(const int* sendBuffer, int* recvBuffer, vtkIdType length)
767  {
768  return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_INT);
769  }
770  int AllGather(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length)
771  {
772  return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_INT);
773  }
774  int AllGather(const short* sendBuffer, short* recvBuffer, vtkIdType length)
775  {
776  return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_SHORT);
777  }
778  int AllGather(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length)
779  {
780  return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_SHORT);
781  }
782  int AllGather(const long* sendBuffer, long* recvBuffer, vtkIdType length)
783  {
784  return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_LONG);
785  }
786  int AllGather(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length)
787  {
788  return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG);
789  }
790  int AllGather(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length)
791  {
792  return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_CHAR);
793  }
794  int AllGather(const char* sendBuffer, char* recvBuffer, vtkIdType length)
795  {
796  return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_CHAR);
797  }
798  int AllGather(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length)
799  {
800  return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_SIGNED_CHAR);
801  }
802  int AllGather(const float* sendBuffer, float* recvBuffer, vtkIdType length)
803  {
804  return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_FLOAT);
805  }
806  int AllGather(const double* sendBuffer, double* recvBuffer, vtkIdType length)
807  {
808  return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_DOUBLE);
809  }
810  int AllGather(const long long* sendBuffer, long long* recvBuffer, vtkIdType length)
811  {
812  return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_LONG_LONG);
813  }
815  const unsigned long long* sendBuffer, unsigned long long* recvBuffer, vtkIdType length)
816  {
817  return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG_LONG);
818  }
819  int AllGather(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer);
821  const vtkMultiProcessStream& sendBuffer, std::vector<vtkMultiProcessStream>& recvBuffer);
823 
835 
837 
840  int AllGatherV(const int* sendBuffer, int* recvBuffer, vtkIdType sendLength,
841  vtkIdType* recvLengths, vtkIdType* offsets)
842  {
843  return this->AllGatherVVoidArray(
844  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_INT);
845  }
846  int AllGatherV(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType sendLength,
847  vtkIdType* recvLengths, vtkIdType* offsets)
848  {
849  return this->AllGatherVVoidArray(
850  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_INT);
851  }
852  int AllGatherV(const short* sendBuffer, short* recvBuffer, vtkIdType sendLength,
853  vtkIdType* recvLengths, vtkIdType* offsets)
854  {
855  return this->AllGatherVVoidArray(
856  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_SHORT);
857  }
858  int AllGatherV(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType sendLength,
859  vtkIdType* recvLengths, vtkIdType* offsets)
860  {
861  return this->AllGatherVVoidArray(
862  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_SHORT);
863  }
864  int AllGatherV(const long* sendBuffer, long* recvBuffer, vtkIdType sendLength,
865  vtkIdType* recvLengths, vtkIdType* offsets)
866  {
867  return this->AllGatherVVoidArray(
868  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_LONG);
869  }
870  int AllGatherV(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType sendLength,
871  vtkIdType* recvLengths, vtkIdType* offsets)
872  {
873  return this->AllGatherVVoidArray(
874  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_LONG);
875  }
876  int AllGatherV(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType sendLength,
877  vtkIdType* recvLengths, vtkIdType* offsets)
878  {
879  return this->AllGatherVVoidArray(
880  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_CHAR);
881  }
882  int AllGatherV(const char* sendBuffer, char* recvBuffer, vtkIdType sendLength,
883  vtkIdType* recvLengths, vtkIdType* offsets)
884  {
885  return this->AllGatherVVoidArray(
886  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_CHAR);
887  }
888  int AllGatherV(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType sendLength,
889  vtkIdType* recvLengths, vtkIdType* offsets)
890  {
891  return this->AllGatherVVoidArray(
892  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_CHAR);
893  }
894  int AllGatherV(const float* sendBuffer, float* recvBuffer, vtkIdType sendLength,
895  vtkIdType* recvLengths, vtkIdType* offsets)
896  {
897  return this->AllGatherVVoidArray(
898  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_FLOAT);
899  }
900  int AllGatherV(const double* sendBuffer, double* recvBuffer, vtkIdType sendLength,
901  vtkIdType* recvLengths, vtkIdType* offsets)
902  {
903  return this->AllGatherVVoidArray(
904  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_DOUBLE);
905  }
906  int AllGatherV(const long long* sendBuffer, long long* recvBuffer, vtkIdType sendLength,
907  vtkIdType* recvLengths, vtkIdType* offsets)
908  {
909  return this->AllGatherVVoidArray(
910  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_LONG_LONG);
911  }
912  int AllGatherV(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
913  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets)
914  {
915  return this->AllGatherVVoidArray(
916  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_LONG_LONG);
917  }
919  vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, vtkIdType* recvLengths, vtkIdType* offsets);
920  int AllGatherV(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer);
922 
924 
929  int Reduce(
930  const int* sendBuffer, int* recvBuffer, vtkIdType length, int operation, int destProcessId)
931  {
932  return this->ReduceVoidArray(sendBuffer, recvBuffer, length, VTK_INT, operation, destProcessId);
933  }
934  int Reduce(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length,
935  int operation, int destProcessId)
936  {
937  return this->ReduceVoidArray(
938  sendBuffer, recvBuffer, length, VTK_UNSIGNED_INT, operation, destProcessId);
939  }
940  int Reduce(
941  const short* sendBuffer, short* recvBuffer, vtkIdType length, int operation, int destProcessId)
942  {
943  return this->ReduceVoidArray(
944  sendBuffer, recvBuffer, length, VTK_SHORT, operation, destProcessId);
945  }
946  int Reduce(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
947  int operation, int destProcessId)
948  {
949  return this->ReduceVoidArray(
950  sendBuffer, recvBuffer, length, VTK_UNSIGNED_SHORT, operation, destProcessId);
951  }
952  int Reduce(
953  const long* sendBuffer, long* recvBuffer, vtkIdType length, int operation, int destProcessId)
954  {
955  return this->ReduceVoidArray(
956  sendBuffer, recvBuffer, length, VTK_LONG, operation, destProcessId);
957  }
958  int Reduce(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length,
959  int operation, int destProcessId)
960  {
961  return this->ReduceVoidArray(
962  sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG, operation, destProcessId);
963  }
964  int Reduce(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length,
965  int operation, int destProcessId)
966  {
967  return this->ReduceVoidArray(
968  sendBuffer, recvBuffer, length, VTK_UNSIGNED_CHAR, operation, destProcessId);
969  }
970  int Reduce(
971  const char* sendBuffer, char* recvBuffer, vtkIdType length, int operation, int destProcessId)
972  {
973  return this->ReduceVoidArray(
974  sendBuffer, recvBuffer, length, VTK_CHAR, operation, destProcessId);
975  }
976  int Reduce(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length,
977  int operation, int destProcessId)
978  {
979  return this->ReduceVoidArray(
980  sendBuffer, recvBuffer, length, VTK_SIGNED_CHAR, operation, destProcessId);
981  }
982  int Reduce(
983  const float* sendBuffer, float* recvBuffer, vtkIdType length, int operation, int destProcessId)
984  {
985  return this->ReduceVoidArray(
986  sendBuffer, recvBuffer, length, VTK_FLOAT, operation, destProcessId);
987  }
988  int Reduce(const double* sendBuffer, double* recvBuffer, vtkIdType length, int operation,
989  int destProcessId)
990  {
991  return this->ReduceVoidArray(
992  sendBuffer, recvBuffer, length, VTK_DOUBLE, operation, destProcessId);
993  }
994  int Reduce(const long long* sendBuffer, long long* recvBuffer, vtkIdType length, int operation,
995  int destProcessId)
996  {
997  return this->ReduceVoidArray(
998  sendBuffer, recvBuffer, length, VTK_LONG_LONG, operation, destProcessId);
999  }
1000  int Reduce(const unsigned long long* sendBuffer, unsigned long long* recvBuffer, vtkIdType length,
1001  int operation, int destProcessId)
1002  {
1003  return this->ReduceVoidArray(
1004  sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG_LONG, operation, destProcessId);
1005  }
1006  int Reduce(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int operation, int destProcessId);
1008 
1010 
1014  int Reduce(const int* sendBuffer, int* recvBuffer, vtkIdType length, Operation* operation,
1015  int destProcessId)
1016  {
1017  return this->ReduceVoidArray(sendBuffer, recvBuffer, length, VTK_INT, operation, destProcessId);
1018  }
1019  int Reduce(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length,
1020  Operation* operation, int destProcessId)
1021  {
1022  return this->ReduceVoidArray(
1023  sendBuffer, recvBuffer, length, VTK_UNSIGNED_INT, operation, destProcessId);
1024  }
1025  int Reduce(const short* sendBuffer, short* recvBuffer, vtkIdType length, Operation* operation,
1026  int destProcessId)
1027  {
1028  return this->ReduceVoidArray(
1029  sendBuffer, recvBuffer, length, VTK_SHORT, operation, destProcessId);
1030  }
1031  int Reduce(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
1032  Operation* operation, int destProcessId)
1033  {
1034  return this->ReduceVoidArray(
1035  sendBuffer, recvBuffer, length, VTK_UNSIGNED_SHORT, operation, destProcessId);
1036  }
1037  int Reduce(const long* sendBuffer, long* recvBuffer, vtkIdType length, Operation* operation,
1038  int destProcessId)
1039  {
1040  return this->ReduceVoidArray(
1041  sendBuffer, recvBuffer, length, VTK_LONG, operation, destProcessId);
1042  }
1043  int Reduce(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length,
1044  Operation* operation, int destProcessId)
1045  {
1046  return this->ReduceVoidArray(
1047  sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG, operation, destProcessId);
1048  }
1049  int Reduce(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length,
1050  Operation* operation, int destProcessId)
1051  {
1052  return this->ReduceVoidArray(
1053  sendBuffer, recvBuffer, length, VTK_UNSIGNED_CHAR, operation, destProcessId);
1054  }
1055  int Reduce(const char* sendBuffer, char* recvBuffer, vtkIdType length, Operation* operation,
1056  int destProcessId)
1057  {
1058  return this->ReduceVoidArray(
1059  sendBuffer, recvBuffer, length, VTK_CHAR, operation, destProcessId);
1060  }
1061  int Reduce(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length,
1062  Operation* operation, int destProcessId)
1063  {
1064  return this->ReduceVoidArray(
1065  sendBuffer, recvBuffer, length, VTK_SIGNED_CHAR, operation, destProcessId);
1066  }
1067  int Reduce(const float* sendBuffer, float* recvBuffer, vtkIdType length, Operation* operation,
1068  int destProcessId)
1069  {
1070  return this->ReduceVoidArray(
1071  sendBuffer, recvBuffer, length, VTK_FLOAT, operation, destProcessId);
1072  }
1073  int Reduce(const double* sendBuffer, double* recvBuffer, vtkIdType length, Operation* operation,
1074  int destProcessId)
1075  {
1076  return this->ReduceVoidArray(
1077  sendBuffer, recvBuffer, length, VTK_DOUBLE, operation, destProcessId);
1078  }
1079  int Reduce(const long long* sendBuffer, long long* recvBuffer, vtkIdType length,
1080  Operation* operation, int destProcessId)
1081  {
1082  return this->ReduceVoidArray(
1083  sendBuffer, recvBuffer, length, VTK_LONG_LONG, operation, destProcessId);
1084  }
1085  int Reduce(const unsigned long long* sendBuffer, unsigned long long* recvBuffer, vtkIdType length,
1086  Operation* operation, int destProcessId)
1087  {
1088  return this->ReduceVoidArray(
1089  sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG_LONG, operation, destProcessId);
1090  }
1091  int Reduce(
1092  vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, Operation* operation, int destProcessId);
1094 
1096 
1099  int AllReduce(const int* sendBuffer, int* recvBuffer, vtkIdType length, int operation)
1100  {
1101  return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_INT, operation);
1102  }
1104  const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length, int operation)
1105  {
1106  return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_INT, operation);
1107  }
1108  int AllReduce(const short* sendBuffer, short* recvBuffer, vtkIdType length, int operation)
1109  {
1110  return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_SHORT, operation);
1111  }
1113  const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length, int operation)
1114  {
1115  return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_SHORT, operation);
1116  }
1117  int AllReduce(const long* sendBuffer, long* recvBuffer, vtkIdType length, int operation)
1118  {
1119  return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_LONG, operation);
1120  }
1122  const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length, int operation)
1123  {
1124  return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG, operation);
1125  }
1127  const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length, int operation)
1128  {
1129  return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_CHAR, operation);
1130  }
1131  int AllReduce(const char* sendBuffer, char* recvBuffer, vtkIdType length, int operation)
1132  {
1133  return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_CHAR, operation);
1134  }
1136  const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length, int operation)
1137  {
1138  return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_SIGNED_CHAR, operation);
1139  }
1140  int AllReduce(const float* sendBuffer, float* recvBuffer, vtkIdType length, int operation)
1141  {
1142  return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_FLOAT, operation);
1143  }
1144  int AllReduce(const double* sendBuffer, double* recvBuffer, vtkIdType length, int operation)
1145  {
1146  return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_DOUBLE, operation);
1147  }
1148  int AllReduce(const long long* sendBuffer, long long* recvBuffer, vtkIdType length, int operation)
1149  {
1150  return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_LONG_LONG, operation);
1151  }
1152  int AllReduce(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
1153  vtkIdType length, int operation)
1154  {
1155  return this->AllReduceVoidArray(
1156  sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG_LONG, operation);
1157  }
1158  int AllReduce(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int operation);
1159  int AllReduce(const int* sendBuffer, int* recvBuffer, vtkIdType length, Operation* operation)
1160  {
1161  return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_INT, operation);
1162  }
1163  int AllReduce(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length,
1164  Operation* operation)
1165  {
1166  return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_INT, operation);
1167  }
1168  int AllReduce(const short* sendBuffer, short* recvBuffer, vtkIdType length, Operation* operation)
1169  {
1170  return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_SHORT, operation);
1171  }
1172  int AllReduce(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
1173  Operation* operation)
1174  {
1175  return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_SHORT, operation);
1176  }
1177  int AllReduce(const long* sendBuffer, long* recvBuffer, vtkIdType length, Operation* operation)
1178  {
1179  return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_LONG, operation);
1180  }
1181  int AllReduce(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length,
1182  Operation* operation)
1183  {
1184  return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG, operation);
1185  }
1186  int AllReduce(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length,
1187  Operation* operation)
1188  {
1189  return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_CHAR, operation);
1190  }
1191  int AllReduce(const char* sendBuffer, char* recvBuffer, vtkIdType length, Operation* operation)
1192  {
1193  return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_CHAR, operation);
1194  }
1196  const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length, Operation* operation)
1197  {
1198  return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_SIGNED_CHAR, operation);
1199  }
1200  int AllReduce(const float* sendBuffer, float* recvBuffer, vtkIdType length, Operation* operation)
1201  {
1202  return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_FLOAT, operation);
1203  }
1205  const double* sendBuffer, double* recvBuffer, vtkIdType length, Operation* operation)
1206  {
1207  return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_DOUBLE, operation);
1208  }
1210  const long long* sendBuffer, long long* recvBuffer, vtkIdType length, Operation* operation)
1211  {
1212  return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_LONG_LONG, operation);
1213  }
1214  int AllReduce(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
1215  vtkIdType length, Operation* operation)
1216  {
1217  return this->AllReduceVoidArray(
1218  sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG_LONG, operation);
1219  }
1220  int AllReduce(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, Operation* operation);
1222 
1224 
1228  virtual int BroadcastVoidArray(void* data, vtkIdType length, int type, int srcProcessId);
1229  virtual int GatherVoidArray(
1230  const void* sendBuffer, void* recvBuffer, vtkIdType length, int type, int destProcessId);
1231  virtual int GatherVVoidArray(const void* sendBuffer, void* recvBuffer, vtkIdType sendLength,
1232  vtkIdType* recvLengths, vtkIdType* offsets, int type, int destProcessId);
1233  virtual int ScatterVoidArray(
1234  const void* sendBuffer, void* recvBuffer, vtkIdType length, int type, int srcProcessId);
1235  virtual int ScatterVVoidArray(const void* sendBuffer, void* recvBuffer, vtkIdType* sendLengths,
1236  vtkIdType* offsets, vtkIdType recvLength, int type, int srcProcessId);
1237  virtual int AllGatherVoidArray(
1238  const void* sendBuffer, void* recvBuffer, vtkIdType length, int type);
1239  virtual int AllGatherVVoidArray(const void* sendBuffer, void* recvBuffer, vtkIdType sendLength,
1240  vtkIdType* recvLengths, vtkIdType* offsets, int type);
1241  virtual int ReduceVoidArray(const void* sendBuffer, void* recvBuffer, vtkIdType length, int type,
1242  int operation, int destProcessId);
1243  virtual int ReduceVoidArray(const void* sendBuffer, void* recvBuffer, vtkIdType length, int type,
1244  Operation* operation, int destProcessId);
1245  virtual int AllReduceVoidArray(
1246  const void* sendBuffer, void* recvBuffer, vtkIdType length, int type, int operation);
1247  virtual int AllReduceVoidArray(
1248  const void* sendBuffer, void* recvBuffer, vtkIdType length, int type, Operation* operation);
1250 
1251  static void SetUseCopy(int useCopy);
1252 
1264  virtual int ComputeGlobalBounds(int processorId, int numProcesses, vtkBoundingBox* bounds,
1265  int* rightHasBounds = nullptr, int* leftHasBounds = nullptr, int hasBoundsTag = 288402,
1266  int localBoundsTag = 288403, int globalBoundsTag = 288404);
1267 
1269 
1274  static int GetParentProcessor(int pid);
1275  static int GetLeftChildProcessor(int pid);
1277 
1279 
1284  static int MarshalDataObject(vtkDataObject* object, vtkCharArray* buffer);
1285  static int UnMarshalDataObject(vtkCharArray* buffer, vtkDataObject* object);
1287 
1295 
1296 protected:
1299 
1301  ~vtkCommunicator() override;
1302 
1303  // Internal methods called by Send/Receive(vtkDataObject *... ) above.
1304  int SendElementalDataObject(vtkDataObject* data, int remoteHandle, int tag);
1306 
1314  int GatherV(vtkDataArray* sendArray, vtkDataArray* recvArray,
1315  vtkSmartPointer<vtkDataArray>* recvArrays, int destProcessId);
1317  vtkDataObject* sendData, vtkSmartPointer<vtkDataObject>* receiveData, int destProcessId);
1319 
1321  int AllGatherV(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer,
1322  vtkIdTypeArray* recvLengthsArray, vtkIdTypeArray* offsetsArray);
1324  vtkDataArray* sendArray, vtkDataArray* recvArray, vtkSmartPointer<vtkDataArray>* recvArrays);
1326 
1327  int ReceiveDataObject(vtkDataObject* data, int remoteHandle, int tag, int type = -1);
1328  int ReceiveElementalDataObject(vtkDataObject* data, int remoteHandle, int tag);
1329  int ReceiveMultiBlockDataSet(vtkMultiBlockDataSet* data, int remoteHandle, int tag);
1330 
1333 
1335 
1336  static int UseCopy;
1337 
1339 
1340 private:
1341  vtkCommunicator(const vtkCommunicator&) = delete;
1342  void operator=(const vtkCommunicator&) = delete;
1343 };
1344 
1345 #endif // vtkCommunicator_h
Fast, simple class for representing and operating on 3D bounds.
dynamic, self-adjusting array of char
Definition: vtkCharArray.h:49
A custom operation to use in a reduce command.
virtual int Commutative()=0
Subclasses override this method to specify whether their operation is commutative.
virtual void Function(const void *A, void *B, vtkIdType length, int datatype)=0
Subclasses must overload this method, which performs the actual operations.
virtual ~Operation()=default
Used to send/receive messages in a multiprocess environment.
int Reduce(const long long *sendBuffer, long long *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
int AllReduce(const double *sendBuffer, double *recvBuffer, vtkIdType length, Operation *operation)
Same as Reduce except that the result is placed in all of the processes.
int AllGatherV(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
Same as GatherV except that the result is placed in all processes.
int Send(const unsigned long long *data, vtkIdType length, int remoteHandle, int tag)
Convenience methods for sending data arrays.
int AllReduce(const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, Operation *operation)
Same as Reduce except that the result is placed in all of the processes.
int Receive(vtkDataArray *data, int remoteHandle, int tag)
This method receives a data array from a corresponding send.
int Reduce(const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
int AllGatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer)
Same as GatherV except that the result is placed in all processes.
int Send(const short *data, vtkIdType length, int remoteHandle, int tag)
Convenience methods for sending data arrays.
int Receive(long long *data, vtkIdType maxlength, int remoteHandle, int tag)
Convenience methods for receiving data arrays.
int ScatterV(const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
int AllReduce(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, Operation *operation)
Same as Reduce except that the result is placed in all of the processes.
int Receive(char *data, vtkIdType maxlength, int remoteHandle, int tag)
Convenience methods for receiving data arrays.
virtual void SetNumberOfProcesses(int num)
Set the number of processes you will be using.
int GatherV(vtkDataObject *sendData, vtkSmartPointer< vtkDataObject > *recvData, int destProcessId)
Collects data objects in the process with id destProcessId.
int GatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
For the first GatherV variant, recvLengths and offsets known on destProcessId and are passed in as pa...
int Scatter(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, int srcProcessId)
Scatter takes an array in the process with id srcProcessId and distributes it.
int AllGather(const long *sendBuffer, long *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int AllGather(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int ScatterV(const long *sendBuffer, long *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
int AllReduce(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, Operation *operation)
Same as Reduce except that the result is placed in all of the processes.
int Receive(unsigned long long *data, vtkIdType maxlength, int remoteHandle, int tag)
Convenience methods for receiving data arrays.
int Reduce(const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
Reduce an array to the given destination process.
int ScatterV(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
int AllGather(const float *sendBuffer, float *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int Reduce(const long *sendBuffer, long *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
Reduce an array to the given destination process.
int Gather(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int Gather(const short *sendBuffer, short *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int GatherV(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int Send(const char *data, vtkIdType length, int remoteHandle, int tag)
Convenience methods for sending data arrays.
int AllGather(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int Scatter(const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, int srcProcessId)
Scatter takes an array in the process with id srcProcessId and distributes it.
int GatherV(const signed char *sendBuffer, signed char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
virtual int GatherVVoidArray(const void *sendBuffer, void *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int type, int destProcessId)
Subclasses should reimplement these if they have a more efficient implementation.
int Scatter(const long *sendBuffer, long *recvBuffer, vtkIdType length, int srcProcessId)
Scatter takes an array in the process with id srcProcessId and distributes it.
int ScatterV(const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
int Broadcast(short *data, vtkIdType length, int srcProcessId)
Broadcast sends the array in the process with id srcProcessId to all of the other processes.
int Scatter(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, int srcProcessId)
Scatter takes an array in the process with id srcProcessId and distributes it.
int AllGather(const char *sendBuffer, char *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int GatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int destProcessId)
For the first GatherV variant, recvLengths and offsets known on destProcessId and are passed in as pa...
int Scatter(const long long *sendBuffer, long long *recvBuffer, vtkIdType length, int srcProcessId)
Scatter takes an array in the process with id srcProcessId and distributes it.
int AllGather(const short *sendBuffer, short *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int Reduce(const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
int AllReduce(const int *sendBuffer, int *recvBuffer, vtkIdType length, Operation *operation)
Same as Reduce except that the result is placed in all of the processes.
static void SetUseCopy(int useCopy)
int Send(const int *data, vtkIdType length, int remoteHandle, int tag)
Convenience methods for sending data arrays.
int Send(vtkDataArray *data, int remoteHandle, int tag)
This method sends a data array to a destination.
int Reduce(const char *sendBuffer, char *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
int ScatterV(const signed char *sendBuffer, signed char *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
int Gather(const int *sendBuffer, int *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int WriteDataArray(vtkDataArray *object)
virtual int SendVoidArray(const void *data, vtkIdType length, int type, int remoteHandle, int tag)=0
Subclasses have to supply this method to send various arrays of data.
int Receive(float *data, vtkIdType maxlength, int remoteHandle, int tag)
Convenience methods for receiving data arrays.
int Send(const long long *data, vtkIdType length, int remoteHandle, int tag)
Convenience methods for sending data arrays.
int ScatterV(const float *sendBuffer, float *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
int Gather(const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int GatherV(const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
int Receive(vtkMultiProcessStream &stream, int remoteId, int tag)
int AllReduce(const float *sendBuffer, float *recvBuffer, vtkIdType length, Operation *operation)
Same as Reduce except that the result is placed in all of the processes.
virtual int AllReduceVoidArray(const void *sendBuffer, void *recvBuffer, vtkIdType length, int type, Operation *operation)
Subclasses should reimplement these if they have a more efficient implementation.
int Reduce(const double *sendBuffer, double *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
int AllReduce(const long long *sendBuffer, long long *recvBuffer, vtkIdType length, Operation *operation)
Same as Reduce except that the result is placed in all of the processes.
int Broadcast(unsigned char *data, vtkIdType length, int srcProcessId)
Broadcast sends the array in the process with id srcProcessId to all of the other processes.
virtual int AllReduceVoidArray(const void *sendBuffer, void *recvBuffer, vtkIdType length, int type, int operation)
Subclasses should reimplement these if they have a more efficient implementation.
int ScatterV(const short *sendBuffer, short *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
int ReceiveElementalDataObject(vtkDataObject *data, int remoteHandle, int tag)
int ScatterV(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
int ScatterV(const long long *sendBuffer, long long *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
int Scatter(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int srcProcessId)
Scatter takes an array in the process with id srcProcessId and distributes it.
int Broadcast(char *data, vtkIdType length, int srcProcessId)
Broadcast sends the array in the process with id srcProcessId to all of the other processes.
int Broadcast(unsigned long long *data, vtkIdType length, int srcProcessId)
Broadcast sends the array in the process with id srcProcessId to all of the other processes.
int AllGatherV(const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
Same as GatherV except that the result is placed in all processes.
virtual void Barrier()
Will block the processes until all other processes reach the Barrier function.
int ScatterV(const int *sendBuffer, int *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
int AllReduce(const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, Operation *operation)
Same as Reduce except that the result is placed in all of the processes.
static vtkSmartPointer< vtkDataObject > UnMarshalDataObject(vtkCharArray *buffer)
Same as UnMarshalDataObject(vtkCharArray*, vtkDataObject*) except that this method doesn't need to kn...
int Gather(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int SendElementalDataObject(vtkDataObject *data, int remoteHandle, int tag)
int Gather(const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int Receive(long *data, vtkIdType maxlength, int remoteHandle, int tag)
Convenience methods for receiving data arrays.
int Reduce(const float *sendBuffer, float *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
Reduce an array to the given destination process.
int Gather(const double *sendBuffer, double *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int Broadcast(vtkMultiProcessStream &stream, int srcProcessId)
int AllGatherV(const int *sendBuffer, int *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
Same as GatherV except that the result is placed in all processes.
int AllGather(const long long *sendBuffer, long long *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int Reduce(const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
Reduce an array to the given destination process.
static int UnMarshalDataObject(vtkCharArray *buffer, vtkDataObject *object)
Convert a data object into a string that can be transmitted and vice versa.
int Reduce(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
Reduce an array to the given destination process.
int AllReduce(const short *sendBuffer, short *recvBuffer, vtkIdType length, Operation *operation)
Same as Reduce except that the result is placed in all of the processes.
int Reduce(const char *sendBuffer, char *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
Reduce an array to the given destination process.
int Scatter(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int srcProcessId)
Scatter takes an array in the process with id srcProcessId and distributes it.
int GatherV(const long *sendBuffer, long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
int Reduce(const double *sendBuffer, double *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
Reduce an array to the given destination process.
int GatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkIdTypeArray *recvLengths, vtkIdTypeArray *offsets, int destProcessId)
For the first GatherV variant, recvLengths and offsets known on destProcessId and are passed in as pa...
int Gather(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int Gather(vtkDataObject *sendBuffer, std::vector< vtkSmartPointer< vtkDataObject >> &recvBuffer, int destProcessId)
Gathers vtkDataObject (sendBuffer) from all ranks to the destProcessId.
int Broadcast(signed char *data, vtkIdType length, int srcProcessId)
Broadcast sends the array in the process with id srcProcessId to all of the other processes.
int AllReduce(const int *sendBuffer, int *recvBuffer, vtkIdType length, int operation)
Same as Reduce except that the result is placed in all of the processes.
virtual int ReceiveVoidArray(void *data, vtkIdType maxlength, int type, int remoteHandle, int tag)=0
Subclasses have to supply this method to receive various arrays of data.
int Send(const unsigned long *data, vtkIdType length, int remoteHandle, int tag)
Convenience methods for sending data arrays.
int GatherVElementalDataObject(vtkDataObject *sendData, vtkSmartPointer< vtkDataObject > *receiveData, int destProcessId)
GatherV collects arrays in the process with id destProcessId.
int AllReduce(const long *sendBuffer, long *recvBuffer, vtkIdType length, Operation *operation)
Same as Reduce except that the result is placed in all of the processes.
int AllReduce(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, Operation *operation)
Same as Reduce except that the result is placed in all of the processes.
static int GetParentProcessor(int pid)
Some helper functions when dealing with heap tree - based algorithms - we don't need a function for g...
int AllReduce(const long long *sendBuffer, long long *recvBuffer, vtkIdType length, int operation)
Same as Reduce except that the result is placed in all of the processes.
int Reduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, Operation *operation, int destProcessId)
Reduce an array to the given destination process.
int Send(vtkDataObject *data, int remoteHandle, int tag)
This method sends a data object to a destination.
int Broadcast(long long *data, vtkIdType length, int srcProcessId)
Broadcast sends the array in the process with id srcProcessId to all of the other processes.
int Receive(vtkDataObject *data, int remoteHandle, int tag)
This method receives a data object from a corresponding send.
int ReceiveMultiBlockDataSet(vtkMultiBlockDataSet *data, int remoteHandle, int tag)
int GatherV(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
int Reduce(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
int AllGatherV(const double *sendBuffer, double *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
Same as GatherV except that the result is placed in all processes.
int GatherV(vtkDataArray *sendArray, vtkDataArray *recvArray, vtkSmartPointer< vtkDataArray > *recvArrays, int destProcessId)
GatherV collects arrays in the process with id destProcessId.
int Scatter(const short *sendBuffer, short *recvBuffer, vtkIdType length, int srcProcessId)
Scatter takes an array in the process with id srcProcessId and distributes it.
int Gather(const long *sendBuffer, long *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int AllGatherV(const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
Same as GatherV except that the result is placed in all processes.
int ReadDataArray(vtkDataArray *object)
int Broadcast(unsigned long *data, vtkIdType length, int srcProcessId)
Broadcast sends the array in the process with id srcProcessId to all of the other processes.
int AllReduce(const char *sendBuffer, char *recvBuffer, vtkIdType length, int operation)
Same as Reduce except that the result is placed in all of the processes.
int Broadcast(long *data, vtkIdType length, int srcProcessId)
Broadcast sends the array in the process with id srcProcessId to all of the other processes.
int AllReduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, Operation *operation)
Same as Reduce except that the result is placed in all of the processes.
int AllGatherV(vtkDataArray *sendArray, vtkDataArray *recvArray, vtkSmartPointer< vtkDataArray > *recvArrays)
int Scatter(const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, int srcProcessId)
Scatter takes an array in the process with id srcProcessId and distributes it.
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 AllReduce(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, int operation)
Same as Reduce except that the result is placed in all of the processes.
int AllGatherV(const signed char *sendBuffer, signed char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
Same as GatherV except that the result is placed in all processes.
int Scatter(const int *sendBuffer, int *recvBuffer, vtkIdType length, int srcProcessId)
Scatter takes an array in the process with id srcProcessId and distributes it.
virtual int ReduceVoidArray(const void *sendBuffer, void *recvBuffer, vtkIdType length, int type, int operation, int destProcessId)
Subclasses should reimplement these if they have a more efficient implementation.
int GatherV(const double *sendBuffer, double *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
int Reduce(const long *sendBuffer, long *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
int ScatterV(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
int Receive(unsigned char *data, vtkIdType maxlength, int remoteHandle, int tag)
Convenience methods for receiving data arrays.
int Receive(signed char *data, vtkIdType maxlength, int remoteHandle, int tag)
Convenience methods for receiving data arrays.
int AllReduce(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int operation)
Same as Reduce except that the result is placed in all of the processes.
int Reduce(const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
int Reduce(const long long *sendBuffer, long long *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
Reduce an array to the given destination process.
int ReceiveDataObject(vtkDataObject *data, int remoteHandle, int tag, int type=-1)
virtual int ComputeGlobalBounds(int processorId, int numProcesses, vtkBoundingBox *bounds, int *rightHasBounds=nullptr, int *leftHasBounds=nullptr, int hasBoundsTag=288402, int localBoundsTag=288403, int globalBoundsTag=288404)
Determine the global bounds for a set of processes.
int Send(const long *data, vtkIdType length, int remoteHandle, int tag)
Convenience methods for sending data arrays.
int Gather(const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int AllGatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkIdType *recvLengths, vtkIdType *offsets)
Same as GatherV except that the result is placed in all processes.
int Send(const double *data, vtkIdType length, int remoteHandle, int tag)
Convenience methods for sending data arrays.
int Gather(const vtkMultiProcessStream &sendBuffer, std::vector< vtkMultiProcessStream > &recvBuffer, int destProcessId)
Gathers vtkMultiProcessStream (sendBuffer) from all ranks to the destProcessId.
int Receive(int *data, vtkIdType maxlength, int remoteHandle, int tag)
Convenience methods for receiving data arrays.
int Gather(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int AllReduce(const double *sendBuffer, double *recvBuffer, vtkIdType length, int operation)
Same as Reduce except that the result is placed in all of the processes.
int ScatterV(const double *sendBuffer, double *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
int Gather(const char *sendBuffer, char *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int Reduce(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
virtual int ScatterVVoidArray(const void *sendBuffer, void *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int type, int srcProcessId)
Subclasses should reimplement these if they have a more efficient implementation.
int AllGatherV(const char *sendBuffer, char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
Same as GatherV except that the result is placed in all processes.
int Reduce(const int *sendBuffer, int *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
int AllGather(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int Gather(const long long *sendBuffer, long long *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int Scatter(const double *sendBuffer, double *recvBuffer, vtkIdType length, int srcProcessId)
Scatter takes an array in the process with id srcProcessId and distributes it.
int GatherV(const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
virtual int ScatterVoidArray(const void *sendBuffer, void *recvBuffer, vtkIdType length, int type, int srcProcessId)
Subclasses should reimplement these if they have a more efficient implementation.
int AllReduce(const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, int operation)
Same as Reduce except that the result is placed in all of the processes.
int GatherV(const int *sendBuffer, int *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
int Send(const unsigned char *data, vtkIdType length, int remoteHandle, int tag)
Convenience methods for sending data arrays.
int AllGather(vtkDataObject *sendBuffer, std::vector< vtkSmartPointer< vtkDataObject >> &recvBuffer)
Gathers vtkDataObject (sendBuffer) from all ranks to all raks.
virtual int ReduceVoidArray(const void *sendBuffer, void *recvBuffer, vtkIdType length, int type, Operation *operation, int destProcessId)
Subclasses should reimplement these if they have a more efficient implementation.
int AllGatherV(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
Same as GatherV except that the result is placed in all processes.
int AllReduce(const char *sendBuffer, char *recvBuffer, vtkIdType length, Operation *operation)
Same as Reduce except that the result is placed in all of the processes.
int AllGather(const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int AllGather(const double *sendBuffer, double *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int Gather(const float *sendBuffer, float *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int AllReduce(const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, Operation *operation)
Same as Reduce except that the result is placed in all of the processes.
int GatherV(const char *sendBuffer, char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
int AllReduce(const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, int operation)
Same as Reduce except that the result is placed in all of the processes.
int Scatter(const char *sendBuffer, char *recvBuffer, vtkIdType length, int srcProcessId)
Scatter takes an array in the process with id srcProcessId and distributes it.
~vtkCommunicator() override
int Receive(short *data, vtkIdType maxlength, int remoteHandle, int tag)
Convenience methods for receiving data arrays.
int Broadcast(vtkDataArray *data, int srcProcessId)
Broadcast sends the array in the process with id srcProcessId to all of the other processes.
int GatherV(const float *sendBuffer, float *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
int AllGatherV(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
Same as GatherV except that the result is placed in all processes.
virtual int GatherVoidArray(const void *sendBuffer, void *recvBuffer, vtkIdType length, int type, int destProcessId)
Subclasses should reimplement these if they have a more efficient implementation.
int Reduce(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
int Broadcast(double *data, vtkIdType length, int srcProcessId)
Broadcast sends the array in the process with id srcProcessId to all of the other processes.
int Broadcast(unsigned short *data, vtkIdType length, int srcProcessId)
Broadcast sends the array in the process with id srcProcessId to all of the other processes.
int Receive(double *data, vtkIdType maxlength, int remoteHandle, int tag)
Convenience methods for receiving data arrays.
static int GetLeftChildProcessor(int pid)
Some helper functions when dealing with heap tree - based algorithms - we don't need a function for g...
virtual int AllGatherVVoidArray(const void *sendBuffer, void *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int type)
Subclasses should reimplement these if they have a more efficient implementation.
int AllReduce(const long *sendBuffer, long *recvBuffer, vtkIdType length, int operation)
Same as Reduce except that the result is placed in all of the processes.
int GatherV(const short *sendBuffer, short *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
virtual int AllGatherVoidArray(const void *sendBuffer, void *recvBuffer, vtkIdType length, int type)
Subclasses should reimplement these if they have a more efficient implementation.
int AllGather(const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int Receive(unsigned long *data, vtkIdType maxlength, int remoteHandle, int tag)
Convenience methods for receiving data arrays.
int GatherV(const long long *sendBuffer, long long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
int AllReduce(const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, int operation)
Same as Reduce except that the result is placed in all of the processes.
int Reduce(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
Reduce an array to the given destination process.
int GatherV(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
int AllGather(const vtkMultiProcessStream &sendBuffer, std::vector< vtkMultiProcessStream > &recvBuffer)
Same as gather except that the result ends up on all processes.
int AllGather(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer)
Same as gather except that the result ends up on all processes.
int AllReduce(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, int operation)
Same as Reduce except that the result is placed in all of the processes.
int Send(const signed char *data, vtkIdType length, int remoteHandle, int tag)
Convenience methods for sending data arrays.
int AllGather(const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int AllGather(const int *sendBuffer, int *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int Send(const unsigned int *data, vtkIdType length, int remoteHandle, int tag)
Convenience methods for sending data arrays.
virtual int BroadcastVoidArray(void *data, vtkIdType length, int type, int srcProcessId)
Subclasses should reimplement these if they have a more efficient implementation.
int Receive(unsigned short *data, vtkIdType maxlength, int remoteHandle, int tag)
Convenience methods for receiving data arrays.
int Reduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int operation, int destProcessId)
Reduce an array to the given destination process.
int Broadcast(unsigned int *data, vtkIdType length, int srcProcessId)
Broadcast sends the array in the process with id srcProcessId to all of the other processes.
int Broadcast(vtkDataObject *data, int srcProcessId)
Broadcast sends the array in the process with id srcProcessId to all of the other processes.
int Reduce(const short *sendBuffer, short *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
Reduce an array to the given destination process.
int Reduce(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
Reduce an array to the given destination process.
static int MarshalDataObject(vtkDataObject *object, vtkCharArray *buffer)
Convert a data object into a string that can be transmitted and vice versa.
int Reduce(const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
Reduce an array to the given destination process.
int Scatter(const float *sendBuffer, float *recvBuffer, vtkIdType length, int srcProcessId)
Scatter takes an array in the process with id srcProcessId and distributes it.
int Send(const float *data, vtkIdType length, int remoteHandle, int tag)
Convenience methods for sending data arrays.
int Send(const vtkMultiProcessStream &stream, int remoteId, int tag)
int AllReduce(const float *sendBuffer, float *recvBuffer, vtkIdType length, int operation)
Same as Reduce except that the result is placed in all of the processes.
int Reduce(const float *sendBuffer, float *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
int AllGatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkIdTypeArray *recvLengthsArray, vtkIdTypeArray *offsetsArray)
int AllGatherV(const float *sendBuffer, float *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
Same as GatherV except that the result is placed in all processes.
int AllReduce(const short *sendBuffer, short *recvBuffer, vtkIdType length, int operation)
Same as Reduce except that the result is placed in all of the processes.
int AllGatherV(const long long *sendBuffer, long long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
Same as GatherV except that the result is placed in all processes.
vtkDataObject * ReceiveDataObject(int remoteHandle, int tag)
The caller does not have to know the data type before this call is made.
int Scatter(const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, int srcProcessId)
Scatter takes an array in the process with id srcProcessId and distributes it.
int Reduce(const int *sendBuffer, int *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
Reduce an array to the given destination process.
int AllGatherV(const short *sendBuffer, short *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
Same as GatherV except that the result is placed in all processes.
int Send(const unsigned short *data, vtkIdType length, int remoteHandle, int tag)
Convenience methods for sending data arrays.
int AllReduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int operation)
Same as Reduce except that the result is placed in all of the processes.
int AllGatherV(const long *sendBuffer, long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
Same as GatherV except that the result is placed in all processes.
int Reduce(const short *sendBuffer, short *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
int ScatterV(const char *sendBuffer, char *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
int Receive(unsigned int *data, vtkIdType maxlength, int remoteHandle, int tag)
Convenience methods for receiving data arrays.
int Broadcast(float *data, vtkIdType length, int srcProcessId)
Broadcast sends the array in the process with id srcProcessId to all of the other processes.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:50
general representation of visualization data
Definition: vtkDataObject.h:60
abstract class to specify dataset behavior
Definition: vtkDataSet.h:57
dynamic, self-adjusting array of vtkIdType
topologically and geometrically regular array of data
Definition: vtkImageData.h:48
a simple class to control print indentation
Definition: vtkIndent.h:34
Composite dataset that organizes datasets into blocks.
stream used to pass data across processes using vtkMultiProcessController.
abstract base class for most VTK objects
Definition: vtkObject.h:63
@ vector
Definition: vtkX3D.h:243
@ length
Definition: vtkX3D.h:399
@ type
Definition: vtkX3D.h:522
@ data
Definition: vtkX3D.h:321
#define VTK_SHORT
Definition: vtkType.h:48
int vtkIdType
Definition: vtkType.h:332
#define VTK_UNSIGNED_INT
Definition: vtkType.h:51
#define VTK_LONG_LONG
Definition: vtkType.h:63
#define VTK_DOUBLE
Definition: vtkType.h:55
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:47
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:49
#define VTK_INT
Definition: vtkType.h:50
#define VTK_SIGNED_CHAR
Definition: vtkType.h:46
#define VTK_FLOAT
Definition: vtkType.h:54
#define VTK_CHAR
Definition: vtkType.h:45
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:53
#define VTK_UNSIGNED_LONG_LONG
Definition: vtkType.h:64
#define VTK_LONG
Definition: vtkType.h:52