VTK  9.5.2
vtkCommunicator.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
23#ifndef vtkCommunicator_h
24#define vtkCommunicator_h
25
26#include "vtkObject.h"
27#include "vtkParallelCoreModule.h" // For export macro
28#include "vtkSmartPointer.h" // needed for vtkSmartPointer.
29#include <vector> // needed for std::vector
30
31VTK_ABI_NAMESPACE_BEGIN
32class vtkBoundingBox;
33class vtkCharArray;
34class vtkDataArray;
35class vtkDataObject;
36class vtkDataSet;
37class vtkIdTypeArray;
38class vtkImageData;
41
42class VTKPARALLELCORE_EXPORT vtkCommunicator : public vtkObject
43{
44
45public:
46 vtkTypeMacro(vtkCommunicator, vtkObject);
47 void PrintSelf(ostream& os, vtkIndent indent) override;
48
50
55 virtual void SetNumberOfProcesses(int num);
56 vtkGetMacro(NumberOfProcesses, int);
58
60
63 vtkGetMacro(LocalProcessId, int);
65
66 enum Tags
67 {
68 BROADCAST_TAG = 10,
69 GATHER_TAG = 11,
70 GATHERV_TAG = 12,
71 SCATTER_TAG = 13,
72 SCATTERV_TAG = 14,
73 REDUCE_TAG = 15,
74 BARRIER_TAG = 16
75 };
76
78 {
88 BITWISE_XOR_OP
89 };
90
96 {
97 public:
108 virtual void Function(const void* A, void* B, vtkIdType length, int datatype) = 0;
109
114 virtual int Commutative() = 0;
115
116 virtual ~Operation() = default;
117 };
118
124 int Send(vtkDataObject* data, int remoteHandle, int tag);
125
131 int Send(vtkDataArray* data, int remoteHandle, int tag);
132
139 virtual int SendVoidArray(
140 const void* data, vtkIdType length, int type, int remoteHandle, int tag) = 0;
141
143
146 int Send(const int* data, vtkIdType length, int remoteHandle, int tag)
147 {
148 return this->SendVoidArray(data, length, VTK_INT, remoteHandle, tag);
149 }
150 int Send(const unsigned int* data, vtkIdType length, int remoteHandle, int tag)
151 {
152 return this->SendVoidArray(data, length, VTK_INT, remoteHandle, tag);
153 }
154 int Send(const short* data, vtkIdType length, int remoteHandle, int tag)
155 {
156 return this->SendVoidArray(data, length, VTK_SHORT, remoteHandle, tag);
157 }
158 int Send(const unsigned short* data, vtkIdType length, int remoteHandle, int tag)
159 {
160 return this->SendVoidArray(data, length, VTK_UNSIGNED_SHORT, remoteHandle, tag);
161 }
162 int Send(const long* data, vtkIdType length, int remoteHandle, int tag)
163 {
164 return this->SendVoidArray(data, length, VTK_LONG, remoteHandle, tag);
165 }
166 int Send(const unsigned long* data, vtkIdType length, int remoteHandle, int tag)
167 {
168 return this->SendVoidArray(data, length, VTK_UNSIGNED_LONG, remoteHandle, tag);
169 }
170 int Send(const unsigned char* data, vtkIdType length, int remoteHandle, int tag)
171 {
172 return this->SendVoidArray(data, length, VTK_UNSIGNED_CHAR, remoteHandle, tag);
173 }
174 int Send(const char* data, vtkIdType length, int remoteHandle, int tag)
175 {
176 return this->SendVoidArray(data, length, VTK_CHAR, remoteHandle, tag);
177 }
178 int Send(const signed char* data, vtkIdType length, int remoteHandle, int tag)
179 {
180 return this->SendVoidArray(data, length, VTK_SIGNED_CHAR, remoteHandle, tag);
181 }
182 int Send(const float* data, vtkIdType length, int remoteHandle, int tag)
183 {
184 return this->SendVoidArray(data, length, VTK_FLOAT, remoteHandle, tag);
185 }
186 int Send(const double* data, vtkIdType length, int remoteHandle, int tag)
187 {
188 return this->SendVoidArray(data, length, VTK_DOUBLE, remoteHandle, tag);
189 }
190 int Send(const long long* data, vtkIdType length, int remoteHandle, int tag)
191 {
192 return this->SendVoidArray(data, length, VTK_LONG_LONG, remoteHandle, tag);
193 }
194 int Send(const unsigned long long* data, vtkIdType length, int remoteHandle, int tag)
195 {
196 return this->SendVoidArray(data, length, VTK_UNSIGNED_LONG_LONG, remoteHandle, tag);
197 }
199
200 int Send(const vtkMultiProcessStream& stream, int remoteId, int tag);
201
206 int Receive(vtkDataObject* data, int remoteHandle, int tag);
207
212 vtkDataObject* ReceiveDataObject(int remoteHandle, int tag);
213
218 int Receive(vtkDataArray* data, int remoteHandle, int tag);
219
230 virtual int ReceiveVoidArray(
231 void* data, vtkIdType maxlength, int type, int remoteHandle, int tag) = 0;
232
234
237 int Receive(int* data, vtkIdType maxlength, int remoteHandle, int tag)
238 {
239 return this->ReceiveVoidArray(data, maxlength, VTK_INT, remoteHandle, tag);
240 }
241 int Receive(unsigned int* data, vtkIdType maxlength, int remoteHandle, int tag)
242 {
243 return this->ReceiveVoidArray(data, maxlength, VTK_INT, remoteHandle, tag);
244 }
245 int Receive(short* data, vtkIdType maxlength, int remoteHandle, int tag)
246 {
247 return this->ReceiveVoidArray(data, maxlength, VTK_SHORT, remoteHandle, tag);
248 }
249 int Receive(unsigned short* data, vtkIdType maxlength, int remoteHandle, int tag)
250 {
251 return this->ReceiveVoidArray(data, maxlength, VTK_UNSIGNED_SHORT, remoteHandle, tag);
252 }
253 int Receive(long* data, vtkIdType maxlength, int remoteHandle, int tag)
254 {
255 return this->ReceiveVoidArray(data, maxlength, VTK_LONG, remoteHandle, tag);
256 }
257 int Receive(unsigned long* data, vtkIdType maxlength, int remoteHandle, int tag)
258 {
259 return this->ReceiveVoidArray(data, maxlength, VTK_UNSIGNED_LONG, remoteHandle, tag);
260 }
261 int Receive(unsigned char* data, vtkIdType maxlength, int remoteHandle, int tag)
262 {
263 return this->ReceiveVoidArray(data, maxlength, VTK_UNSIGNED_CHAR, remoteHandle, tag);
264 }
265 int Receive(char* data, vtkIdType maxlength, int remoteHandle, int tag)
266 {
267 return this->ReceiveVoidArray(data, maxlength, VTK_CHAR, remoteHandle, tag);
268 }
269 int Receive(signed char* data, vtkIdType maxlength, int remoteHandle, int tag)
270 {
271 return this->ReceiveVoidArray(data, maxlength, VTK_SIGNED_CHAR, remoteHandle, tag);
272 }
273 int Receive(float* data, vtkIdType maxlength, int remoteHandle, int tag)
274 {
275 return this->ReceiveVoidArray(data, maxlength, VTK_FLOAT, remoteHandle, tag);
276 }
277 int Receive(double* data, vtkIdType maxlength, int remoteHandle, int tag)
278 {
279 return this->ReceiveVoidArray(data, maxlength, VTK_DOUBLE, remoteHandle, tag);
280 }
281 int Receive(long long* data, vtkIdType maxlength, int remoteHandle, int tag)
282 {
283 return this->ReceiveVoidArray(data, maxlength, VTK_LONG_LONG, remoteHandle, tag);
284 }
285 int Receive(unsigned long long* data, vtkIdType maxlength, int remoteHandle, int tag)
286 {
287 return this->ReceiveVoidArray(data, maxlength, VTK_UNSIGNED_LONG_LONG, remoteHandle, tag);
288 }
290
291 int Receive(vtkMultiProcessStream& stream, int remoteId, int tag);
292
294
302 vtkGetMacro(Count, vtkIdType);
304
305 //---------------------- Collective Operations ----------------------
306
311 virtual void Barrier();
312
314
319 int Broadcast(int* data, vtkIdType length, int srcProcessId)
320 {
321 return this->BroadcastVoidArray(data, length, VTK_INT, srcProcessId);
322 }
323 int Broadcast(unsigned int* data, vtkIdType length, int srcProcessId)
324 {
325 return this->BroadcastVoidArray(data, length, VTK_UNSIGNED_INT, srcProcessId);
326 }
327 int Broadcast(short* data, vtkIdType length, int srcProcessId)
328 {
329 return this->BroadcastVoidArray(data, length, VTK_SHORT, srcProcessId);
330 }
331 int Broadcast(unsigned short* data, vtkIdType length, int srcProcessId)
332 {
333 return this->BroadcastVoidArray(data, length, VTK_UNSIGNED_SHORT, srcProcessId);
334 }
335 int Broadcast(long* data, vtkIdType length, int srcProcessId)
336 {
337 return this->BroadcastVoidArray(data, length, VTK_LONG, srcProcessId);
338 }
339 int Broadcast(unsigned long* data, vtkIdType length, int srcProcessId)
340 {
341 return this->BroadcastVoidArray(data, length, VTK_UNSIGNED_LONG, srcProcessId);
342 }
343 int Broadcast(unsigned char* data, vtkIdType length, int srcProcessId)
344 {
345 return this->BroadcastVoidArray(data, length, VTK_UNSIGNED_CHAR, srcProcessId);
346 }
347 int Broadcast(char* data, vtkIdType length, int srcProcessId)
348 {
349 return this->BroadcastVoidArray(data, length, VTK_CHAR, srcProcessId);
350 }
351 int Broadcast(signed char* data, vtkIdType length, int srcProcessId)
352 {
353 return this->BroadcastVoidArray(data, length, VTK_SIGNED_CHAR, srcProcessId);
354 }
355 int Broadcast(float* data, vtkIdType length, int srcProcessId)
356 {
357 return this->BroadcastVoidArray(data, length, VTK_FLOAT, srcProcessId);
358 }
359 int Broadcast(double* data, vtkIdType length, int srcProcessId)
360 {
361 return this->BroadcastVoidArray(data, length, VTK_DOUBLE, srcProcessId);
362 }
363 int Broadcast(long long* data, vtkIdType length, int srcProcessId)
364 {
365 return this->BroadcastVoidArray(data, length, VTK_LONG_LONG, srcProcessId);
366 }
367 int Broadcast(unsigned long long* data, vtkIdType length, int srcProcessId)
368 {
369 return this->BroadcastVoidArray(data, length, VTK_UNSIGNED_LONG_LONG, srcProcessId);
370 }
371 int Broadcast(vtkDataObject* data, int srcProcessId);
372 int Broadcast(vtkDataArray* data, int srcProcessId);
374
375 int Broadcast(vtkMultiProcessStream& stream, int srcProcessId);
376
378
387 int Gather(const int* sendBuffer, int* recvBuffer, vtkIdType length, int destProcessId)
388 {
389 return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_INT, destProcessId);
390 }
392 const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length, int destProcessId)
393 {
394 return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_INT, destProcessId);
395 }
396 int Gather(const short* sendBuffer, short* recvBuffer, vtkIdType length, int destProcessId)
397 {
398 return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_SHORT, destProcessId);
399 }
400 int Gather(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
401 int destProcessId)
402 {
403 return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_SHORT, destProcessId);
404 }
405 int Gather(const long* sendBuffer, long* recvBuffer, vtkIdType length, int destProcessId)
406 {
407 return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_LONG, destProcessId);
408 }
410 const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length, int destProcessId)
411 {
412 return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG, destProcessId);
413 }
415 const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length, int destProcessId)
416 {
417 return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_CHAR, destProcessId);
418 }
419 int Gather(const char* sendBuffer, char* recvBuffer, vtkIdType length, int destProcessId)
420 {
421 return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_CHAR, destProcessId);
422 }
424 const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length, int destProcessId)
425 {
426 return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_SIGNED_CHAR, destProcessId);
427 }
428 int Gather(const float* sendBuffer, float* recvBuffer, vtkIdType length, int destProcessId)
429 {
430 return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_FLOAT, destProcessId);
431 }
432 int Gather(const double* sendBuffer, double* recvBuffer, vtkIdType length, int destProcessId)
433 {
434 return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_DOUBLE, destProcessId);
435 }
437 const long long* sendBuffer, long long* recvBuffer, vtkIdType length, int destProcessId)
438 {
439 return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_LONG_LONG, destProcessId);
440 }
441 int Gather(const unsigned long long* sendBuffer, unsigned long long* recvBuffer, vtkIdType length,
442 int destProcessId)
443 {
444 return this->GatherVoidArray(
445 sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG_LONG, destProcessId);
446 }
447 int Gather(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int destProcessId);
449
463 int destProcessId);
464
474 int Gather(const vtkMultiProcessStream& sendBuffer,
475 std::vector<vtkMultiProcessStream>& recvBuffer, int destProcessId);
476
478
489 int GatherV(const int* sendBuffer, int* recvBuffer, vtkIdType sendLength, vtkIdType* recvLengths,
490 vtkIdType* offsets, int destProcessId)
491 {
492 return this->GatherVVoidArray(
493 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_INT, destProcessId);
494 }
495 int GatherV(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType sendLength,
496 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
497 {
498 return this->GatherVVoidArray(
499 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_INT, destProcessId);
500 }
501 int GatherV(const short* sendBuffer, short* recvBuffer, vtkIdType sendLength,
502 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
503 {
504 return this->GatherVVoidArray(
505 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_SHORT, destProcessId);
506 }
507 int GatherV(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType sendLength,
508 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
509 {
510 return this->GatherVVoidArray(
511 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_SHORT, destProcessId);
512 }
513 int GatherV(const long* sendBuffer, long* recvBuffer, vtkIdType sendLength,
514 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
515 {
516 return this->GatherVVoidArray(
517 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_LONG, destProcessId);
518 }
519 int GatherV(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType sendLength,
520 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
521 {
522 return this->GatherVVoidArray(
523 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_LONG, destProcessId);
524 }
525 int GatherV(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType sendLength,
526 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
527 {
528 return this->GatherVVoidArray(
529 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_CHAR, destProcessId);
530 }
531 int GatherV(const char* sendBuffer, char* recvBuffer, vtkIdType sendLength,
532 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
533 {
534 return this->GatherVVoidArray(
535 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_CHAR, destProcessId);
536 }
537 int GatherV(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType sendLength,
538 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
539 {
540 return this->GatherVVoidArray(
541 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_SIGNED_CHAR, destProcessId);
542 }
543 int GatherV(const float* sendBuffer, float* recvBuffer, vtkIdType sendLength,
544 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
545 {
546 return this->GatherVVoidArray(
547 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_FLOAT, destProcessId);
548 }
549 int GatherV(const double* sendBuffer, double* recvBuffer, vtkIdType sendLength,
550 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
551 {
552 return this->GatherVVoidArray(
553 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_DOUBLE, destProcessId);
554 }
555 int GatherV(const long long* sendBuffer, long long* recvBuffer, vtkIdType sendLength,
556 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
557 {
558 return this->GatherVVoidArray(
559 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_LONG_LONG, destProcessId);
560 }
561 int GatherV(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
562 vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
563 {
564 return this->GatherVVoidArray(sendBuffer, recvBuffer, sendLength, recvLengths, offsets,
565 VTK_UNSIGNED_LONG_LONG, destProcessId);
566 }
569
575 int GatherV(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, vtkIdTypeArray* recvLengths,
576 vtkIdTypeArray* offsets, int destProcessId);
581 int GatherV(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int destProcessId);
587 int GatherV(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, vtkIdType* recvLengths,
588 vtkIdType* offsets, int destProcessId);
589
591
599 int GatherV(vtkDataObject* sendData, vtkSmartPointer<vtkDataObject>* recvData, int destProcessId);
600
602
609 int Scatter(const int* sendBuffer, int* recvBuffer, vtkIdType length, int srcProcessId)
610 {
611 return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_INT, srcProcessId);
612 }
614 const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length, int srcProcessId)
615 {
616 return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_INT, srcProcessId);
617 }
618 int Scatter(const short* sendBuffer, short* recvBuffer, vtkIdType length, int srcProcessId)
619 {
620 return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_SHORT, srcProcessId);
621 }
622 int Scatter(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
623 int srcProcessId)
624 {
625 return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_SHORT, srcProcessId);
626 }
627 int Scatter(const long* sendBuffer, long* recvBuffer, vtkIdType length, int srcProcessId)
628 {
629 return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_INT, srcProcessId);
630 }
632 const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length, int srcProcessId)
633 {
634 return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG, srcProcessId);
635 }
637 const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length, int srcProcessId)
638 {
639 return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_CHAR, srcProcessId);
640 }
641 int Scatter(const char* sendBuffer, char* recvBuffer, vtkIdType length, int srcProcessId)
642 {
643 return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_CHAR, srcProcessId);
644 }
646 const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length, int srcProcessId)
647 {
648 return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_SIGNED_CHAR, srcProcessId);
649 }
650 int Scatter(const float* sendBuffer, float* recvBuffer, vtkIdType length, int srcProcessId)
651 {
652 return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_FLOAT, srcProcessId);
653 }
654 int Scatter(const double* sendBuffer, double* recvBuffer, vtkIdType length, int srcProcessId)
655 {
656 return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_DOUBLE, srcProcessId);
657 }
659 const long long* sendBuffer, long long* recvBuffer, vtkIdType length, int srcProcessId)
660 {
661 return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_LONG_LONG, srcProcessId);
662 }
663 int Scatter(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
664 vtkIdType length, int srcProcessId)
665 {
666 return this->ScatterVoidArray(
667 sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG_LONG, srcProcessId);
668 }
669 int Scatter(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int srcProcessId);
671
673
680 int ScatterV(const int* sendBuffer, int* recvBuffer, vtkIdType* sendLengths, vtkIdType* offsets,
681 vtkIdType recvLength, int srcProcessId)
682 {
683 return this->ScatterVVoidArray(
684 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_INT, srcProcessId);
685 }
686 int ScatterV(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType* sendLengths,
687 vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
688 {
689 return this->ScatterVVoidArray(
690 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_UNSIGNED_INT, srcProcessId);
691 }
692 int ScatterV(const short* sendBuffer, short* recvBuffer, vtkIdType* sendLengths,
693 vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
694 {
695 return this->ScatterVVoidArray(
696 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_SHORT, srcProcessId);
697 }
698 int ScatterV(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType* sendLengths,
699 vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
700 {
701 return this->ScatterVVoidArray(
702 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_UNSIGNED_SHORT, srcProcessId);
703 }
704 int ScatterV(const long* sendBuffer, long* recvBuffer, vtkIdType* sendLengths, vtkIdType* offsets,
705 vtkIdType recvLength, int srcProcessId)
706 {
707 return this->ScatterVVoidArray(
708 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_LONG, srcProcessId);
709 }
710 int ScatterV(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType* sendLengths,
711 vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
712 {
713 return this->ScatterVVoidArray(
714 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_UNSIGNED_LONG, srcProcessId);
715 }
716 int ScatterV(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType* sendLengths,
717 vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
718 {
719 return this->ScatterVVoidArray(
720 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_UNSIGNED_CHAR, srcProcessId);
721 }
722 int ScatterV(const char* sendBuffer, char* recvBuffer, vtkIdType* sendLengths, vtkIdType* offsets,
723 vtkIdType recvLength, int srcProcessId)
724 {
725 return this->ScatterVVoidArray(
726 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_CHAR, srcProcessId);
727 }
728 int ScatterV(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType* sendLengths,
729 vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
730 {
731 return this->ScatterVVoidArray(
732 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_SIGNED_CHAR, srcProcessId);
733 }
734 int ScatterV(const float* sendBuffer, float* recvBuffer, vtkIdType* sendLengths,
735 vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
736 {
737 return this->ScatterVVoidArray(
738 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_FLOAT, srcProcessId);
739 }
740 int ScatterV(const double* sendBuffer, double* recvBuffer, vtkIdType* sendLengths,
741 vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
742 {
743 return this->ScatterVVoidArray(
744 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_DOUBLE, srcProcessId);
745 }
746 int ScatterV(const long long* sendBuffer, long long* recvBuffer, vtkIdType* sendLengths,
747 vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
748 {
749 return this->ScatterVVoidArray(
750 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, VTK_LONG_LONG, srcProcessId);
751 }
752 int ScatterV(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
753 vtkIdType* sendLengths, vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
754 {
755 return this->ScatterVVoidArray(sendBuffer, recvBuffer, sendLengths, offsets, recvLength,
756 VTK_UNSIGNED_LONG_LONG, srcProcessId);
757 }
759
761
764 int AllGather(const int* sendBuffer, int* recvBuffer, vtkIdType length)
765 {
766 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_INT);
767 }
768 int AllGather(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length)
769 {
770 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_INT);
771 }
772 int AllGather(const short* sendBuffer, short* recvBuffer, vtkIdType length)
773 {
774 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_SHORT);
775 }
776 int AllGather(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length)
777 {
778 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_SHORT);
779 }
780 int AllGather(const long* sendBuffer, long* recvBuffer, vtkIdType length)
781 {
782 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_LONG);
783 }
784 int AllGather(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length)
785 {
786 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG);
787 }
788 int AllGather(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length)
789 {
790 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_CHAR);
791 }
792 int AllGather(const char* sendBuffer, char* recvBuffer, vtkIdType length)
793 {
794 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_CHAR);
795 }
796 int AllGather(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length)
797 {
798 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_SIGNED_CHAR);
799 }
800 int AllGather(const float* sendBuffer, float* recvBuffer, vtkIdType length)
801 {
802 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_FLOAT);
803 }
804 int AllGather(const double* sendBuffer, double* recvBuffer, vtkIdType length)
805 {
806 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_DOUBLE);
807 }
808 int AllGather(const long long* sendBuffer, long long* recvBuffer, vtkIdType length)
809 {
810 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_LONG_LONG);
811 }
813 const unsigned long long* sendBuffer, unsigned long long* recvBuffer, vtkIdType length)
814 {
815 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG_LONG);
816 }
817 int AllGather(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer);
819 const vtkMultiProcessStream& sendBuffer, std::vector<vtkMultiProcessStream>& recvBuffer);
821
833
835
838 int AllGatherV(const int* sendBuffer, int* recvBuffer, vtkIdType sendLength,
839 vtkIdType* recvLengths, vtkIdType* offsets)
840 {
841 return this->AllGatherVVoidArray(
842 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_INT);
843 }
844 int AllGatherV(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType sendLength,
845 vtkIdType* recvLengths, vtkIdType* offsets)
846 {
847 return this->AllGatherVVoidArray(
848 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_INT);
849 }
850 int AllGatherV(const short* sendBuffer, short* recvBuffer, vtkIdType sendLength,
851 vtkIdType* recvLengths, vtkIdType* offsets)
852 {
853 return this->AllGatherVVoidArray(
854 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_SHORT);
855 }
856 int AllGatherV(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType sendLength,
857 vtkIdType* recvLengths, vtkIdType* offsets)
858 {
859 return this->AllGatherVVoidArray(
860 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_SHORT);
861 }
862 int AllGatherV(const long* sendBuffer, long* recvBuffer, vtkIdType sendLength,
863 vtkIdType* recvLengths, vtkIdType* offsets)
864 {
865 return this->AllGatherVVoidArray(
866 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_LONG);
867 }
868 int AllGatherV(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType sendLength,
869 vtkIdType* recvLengths, vtkIdType* offsets)
870 {
871 return this->AllGatherVVoidArray(
872 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_LONG);
873 }
874 int AllGatherV(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType sendLength,
875 vtkIdType* recvLengths, vtkIdType* offsets)
876 {
877 return this->AllGatherVVoidArray(
878 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_CHAR);
879 }
880 int AllGatherV(const char* sendBuffer, char* recvBuffer, vtkIdType sendLength,
881 vtkIdType* recvLengths, vtkIdType* offsets)
882 {
883 return this->AllGatherVVoidArray(
884 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_CHAR);
885 }
886 int AllGatherV(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType sendLength,
887 vtkIdType* recvLengths, vtkIdType* offsets)
888 {
889 return this->AllGatherVVoidArray(
890 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_CHAR);
891 }
892 int AllGatherV(const float* sendBuffer, float* recvBuffer, vtkIdType sendLength,
893 vtkIdType* recvLengths, vtkIdType* offsets)
894 {
895 return this->AllGatherVVoidArray(
896 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_FLOAT);
897 }
898 int AllGatherV(const double* sendBuffer, double* recvBuffer, vtkIdType sendLength,
899 vtkIdType* recvLengths, vtkIdType* offsets)
900 {
901 return this->AllGatherVVoidArray(
902 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_DOUBLE);
903 }
904 int AllGatherV(const long long* sendBuffer, long long* recvBuffer, vtkIdType sendLength,
905 vtkIdType* recvLengths, vtkIdType* offsets)
906 {
907 return this->AllGatherVVoidArray(
908 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_LONG_LONG);
909 }
910 int AllGatherV(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
911 vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets)
912 {
913 return this->AllGatherVVoidArray(
914 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, VTK_UNSIGNED_LONG_LONG);
915 }
917 vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, vtkIdType* recvLengths, vtkIdType* offsets);
918 int AllGatherV(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer);
920
922
928 const int* sendBuffer, int* recvBuffer, vtkIdType length, int operation, int destProcessId)
929 {
930 return this->ReduceVoidArray(sendBuffer, recvBuffer, length, VTK_INT, operation, destProcessId);
931 }
932 int Reduce(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length,
933 int operation, int destProcessId)
934 {
935 return this->ReduceVoidArray(
936 sendBuffer, recvBuffer, length, VTK_UNSIGNED_INT, operation, destProcessId);
937 }
939 const short* sendBuffer, short* recvBuffer, vtkIdType length, int operation, int destProcessId)
940 {
941 return this->ReduceVoidArray(
942 sendBuffer, recvBuffer, length, VTK_SHORT, operation, destProcessId);
943 }
944 int Reduce(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
945 int operation, int destProcessId)
946 {
947 return this->ReduceVoidArray(
948 sendBuffer, recvBuffer, length, VTK_UNSIGNED_SHORT, operation, destProcessId);
949 }
951 const long* sendBuffer, long* recvBuffer, vtkIdType length, int operation, int destProcessId)
952 {
953 return this->ReduceVoidArray(
954 sendBuffer, recvBuffer, length, VTK_LONG, operation, destProcessId);
955 }
956 int Reduce(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length,
957 int operation, int destProcessId)
958 {
959 return this->ReduceVoidArray(
960 sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG, operation, destProcessId);
961 }
962 int Reduce(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length,
963 int operation, int destProcessId)
964 {
965 return this->ReduceVoidArray(
966 sendBuffer, recvBuffer, length, VTK_UNSIGNED_CHAR, operation, destProcessId);
967 }
969 const char* sendBuffer, char* recvBuffer, vtkIdType length, int operation, int destProcessId)
970 {
971 return this->ReduceVoidArray(
972 sendBuffer, recvBuffer, length, VTK_CHAR, operation, destProcessId);
973 }
974 int Reduce(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length,
975 int operation, int destProcessId)
976 {
977 return this->ReduceVoidArray(
978 sendBuffer, recvBuffer, length, VTK_SIGNED_CHAR, operation, destProcessId);
979 }
981 const float* sendBuffer, float* recvBuffer, vtkIdType length, int operation, int destProcessId)
982 {
983 return this->ReduceVoidArray(
984 sendBuffer, recvBuffer, length, VTK_FLOAT, operation, destProcessId);
985 }
986 int Reduce(const double* sendBuffer, double* recvBuffer, vtkIdType length, int operation,
987 int destProcessId)
988 {
989 return this->ReduceVoidArray(
990 sendBuffer, recvBuffer, length, VTK_DOUBLE, operation, destProcessId);
991 }
992 int Reduce(const long long* sendBuffer, long long* recvBuffer, vtkIdType length, int operation,
993 int destProcessId)
994 {
995 return this->ReduceVoidArray(
996 sendBuffer, recvBuffer, length, VTK_LONG_LONG, operation, destProcessId);
997 }
998 int Reduce(const unsigned long long* sendBuffer, unsigned long long* recvBuffer, vtkIdType length,
999 int operation, int destProcessId)
1000 {
1001 return this->ReduceVoidArray(
1002 sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG_LONG, operation, destProcessId);
1003 }
1004 int Reduce(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int operation, int destProcessId);
1006
1008
1012 int Reduce(const int* sendBuffer, int* recvBuffer, vtkIdType length, Operation* operation,
1013 int destProcessId)
1014 {
1015 return this->ReduceVoidArray(sendBuffer, recvBuffer, length, VTK_INT, operation, destProcessId);
1016 }
1017 int Reduce(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length,
1018 Operation* operation, int destProcessId)
1019 {
1020 return this->ReduceVoidArray(
1021 sendBuffer, recvBuffer, length, VTK_UNSIGNED_INT, operation, destProcessId);
1022 }
1023 int Reduce(const short* sendBuffer, short* recvBuffer, vtkIdType length, Operation* operation,
1024 int destProcessId)
1025 {
1026 return this->ReduceVoidArray(
1027 sendBuffer, recvBuffer, length, VTK_SHORT, operation, destProcessId);
1028 }
1029 int Reduce(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
1030 Operation* operation, int destProcessId)
1031 {
1032 return this->ReduceVoidArray(
1033 sendBuffer, recvBuffer, length, VTK_UNSIGNED_SHORT, operation, destProcessId);
1034 }
1035 int Reduce(const long* sendBuffer, long* recvBuffer, vtkIdType length, Operation* operation,
1036 int destProcessId)
1037 {
1038 return this->ReduceVoidArray(
1039 sendBuffer, recvBuffer, length, VTK_LONG, operation, destProcessId);
1040 }
1041 int Reduce(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length,
1042 Operation* operation, int destProcessId)
1043 {
1044 return this->ReduceVoidArray(
1045 sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG, operation, destProcessId);
1046 }
1047 int Reduce(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length,
1048 Operation* operation, int destProcessId)
1049 {
1050 return this->ReduceVoidArray(
1051 sendBuffer, recvBuffer, length, VTK_UNSIGNED_CHAR, operation, destProcessId);
1052 }
1053 int Reduce(const char* sendBuffer, char* recvBuffer, vtkIdType length, Operation* operation,
1054 int destProcessId)
1055 {
1056 return this->ReduceVoidArray(
1057 sendBuffer, recvBuffer, length, VTK_CHAR, operation, destProcessId);
1058 }
1059 int Reduce(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length,
1060 Operation* operation, int destProcessId)
1061 {
1062 return this->ReduceVoidArray(
1063 sendBuffer, recvBuffer, length, VTK_SIGNED_CHAR, operation, destProcessId);
1064 }
1065 int Reduce(const float* sendBuffer, float* recvBuffer, vtkIdType length, Operation* operation,
1066 int destProcessId)
1067 {
1068 return this->ReduceVoidArray(
1069 sendBuffer, recvBuffer, length, VTK_FLOAT, operation, destProcessId);
1070 }
1071 int Reduce(const double* sendBuffer, double* recvBuffer, vtkIdType length, Operation* operation,
1072 int destProcessId)
1073 {
1074 return this->ReduceVoidArray(
1075 sendBuffer, recvBuffer, length, VTK_DOUBLE, operation, destProcessId);
1076 }
1077 int Reduce(const long long* sendBuffer, long long* recvBuffer, vtkIdType length,
1078 Operation* operation, int destProcessId)
1079 {
1080 return this->ReduceVoidArray(
1081 sendBuffer, recvBuffer, length, VTK_LONG_LONG, operation, destProcessId);
1082 }
1083 int Reduce(const unsigned long long* sendBuffer, unsigned long long* recvBuffer, vtkIdType length,
1084 Operation* operation, int destProcessId)
1085 {
1086 return this->ReduceVoidArray(
1087 sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG_LONG, operation, destProcessId);
1088 }
1090 vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, Operation* operation, int destProcessId);
1092
1094
1097 int AllReduce(const int* sendBuffer, int* recvBuffer, vtkIdType length, int operation)
1098 {
1099 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_INT, operation);
1100 }
1102 const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length, int operation)
1103 {
1104 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_INT, operation);
1105 }
1106 int AllReduce(const short* sendBuffer, short* recvBuffer, vtkIdType length, int operation)
1107 {
1108 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_SHORT, operation);
1109 }
1111 const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length, int operation)
1112 {
1113 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_SHORT, operation);
1114 }
1115 int AllReduce(const long* sendBuffer, long* recvBuffer, vtkIdType length, int operation)
1116 {
1117 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_LONG, operation);
1118 }
1120 const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length, int operation)
1121 {
1122 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG, operation);
1123 }
1125 const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length, int operation)
1126 {
1127 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_CHAR, operation);
1128 }
1129 int AllReduce(const char* sendBuffer, char* recvBuffer, vtkIdType length, int operation)
1130 {
1131 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_CHAR, operation);
1132 }
1134 const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length, int operation)
1135 {
1136 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_SIGNED_CHAR, operation);
1137 }
1138 int AllReduce(const float* sendBuffer, float* recvBuffer, vtkIdType length, int operation)
1139 {
1140 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_FLOAT, operation);
1141 }
1142 int AllReduce(const double* sendBuffer, double* recvBuffer, vtkIdType length, int operation)
1143 {
1144 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_DOUBLE, operation);
1145 }
1146 int AllReduce(const long long* sendBuffer, long long* recvBuffer, vtkIdType length, int operation)
1147 {
1148 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_LONG_LONG, operation);
1149 }
1150 int AllReduce(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
1151 vtkIdType length, int operation)
1152 {
1153 return this->AllReduceVoidArray(
1154 sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG_LONG, operation);
1155 }
1156 int AllReduce(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int operation);
1157 int AllReduce(const int* sendBuffer, int* recvBuffer, vtkIdType length, Operation* operation)
1158 {
1159 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_INT, operation);
1160 }
1161 int AllReduce(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length,
1162 Operation* operation)
1163 {
1164 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_INT, operation);
1165 }
1166 int AllReduce(const short* sendBuffer, short* recvBuffer, vtkIdType length, Operation* operation)
1167 {
1168 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_SHORT, operation);
1169 }
1170 int AllReduce(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
1171 Operation* operation)
1172 {
1173 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_SHORT, operation);
1174 }
1175 int AllReduce(const long* sendBuffer, long* recvBuffer, vtkIdType length, Operation* operation)
1176 {
1177 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_LONG, operation);
1178 }
1179 int AllReduce(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length,
1180 Operation* operation)
1181 {
1182 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG, operation);
1183 }
1184 int AllReduce(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length,
1185 Operation* operation)
1186 {
1187 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_CHAR, operation);
1188 }
1189 int AllReduce(const char* sendBuffer, char* recvBuffer, vtkIdType length, Operation* operation)
1190 {
1191 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_CHAR, operation);
1192 }
1194 const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length, Operation* operation)
1195 {
1196 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_SIGNED_CHAR, operation);
1197 }
1198 int AllReduce(const float* sendBuffer, float* recvBuffer, vtkIdType length, Operation* operation)
1199 {
1200 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_FLOAT, operation);
1201 }
1203 const double* sendBuffer, double* recvBuffer, vtkIdType length, Operation* operation)
1204 {
1205 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_DOUBLE, operation);
1206 }
1208 const long long* sendBuffer, long long* recvBuffer, vtkIdType length, Operation* operation)
1209 {
1210 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_LONG_LONG, operation);
1211 }
1212 int AllReduce(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
1213 vtkIdType length, Operation* operation)
1214 {
1215 return this->AllReduceVoidArray(
1216 sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG_LONG, operation);
1217 }
1218 int AllReduce(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, Operation* operation);
1220
1222
1226 virtual int BroadcastVoidArray(void* data, vtkIdType length, int type, int srcProcessId);
1227 virtual int GatherVoidArray(
1228 const void* sendBuffer, void* recvBuffer, vtkIdType length, int type, int destProcessId);
1229 virtual int GatherVVoidArray(const void* sendBuffer, void* recvBuffer, vtkIdType sendLength,
1230 vtkIdType* recvLengths, vtkIdType* offsets, int type, int destProcessId);
1231 virtual int ScatterVoidArray(
1232 const void* sendBuffer, void* recvBuffer, vtkIdType length, int type, int srcProcessId);
1233 virtual int ScatterVVoidArray(const void* sendBuffer, void* recvBuffer, vtkIdType* sendLengths,
1234 vtkIdType* offsets, vtkIdType recvLength, int type, int srcProcessId);
1236 const void* sendBuffer, void* recvBuffer, vtkIdType length, int type);
1237 virtual int AllGatherVVoidArray(const void* sendBuffer, void* recvBuffer, vtkIdType sendLength,
1238 vtkIdType* recvLengths, vtkIdType* offsets, int type);
1239 virtual int ReduceVoidArray(const void* sendBuffer, void* recvBuffer, vtkIdType length, int type,
1240 int operation, int destProcessId);
1241 virtual int ReduceVoidArray(const void* sendBuffer, void* recvBuffer, vtkIdType length, int type,
1242 Operation* operation, int destProcessId);
1244 const void* sendBuffer, void* recvBuffer, vtkIdType length, int type, int operation);
1246 const void* sendBuffer, void* recvBuffer, vtkIdType length, int type, Operation* operation);
1248
1257 virtual bool CanProbe() { return false; }
1258
1268 virtual int Probe(int vtkNotUsed(source), int vtkNotUsed(tag), int* vtkNotUsed(actualSource))
1269 {
1270 vtkErrorMacro("Probe not implemented for this controller.");
1271 return 0;
1272 }
1273
1274 static void SetUseCopy(int useCopy);
1275
1287 virtual int ComputeGlobalBounds(int processorId, int numProcesses, vtkBoundingBox* bounds,
1288 int* rightHasBounds = nullptr, int* leftHasBounds = nullptr, int hasBoundsTag = 288402,
1289 int localBoundsTag = 288403, int globalBoundsTag = 288404);
1290
1292
1297 static int GetParentProcessor(int pid);
1298 static int GetLeftChildProcessor(int pid);
1300
1302
1307 static int MarshalDataObject(vtkDataObject* object, vtkCharArray* buffer);
1308 static int UnMarshalDataObject(vtkCharArray* buffer, vtkDataObject* object);
1310
1318
1319protected:
1322
1325
1326 // Internal methods called by Send/Receive(vtkDataObject *... ) above.
1327 int SendElementalDataObject(vtkDataObject* data, int remoteHandle, int tag);
1329
1337 int GatherV(vtkDataArray* sendArray, vtkDataArray* recvArray,
1338 vtkSmartPointer<vtkDataArray>* recvArrays, int destProcessId);
1340 vtkDataObject* sendData, vtkSmartPointer<vtkDataObject>* receiveData, int destProcessId);
1342
1344 int AllGatherV(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer,
1345 vtkIdTypeArray* recvLengthsArray, vtkIdTypeArray* offsetsArray);
1347 vtkDataArray* sendArray, vtkDataArray* recvArray, vtkSmartPointer<vtkDataArray>* recvArrays);
1349
1350 int ReceiveDataObject(vtkDataObject* data, int remoteHandle, int tag, int type = -1);
1351 int ReceiveElementalDataObject(vtkDataObject* data, int remoteHandle, int tag);
1352 int ReceiveMultiBlockDataSet(vtkMultiBlockDataSet* data, int remoteHandle, int tag);
1353
1356
1358
1359 static int UseCopy;
1360
1362
1363private:
1364 vtkCommunicator(const vtkCommunicator&) = delete;
1365 void operator=(const vtkCommunicator&) = delete;
1366};
1367
1368VTK_ABI_NAMESPACE_END
1369#endif // vtkCommunicator_h
Fast, simple class for representing and operating on 3D bounds.
dynamic, self-adjusting array of char
Definition: vtkCharArray.h:41
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 this overload, recvLengths and offsets known on destProcessId and are passed in as parameters.
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 this overload, the recvLengths and offsets parameters are still computed but not exposed.
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 this overload, recvLengths and offsets are not known on destProcessId.
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.
virtual int Probe(int vtkNotUsed(source), int vtkNotUsed(tag), int *vtkNotUsed(actualSource))
Blocking test for checking for a message tagged with tag from source process (if source == ANY_SOURCE...
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.
virtual bool CanProbe()
Check if this communicator implements a probe operation.
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:46
general representation of visualization data
Definition: vtkDataObject.h:56
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
dynamic, self-adjusting array of vtkIdType
topologically and geometrically regular array of data
Definition: vtkImageData.h:47
a simple class to control print indentation
Definition: vtkIndent.h:29
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:53
@ vector
Definition: vtkX3D.h:237
@ length
Definition: vtkX3D.h:393
@ type
Definition: vtkX3D.h:516
@ data
Definition: vtkX3D.h:315
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
#define VTK_SHORT
Definition: vtkType.h:37
int vtkIdType
Definition: vtkType.h:332
#define VTK_UNSIGNED_INT
Definition: vtkType.h:40
#define VTK_LONG_LONG
Definition: vtkType.h:52
#define VTK_DOUBLE
Definition: vtkType.h:44
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:36
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:38
#define VTK_INT
Definition: vtkType.h:39
#define VTK_SIGNED_CHAR
Definition: vtkType.h:35
#define VTK_FLOAT
Definition: vtkType.h:43
#define VTK_CHAR
Definition: vtkType.h:34
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:42
#define VTK_UNSIGNED_LONG_LONG
Definition: vtkType.h:53
#define VTK_LONG
Definition: vtkType.h:41