VTK  9.7.20260828
vtkMultiProcessController.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
42
43#ifndef vtkMultiProcessController_h
44#define vtkMultiProcessController_h
45
46#include "vtkObject.h"
47#include "vtkParallelCoreModule.h" // For export macro
48
49#include "vtkCommunicator.h" // Needed for direct access to communicator
50
51VTK_ABI_NAMESPACE_BEGIN
52class vtkBoundingBox;
53class vtkCollection;
54class vtkDataObject;
55class vtkDataSet;
56class vtkImageData;
59class vtkOutputWindow;
60class vtkProcessGroup;
61class vtkProcess;
63
64// The type of function that gets called when new processes are initiated.
65typedef void (*vtkProcessFunctionType)(vtkMultiProcessController* controller, void* userData);
66
67// The type of function that gets called when an RMI is triggered.
68typedef void (*vtkRMIFunctionType)(
69 void* localArg, void* remoteArg, int remoteArgLength, int remoteProcessId);
70
71class VTKPARALLELCORE_EXPORT vtkMultiProcessController : public vtkObject
72{
73public:
75 void PrintSelf(ostream& os, vtkIndent indent) override;
76
82 virtual void Initialize(int* vtkNotUsed(argc), char*** vtkNotUsed(argv)) = 0;
83
89 virtual void Initialize(
90 int* vtkNotUsed(argc), char*** vtkNotUsed(argv), int initializedExternally) = 0;
91
97 virtual void Finalize() = 0;
98
104 virtual void Finalize(int finalizedExternally) = 0;
105
107
112 void SetNumberOfProcesses(int num);
115
123
130
136 virtual void SingleMethodExecute() = 0;
137
144 void SetMultipleMethod(int index, vtkProcessFunctionType, void* data);
145
151 virtual void MultipleMethodExecute() = 0;
152
157
165
171 virtual void CreateOutputWindow() = 0;
172
185
196 virtual vtkMultiProcessController* PartitionController(int localColor, int localKey);
197
199
221
232 static std::vector<int> ApportionGroupSlots(
233 const std::vector<int>& nodeSizes, int numberOfGroups);
234
245 static int BlockDistribute(int position, int count, int numberOfGroups);
246
259 static std::vector<int> PartitionNodesLPT(const std::vector<int>& nodeSizes, int numberOfGroups);
260
261 //------------------ RMIs --------------------
262
275 virtual unsigned long AddRMI(vtkRMIFunctionType, void* localArg, int tag);
276
280 virtual int RemoveFirstRMI(int tag);
281
286 virtual int RemoveRMI(unsigned long id);
287
291 virtual void RemoveRMI(vtkRMIFunctionType f, void* arg, int tag)
292 {
293 (void)f;
294 (void)arg;
295 (void)tag;
296 vtkErrorMacro("RemoveRMI Not Implemented Yet");
297 }
298
304 virtual unsigned long AddRMICallback(vtkRMIFunctionType, void* localArg, int tag);
305
311 virtual void RemoveAllRMICallbacks(int tag);
312
316 virtual bool RemoveRMICallback(unsigned long id);
317
321 void TriggerRMI(int remoteProcessId, void* arg, int argLength, int tag);
322
328
332 void TriggerRMI(int remoteProcessId, const char* arg, int tag)
333 {
334 this->TriggerRMI(remoteProcessId, (void*)arg, static_cast<int>(strlen(arg)) + 1, tag);
335 }
336
340 void TriggerRMI(int remoteProcessId, int tag)
341 {
342 this->TriggerRMI(remoteProcessId, nullptr, 0, tag);
343 }
344
346
354 void TriggerRMIOnAllChildren(void* arg, int argLength, int tag);
355 void TriggerRMIOnAllChildren(const char* arg, int tag)
356 {
357 this->TriggerRMIOnAllChildren((void*)arg, static_cast<int>(strlen(arg)) + 1, tag);
358 }
359 void TriggerRMIOnAllChildren(int tag) { this->TriggerRMIOnAllChildren(nullptr, 0, tag); }
360 void BroadcastTriggerRMIOnAllChildren(void* arg, int argLength, int tag);
362
364
375 int ProcessRMIs(int reportErrors, int dont_loop = 0);
377 int BroadcastProcessRMIs(int reportErrors, int dont_loop = 0);
379
381
386 vtkSetMacro(BreakFlag, int);
387 vtkGetMacro(BreakFlag, int);
389
391
396 vtkSetMacro(BroadcastTriggerRMI, bool);
397 vtkGetMacro(BroadcastTriggerRMI, bool);
398 vtkBooleanMacro(BroadcastTriggerRMI, bool);
400
402
406 vtkGetObjectMacro(Communicator, vtkCommunicator);
408
412 static int GetBreakRMITag() { return BREAK_RMI_TAG; }
413 static int GetRMITag() { return RMI_TAG; }
414 static int GetRMIArgTag() { return RMI_ARG_TAG; }
415
422
424 {
427 };
428
436
440 void Barrier();
441
443
444 //------------------ Communication --------------------
445
447
454 int Send(const int* data, vtkIdType length, int remoteProcessId, int tag);
455 int Send(const short* data, vtkIdType length, int remoteProcessId, int tag);
456 int Send(const unsigned short* data, vtkIdType length, int remoteProcessId, int tag);
457 int Send(const unsigned int* data, vtkIdType length, int remoteProcessId, int tag);
458 int Send(const unsigned long* data, vtkIdType length, int remoteProcessId, int tag);
459 int Send(const long* data, vtkIdType length, int remoteProcessId, int tag);
460 int Send(const signed char* data, vtkIdType length, int remoteProcessId, int tag);
461 int Send(const char* data, vtkIdType length, int remoteProcessId, int tag);
462 int Send(const unsigned char* data, vtkIdType length, int remoteProcessId, int tag);
463 int Send(const float* data, vtkIdType length, int remoteProcessId, int tag);
464 int Send(const double* data, vtkIdType length, int remoteProcessId, int tag);
465 int Send(const long long* data, vtkIdType length, int remoteProcessId, int tag);
466 int Send(const unsigned long long* data, vtkIdType length, int remoteProcessId, int tag);
467 int Send(vtkDataObject* data, int remoteId, int tag);
468 int Send(vtkDataArray* data, int remoteId, int tag);
470
478 int Send(const vtkMultiProcessStream& stream, int remoteId, int tag);
479
481
490 int Receive(int* data, vtkIdType maxlength, int remoteProcessId, int tag);
491 int Receive(unsigned int* data, vtkIdType maxlength, int remoteProcessId, int tag);
492 int Receive(short* data, vtkIdType maxlength, int remoteProcessId, int tag);
493 int Receive(unsigned short* data, vtkIdType maxlength, int remoteProcessId, int tag);
494 int Receive(long* data, vtkIdType maxlength, int remoteProcessId, int tag);
495 int Receive(unsigned long* data, vtkIdType maxlength, int remoteProcessId, int tag);
496 int Receive(char* data, vtkIdType maxlength, int remoteProcessId, int tag);
497 int Receive(unsigned char* data, vtkIdType maxlength, int remoteProcessId, int tag);
498 int Receive(signed char* data, vtkIdType maxlength, int remoteProcessId, int tag);
499 int Receive(float* data, vtkIdType maxlength, int remoteProcessId, int tag);
500 int Receive(double* data, vtkIdType maxlength, int remoteProcessId, int tag);
501 int Receive(long long* data, vtkIdType maxLength, int remoteProcessId, int tag);
502 int Receive(unsigned long long* data, vtkIdType maxLength, int remoteProcessId, int tag);
503 int Receive(vtkDataObject* data, int remoteId, int tag);
504 int Receive(vtkDataArray* data, int remoteId, int tag);
506
510 int Receive(vtkMultiProcessStream& stream, int remoteId, int tag);
511
512 vtkDataObject* ReceiveDataObject(int remoteId, int tag);
513
523
524 //---------------------- Collective Operations ----------------------
525
527
532 int Broadcast(int* data, vtkIdType length, int srcProcessId)
533 {
534 return this->Communicator->Broadcast(data, length, srcProcessId);
535 }
536 int Broadcast(unsigned int* data, vtkIdType length, int srcProcessId)
537 {
538 return this->Communicator->Broadcast(data, length, srcProcessId);
539 }
540 int Broadcast(short* data, vtkIdType length, int srcProcessId)
541 {
542 return this->Communicator->Broadcast(data, length, srcProcessId);
543 }
544 int Broadcast(unsigned short* data, vtkIdType length, int srcProcessId)
545 {
546 return this->Communicator->Broadcast(data, length, srcProcessId);
547 }
548 int Broadcast(long* data, vtkIdType length, int srcProcessId)
549 {
550 return this->Communicator->Broadcast(data, length, srcProcessId);
551 }
552 int Broadcast(unsigned long* data, vtkIdType length, int srcProcessId)
553 {
554 return this->Communicator->Broadcast(data, length, srcProcessId);
555 }
556 int Broadcast(unsigned char* data, vtkIdType length, int srcProcessId)
557 {
558 return this->Communicator->Broadcast(data, length, srcProcessId);
559 }
560 int Broadcast(char* data, vtkIdType length, int srcProcessId)
561 {
562 return this->Communicator->Broadcast(data, length, srcProcessId);
563 }
564 int Broadcast(signed char* data, vtkIdType length, int srcProcessId)
565 {
566 return this->Communicator->Broadcast(data, length, srcProcessId);
567 }
568 int Broadcast(float* data, vtkIdType length, int srcProcessId)
569 {
570 return this->Communicator->Broadcast(data, length, srcProcessId);
571 }
572 int Broadcast(double* data, vtkIdType length, int srcProcessId)
573 {
574 return this->Communicator->Broadcast(data, length, srcProcessId);
575 }
576 int Broadcast(long long* data, vtkIdType length, int srcProcessId)
577 {
578 return this->Communicator->Broadcast(data, length, srcProcessId);
579 }
580 int Broadcast(unsigned long long* data, vtkIdType length, int srcProcessId)
581 {
582 return this->Communicator->Broadcast(data, length, srcProcessId);
583 }
584 int Broadcast(vtkDataObject* data, int srcProcessId)
585 {
586 return this->Communicator->Broadcast(data, srcProcessId);
587 }
588 int Broadcast(vtkDataArray* data, int srcProcessId)
589 {
590 return this->Communicator->Broadcast(data, srcProcessId);
591 }
592
593
594 int Broadcast(vtkMultiProcessStream& stream, int srcProcessId)
595 {
596 return this->Communicator->Broadcast(stream, srcProcessId);
597 }
598
600
609 int Gather(const int* sendBuffer, int* recvBuffer, vtkIdType length, int destProcessId)
610 {
611 return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
612 }
614 const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length, int destProcessId)
615 {
616 return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
617 }
618 int Gather(const short* sendBuffer, short* recvBuffer, vtkIdType length, int destProcessId)
619 {
620 return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
621 }
622 int Gather(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
623 int destProcessId)
624 {
625 return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
626 }
627 int Gather(const long* sendBuffer, long* recvBuffer, vtkIdType length, int destProcessId)
628 {
629 return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
630 }
632 const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length, int destProcessId)
633 {
634 return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
635 }
637 const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length, int destProcessId)
638 {
639 return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
640 }
641 int Gather(const char* sendBuffer, char* recvBuffer, vtkIdType length, int destProcessId)
642 {
643 return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
644 }
646 const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length, int destProcessId)
647 {
648 return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
649 }
650 int Gather(const float* sendBuffer, float* recvBuffer, vtkIdType length, int destProcessId)
651 {
652 return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
653 }
654 int Gather(const double* sendBuffer, double* recvBuffer, vtkIdType length, int destProcessId)
655 {
656 return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
657 }
659 const long long* sendBuffer, long long* recvBuffer, vtkIdType length, int destProcessId)
660 {
661 return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
662 }
663 int Gather(const unsigned long long* sendBuffer, unsigned long long* recvBuffer, vtkIdType length,
664 int destProcessId)
665 {
666 return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
667 }
668 int Gather(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int destProcessId)
669 {
670 return this->Communicator->Gather(sendBuffer, recvBuffer, destProcessId);
671 }
672
673
683 int Gather(vtkDataObject* sendBuffer, std::vector<vtkSmartPointer<vtkDataObject>>& recvBuffer,
684 int destProcessId)
685 {
686 return this->Communicator->Gather(sendBuffer, recvBuffer, destProcessId);
687 }
688
698 int Gather(const vtkMultiProcessStream& sendBuffer,
699 std::vector<vtkMultiProcessStream>& recvBuffer, int destProcessId)
700 {
701 return this->Communicator->Gather(sendBuffer, recvBuffer, destProcessId);
702 }
703
705
716 int GatherV(const int* sendBuffer, int* recvBuffer, vtkIdType sendLength, vtkIdType* recvLengths,
717 vtkIdType* offsets, int destProcessId)
718 {
719 return this->Communicator->GatherV(
720 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
721 }
722 int GatherV(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType sendLength,
723 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
724 {
725 return this->Communicator->GatherV(
726 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
727 }
728 int GatherV(const short* sendBuffer, short* recvBuffer, vtkIdType sendLength,
729 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
730 {
731 return this->Communicator->GatherV(
732 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
733 }
734 int GatherV(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType sendLength,
735 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
736 {
737 return this->Communicator->GatherV(
738 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
739 }
740 int GatherV(const long* sendBuffer, long* recvBuffer, vtkIdType sendLength,
741 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
742 {
743 return this->Communicator->GatherV(
744 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
745 }
746 int GatherV(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType sendLength,
747 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
748 {
749 return this->Communicator->GatherV(
750 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
751 }
752 int GatherV(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType sendLength,
753 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
754 {
755 return this->Communicator->GatherV(
756 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
757 }
758 int GatherV(const char* sendBuffer, char* recvBuffer, vtkIdType sendLength,
759 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
760 {
761 return this->Communicator->GatherV(
762 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
763 }
764 int GatherV(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType sendLength,
765 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
766 {
767 return this->Communicator->GatherV(
768 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
769 }
770 int GatherV(const float* sendBuffer, float* recvBuffer, vtkIdType sendLength,
771 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
772 {
773 return this->Communicator->GatherV(
774 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
775 }
776 int GatherV(const double* sendBuffer, double* recvBuffer, vtkIdType sendLength,
777 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
778 {
779 return this->Communicator->GatherV(
780 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
781 }
782 int GatherV(const long long* sendBuffer, long long* recvBuffer, vtkIdType sendLength,
783 vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
784 {
785 return this->Communicator->GatherV(
786 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
787 }
788 int GatherV(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
789 vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
790 {
791 return this->Communicator->GatherV(
792 sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
793 }
794
795
796 int GatherV(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, vtkIdType* recvLengths,
797 vtkIdType* offsets, int destProcessId)
798 {
799 return this->Communicator->GatherV(sendBuffer, recvBuffer, recvLengths, offsets, destProcessId);
800 }
801 int GatherV(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, vtkIdTypeArray* recvLengths,
802 vtkIdTypeArray* offsets, int destProcessId)
803 {
804 return this->Communicator->GatherV(sendBuffer, recvBuffer, recvLengths, offsets, destProcessId);
805 }
806
808
814 int GatherV(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int destProcessId)
815 {
816 return this->Communicator->GatherV(sendBuffer, recvBuffer, destProcessId);
817 }
818 int GatherV(vtkDataObject* sendData, vtkSmartPointer<vtkDataObject>* recvData, int destProcessId)
819 {
820 return this->Communicator->GatherV(sendData, recvData, destProcessId);
821 }
822
823
825
832 int Scatter(const int* sendBuffer, int* recvBuffer, vtkIdType length, int srcProcessId)
833 {
834 return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
835 }
837 const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length, int srcProcessId)
838 {
839 return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
840 }
841 int Scatter(const short* sendBuffer, short* recvBuffer, vtkIdType length, int srcProcessId)
842 {
843 return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
844 }
845 int Scatter(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
846 int srcProcessId)
847 {
848 return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
849 }
850 int Scatter(const long* sendBuffer, long* recvBuffer, vtkIdType length, int srcProcessId)
851 {
852 return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
853 }
855 const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length, int srcProcessId)
856 {
857 return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
858 }
860 const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length, int srcProcessId)
861 {
862 return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
863 }
864 int Scatter(const char* sendBuffer, char* recvBuffer, vtkIdType length, int srcProcessId)
865 {
866 return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
867 }
869 const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length, int srcProcessId)
870 {
871 return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
872 }
873 int Scatter(const float* sendBuffer, float* recvBuffer, vtkIdType length, int srcProcessId)
874 {
875 return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
876 }
877 int Scatter(const double* sendBuffer, double* recvBuffer, vtkIdType length, int srcProcessId)
878 {
879 return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
880 }
882 const long long* sendBuffer, long long* recvBuffer, vtkIdType length, int srcProcessId)
883 {
884 return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
885 }
886 int Scatter(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
887 vtkIdType length, int srcProcessId)
888 {
889 return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
890 }
891 int Scatter(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int srcProcessId)
892 {
893 return this->Communicator->Scatter(sendBuffer, recvBuffer, srcProcessId);
894 }
895
896
898
905 int ScatterV(const int* sendBuffer, int* recvBuffer, vtkIdType* sendLengths, vtkIdType* offsets,
906 vtkIdType recvLength, int srcProcessId)
907 {
908 return this->Communicator->ScatterV(
909 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
910 }
911 int ScatterV(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType* sendLengths,
912 vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
913 {
914 return this->Communicator->ScatterV(
915 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
916 }
917 int ScatterV(const short* sendBuffer, short* recvBuffer, vtkIdType* sendLengths,
918 vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
919 {
920 return this->Communicator->ScatterV(
921 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
922 }
923 int ScatterV(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType* sendLengths,
924 vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
925 {
926 return this->Communicator->ScatterV(
927 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
928 }
929 int ScatterV(const long* sendBuffer, long* recvBuffer, vtkIdType* sendLengths, vtkIdType* offsets,
930 vtkIdType recvLength, int srcProcessId)
931 {
932 return this->Communicator->ScatterV(
933 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
934 }
935 int ScatterV(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType* sendLengths,
936 vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
937 {
938 return this->Communicator->ScatterV(
939 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
940 }
941 int ScatterV(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType* sendLengths,
942 vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
943 {
944 return this->Communicator->ScatterV(
945 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
946 }
947 int ScatterV(const char* sendBuffer, char* recvBuffer, vtkIdType* sendLengths, vtkIdType* offsets,
948 vtkIdType recvLength, int srcProcessId)
949 {
950 return this->Communicator->ScatterV(
951 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
952 }
953 int ScatterV(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType* sendLengths,
954 vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
955 {
956 return this->Communicator->ScatterV(
957 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
958 }
959 int ScatterV(const float* sendBuffer, float* recvBuffer, vtkIdType* sendLengths,
960 vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
961 {
962 return this->Communicator->ScatterV(
963 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
964 }
965 int ScatterV(const double* sendBuffer, double* recvBuffer, vtkIdType* sendLengths,
966 vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
967 {
968 return this->Communicator->ScatterV(
969 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
970 }
971 int ScatterV(const long long* sendBuffer, long long* recvBuffer, vtkIdType* sendLengths,
972 vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
973 {
974 return this->Communicator->ScatterV(
975 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
976 }
977 int ScatterV(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
978 vtkIdType* sendLengths, vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
979 {
980 return this->Communicator->ScatterV(
981 sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
982 }
983
984
986
989 int AllGather(const int* sendBuffer, int* recvBuffer, vtkIdType length)
990 {
991 return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
992 }
993 int AllGather(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length)
994 {
995 return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
996 }
997 int AllGather(const short* sendBuffer, short* recvBuffer, vtkIdType length)
998 {
999 return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
1000 }
1001 int AllGather(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length)
1002 {
1003 return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
1004 }
1005 int AllGather(const long* sendBuffer, long* recvBuffer, vtkIdType length)
1006 {
1007 return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
1008 }
1009 int AllGather(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length)
1010 {
1011 return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
1012 }
1013 int AllGather(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length)
1014 {
1015 return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
1016 }
1017 int AllGather(const char* sendBuffer, char* recvBuffer, vtkIdType length)
1018 {
1019 return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
1020 }
1021 int AllGather(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length)
1022 {
1023 return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
1024 }
1025 int AllGather(const float* sendBuffer, float* recvBuffer, vtkIdType length)
1026 {
1027 return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
1028 }
1029 int AllGather(const double* sendBuffer, double* recvBuffer, vtkIdType length)
1030 {
1031 return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
1032 }
1033 int AllGather(const long long* sendBuffer, long long* recvBuffer, vtkIdType length)
1034 {
1035 return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
1036 }
1038 const unsigned long long* sendBuffer, unsigned long long* recvBuffer, vtkIdType length)
1039 {
1040 return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
1041 }
1042 int AllGather(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer)
1043 {
1044 return this->Communicator->AllGather(sendBuffer, recvBuffer);
1045 }
1046
1047
1055 int AllGather(vtkDataObject* sendBuffer, std::vector<vtkSmartPointer<vtkDataObject>>& recvBuffer)
1056 {
1057 return this->Communicator->AllGather(sendBuffer, recvBuffer);
1058 }
1059
1068 const vtkMultiProcessStream& sendBuffer, std::vector<vtkMultiProcessStream>& recvBuffer)
1069 {
1070 return this->Communicator->AllGather(sendBuffer, recvBuffer);
1071 }
1072
1074
1077 int AllGatherV(const int* sendBuffer, int* recvBuffer, vtkIdType sendLength,
1078 vtkIdType* recvLengths, vtkIdType* offsets)
1079 {
1080 return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1081 }
1082 int AllGatherV(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType sendLength,
1083 vtkIdType* recvLengths, vtkIdType* offsets)
1084 {
1085 return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1086 }
1087 int AllGatherV(const short* sendBuffer, short* recvBuffer, vtkIdType sendLength,
1088 vtkIdType* recvLengths, vtkIdType* offsets)
1089 {
1090 return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1091 }
1092 int AllGatherV(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType sendLength,
1093 vtkIdType* recvLengths, vtkIdType* offsets)
1094 {
1095 return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1096 }
1097 int AllGatherV(const long* sendBuffer, long* recvBuffer, vtkIdType sendLength,
1098 vtkIdType* recvLengths, vtkIdType* offsets)
1099 {
1100 return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1101 }
1102 int AllGatherV(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType sendLength,
1103 vtkIdType* recvLengths, vtkIdType* offsets)
1104 {
1105 return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1106 }
1107 int AllGatherV(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType sendLength,
1108 vtkIdType* recvLengths, vtkIdType* offsets)
1109 {
1110 return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1111 }
1112 int AllGatherV(const char* sendBuffer, char* recvBuffer, vtkIdType sendLength,
1113 vtkIdType* recvLengths, vtkIdType* offsets)
1114 {
1115 return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1116 }
1117 int AllGatherV(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType sendLength,
1118 vtkIdType* recvLengths, vtkIdType* offsets)
1119 {
1120 return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1121 }
1122 int AllGatherV(const float* sendBuffer, float* recvBuffer, vtkIdType sendLength,
1123 vtkIdType* recvLengths, vtkIdType* offsets)
1124 {
1125 return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1126 }
1127 int AllGatherV(const double* sendBuffer, double* recvBuffer, vtkIdType sendLength,
1128 vtkIdType* recvLengths, vtkIdType* offsets)
1129 {
1130 return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1131 }
1132 int AllGatherV(const long long* sendBuffer, long long* recvBuffer, vtkIdType sendLength,
1133 vtkIdType* recvLengths, vtkIdType* offsets)
1134 {
1135 return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1136 }
1137 int AllGatherV(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
1138 vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets)
1139 {
1140 return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1141 }
1143 vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, vtkIdType* recvLengths, vtkIdType* offsets)
1144 {
1145 return this->Communicator->AllGatherV(sendBuffer, recvBuffer, recvLengths, offsets);
1146 }
1147
1148
1155 int AllGatherV(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer)
1156 {
1157 return this->Communicator->AllGatherV(sendBuffer, recvBuffer);
1158 }
1159
1161
1167 const int* sendBuffer, int* recvBuffer, vtkIdType length, int operation, int destProcessId)
1168 {
1169 return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1170 }
1171 int Reduce(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length,
1172 int operation, int destProcessId)
1173 {
1174 return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1175 }
1177 const short* sendBuffer, short* recvBuffer, vtkIdType length, int operation, int destProcessId)
1178 {
1179 return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1180 }
1181 int Reduce(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
1182 int operation, int destProcessId)
1183 {
1184 return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1185 }
1187 const long* sendBuffer, long* recvBuffer, vtkIdType length, int operation, int destProcessId)
1188 {
1189 return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1190 }
1191 int Reduce(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length,
1192 int operation, int destProcessId)
1193 {
1194 return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1195 }
1196 int Reduce(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length,
1197 int operation, int destProcessId)
1198 {
1199 return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1200 }
1202 const char* sendBuffer, char* recvBuffer, vtkIdType length, int operation, int destProcessId)
1203 {
1204 return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1205 }
1206 int Reduce(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length,
1207 int operation, int destProcessId)
1208 {
1209 return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1210 }
1212 const float* sendBuffer, float* recvBuffer, vtkIdType length, int operation, int destProcessId)
1213 {
1214 return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1215 }
1216 int Reduce(const double* sendBuffer, double* recvBuffer, vtkIdType length, int operation,
1217 int destProcessId)
1218 {
1219 return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1220 }
1221 int Reduce(const long long* sendBuffer, long long* recvBuffer, vtkIdType length, int operation,
1222 int destProcessId)
1223 {
1224 return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1225 }
1226 int Reduce(const unsigned long long* sendBuffer, unsigned long long* recvBuffer, vtkIdType length,
1227 int operation, int destProcessId)
1228 {
1229 return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1230 }
1231 int Reduce(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int operation, int destProcessId)
1232 {
1233 return this->Communicator->Reduce(sendBuffer, recvBuffer, operation, destProcessId);
1234 }
1235
1236
1238
1242 int Reduce(const int* sendBuffer, int* recvBuffer, vtkIdType length,
1243 vtkCommunicator::Operation* operation, int destProcessId)
1244 {
1245 return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1246 }
1247 int Reduce(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length,
1248 vtkCommunicator::Operation* operation, int destProcessId)
1249 {
1250 return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1251 }
1252 int Reduce(const short* sendBuffer, short* recvBuffer, vtkIdType length,
1253 vtkCommunicator::Operation* operation, int destProcessId)
1254 {
1255 return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1256 }
1257 int Reduce(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
1258 vtkCommunicator::Operation* operation, int destProcessId)
1259 {
1260 return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1261 }
1262 int Reduce(const long* sendBuffer, long* recvBuffer, vtkIdType length,
1263 vtkCommunicator::Operation* operation, int destProcessId)
1264 {
1265 return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1266 }
1267 int Reduce(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length,
1268 vtkCommunicator::Operation* operation, int destProcessId)
1269 {
1270 return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1271 }
1272 int Reduce(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length,
1273 vtkCommunicator::Operation* operation, int destProcessId)
1274 {
1275 return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1276 }
1277 int Reduce(const char* sendBuffer, char* recvBuffer, vtkIdType length,
1278 vtkCommunicator::Operation* operation, int destProcessId)
1279 {
1280 return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1281 }
1282 int Reduce(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length,
1283 vtkCommunicator::Operation* operation, int destProcessId)
1284 {
1285 return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1286 }
1287 int Reduce(const float* sendBuffer, float* recvBuffer, vtkIdType length,
1288 vtkCommunicator::Operation* operation, int destProcessId)
1289 {
1290 return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1291 }
1292 int Reduce(const double* sendBuffer, double* recvBuffer, vtkIdType length,
1293 vtkCommunicator::Operation* operation, int destProcessId)
1294 {
1295 return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1296 }
1297 int Reduce(const long long* sendBuffer, long long* recvBuffer, vtkIdType length,
1298 vtkCommunicator::Operation* operation, int destProcessId)
1299 {
1300 return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1301 }
1302 int Reduce(const unsigned long long* sendBuffer, unsigned long long* recvBuffer, vtkIdType length,
1303 vtkCommunicator::Operation* operation, int destProcessId)
1304 {
1305 return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1306 }
1307 int Reduce(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer,
1308 vtkCommunicator::Operation* operation, int destProcessId)
1309 {
1310 return this->Communicator->Reduce(sendBuffer, recvBuffer, operation, destProcessId);
1311 }
1312
1313
1315
1318 int AllReduce(const int* sendBuffer, int* recvBuffer, vtkIdType length, int operation)
1319 {
1320 return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1321 }
1323 const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length, int operation)
1324 {
1325 return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1326 }
1327 int AllReduce(const short* sendBuffer, short* recvBuffer, vtkIdType length, int operation)
1328 {
1329 return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1330 }
1332 const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length, int operation)
1333 {
1334 return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1335 }
1336 int AllReduce(const long* sendBuffer, long* recvBuffer, vtkIdType length, int operation)
1337 {
1338 return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1339 }
1341 const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length, int operation)
1342 {
1343 return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1344 }
1346 const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length, int operation)
1347 {
1348 return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1349 }
1350 int AllReduce(const char* sendBuffer, char* recvBuffer, vtkIdType length, int operation)
1351 {
1352 return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1353 }
1355 const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length, int operation)
1356 {
1357 return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1358 }
1359 int AllReduce(const float* sendBuffer, float* recvBuffer, vtkIdType length, int operation)
1360 {
1361 return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1362 }
1363 int AllReduce(const double* sendBuffer, double* recvBuffer, vtkIdType length, int operation)
1364 {
1365 return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1366 }
1367 int AllReduce(const long long* sendBuffer, long long* recvBuffer, vtkIdType length, int operation)
1368 {
1369 return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1370 }
1371 int AllReduce(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
1372 vtkIdType length, int operation)
1373 {
1374 return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1375 }
1376 int AllReduce(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int operation)
1377 {
1378 return this->Communicator->AllReduce(sendBuffer, recvBuffer, operation);
1379 }
1380
1381
1383 const int* sendBuffer, int* recvBuffer, vtkIdType length, vtkCommunicator::Operation* operation)
1384 {
1385 return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1386 }
1387 int AllReduce(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length,
1388 vtkCommunicator::Operation* operation)
1389 {
1390 return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1391 }
1392 int AllReduce(const short* sendBuffer, short* recvBuffer, vtkIdType length,
1393 vtkCommunicator::Operation* operation)
1394 {
1395 return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1396 }
1397 int AllReduce(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
1398 vtkCommunicator::Operation* operation)
1399 {
1400 return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1401 }
1402 int AllReduce(const long* sendBuffer, long* recvBuffer, vtkIdType length,
1403 vtkCommunicator::Operation* operation)
1404 {
1405 return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1406 }
1407 int AllReduce(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length,
1408 vtkCommunicator::Operation* operation)
1409 {
1410 return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1411 }
1412 int AllReduce(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length,
1413 vtkCommunicator::Operation* operation)
1414 {
1415 return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1416 }
1417 int AllReduce(const char* sendBuffer, char* recvBuffer, vtkIdType length,
1418 vtkCommunicator::Operation* operation)
1419 {
1420 return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1421 }
1422 int AllReduce(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length,
1423 vtkCommunicator::Operation* operation)
1424 {
1425 return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1426 }
1427 int AllReduce(const float* sendBuffer, float* recvBuffer, vtkIdType length,
1428 vtkCommunicator::Operation* operation)
1429 {
1430 return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1431 }
1432 int AllReduce(const double* sendBuffer, double* recvBuffer, vtkIdType length,
1433 vtkCommunicator::Operation* operation)
1434 {
1435 return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1436 }
1437 int AllReduce(const long long* sendBuffer, long long* recvBuffer, vtkIdType length,
1438 vtkCommunicator::Operation* operation)
1439 {
1440 return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1441 }
1442 int AllReduce(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
1443 vtkIdType length, vtkCommunicator::Operation* operation)
1444 {
1445 return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1446 }
1448 vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, vtkCommunicator::Operation* operation)
1449 {
1450 return this->Communicator->AllReduce(sendBuffer, recvBuffer, operation);
1451 }
1452
1454
1457 int Reduce(const vtkBoundingBox& sendBuffer, vtkBoundingBox& recvBuffer, int destProcessId);
1458 int AllReduce(const vtkBoundingBox& sendBuffer, vtkBoundingBox& recvBuffer);
1460
1462
1466 vtkDataArraySelection* sendBuffer, vtkDataArraySelection* recvBuffer, int destProcessId);
1469
1473 virtual bool CanProbe() { return this->Communicator->CanProbe(); }
1474
1485 virtual int Probe(int source, int tag, int* actualSource)
1486 {
1487 return this->Communicator->Probe(source, tag, actualSource);
1488 }
1489
1490 // Internally implemented RMI to break the process loop.
1491
1492protected:
1495
1502 int remoteProcessId, void* arg, int argLength, int rmiTag, bool propagate);
1503
1506
1507 void GetMultipleMethod(int index, vtkProcessFunctionType& func, void*& data);
1508
1509 // This is a flag that can be used by the ports to break
1510 // their update loop. (same as ProcessRMIs)
1512
1513 void ProcessRMI(int remoteProcessId, void* arg, int argLength, int rmiTag);
1514
1515 // This method implements "GetGlobalController".
1516 // It needs to be virtual and static.
1518
1519 // This flag can force deep copies during send.
1521
1522 // This flag can be used to indicate that an MPI Broadcast will be used
1523 // when calling TriggerRMIOnAllChildren(), instead of the binary tree
1524 // propagation of the data to the satellite ranks from rank 0.
1526
1528
1529 // Note that since the communicators can be created differently
1530 // depending on the type of controller, the subclasses are
1531 // responsible of deleting them.
1533
1534 // Communicator which is a copy of the current user
1535 // level communicator except the context; i.e. even if the tags
1536 // are the same, the RMI messages will not interfere with user
1537 // level messages.
1538 // Note that since the communicators can be created differently
1539 // depending on the type of controller, the subclasses are
1540 // responsible of deleting them.
1542
1543private:
1545 void operator=(const vtkMultiProcessController&) = delete;
1546
1547 unsigned long RMICount;
1548
1549 class vtkInternal;
1550 vtkInternal* Internal;
1551};
1552
1553inline int vtkMultiProcessController::Send(vtkDataObject* data, int remoteProcessId, int tag)
1554{
1555 if (this->Communicator)
1556 {
1557 return this->Communicator->Send(data, remoteProcessId, tag);
1558 }
1559 else
1560 {
1561 return 0;
1562 }
1563}
1564
1565inline int vtkMultiProcessController::Send(vtkDataArray* data, int remoteProcessId, int tag)
1566{
1567 if (this->Communicator)
1568 {
1569 return this->Communicator->Send(data, remoteProcessId, tag);
1570 }
1571 else
1572 {
1573 return 0;
1574 }
1575}
1576
1578 const int* data, vtkIdType length, int remoteProcessId, int tag)
1579{
1580 if (this->Communicator)
1581 {
1582 return this->Communicator->Send(data, length, remoteProcessId, tag);
1583 }
1584 else
1585 {
1586 return 0;
1587 }
1588}
1589
1591 const short* data, vtkIdType length, int remoteProcessId, int tag)
1592{
1593 if (this->Communicator)
1594 {
1595 return this->Communicator->Send(data, length, remoteProcessId, tag);
1596 }
1597 else
1598 {
1599 return 0;
1600 }
1601}
1602
1604 const unsigned short* data, vtkIdType length, int remoteProcessId, int tag)
1605{
1606 if (this->Communicator)
1607 {
1608 return this->Communicator->Send(data, length, remoteProcessId, tag);
1609 }
1610 else
1611 {
1612 return 0;
1613 }
1614}
1615
1617 const unsigned int* data, vtkIdType length, int remoteProcessId, int tag)
1618{
1619 if (this->Communicator)
1620 {
1621 return this->Communicator->Send(data, length, remoteProcessId, tag);
1622 }
1623 else
1624 {
1625 return 0;
1626 }
1627}
1628
1630 const unsigned long* data, vtkIdType length, int remoteProcessId, int tag)
1631{
1632 if (this->Communicator)
1633 {
1634 return this->Communicator->Send(data, length, remoteProcessId, tag);
1635 }
1636 else
1637 {
1638 return 0;
1639 }
1640}
1641
1643 const long* data, vtkIdType length, int remoteProcessId, int tag)
1644{
1645 if (this->Communicator)
1646 {
1647 return this->Communicator->Send(data, length, remoteProcessId, tag);
1648 }
1649 else
1650 {
1651 return 0;
1652 }
1653}
1654
1656 const signed char* data, vtkIdType length, int remoteProcessId, int tag)
1657{
1658 if (this->Communicator)
1659 {
1660 return this->Communicator->Send(data, length, remoteProcessId, tag);
1661 }
1662 else
1663 {
1664 return 0;
1665 }
1666}
1667
1669 const char* data, vtkIdType length, int remoteProcessId, int tag)
1670{
1671 if (this->Communicator)
1672 {
1673 return this->Communicator->Send(data, length, remoteProcessId, tag);
1674 }
1675 else
1676 {
1677 return 0;
1678 }
1679}
1680
1682 const unsigned char* data, vtkIdType length, int remoteProcessId, int tag)
1683{
1684 if (this->Communicator)
1685 {
1686 return this->Communicator->Send(data, length, remoteProcessId, tag);
1687 }
1688 else
1689 {
1690 return 0;
1691 }
1692}
1693
1695 const float* data, vtkIdType length, int remoteProcessId, int tag)
1696{
1697 if (this->Communicator)
1698 {
1699 return this->Communicator->Send(data, length, remoteProcessId, tag);
1700 }
1701 else
1702 {
1703 return 0;
1704 }
1705}
1706
1708 const double* data, vtkIdType length, int remoteProcessId, int tag)
1709{
1710 if (this->Communicator)
1711 {
1712 return this->Communicator->Send(data, length, remoteProcessId, tag);
1713 }
1714 else
1715 {
1716 return 0;
1717 }
1718}
1719
1721 const long long* data, vtkIdType length, int remoteProcessId, int tag)
1722{
1723 if (this->Communicator)
1724 {
1725 return this->Communicator->Send(data, length, remoteProcessId, tag);
1726 }
1727 else
1728 {
1729 return 0;
1730 }
1731}
1732
1734 const unsigned long long* data, vtkIdType length, int remoteProcessId, int tag)
1735{
1736 if (this->Communicator)
1737 {
1738 return this->Communicator->Send(data, length, remoteProcessId, tag);
1739 }
1740 else
1741 {
1742 return 0;
1743 }
1744}
1745
1747 const vtkMultiProcessStream& stream, int remoteId, int tag)
1748{
1749 if (this->Communicator)
1750 {
1751 return this->Communicator->Send(stream, remoteId, tag);
1752 }
1753 return 0;
1754}
1755
1756inline int vtkMultiProcessController::Receive(vtkDataObject* data, int remoteProcessId, int tag)
1757{
1758 if (this->Communicator)
1759 {
1760 return this->Communicator->Receive(data, remoteProcessId, tag);
1761 }
1762 else
1763 {
1764 return 0;
1765 }
1766}
1767
1769{
1770 if (this->Communicator)
1771 {
1772 return this->Communicator->ReceiveDataObject(remoteProcessId, tag);
1773 }
1774 else
1775 {
1776 return nullptr;
1777 }
1778}
1779
1780inline int vtkMultiProcessController::Receive(vtkDataArray* data, int remoteProcessId, int tag)
1781{
1782 if (this->Communicator)
1783 {
1784 return this->Communicator->Receive(data, remoteProcessId, tag);
1785 }
1786 else
1787 {
1788 return 0;
1789 }
1790}
1791
1793 int* data, vtkIdType length, int remoteProcessId, int tag)
1794{
1795 if (this->Communicator)
1796 {
1797 return this->Communicator->Receive(data, length, remoteProcessId, tag);
1798 }
1799 else
1800 {
1801 return 0;
1802 }
1803}
1804
1806 unsigned int* data, vtkIdType length, int remoteProcessId, int tag)
1807{
1808 if (this->Communicator)
1809 {
1810 return this->Communicator->Receive(data, length, remoteProcessId, tag);
1811 }
1812 else
1813 {
1814 return 0;
1815 }
1816}
1817
1819 short* data, vtkIdType length, int remoteProcessId, int tag)
1820{
1821 if (this->Communicator)
1822 {
1823 return this->Communicator->Receive(data, length, remoteProcessId, tag);
1824 }
1825 else
1826 {
1827 return 0;
1828 }
1829}
1830
1832 unsigned short* data, vtkIdType length, int remoteProcessId, int tag)
1833{
1834 if (this->Communicator)
1835 {
1836 return this->Communicator->Receive(data, length, remoteProcessId, tag);
1837 }
1838 else
1839 {
1840 return 0;
1841 }
1842}
1843
1845 long* data, vtkIdType length, int remoteProcessId, int tag)
1846{
1847 if (this->Communicator)
1848 {
1849 return this->Communicator->Receive(data, length, remoteProcessId, tag);
1850 }
1851 else
1852 {
1853 return 0;
1854 }
1855}
1856
1858 unsigned long* data, vtkIdType length, int remoteProcessId, int tag)
1859{
1860 if (this->Communicator)
1861 {
1862 return this->Communicator->Receive(data, length, remoteProcessId, tag);
1863 }
1864 else
1865 {
1866 return 0;
1867 }
1868}
1869
1871 char* data, vtkIdType length, int remoteProcessId, int tag)
1872{
1873 if (this->Communicator)
1874 {
1875 return this->Communicator->Receive(data, length, remoteProcessId, tag);
1876 }
1877 else
1878 {
1879 return 0;
1880 }
1881}
1882
1884 unsigned char* data, vtkIdType length, int remoteProcessId, int tag)
1885{
1886 if (this->Communicator)
1887 {
1888 return this->Communicator->Receive(data, length, remoteProcessId, tag);
1889 }
1890 else
1891 {
1892 return 0;
1893 }
1894}
1895
1897 signed char* data, vtkIdType length, int remoteProcessId, int tag)
1898{
1899 if (this->Communicator)
1900 {
1901 return this->Communicator->Receive(data, length, remoteProcessId, tag);
1902 }
1903 else
1904 {
1905 return 0;
1906 }
1907}
1908
1910 float* data, vtkIdType length, int remoteProcessId, int tag)
1911{
1912 if (this->Communicator)
1913 {
1914 return this->Communicator->Receive(data, length, remoteProcessId, tag);
1915 }
1916 else
1917 {
1918 return 0;
1919 }
1920}
1921
1923 double* data, vtkIdType length, int remoteProcessId, int tag)
1924{
1925 if (this->Communicator)
1926 {
1927 return this->Communicator->Receive(data, length, remoteProcessId, tag);
1928 }
1929 else
1930 {
1931 return 0;
1932 }
1933}
1934
1936 long long* data, vtkIdType length, int remoteProcessId, int tag)
1937{
1938 if (this->Communicator)
1939 {
1940 return this->Communicator->Receive(data, length, remoteProcessId, tag);
1941 }
1942 else
1943 {
1944 return 0;
1945 }
1946}
1947
1949 unsigned long long* data, vtkIdType length, int remoteProcessId, int tag)
1950{
1951 if (this->Communicator)
1952 {
1953 return this->Communicator->Receive(data, length, remoteProcessId, tag);
1954 }
1955 else
1956 {
1957 return 0;
1958 }
1959}
1960
1961inline int vtkMultiProcessController::Receive(vtkMultiProcessStream& stream, int remoteId, int tag)
1962{
1963 if (this->Communicator)
1964 {
1965 return this->Communicator->Receive(stream, remoteId, tag);
1966 }
1967 return 0;
1968}
1969
1971{
1972 if (this->Communicator)
1973 {
1974 this->Communicator->Barrier();
1975 }
1976}
1977
1979{
1980 if (this->Communicator)
1981 {
1982 return this->Communicator->GetCount();
1983 }
1984 return 0;
1985}
1986
1987VTK_ABI_NAMESPACE_END
1988#endif
Fast, simple class for representing and operating on 3D bounds.
create and manipulate ordered lists of objects
A custom operation to use in a reduce command.
Used to send/receive messages in a multiprocess environment.
Store on/off settings for data arrays, etc.
general representation of visualization data
abstract class to specify dataset behavior
Definition vtkDataSet.h:165
dynamic, self-adjusting array of vtkIdType
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:108
Multiprocessing communication superclass.
int Gather(const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
void TriggerBreakRMIs()
A convenience method.
void TriggerRMI(int remoteProcessId, const char *arg, int tag)
Convenience method when the arg is a string.
vtkDataObject * ReceiveDataObject(int remoteId, int tag)
vtkIdType GetCount()
Returns the number of words received by the most recent Receive().
int GatherV(const signed char *sendBuffer, signed char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
int Reduce(const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, vtkCommunicator::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 Reduce(const double *sendBuffer, double *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
int Broadcast(vtkMultiProcessStream &stream, int srcProcessId)
int AllReduce(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
int Gather(const short *sendBuffer, short *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
virtual unsigned long AddRMI(vtkRMIFunctionType, void *localArg, int tag)
Register remote method invocation in the receiving process which makes the call.
int Send(const int *data, vtkIdType length, int remoteProcessId, int tag)
This method sends data to another process.
virtual vtkMultiProcessController * PartitionControllerByCount(int numberOfGroups)
Partitions this controller's processes into numberOfGroups groups and returns a new controller repres...
void TriggerRMIOnAllChildren(void *arg, int argLength, int tag)
This is a convenicence method to trigger an RMI call on all the "children" of the current node.
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 GetNumberOfProcesses()
Set the number of processes you will be using.
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 AllGather(const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all 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.
virtual int RemoveFirstRMI(int tag)
Remove the first RMI matching the tag.
int Gather(const unsigned int *sendBuffer, unsigned int *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 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.
int GatherV(const char *sendBuffer, char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
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 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 Broadcast(vtkDataArray *data, int srcProcessId)
Broadcast sends the array in the process with id srcProcessId to all of the other processes.
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 Reduce(const long long *sendBuffer, long long *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId)
Reduce an array to the given destination process.
static void SetGlobalController(vtkMultiProcessController *controller)
int GatherV(const double *sendBuffer, double *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
int AllReduce(const vtkBoundingBox &sendBuffer, vtkBoundingBox &recvBuffer)
Convenience methods to reduce bounds.
int AllReduce(const char *sendBuffer, char *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
int Reduce(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId)
Reduce an array to the given destination process.
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 unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId)
Reduce an array to the given destination process.
int AllGather(const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int AllReduce(const long *sendBuffer, long *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
static std::vector< int > PartitionNodesLPT(const std::vector< int > &nodeSizes, int numberOfGroups)
Assigns each of nodeSizes.size() groupings of processes (e.g.
static vtkMultiProcessController * GetGlobalController()
This convenience method returns the controller associated with the local process.
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 void RemoveRMI(vtkRMIFunctionType f, void *arg, int tag)
Take an RMI away.
int AllGather(const long long *sendBuffer, long long *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
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 ProcessRMIs(int reportErrors, int dont_loop=0)
Calling this method gives control to the controller to start processing RMIs.
int ScatterV(const long *sendBuffer, long *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
int AllGather(const char *sendBuffer, char *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
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.
static int BlockDistribute(int position, int count, int numberOfGroups)
Assigns position (0-indexed) to one of numberOfGroups contiguous blocks of count total positions,...
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 Scatter(const long *sendBuffer, long *recvBuffer, vtkIdType length, int srcProcessId)
Scatter takes an array in the process with id srcProcessId and distributes it.
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 Gather(const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
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.
void SetMultipleMethod(int index, vtkProcessFunctionType, void *data)
Set the MultipleMethod to f() and the UserData of the for the method to be executed by the process in...
int AllReduce(vtkDataArraySelection *sendBuffer, vtkDataArraySelection *recvBuffer)
Convenience methods to reduce vtkDataArraySelection.
virtual void TriggerRMIInternal(int remoteProcessId, void *arg, int argLength, int rmiTag, bool propagate)
Implementation for TriggerRMI() provides subclasses an opportunity to modify the behaviour eg.
int Reduce(vtkDataArraySelection *sendBuffer, vtkDataArraySelection *recvBuffer, int destProcessId)
Convenience methods to reduce vtkDataArraySelection.
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 char *sendBuffer, unsigned char *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
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.
void SetSingleProcessObject(vtkProcess *p)
Object-oriented flavor of SetSingleMethod().
static std::vector< int > ApportionGroupSlots(const std::vector< int > &nodeSizes, int numberOfGroups)
Apportions numberOfGroups "slots" (each slot corresponds to one group) across nodeSizes....
int AllReduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int operation)
Same as Reduce except that the result is placed in all of the 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 Gather(const float *sendBuffer, float *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
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.
virtual void RemoveAllRMICallbacks(int tag)
These methods are a part of the newer API to add multiple rmi callbacks.
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 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 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 AllGather(const float *sendBuffer, float *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int Reduce(const short *sendBuffer, short *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
static int GetBreakRMITag()
Accessor to some default tags.
int Scatter(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int srcProcessId)
Scatter takes an array in the process with id srcProcessId and distributes it.
virtual vtkMultiProcessController * CreateSubController(vtkProcessGroup *group)
Creates a new controller with the processes specified by the given group.
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 AllReduce(const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
int Gather(const long *sendBuffer, long *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
virtual bool CanProbe()
Check if this controller implements a probe operation.
int Reduce(const long *sendBuffer, long *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId)
Reduce an array to the given destination process.
int Gather(const int *sendBuffer, int *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
virtual void SingleMethodExecute()=0
Execute the SingleMethod (as define by SetSingleMethod) using this->NumberOfProcesses processes.
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 float *sendBuffer, float *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId)
Reduce an array to the given destination process.
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 Broadcast(float *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 Gather(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int ScatterV(const double *sendBuffer, double *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
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 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 AllReduce(const double *sendBuffer, double *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
virtual vtkMultiProcessController * PartitionController(int localColor, int localKey)
Partitions this controller based on a coloring.
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 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.
void BroadcastTriggerRMIOnAllChildren(void *arg, int argLength, int tag)
This is a convenicence method to trigger an RMI call on all the "children" of the current node.
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 AllGatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer)
This special form of AllGatherV will automatically determine recvLengths and offsets to tightly pack ...
virtual vtkMultiProcessController * GetLocalController()
void TriggerRMI(int remoteProcessId, int tag)
Convenience method when there is no argument.
int Reduce(const double *sendBuffer, double *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId)
Reduce an array to the given destination process.
int Gather(const long long *sendBuffer, long long *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int AllGather(const double *sendBuffer, double *recvBuffer, vtkIdType length)
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 int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, int operation)
Same as Reduce except that the result is placed in all of the processes.
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 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 Reduce(const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId)
Reduce an array to the given destination process.
void Barrier()
This method can be used to synchronize processes.
int Gather(const double *sendBuffer, double *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int AllReduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkCommunicator::Operation *operation)
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.
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 Broadcast(unsigned long *data, vtkIdType length, int srcProcessId)
Broadcast sends the array in the process with id srcProcessId to all of the other processes.
virtual void Initialize(int *argc, char ***argv, int initializedExternally)=0
This method is for setting up the processes.
int AllReduce(const float *sendBuffer, float *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
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 ScatterV(const float *sendBuffer, float *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
void TriggerRMIOnAllChildren(const char *arg, int tag)
This is a convenicence method to trigger an RMI call on all the "children" of the current node.
int AllGather(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
~vtkMultiProcessController() override
int BroadcastProcessRMIs(int reportErrors, int dont_loop=0)
Calling this method gives control to the controller to start processing RMIs.
int AllReduce(const int *sendBuffer, int *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
int AllGather(vtkDataObject *sendBuffer, std::vector< vtkSmartPointer< vtkDataObject > > &recvBuffer)
Gathers vtkDataObject (sendBuffer) from all ranks to all raks.
int AllReduce(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
int ScatterV(const char *sendBuffer, char *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
int ScatterV(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
virtual void Finalize(int finalizedExternally)=0
This method is for cleaning up.
int Reduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int operation, int destProcessId)
Reduce an array to the given destination process.
int Reduce(const long *sendBuffer, long *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
int AllReduce(const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
int GatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
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 Reduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkCommunicator::Operation *operation, int destProcessId)
Reduce an array to the given destination process.
int GatherV(const int *sendBuffer, int *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
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.
void SetNumberOfProcesses(int num)
Set the number of processes you will be using.
int GatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkIdTypeArray *recvLengths, vtkIdTypeArray *offsets, int destProcessId)
virtual int RemoveRMI(unsigned long id)
Remove the RMI matching the id.
int Reduce(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId)
Reduce an array to the given destination process.
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 GetLocalProcessId()
Tells you which process [0, NumProcess) you are in.
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 AllGather(const vtkMultiProcessStream &sendBuffer, std::vector< vtkMultiProcessStream > &recvBuffer)
Gathers vtkMultiProcessStream (sendBuffer) from all ranks to the destProcessId.
void ProcessRMI(int remoteProcessId, void *arg, int argLength, int rmiTag)
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 ScatterV(const short *sendBuffer, short *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
int Scatter(const float *sendBuffer, float *recvBuffer, vtkIdType length, int srcProcessId)
Scatter takes an array in the process with id srcProcessId and distributes it.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int Reduce(const vtkBoundingBox &sendBuffer, vtkBoundingBox &recvBuffer, int destProcessId)
Convenience methods to reduce bounds.
int GatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int destProcessId)
This special form of GatherV will automatically determine recvLengths and offsets to tightly pack the...
int AllGather(const short *sendBuffer, short *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int AllGatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkIdType *recvLengths, vtkIdType *offsets)
Same as GatherV except that the result is placed in all processes.
int Gather(const char *sendBuffer, char *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int Gather(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
void SetSingleMethod(vtkProcessFunctionType, void *data)
Set the SingleMethod to f() and the UserData of the for the method to be executed by all of the proce...
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 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.
int Reduce(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
void TriggerRMIOnAllChildren(int tag)
This is a convenicence method to trigger an RMI call on all the "children" of the current node.
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 Gather(vtkDataObject *sendBuffer, std::vector< vtkSmartPointer< vtkDataObject > > &recvBuffer, int destProcessId)
Gathers vtkDataObject (sendBuffer) from all ranks to the destProcessId.
int Reduce(const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
int Receive(int *data, vtkIdType maxlength, int remoteProcessId, int tag)
This method receives data from a corresponding send.
int GatherV(const float *sendBuffer, float *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
int GatherV(const long *sendBuffer, long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
int AllReduce(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
virtual void MultipleMethodExecute()=0
Execute the MultipleMethods (as define by calling SetMultipleMethod for each of the required this->Nu...
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 float *sendBuffer, float *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
void GetMultipleMethod(int index, vtkProcessFunctionType &func, void *&data)
int AllReduce(const short *sendBuffer, short *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
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 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 GatherV(const short *sendBuffer, short *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
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 Gather(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int destProcessId)
Gather collects arrays in the process with id destProcessId.
virtual unsigned long AddRMICallback(vtkRMIFunctionType, void *localArg, int tag)
These methods are a part of the newer API to add multiple rmi callbacks.
int AllReduce(const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
int AllGather(const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int Gather(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int Reduce(const char *sendBuffer, char *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId)
Reduce an array to the given destination process.
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 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 Reduce(const short *sendBuffer, short *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId)
Reduce an array to the given destination process.
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 AllGather(const int *sendBuffer, int *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
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 float *sendBuffer, float *recvBuffer, vtkIdType length, int operation)
Same as Reduce except that the result is placed in all of the processes.
void TriggerRMI(int remoteProcessId, void *arg, int argLength, int tag)
A method to trigger a method invocation in another process.
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 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.
virtual void Initialize(int *argc, char ***argv)=0
This method is for setting up the processes.
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 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.
virtual void CreateOutputWindow()=0
This method can be used to tell the controller to create a special output window in which all message...
int GatherV(vtkDataObject *sendData, vtkSmartPointer< vtkDataObject > *recvData, int destProcessId)
This special form of GatherV will automatically determine recvLengths and offsets to tightly pack the...
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 void Finalize()=0
This method is for cleaning up.
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 GatherV(const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
int Reduce(const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId)
Reduce an array to the given destination process.
int ProcessRMIs()
Calling this method gives control to the controller to start processing RMIs.
int AllReduce(const long long *sendBuffer, long long *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
int Scatter(const char *sendBuffer, char *recvBuffer, vtkIdType length, int srcProcessId)
Scatter takes an array in the process with id srcProcessId and distributes it.
int Scatter(const int *sendBuffer, int *recvBuffer, vtkIdType length, int srcProcessId)
Scatter takes an array in the process with id srcProcessId and distributes it.
int Gather(const vtkMultiProcessStream &sendBuffer, std::vector< vtkMultiProcessStream > &recvBuffer, int destProcessId)
Gathers vtkMultiProcessStream (sendBuffer) from all ranks to the destProcessId.
int Reduce(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
int Reduce(const int *sendBuffer, int *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId)
Reduce an array to the given destination process.
int Reduce(const char *sendBuffer, char *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
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, int operation, int destProcessId)
Reduce an array to the given destination process.
virtual bool RemoveRMICallback(unsigned long id)
Remove a callback.
int AllGather(const long *sendBuffer, long *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int Reduce(const unsigned short *sendBuffer, unsigned short *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.
virtual int Probe(int source, int tag, int *actualSource)
Blocking test for checking for a message tagged with tag from source process (if source == ANY_SOURCE...
stream used to pass data across processes using vtkMultiProcessController.
Base class for writing debug output to a console.
A subgroup of processes from a communicator.
a process that can be launched by a vtkMultiProcessController
Definition vtkProcess.h:39
Hold a reference to a vtkObjectBase instance.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
#define vtkDataArray
void(* vtkProcessFunctionType)(vtkMultiProcessController *controller, void *userData)
void(* vtkRMIFunctionType)(void *localArg, void *remoteArg, int remoteArgLength, int remoteProcessId)
int vtkIdType
Definition vtkType.h:363