VTK  9.2.6
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=========================================================================*/
35#ifndef vtkCommunicator_h
36#define vtkCommunicator_h
37
38#include "vtkObject.h"
39#include "vtkParallelCoreModule.h" // For export macro
40#include "vtkSmartPointer.h" // needed for vtkSmartPointer.
41#include <vector> // needed for std::vector
42
43class vtkBoundingBox;
44class vtkCharArray;
45class vtkDataArray;
46class vtkDataObject;
47class vtkDataSet;
48class vtkIdTypeArray;
49class vtkImageData;
52
53class VTKPARALLELCORE_EXPORT vtkCommunicator : public vtkObject
54{
55
56public:
57 vtkTypeMacro(vtkCommunicator, vtkObject);
58 void PrintSelf(ostream& os, vtkIndent indent) override;
59
61
66 virtual void SetNumberOfProcesses(int num);
67 vtkGetMacro(NumberOfProcesses, int);
69
71
74 vtkGetMacro(LocalProcessId, int);
76
77 enum Tags
78 {
79 BROADCAST_TAG = 10,
80 GATHER_TAG = 11,
81 GATHERV_TAG = 12,
82 SCATTER_TAG = 13,
83 SCATTERV_TAG = 14,
84 REDUCE_TAG = 15,
85 BARRIER_TAG = 16
86 };
87
89 {
99 BITWISE_XOR_OP
100 };
101
107 {
108 public:
119 virtual void Function(const void* A, void* B, vtkIdType length, int datatype) = 0;
120
125 virtual int Commutative() = 0;
126
127 virtual ~Operation() = default;
128 };
129
135 int Send(vtkDataObject* data, int remoteHandle, int tag);
136
142 int Send(vtkDataArray* data, int remoteHandle, int tag);
143
150 virtual int SendVoidArray(
151 const void* data, vtkIdType length, int type, int remoteHandle, int tag) = 0;
152
154
157 int Send(const int* data, vtkIdType length, int remoteHandle, int tag)
158 {
159 return this->SendVoidArray(data, length, VTK_INT, remoteHandle, tag);
160 }
161 int Send(const unsigned int* data, vtkIdType length, int remoteHandle, int tag)
162 {
163 return this->SendVoidArray(data, length, VTK_INT, remoteHandle, tag);
164 }
165 int Send(const short* data, vtkIdType length, int remoteHandle, int tag)
166 {
167 return this->SendVoidArray(data, length, VTK_SHORT, remoteHandle, tag);
168 }
169 int Send(const unsigned short* data, vtkIdType length, int remoteHandle, int tag)
170 {
171 return this->SendVoidArray(data, length, VTK_UNSIGNED_SHORT, remoteHandle, tag);
172 }
173 int Send(const long* data, vtkIdType length, int remoteHandle, int tag)
174 {
175 return this->SendVoidArray(data, length, VTK_LONG, remoteHandle, tag);
176 }
177 int Send(const unsigned long* data, vtkIdType length, int remoteHandle, int tag)
178 {
179 return this->SendVoidArray(data, length, VTK_UNSIGNED_LONG, remoteHandle, tag);
180 }
181 int Send(const unsigned char* data, vtkIdType length, int remoteHandle, int tag)
182 {
183 return this->SendVoidArray(data, length, VTK_UNSIGNED_CHAR, remoteHandle, tag);
184 }
185 int Send(const char* data, vtkIdType length, int remoteHandle, int tag)
186 {
187 return this->SendVoidArray(data, length, VTK_CHAR, remoteHandle, tag);
188 }
189 int Send(const signed char* data, vtkIdType length, int remoteHandle, int tag)
190 {
191 return this->SendVoidArray(data, length, VTK_SIGNED_CHAR, remoteHandle, tag);
192 }
193 int Send(const float* data, vtkIdType length, int remoteHandle, int tag)
194 {
195 return this->SendVoidArray(data, length, VTK_FLOAT, remoteHandle, tag);
196 }
197 int Send(const double* data, vtkIdType length, int remoteHandle, int tag)
198 {
199 return this->SendVoidArray(data, length, VTK_DOUBLE, remoteHandle, tag);
200 }
201 int Send(const long long* data, vtkIdType length, int remoteHandle, int tag)
202 {
203 return this->SendVoidArray(data, length, VTK_LONG_LONG, remoteHandle, tag);
204 }
205 int Send(const unsigned long long* data, vtkIdType length, int remoteHandle, int tag)
206 {
207 return this->SendVoidArray(data, length, VTK_UNSIGNED_LONG_LONG, remoteHandle, tag);
208 }
210
211 int Send(const vtkMultiProcessStream& stream, int remoteId, int tag);
212
217 int Receive(vtkDataObject* data, int remoteHandle, int tag);
218
223 vtkDataObject* ReceiveDataObject(int remoteHandle, int tag);
224
229 int Receive(vtkDataArray* data, int remoteHandle, int tag);
230
241 virtual int ReceiveVoidArray(
242 void* data, vtkIdType maxlength, int type, int remoteHandle, int tag) = 0;
243
245
248 int Receive(int* data, vtkIdType maxlength, int remoteHandle, int tag)
249 {
250 return this->ReceiveVoidArray(data, maxlength, VTK_INT, remoteHandle, tag);
251 }
252 int Receive(unsigned int* data, vtkIdType maxlength, int remoteHandle, int tag)
253 {
254 return this->ReceiveVoidArray(data, maxlength, VTK_INT, remoteHandle, tag);
255 }
256 int Receive(short* data, vtkIdType maxlength, int remoteHandle, int tag)
257 {
258 return this->ReceiveVoidArray(data, maxlength, VTK_SHORT, remoteHandle, tag);
259 }
260 int Receive(unsigned short* data, vtkIdType maxlength, int remoteHandle, int tag)
261 {
262 return this->ReceiveVoidArray(data, maxlength, VTK_UNSIGNED_SHORT, remoteHandle, tag);
263 }
264 int Receive(long* data, vtkIdType maxlength, int remoteHandle, int tag)
265 {
266 return this->ReceiveVoidArray(data, maxlength, VTK_LONG, remoteHandle, tag);
267 }
268 int Receive(unsigned long* data, vtkIdType maxlength, int remoteHandle, int tag)
269 {
270 return this->ReceiveVoidArray(data, maxlength, VTK_UNSIGNED_LONG, remoteHandle, tag);
271 }
272 int Receive(unsigned char* data, vtkIdType maxlength, int remoteHandle, int tag)
273 {
274 return this->ReceiveVoidArray(data, maxlength, VTK_UNSIGNED_CHAR, remoteHandle, tag);
275 }
276 int Receive(char* data, vtkIdType maxlength, int remoteHandle, int tag)
277 {
278 return this->ReceiveVoidArray(data, maxlength, VTK_CHAR, remoteHandle, tag);
279 }
280 int Receive(signed char* data, vtkIdType maxlength, int remoteHandle, int tag)
281 {
282 return this->ReceiveVoidArray(data, maxlength, VTK_SIGNED_CHAR, remoteHandle, tag);
283 }
284 int Receive(float* data, vtkIdType maxlength, int remoteHandle, int tag)
285 {
286 return this->ReceiveVoidArray(data, maxlength, VTK_FLOAT, remoteHandle, tag);
287 }
288 int Receive(double* data, vtkIdType maxlength, int remoteHandle, int tag)
289 {
290 return this->ReceiveVoidArray(data, maxlength, VTK_DOUBLE, remoteHandle, tag);
291 }
292 int Receive(long long* data, vtkIdType maxlength, int remoteHandle, int tag)
293 {
294 return this->ReceiveVoidArray(data, maxlength, VTK_LONG_LONG, remoteHandle, tag);
295 }
296 int Receive(unsigned long long* data, vtkIdType maxlength, int remoteHandle, int tag)
297 {
298 return this->ReceiveVoidArray(data, maxlength, VTK_UNSIGNED_LONG_LONG, remoteHandle, tag);
299 }
301
302 int Receive(vtkMultiProcessStream& stream, int remoteId, int tag);
303
305
313 vtkGetMacro(Count, vtkIdType);
315
316 //---------------------- Collective Operations ----------------------
317
322 virtual void Barrier();
323
325
330 int Broadcast(int* data, vtkIdType length, int srcProcessId)
331 {
332 return this->BroadcastVoidArray(data, length, VTK_INT, srcProcessId);
333 }
334 int Broadcast(unsigned int* data, vtkIdType length, int srcProcessId)
335 {
336 return this->BroadcastVoidArray(data, length, VTK_UNSIGNED_INT, srcProcessId);
337 }
338 int Broadcast(short* data, vtkIdType length, int srcProcessId)
339 {
340 return this->BroadcastVoidArray(data, length, VTK_SHORT, srcProcessId);
341 }
342 int Broadcast(unsigned short* data, vtkIdType length, int srcProcessId)
343 {
344 return this->BroadcastVoidArray(data, length, VTK_UNSIGNED_SHORT, srcProcessId);
345 }
346 int Broadcast(long* data, vtkIdType length, int srcProcessId)
347 {
348 return this->BroadcastVoidArray(data, length, VTK_LONG, srcProcessId);
349 }
350 int Broadcast(unsigned long* data, vtkIdType length, int srcProcessId)
351 {
352 return this->BroadcastVoidArray(data, length, VTK_UNSIGNED_LONG, srcProcessId);
353 }
354 int Broadcast(unsigned char* data, vtkIdType length, int srcProcessId)
355 {
356 return this->BroadcastVoidArray(data, length, VTK_UNSIGNED_CHAR, srcProcessId);
357 }
358 int Broadcast(char* data, vtkIdType length, int srcProcessId)
359 {
360 return this->BroadcastVoidArray(data, length, VTK_CHAR, srcProcessId);
361 }
362 int Broadcast(signed char* data, vtkIdType length, int srcProcessId)
363 {
364 return this->BroadcastVoidArray(data, length, VTK_SIGNED_CHAR, srcProcessId);
365 }
366 int Broadcast(float* data, vtkIdType length, int srcProcessId)
367 {
368 return this->BroadcastVoidArray(data, length, VTK_FLOAT, srcProcessId);
369 }
370 int Broadcast(double* data, vtkIdType length, int srcProcessId)
371 {
372 return this->BroadcastVoidArray(data, length, VTK_DOUBLE, srcProcessId);
373 }
374 int Broadcast(long long* data, vtkIdType length, int srcProcessId)
375 {
376 return this->BroadcastVoidArray(data, length, VTK_LONG_LONG, srcProcessId);
377 }
378 int Broadcast(unsigned long long* data, vtkIdType length, int srcProcessId)
379 {
380 return this->BroadcastVoidArray(data, length, VTK_UNSIGNED_LONG_LONG, srcProcessId);
381 }
382 int Broadcast(vtkDataObject* data, int srcProcessId);
383 int Broadcast(vtkDataArray* data, int srcProcessId);
385
386 int Broadcast(vtkMultiProcessStream& stream, int srcProcessId);
387
389
398 int Gather(const int* sendBuffer, int* recvBuffer, vtkIdType length, int destProcessId)
399 {
400 return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_INT, destProcessId);
401 }
403 const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length, int destProcessId)
404 {
405 return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_INT, destProcessId);
406 }
407 int Gather(const short* sendBuffer, short* recvBuffer, vtkIdType length, int destProcessId)
408 {
409 return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_SHORT, destProcessId);
410 }
411 int Gather(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
412 int destProcessId)
413 {
414 return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_SHORT, destProcessId);
415 }
416 int Gather(const long* sendBuffer, long* recvBuffer, vtkIdType length, int destProcessId)
417 {
418 return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_LONG, destProcessId);
419 }
421 const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length, int destProcessId)
422 {
423 return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG, destProcessId);
424 }
426 const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length, int destProcessId)
427 {
428 return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_CHAR, destProcessId);
429 }
430 int Gather(const char* sendBuffer, char* recvBuffer, vtkIdType length, int destProcessId)
431 {
432 return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_CHAR, destProcessId);
433 }
435 const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length, int destProcessId)
436 {
437 return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_SIGNED_CHAR, destProcessId);
438 }
439 int Gather(const float* sendBuffer, float* recvBuffer, vtkIdType length, int destProcessId)
440 {
441 return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_FLOAT, destProcessId);
442 }
443 int Gather(const double* sendBuffer, double* recvBuffer, vtkIdType length, int destProcessId)
444 {
445 return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_DOUBLE, destProcessId);
446 }
448 const long long* sendBuffer, long long* recvBuffer, vtkIdType length, int destProcessId)
449 {
450 return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_LONG_LONG, destProcessId);
451 }
452 int Gather(const unsigned long long* sendBuffer, unsigned long long* recvBuffer, vtkIdType length,
453 int destProcessId)
454 {
455 return this->GatherVoidArray(
456 sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG_LONG, destProcessId);
457 }
458 int Gather(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int destProcessId);
460
473 int Gather(vtkDataObject* sendBuffer, std::vector<vtkSmartPointer<vtkDataObject>>& recvBuffer,
474 int destProcessId);
475
485 int Gather(const vtkMultiProcessStream& sendBuffer,
486 std::vector<vtkMultiProcessStream>& recvBuffer, int destProcessId);
487
489
500 int GatherV(const int* sendBuffer, int* recvBuffer, vtkIdType sendLength, vtkIdType* recvLengths,
501 vtkIdType* offsets, int destProcessId)
502 {
503 return this->GatherVVoidArray(
504 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_INT, destProcessId);
505 }
506 int GatherV(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType sendLength,
507 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
508 {
509 return this->GatherVVoidArray(
510 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_INT, destProcessId);
511 }
512 int GatherV(const short* sendBuffer, short* recvBuffer, vtkIdType sendLength,
513 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
514 {
515 return this->GatherVVoidArray(
516 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_SHORT, destProcessId);
517 }
518 int GatherV(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType sendLength,
519 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
520 {
521 return this->GatherVVoidArray(
522 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_SHORT, destProcessId);
523 }
524 int GatherV(const long* sendBuffer, long* recvBuffer, vtkIdType sendLength,
525 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
526 {
527 return this->GatherVVoidArray(
528 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_LONG, destProcessId);
529 }
530 int GatherV(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType sendLength,
531 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
532 {
533 return this->GatherVVoidArray(
534 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_LONG, destProcessId);
535 }
536 int GatherV(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType sendLength,
537 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
538 {
539 return this->GatherVVoidArray(
540 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_CHAR, destProcessId);
541 }
542 int GatherV(const char* sendBuffer, char* recvBuffer, vtkIdType sendLength,
543 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
544 {
545 return this->GatherVVoidArray(
546 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_CHAR, destProcessId);
547 }
548 int GatherV(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType sendLength,
549 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
550 {
551 return this->GatherVVoidArray(
552 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_SIGNED_CHAR, destProcessId);
553 }
554 int GatherV(const float* sendBuffer, float* recvBuffer, vtkIdType sendLength,
555 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
556 {
557 return this->GatherVVoidArray(
558 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_FLOAT, destProcessId);
559 }
560 int GatherV(const double* sendBuffer, double* recvBuffer, vtkIdType sendLength,
561 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
562 {
563 return this->GatherVVoidArray(
564 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_DOUBLE, destProcessId);
565 }
566 int GatherV(const long long* sendBuffer, long long* recvBuffer, vtkIdType sendLength,
567 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
568 {
569 return this->GatherVVoidArray(
570 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_LONG_LONG, destProcessId);
571 }
572 int GatherV(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
573 vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
574 {
575 return this->GatherVVoidArray(sendBuffer, recvBuffer, sendLength, recvLengths, offsets,
576 VTK_UNSIGNED_LONG_LONG, destProcessId);
577 }
580
590 int GatherV(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, vtkIdType* recvLengths,
591 vtkIdType* offsets, int destProcessId);
592 int GatherV(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, vtkIdTypeArray* recvLengths,
593 vtkIdTypeArray* offsets, int destProcessId);
594 int GatherV(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int destProcessId);
596
604 int GatherV(vtkDataObject* sendData, vtkSmartPointer<vtkDataObject>* recvData, int destProcessId);
605
607
614 int Scatter(const int* sendBuffer, int* recvBuffer, vtkIdType length, int srcProcessId)
615 {
616 return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_INT, srcProcessId);
617 }
619 const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length, int srcProcessId)
620 {
621 return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_INT, srcProcessId);
622 }
623 int Scatter(const short* sendBuffer, short* recvBuffer, vtkIdType length, int srcProcessId)
624 {
625 return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_SHORT, srcProcessId);
626 }
627 int Scatter(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
628 int srcProcessId)
629 {
630 return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_SHORT, srcProcessId);
631 }
632 int Scatter(const long* sendBuffer, long* recvBuffer, vtkIdType length, int srcProcessId)
633 {
634 return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_INT, srcProcessId);
635 }
637 const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length, int srcProcessId)
638 {
639 return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG, srcProcessId);
640 }
642 const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length, int srcProcessId)
643 {
644 return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_CHAR, srcProcessId);
645 }
646 int Scatter(const char* sendBuffer, char* recvBuffer, vtkIdType length, int srcProcessId)
647 {
648 return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_CHAR, srcProcessId);
649 }
651 const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length, int srcProcessId)
652 {
653 return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_SIGNED_CHAR, srcProcessId);
654 }
655 int Scatter(const float* sendBuffer, float* recvBuffer, vtkIdType length, int srcProcessId)
656 {
657 return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_FLOAT, srcProcessId);
658 }
659 int Scatter(const double* sendBuffer, double* recvBuffer, vtkIdType length, int srcProcessId)
660 {
661 return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_DOUBLE, srcProcessId);
662 }
664 const long long* sendBuffer, long long* recvBuffer, vtkIdType length, int srcProcessId)
665 {
666 return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_LONG_LONG, srcProcessId);
667 }
668 int Scatter(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
669 vtkIdType length, int srcProcessId)
670 {
671 return this->ScatterVoidArray(
672 sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG_LONG, srcProcessId);
673 }
674 int Scatter(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int srcProcessId);
676
678
685 int ScatterV(const int* sendBuffer, int* recvBuffer, vtkIdType* sendLengths, vtkIdType* offsets,
686 vtkIdType recvLength, int srcProcessId)
687 {
688 return this->ScatterVVoidArray(
689 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_INT, srcProcessId);
690 }
691 int ScatterV(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType* sendLengths,
692 vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
693 {
694 return this->ScatterVVoidArray(
695 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_UNSIGNED_INT, srcProcessId);
696 }
697 int ScatterV(const short* sendBuffer, short* recvBuffer, vtkIdType* sendLengths,
698 vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
699 {
700 return this->ScatterVVoidArray(
701 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_SHORT, srcProcessId);
702 }
703 int ScatterV(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType* sendLengths,
704 vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
705 {
706 return this->ScatterVVoidArray(
707 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_UNSIGNED_SHORT, srcProcessId);
708 }
709 int ScatterV(const long* sendBuffer, long* recvBuffer, vtkIdType* sendLengths, vtkIdType* offsets,
710 vtkIdType recvLength, int srcProcessId)
711 {
712 return this->ScatterVVoidArray(
713 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_LONG, srcProcessId);
714 }
715 int ScatterV(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType* sendLengths,
716 vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
717 {
718 return this->ScatterVVoidArray(
719 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_UNSIGNED_LONG, srcProcessId);
720 }
721 int ScatterV(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType* sendLengths,
722 vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
723 {
724 return this->ScatterVVoidArray(
725 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_UNSIGNED_CHAR, srcProcessId);
726 }
727 int ScatterV(const char* sendBuffer, char* recvBuffer, vtkIdType* sendLengths, vtkIdType* offsets,
728 vtkIdType recvLength, int srcProcessId)
729 {
730 return this->ScatterVVoidArray(
731 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_CHAR, srcProcessId);
732 }
733 int ScatterV(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType* sendLengths,
734 vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
735 {
736 return this->ScatterVVoidArray(
737 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_SIGNED_CHAR, srcProcessId);
738 }
739 int ScatterV(const float* sendBuffer, float* recvBuffer, vtkIdType* sendLengths,
740 vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
741 {
742 return this->ScatterVVoidArray(
743 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_FLOAT, srcProcessId);
744 }
745 int ScatterV(const double* sendBuffer, double* recvBuffer, vtkIdType* sendLengths,
746 vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
747 {
748 return this->ScatterVVoidArray(
749 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_DOUBLE, srcProcessId);
750 }
751 int ScatterV(const long long* sendBuffer, long long* recvBuffer, vtkIdType* sendLengths,
752 vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
753 {
754 return this->ScatterVVoidArray(
755 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_LONG_LONG, srcProcessId);
756 }
757 int ScatterV(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
758 vtkIdType* sendLengths, vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
759 {
760 return this->ScatterVVoidArray(sendBuffer, recvBuffer, sendLengths, offsets, recvLength,
761 VTK_UNSIGNED_LONG_LONG, srcProcessId);
762 }
764
766
769 int AllGather(const int* sendBuffer, int* recvBuffer, vtkIdType length)
770 {
771 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_INT);
772 }
773 int AllGather(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length)
774 {
775 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_INT);
776 }
777 int AllGather(const short* sendBuffer, short* recvBuffer, vtkIdType length)
778 {
779 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_SHORT);
780 }
781 int AllGather(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length)
782 {
783 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_SHORT);
784 }
785 int AllGather(const long* sendBuffer, long* recvBuffer, vtkIdType length)
786 {
787 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_LONG);
788 }
789 int AllGather(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length)
790 {
791 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG);
792 }
793 int AllGather(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length)
794 {
795 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_CHAR);
796 }
797 int AllGather(const char* sendBuffer, char* recvBuffer, vtkIdType length)
798 {
799 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_CHAR);
800 }
801 int AllGather(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length)
802 {
803 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_SIGNED_CHAR);
804 }
805 int AllGather(const float* sendBuffer, float* recvBuffer, vtkIdType length)
806 {
807 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_FLOAT);
808 }
809 int AllGather(const double* sendBuffer, double* recvBuffer, vtkIdType length)
810 {
811 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_DOUBLE);
812 }
813 int AllGather(const long long* sendBuffer, long long* recvBuffer, vtkIdType length)
814 {
815 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_LONG_LONG);
816 }
818 const unsigned long long* sendBuffer, unsigned long long* recvBuffer, vtkIdType length)
819 {
820 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG_LONG);
821 }
822 int AllGather(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer);
824 const vtkMultiProcessStream& sendBuffer, std::vector<vtkMultiProcessStream>& recvBuffer);
826
837 int AllGather(vtkDataObject* sendBuffer, std::vector<vtkSmartPointer<vtkDataObject>>& recvBuffer);
838
840
843 int AllGatherV(const int* sendBuffer, int* recvBuffer, vtkIdType sendLength,
844 vtkIdType* recvLengths, vtkIdType* offsets)
845 {
846 return this->AllGatherVVoidArray(
847 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_INT);
848 }
849 int AllGatherV(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType sendLength,
850 vtkIdType* recvLengths, vtkIdType* offsets)
851 {
852 return this->AllGatherVVoidArray(
853 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_INT);
854 }
855 int AllGatherV(const short* sendBuffer, short* recvBuffer, vtkIdType sendLength,
856 vtkIdType* recvLengths, vtkIdType* offsets)
857 {
858 return this->AllGatherVVoidArray(
859 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_SHORT);
860 }
861 int AllGatherV(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType sendLength,
862 vtkIdType* recvLengths, vtkIdType* offsets)
863 {
864 return this->AllGatherVVoidArray(
865 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_SHORT);
866 }
867 int AllGatherV(const long* sendBuffer, long* recvBuffer, vtkIdType sendLength,
868 vtkIdType* recvLengths, vtkIdType* offsets)
869 {
870 return this->AllGatherVVoidArray(
871 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_LONG);
872 }
873 int AllGatherV(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType sendLength,
874 vtkIdType* recvLengths, vtkIdType* offsets)
875 {
876 return this->AllGatherVVoidArray(
877 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_LONG);
878 }
879 int AllGatherV(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType sendLength,
880 vtkIdType* recvLengths, vtkIdType* offsets)
881 {
882 return this->AllGatherVVoidArray(
883 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_CHAR);
884 }
885 int AllGatherV(const char* sendBuffer, char* recvBuffer, vtkIdType sendLength,
886 vtkIdType* recvLengths, vtkIdType* offsets)
887 {
888 return this->AllGatherVVoidArray(
889 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_CHAR);
890 }
891 int AllGatherV(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType sendLength,
892 vtkIdType* recvLengths, vtkIdType* offsets)
893 {
894 return this->AllGatherVVoidArray(
895 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_CHAR);
896 }
897 int AllGatherV(const float* sendBuffer, float* recvBuffer, vtkIdType sendLength,
898 vtkIdType* recvLengths, vtkIdType* offsets)
899 {
900 return this->AllGatherVVoidArray(
901 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_FLOAT);
902 }
903 int AllGatherV(const double* sendBuffer, double* recvBuffer, vtkIdType sendLength,
904 vtkIdType* recvLengths, vtkIdType* offsets)
905 {
906 return this->AllGatherVVoidArray(
907 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_DOUBLE);
908 }
909 int AllGatherV(const long long* sendBuffer, long long* recvBuffer, vtkIdType sendLength,
910 vtkIdType* recvLengths, vtkIdType* offsets)
911 {
912 return this->AllGatherVVoidArray(
913 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_LONG_LONG);
914 }
915 int AllGatherV(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
916 vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets)
917 {
918 return this->AllGatherVVoidArray(
919 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_LONG_LONG);
920 }
922 vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, vtkIdType* recvLengths, vtkIdType* offsets);
923 int AllGatherV(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer);
925
927
933 const int* sendBuffer, int* recvBuffer, vtkIdType length, int operation, int destProcessId)
934 {
935 return this->ReduceVoidArray(sendBuffer, recvBuffer, length, VTK_INT, operation, destProcessId);
936 }
937 int Reduce(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length,
938 int operation, int destProcessId)
939 {
940 return this->ReduceVoidArray(
941 sendBuffer, recvBuffer, length, VTK_UNSIGNED_INT, operation, destProcessId);
942 }
944 const short* sendBuffer, short* recvBuffer, vtkIdType length, int operation, int destProcessId)
945 {
946 return this->ReduceVoidArray(
947 sendBuffer, recvBuffer, length, VTK_SHORT, operation, destProcessId);
948 }
949 int Reduce(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
950 int operation, int destProcessId)
951 {
952 return this->ReduceVoidArray(
953 sendBuffer, recvBuffer, length, VTK_UNSIGNED_SHORT, operation, destProcessId);
954 }
956 const long* sendBuffer, long* recvBuffer, vtkIdType length, int operation, int destProcessId)
957 {
958 return this->ReduceVoidArray(
959 sendBuffer, recvBuffer, length, VTK_LONG, operation, destProcessId);
960 }
961 int Reduce(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length,
962 int operation, int destProcessId)
963 {
964 return this->ReduceVoidArray(
965 sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG, operation, destProcessId);
966 }
967 int Reduce(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length,
968 int operation, int destProcessId)
969 {
970 return this->ReduceVoidArray(
971 sendBuffer, recvBuffer, length, VTK_UNSIGNED_CHAR, operation, destProcessId);
972 }
974 const char* sendBuffer, char* recvBuffer, vtkIdType length, int operation, int destProcessId)
975 {
976 return this->ReduceVoidArray(
977 sendBuffer, recvBuffer, length, VTK_CHAR, operation, destProcessId);
978 }
979 int Reduce(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length,
980 int operation, int destProcessId)
981 {
982 return this->ReduceVoidArray(
983 sendBuffer, recvBuffer, length, VTK_SIGNED_CHAR, operation, destProcessId);
984 }
986 const float* sendBuffer, float* recvBuffer, vtkIdType length, int operation, int destProcessId)
987 {
988 return this->ReduceVoidArray(
989 sendBuffer, recvBuffer, length, VTK_FLOAT, operation, destProcessId);
990 }
991 int Reduce(const double* sendBuffer, double* recvBuffer, vtkIdType length, int operation,
992 int destProcessId)
993 {
994 return this->ReduceVoidArray(
995 sendBuffer, recvBuffer, length, VTK_DOUBLE, operation, destProcessId);
996 }
997 int Reduce(const long long* sendBuffer, long long* recvBuffer, vtkIdType length, int operation,
998 int destProcessId)
999 {
1000 return this->ReduceVoidArray(
1001 sendBuffer, recvBuffer, length, VTK_LONG_LONG, operation, destProcessId);
1002 }
1003 int Reduce(const unsigned long long* sendBuffer, unsigned long long* recvBuffer, vtkIdType length,
1004 int operation, int destProcessId)
1005 {
1006 return this->ReduceVoidArray(
1007 sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG_LONG, operation, destProcessId);
1008 }
1009 int Reduce(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int operation, int destProcessId);
1011
1013
1017 int Reduce(const int* sendBuffer, int* recvBuffer, vtkIdType length, Operation* operation,
1018 int destProcessId)
1019 {
1020 return this->ReduceVoidArray(sendBuffer, recvBuffer, length, VTK_INT, operation, destProcessId);
1021 }
1022 int Reduce(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length,
1023 Operation* operation, int destProcessId)
1024 {
1025 return this->ReduceVoidArray(
1026 sendBuffer, recvBuffer, length, VTK_UNSIGNED_INT, operation, destProcessId);
1027 }
1028 int Reduce(const short* sendBuffer, short* recvBuffer, vtkIdType length, Operation* operation,
1029 int destProcessId)
1030 {
1031 return this->ReduceVoidArray(
1032 sendBuffer, recvBuffer, length, VTK_SHORT, operation, destProcessId);
1033 }
1034 int Reduce(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
1035 Operation* operation, int destProcessId)
1036 {
1037 return this->ReduceVoidArray(
1038 sendBuffer, recvBuffer, length, VTK_UNSIGNED_SHORT, operation, destProcessId);
1039 }
1040 int Reduce(const long* sendBuffer, long* recvBuffer, vtkIdType length, Operation* operation,
1041 int destProcessId)
1042 {
1043 return this->ReduceVoidArray(
1044 sendBuffer, recvBuffer, length, VTK_LONG, operation, destProcessId);
1045 }
1046 int Reduce(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length,
1047 Operation* operation, int destProcessId)
1048 {
1049 return this->ReduceVoidArray(
1050 sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG, operation, destProcessId);
1051 }
1052 int Reduce(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length,
1053 Operation* operation, int destProcessId)
1054 {
1055 return this->ReduceVoidArray(
1056 sendBuffer, recvBuffer, length, VTK_UNSIGNED_CHAR, operation, destProcessId);
1057 }
1058 int Reduce(const char* sendBuffer, char* recvBuffer, vtkIdType length, Operation* operation,
1059 int destProcessId)
1060 {
1061 return this->ReduceVoidArray(
1062 sendBuffer, recvBuffer, length, VTK_CHAR, operation, destProcessId);
1063 }
1064 int Reduce(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length,
1065 Operation* operation, int destProcessId)
1066 {
1067 return this->ReduceVoidArray(
1068 sendBuffer, recvBuffer, length, VTK_SIGNED_CHAR, operation, destProcessId);
1069 }
1070 int Reduce(const float* sendBuffer, float* recvBuffer, vtkIdType length, Operation* operation,
1071 int destProcessId)
1072 {
1073 return this->ReduceVoidArray(
1074 sendBuffer, recvBuffer, length, VTK_FLOAT, operation, destProcessId);
1075 }
1076 int Reduce(const double* sendBuffer, double* recvBuffer, vtkIdType length, Operation* operation,
1077 int destProcessId)
1078 {
1079 return this->ReduceVoidArray(
1080 sendBuffer, recvBuffer, length, VTK_DOUBLE, operation, destProcessId);
1081 }
1082 int Reduce(const long long* sendBuffer, long long* recvBuffer, vtkIdType length,
1083 Operation* operation, int destProcessId)
1084 {
1085 return this->ReduceVoidArray(
1086 sendBuffer, recvBuffer, length, VTK_LONG_LONG, operation, destProcessId);
1087 }
1088 int Reduce(const unsigned long long* sendBuffer, unsigned long long* recvBuffer, vtkIdType length,
1089 Operation* operation, int destProcessId)
1090 {
1091 return this->ReduceVoidArray(
1092 sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG_LONG, operation, destProcessId);
1093 }
1095 vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, Operation* operation, int destProcessId);
1097
1099
1102 int AllReduce(const int* sendBuffer, int* recvBuffer, vtkIdType length, int operation)
1103 {
1104 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_INT, operation);
1105 }
1107 const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length, int operation)
1108 {
1109 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_INT, operation);
1110 }
1111 int AllReduce(const short* sendBuffer, short* recvBuffer, vtkIdType length, int operation)
1112 {
1113 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_SHORT, operation);
1114 }
1116 const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length, int operation)
1117 {
1118 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_SHORT, operation);
1119 }
1120 int AllReduce(const long* sendBuffer, long* recvBuffer, vtkIdType length, int operation)
1121 {
1122 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_LONG, operation);
1123 }
1125 const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length, int operation)
1126 {
1127 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG, operation);
1128 }
1130 const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length, int operation)
1131 {
1132 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_CHAR, operation);
1133 }
1134 int AllReduce(const char* sendBuffer, char* recvBuffer, vtkIdType length, int operation)
1135 {
1136 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_CHAR, operation);
1137 }
1139 const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length, int operation)
1140 {
1141 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_SIGNED_CHAR, operation);
1142 }
1143 int AllReduce(const float* sendBuffer, float* recvBuffer, vtkIdType length, int operation)
1144 {
1145 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_FLOAT, operation);
1146 }
1147 int AllReduce(const double* sendBuffer, double* recvBuffer, vtkIdType length, int operation)
1148 {
1149 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_DOUBLE, operation);
1150 }
1151 int AllReduce(const long long* sendBuffer, long long* recvBuffer, vtkIdType length, int operation)
1152 {
1153 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_LONG_LONG, operation);
1154 }
1155 int AllReduce(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
1156 vtkIdType length, int operation)
1157 {
1158 return this->AllReduceVoidArray(
1159 sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG_LONG, operation);
1160 }
1161 int AllReduce(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int operation);
1162 int AllReduce(const int* sendBuffer, int* recvBuffer, vtkIdType length, Operation* operation)
1163 {
1164 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_INT, operation);
1165 }
1166 int AllReduce(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length,
1167 Operation* operation)
1168 {
1169 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_INT, operation);
1170 }
1171 int AllReduce(const short* sendBuffer, short* recvBuffer, vtkIdType length, Operation* operation)
1172 {
1173 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_SHORT, operation);
1174 }
1175 int AllReduce(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
1176 Operation* operation)
1177 {
1178 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_SHORT, operation);
1179 }
1180 int AllReduce(const long* sendBuffer, long* recvBuffer, vtkIdType length, Operation* operation)
1181 {
1182 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_LONG, operation);
1183 }
1184 int AllReduce(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length,
1185 Operation* operation)
1186 {
1187 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG, operation);
1188 }
1189 int AllReduce(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length,
1190 Operation* operation)
1191 {
1192 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_CHAR, operation);
1193 }
1194 int AllReduce(const char* sendBuffer, char* recvBuffer, vtkIdType length, Operation* operation)
1195 {
1196 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_CHAR, operation);
1197 }
1199 const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length, Operation* operation)
1200 {
1201 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_SIGNED_CHAR, operation);
1202 }
1203 int AllReduce(const float* sendBuffer, float* recvBuffer, vtkIdType length, Operation* operation)
1204 {
1205 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_FLOAT, operation);
1206 }
1208 const double* sendBuffer, double* recvBuffer, vtkIdType length, Operation* operation)
1209 {
1210 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_DOUBLE, operation);
1211 }
1213 const long long* sendBuffer, long long* recvBuffer, vtkIdType length, Operation* operation)
1214 {
1215 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_LONG_LONG, operation);
1216 }
1217 int AllReduce(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
1218 vtkIdType length, Operation* operation)
1219 {
1220 return this->AllReduceVoidArray(
1221 sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG_LONG, operation);
1222 }
1223 int AllReduce(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, Operation* operation);
1225
1227
1231 virtual int BroadcastVoidArray(void* data, vtkIdType length, int type, int srcProcessId);
1232 virtual int GatherVoidArray(
1233 const void* sendBuffer, void* recvBuffer, vtkIdType length, int type, int destProcessId);
1234 virtual int GatherVVoidArray(const void* sendBuffer, void* recvBuffer, vtkIdType sendLength,
1235 vtkIdType* recvLengths, vtkIdType* offsets, int type, int destProcessId);
1236 virtual int ScatterVoidArray(
1237 const void* sendBuffer, void* recvBuffer, vtkIdType length, int type, int srcProcessId);
1238 virtual int ScatterVVoidArray(const void* sendBuffer, void* recvBuffer, vtkIdType* sendLengths,
1239 vtkIdType* offsets, vtkIdType recvLength, int type, int srcProcessId);
1241 const void* sendBuffer, void* recvBuffer, vtkIdType length, int type);
1242 virtual int AllGatherVVoidArray(const void* sendBuffer, void* recvBuffer, vtkIdType sendLength,
1243 vtkIdType* recvLengths, vtkIdType* offsets, int type);
1244 virtual int ReduceVoidArray(const void* sendBuffer, void* recvBuffer, vtkIdType length, int type,
1245 int operation, int destProcessId);
1246 virtual int ReduceVoidArray(const void* sendBuffer, void* recvBuffer, vtkIdType length, int type,
1247 Operation* operation, int destProcessId);
1249 const void* sendBuffer, void* recvBuffer, vtkIdType length, int type, int operation);
1251 const void* sendBuffer, void* recvBuffer, vtkIdType length, int type, Operation* operation);
1253
1254 static void SetUseCopy(int useCopy);
1255
1267 virtual int ComputeGlobalBounds(int processorId, int numProcesses, vtkBoundingBox* bounds,
1268 int* rightHasBounds = nullptr, int* leftHasBounds = nullptr, int hasBoundsTag = 288402,
1269 int localBoundsTag = 288403, int globalBoundsTag = 288404);
1270
1272
1277 static int GetParentProcessor(int pid);
1278 static int GetLeftChildProcessor(int pid);
1280
1282
1287 static int MarshalDataObject(vtkDataObject* object, vtkCharArray* buffer);
1288 static int UnMarshalDataObject(vtkCharArray* buffer, vtkDataObject* object);
1290
1298
1299protected:
1302
1305
1306 // Internal methods called by Send/Receive(vtkDataObject *... ) above.
1307 int SendElementalDataObject(vtkDataObject* data, int remoteHandle, int tag);
1309
1317 int GatherV(vtkDataArray* sendArray, vtkDataArray* recvArray,
1318 vtkSmartPointer<vtkDataArray>* recvArrays, int destProcessId);
1320 vtkDataObject* sendData, vtkSmartPointer<vtkDataObject>* receiveData, int destProcessId);
1322
1324 int AllGatherV(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer,
1325 vtkIdTypeArray* recvLengthsArray, vtkIdTypeArray* offsetsArray);
1327 vtkDataArray* sendArray, vtkDataArray* recvArray, vtkSmartPointer<vtkDataArray>* recvArrays);
1329
1330 int ReceiveDataObject(vtkDataObject* data, int remoteHandle, int tag, int type = -1);
1331 int ReceiveElementalDataObject(vtkDataObject* data, int remoteHandle, int tag);
1332 int ReceiveMultiBlockDataSet(vtkMultiBlockDataSet* data, int remoteHandle, int tag);
1333
1336
1338
1339 static int UseCopy;
1340
1342
1343private:
1344 vtkCommunicator(const vtkCommunicator&) = delete;
1345 void operator=(const vtkCommunicator&) = delete;
1346};
1347
1348#endif // vtkCommunicator_h
Fast, simple class for representing and operating on 3D bounds.
dynamic, self-adjusting array of char
Definition: vtkCharArray.h:52
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 Gather(vtkDataObject *sendBuffer, std::vector< vtkSmartPointer< vtkDataObject > > &recvBuffer, int destProcessId)
Gathers vtkDataObject (sendBuffer) from all ranks to the destProcessId.
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.
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 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 AllGather(vtkDataObject *sendBuffer, std::vector< vtkSmartPointer< vtkDataObject > > &recvBuffer)
Gathers vtkDataObject (sendBuffer) from all ranks to all raks.
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.
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.
vtkDataObject * ReceiveDataObject(int remoteHandle, int tag)
The caller does not have to know the data type before this call is made.
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.
static vtkSmartPointer< vtkDataObject > UnMarshalDataObject(vtkCharArray *buffer)
Same as UnMarshalDataObject(vtkCharArray*, vtkDataObject*) except that this method doesn't need to kn...
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.
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:56
general representation of visualization data
Definition: vtkDataObject.h:66
abstract class to specify dataset behavior
Definition: vtkDataSet.h:63
dynamic, self-adjusting array of vtkIdType
topologically and geometrically regular array of data
Definition: vtkImageData.h:54
a simple class to control print indentation
Definition: vtkIndent.h:40
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
Hold a reference to a vtkObjectBase instance.
#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