VTK  9.3.20240419
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
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 
51 VTK_ABI_NAMESPACE_BEGIN
52 class vtkBoundingBox;
53 class vtkCollection;
54 class vtkDataObject;
55 class vtkDataSet;
56 class vtkImageData;
59 class vtkOutputWindow;
60 class vtkProcessGroup;
61 class vtkProcess;
63 
64 // The type of function that gets called when new processes are initiated.
65 typedef void (*vtkProcessFunctionType)(vtkMultiProcessController* controller, void* userData);
66 
67 // The type of function that gets called when an RMI is triggered.
68 typedef void (*vtkRMIFunctionType)(
69  void* localArg, void* remoteArg, int remoteArgLength, int remoteProcessId);
70 
71 class VTKPARALLELCORE_EXPORT vtkMultiProcessController : public vtkObject
72 {
73 public:
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 
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 
198  //------------------ RMIs --------------------
199 
212  virtual unsigned long AddRMI(vtkRMIFunctionType, void* localArg, int tag);
213 
217  virtual int RemoveFirstRMI(int tag);
218 
223  virtual int RemoveRMI(unsigned long id);
224 
228  virtual void RemoveRMI(vtkRMIFunctionType f, void* arg, int tag)
229  {
230  (void)f;
231  (void)arg;
232  (void)tag;
233  vtkErrorMacro("RemoveRMI Not Implemented Yet");
234  }
235 
241  virtual unsigned long AddRMICallback(vtkRMIFunctionType, void* localArg, int tag);
242 
248  virtual void RemoveAllRMICallbacks(int tag);
249 
253  virtual bool RemoveRMICallback(unsigned long id);
254 
258  void TriggerRMI(int remoteProcessId, void* arg, int argLength, int tag);
259 
265 
269  void TriggerRMI(int remoteProcessId, const char* arg, int tag)
270  {
271  this->TriggerRMI(remoteProcessId, (void*)arg, static_cast<int>(strlen(arg)) + 1, tag);
272  }
273 
277  void TriggerRMI(int remoteProcessId, int tag)
278  {
279  this->TriggerRMI(remoteProcessId, nullptr, 0, tag);
280  }
281 
283 
291  void TriggerRMIOnAllChildren(void* arg, int argLength, int tag);
292  void TriggerRMIOnAllChildren(const char* arg, int tag)
293  {
294  this->TriggerRMIOnAllChildren((void*)arg, static_cast<int>(strlen(arg)) + 1, tag);
295  }
296  void TriggerRMIOnAllChildren(int tag) { this->TriggerRMIOnAllChildren(nullptr, 0, tag); }
297  void BroadcastTriggerRMIOnAllChildren(void* arg, int argLength, int tag);
299 
301 
312  int ProcessRMIs(int reportErrors, int dont_loop = 0);
313  int ProcessRMIs();
314  int BroadcastProcessRMIs(int reportErrors, int dont_loop = 0);
316 
318 
323  vtkSetMacro(BreakFlag, int);
324  vtkGetMacro(BreakFlag, int);
326 
328 
333  vtkSetMacro(BroadcastTriggerRMI, bool);
334  vtkGetMacro(BroadcastTriggerRMI, bool);
335  vtkBooleanMacro(BroadcastTriggerRMI, bool);
337 
339 
343  vtkGetObjectMacro(Communicator, vtkCommunicator);
345 
349  static int GetBreakRMITag() { return BREAK_RMI_TAG; }
350  static int GetRMITag() { return RMI_TAG; }
351  static int GetRMIArgTag() { return RMI_ARG_TAG; }
352 
353  enum Errors
354  {
357  RMI_ARG_ERROR
358  };
359 
360  enum Consts
361  {
362  ANY_SOURCE = -1,
363  INVALID_SOURCE = -2
364  };
365 
366  enum Tags
367  {
368  RMI_TAG = 1,
369  RMI_ARG_TAG = 2,
370  BREAK_RMI_TAG = 3,
371  XML_WRITER_DATA_INFO = 4
372  };
373 
377  void Barrier();
378 
380 
381  //------------------ Communication --------------------
382 
384 
391  int Send(const int* data, vtkIdType length, int remoteProcessId, int tag);
392  int Send(const short* data, vtkIdType length, int remoteProcessId, int tag);
393  int Send(const unsigned short* data, vtkIdType length, int remoteProcessId, int tag);
394  int Send(const unsigned int* data, vtkIdType length, int remoteProcessId, int tag);
395  int Send(const unsigned long* data, vtkIdType length, int remoteProcessId, int tag);
396  int Send(const long* data, vtkIdType length, int remoteProcessId, int tag);
397  int Send(const signed char* data, vtkIdType length, int remoteProcessId, int tag);
398  int Send(const char* data, vtkIdType length, int remoteProcessId, int tag);
399  int Send(const unsigned char* data, vtkIdType length, int remoteProcessId, int tag);
400  int Send(const float* data, vtkIdType length, int remoteProcessId, int tag);
401  int Send(const double* data, vtkIdType length, int remoteProcessId, int tag);
402  int Send(const long long* data, vtkIdType length, int remoteProcessId, int tag);
403  int Send(const unsigned long long* data, vtkIdType length, int remoteProcessId, int tag);
404  int Send(vtkDataObject* data, int remoteId, int tag);
405  int Send(vtkDataArray* data, int remoteId, int tag);
407 
415  int Send(const vtkMultiProcessStream& stream, int remoteId, int tag);
416 
418 
427  int Receive(int* data, vtkIdType maxlength, int remoteProcessId, int tag);
428  int Receive(unsigned int* data, vtkIdType maxlength, int remoteProcessId, int tag);
429  int Receive(short* data, vtkIdType maxlength, int remoteProcessId, int tag);
430  int Receive(unsigned short* data, vtkIdType maxlength, int remoteProcessId, int tag);
431  int Receive(long* data, vtkIdType maxlength, int remoteProcessId, int tag);
432  int Receive(unsigned long* data, vtkIdType maxlength, int remoteProcessId, int tag);
433  int Receive(char* data, vtkIdType maxlength, int remoteProcessId, int tag);
434  int Receive(unsigned char* data, vtkIdType maxlength, int remoteProcessId, int tag);
435  int Receive(signed char* data, vtkIdType maxlength, int remoteProcessId, int tag);
436  int Receive(float* data, vtkIdType maxlength, int remoteProcessId, int tag);
437  int Receive(double* data, vtkIdType maxlength, int remoteProcessId, int tag);
438  int Receive(long long* data, vtkIdType maxLength, int remoteProcessId, int tag);
439  int Receive(unsigned long long* data, vtkIdType maxLength, int remoteProcessId, int tag);
440  int Receive(vtkDataObject* data, int remoteId, int tag);
441  int Receive(vtkDataArray* data, int remoteId, int tag);
443 
447  int Receive(vtkMultiProcessStream& stream, int remoteId, int tag);
448 
449  vtkDataObject* ReceiveDataObject(int remoteId, int tag);
450 
459  vtkIdType GetCount();
460 
461  //---------------------- Collective Operations ----------------------
462 
464 
469  int Broadcast(int* data, vtkIdType length, int srcProcessId)
470  {
471  return this->Communicator->Broadcast(data, length, srcProcessId);
472  }
473  int Broadcast(unsigned int* data, vtkIdType length, int srcProcessId)
474  {
475  return this->Communicator->Broadcast(data, length, srcProcessId);
476  }
477  int Broadcast(short* data, vtkIdType length, int srcProcessId)
478  {
479  return this->Communicator->Broadcast(data, length, srcProcessId);
480  }
481  int Broadcast(unsigned short* data, vtkIdType length, int srcProcessId)
482  {
483  return this->Communicator->Broadcast(data, length, srcProcessId);
484  }
485  int Broadcast(long* data, vtkIdType length, int srcProcessId)
486  {
487  return this->Communicator->Broadcast(data, length, srcProcessId);
488  }
489  int Broadcast(unsigned long* data, vtkIdType length, int srcProcessId)
490  {
491  return this->Communicator->Broadcast(data, length, srcProcessId);
492  }
493  int Broadcast(unsigned char* data, vtkIdType length, int srcProcessId)
494  {
495  return this->Communicator->Broadcast(data, length, srcProcessId);
496  }
497  int Broadcast(char* data, vtkIdType length, int srcProcessId)
498  {
499  return this->Communicator->Broadcast(data, length, srcProcessId);
500  }
501  int Broadcast(signed char* data, vtkIdType length, int srcProcessId)
502  {
503  return this->Communicator->Broadcast(data, length, srcProcessId);
504  }
505  int Broadcast(float* data, vtkIdType length, int srcProcessId)
506  {
507  return this->Communicator->Broadcast(data, length, srcProcessId);
508  }
509  int Broadcast(double* data, vtkIdType length, int srcProcessId)
510  {
511  return this->Communicator->Broadcast(data, length, srcProcessId);
512  }
513  int Broadcast(long long* data, vtkIdType length, int srcProcessId)
514  {
515  return this->Communicator->Broadcast(data, length, srcProcessId);
516  }
517  int Broadcast(unsigned long long* data, vtkIdType length, int srcProcessId)
518  {
519  return this->Communicator->Broadcast(data, length, srcProcessId);
520  }
521  int Broadcast(vtkDataObject* data, int srcProcessId)
522  {
523  return this->Communicator->Broadcast(data, srcProcessId);
524  }
525  int Broadcast(vtkDataArray* data, int srcProcessId)
526  {
527  return this->Communicator->Broadcast(data, srcProcessId);
528  }
530 
531  int Broadcast(vtkMultiProcessStream& stream, int srcProcessId)
532  {
533  return this->Communicator->Broadcast(stream, srcProcessId);
534  }
535 
537 
546  int Gather(const int* sendBuffer, int* recvBuffer, vtkIdType length, int destProcessId)
547  {
548  return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
549  }
550  int Gather(
551  const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length, int destProcessId)
552  {
553  return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
554  }
555  int Gather(const short* sendBuffer, short* recvBuffer, vtkIdType length, int destProcessId)
556  {
557  return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
558  }
559  int Gather(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
560  int destProcessId)
561  {
562  return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
563  }
564  int Gather(const long* sendBuffer, long* recvBuffer, vtkIdType length, int destProcessId)
565  {
566  return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
567  }
568  int Gather(
569  const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length, int destProcessId)
570  {
571  return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
572  }
573  int Gather(
574  const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length, int destProcessId)
575  {
576  return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
577  }
578  int Gather(const char* sendBuffer, char* recvBuffer, vtkIdType length, int destProcessId)
579  {
580  return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
581  }
582  int Gather(
583  const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length, int destProcessId)
584  {
585  return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
586  }
587  int Gather(const float* sendBuffer, float* recvBuffer, vtkIdType length, int destProcessId)
588  {
589  return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
590  }
591  int Gather(const double* sendBuffer, double* recvBuffer, vtkIdType length, int destProcessId)
592  {
593  return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
594  }
595  int Gather(
596  const long long* sendBuffer, long long* recvBuffer, vtkIdType length, int destProcessId)
597  {
598  return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
599  }
600  int Gather(const unsigned long long* sendBuffer, unsigned long long* recvBuffer, vtkIdType length,
601  int destProcessId)
602  {
603  return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
604  }
605  int Gather(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int destProcessId)
606  {
607  return this->Communicator->Gather(sendBuffer, recvBuffer, destProcessId);
608  }
610 
621  int destProcessId)
622  {
623  return this->Communicator->Gather(sendBuffer, recvBuffer, destProcessId);
624  }
625 
635  int Gather(const vtkMultiProcessStream& sendBuffer,
636  std::vector<vtkMultiProcessStream>& recvBuffer, int destProcessId)
637  {
638  return this->Communicator->Gather(sendBuffer, recvBuffer, destProcessId);
639  }
640 
642 
653  int GatherV(const int* sendBuffer, int* recvBuffer, vtkIdType sendLength, vtkIdType* recvLengths,
654  vtkIdType* offsets, int destProcessId)
655  {
656  return this->Communicator->GatherV(
657  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
658  }
659  int GatherV(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType sendLength,
660  vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
661  {
662  return this->Communicator->GatherV(
663  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
664  }
665  int GatherV(const short* sendBuffer, short* recvBuffer, vtkIdType sendLength,
666  vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
667  {
668  return this->Communicator->GatherV(
669  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
670  }
671  int GatherV(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType sendLength,
672  vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
673  {
674  return this->Communicator->GatherV(
675  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
676  }
677  int GatherV(const long* sendBuffer, long* recvBuffer, vtkIdType sendLength,
678  vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
679  {
680  return this->Communicator->GatherV(
681  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
682  }
683  int GatherV(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType sendLength,
684  vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
685  {
686  return this->Communicator->GatherV(
687  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
688  }
689  int GatherV(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType sendLength,
690  vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
691  {
692  return this->Communicator->GatherV(
693  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
694  }
695  int GatherV(const char* sendBuffer, char* recvBuffer, vtkIdType sendLength,
696  vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
697  {
698  return this->Communicator->GatherV(
699  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
700  }
701  int GatherV(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType sendLength,
702  vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
703  {
704  return this->Communicator->GatherV(
705  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
706  }
707  int GatherV(const float* sendBuffer, float* recvBuffer, vtkIdType sendLength,
708  vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
709  {
710  return this->Communicator->GatherV(
711  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
712  }
713  int GatherV(const double* sendBuffer, double* recvBuffer, vtkIdType sendLength,
714  vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
715  {
716  return this->Communicator->GatherV(
717  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
718  }
719  int GatherV(const long long* sendBuffer, long long* recvBuffer, vtkIdType sendLength,
720  vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
721  {
722  return this->Communicator->GatherV(
723  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
724  }
725  int GatherV(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
726  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
727  {
728  return this->Communicator->GatherV(
729  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
730  }
732 
733  int GatherV(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, vtkIdType* recvLengths,
734  vtkIdType* offsets, int destProcessId)
735  {
736  return this->Communicator->GatherV(sendBuffer, recvBuffer, recvLengths, offsets, destProcessId);
737  }
738  int GatherV(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, vtkIdTypeArray* recvLengths,
739  vtkIdTypeArray* offsets, int destProcessId)
740  {
741  return this->Communicator->GatherV(sendBuffer, recvBuffer, recvLengths, offsets, destProcessId);
742  }
743 
745 
751  int GatherV(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int destProcessId)
752  {
753  return this->Communicator->GatherV(sendBuffer, recvBuffer, destProcessId);
754  }
755  int GatherV(vtkDataObject* sendData, vtkSmartPointer<vtkDataObject>* recvData, int destProcessId)
756  {
757  return this->Communicator->GatherV(sendData, recvData, destProcessId);
758  }
760 
762 
769  int Scatter(const int* sendBuffer, int* recvBuffer, vtkIdType length, int srcProcessId)
770  {
771  return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
772  }
773  int Scatter(
774  const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length, int srcProcessId)
775  {
776  return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
777  }
778  int Scatter(const short* sendBuffer, short* recvBuffer, vtkIdType length, int srcProcessId)
779  {
780  return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
781  }
782  int Scatter(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
783  int srcProcessId)
784  {
785  return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
786  }
787  int Scatter(const long* sendBuffer, long* recvBuffer, vtkIdType length, int srcProcessId)
788  {
789  return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
790  }
791  int Scatter(
792  const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length, int srcProcessId)
793  {
794  return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
795  }
796  int Scatter(
797  const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length, int srcProcessId)
798  {
799  return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
800  }
801  int Scatter(const char* sendBuffer, char* recvBuffer, vtkIdType length, int srcProcessId)
802  {
803  return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
804  }
805  int Scatter(
806  const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length, int srcProcessId)
807  {
808  return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
809  }
810  int Scatter(const float* sendBuffer, float* recvBuffer, vtkIdType length, int srcProcessId)
811  {
812  return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
813  }
814  int Scatter(const double* sendBuffer, double* recvBuffer, vtkIdType length, int srcProcessId)
815  {
816  return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
817  }
818  int Scatter(
819  const long long* sendBuffer, long long* recvBuffer, vtkIdType length, int srcProcessId)
820  {
821  return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
822  }
823  int Scatter(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
824  vtkIdType length, int srcProcessId)
825  {
826  return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
827  }
828  int Scatter(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int srcProcessId)
829  {
830  return this->Communicator->Scatter(sendBuffer, recvBuffer, srcProcessId);
831  }
833 
835 
842  int ScatterV(const int* sendBuffer, int* recvBuffer, vtkIdType* sendLengths, vtkIdType* offsets,
843  vtkIdType recvLength, int srcProcessId)
844  {
845  return this->Communicator->ScatterV(
846  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
847  }
848  int ScatterV(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType* sendLengths,
849  vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
850  {
851  return this->Communicator->ScatterV(
852  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
853  }
854  int ScatterV(const short* sendBuffer, short* recvBuffer, vtkIdType* sendLengths,
855  vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
856  {
857  return this->Communicator->ScatterV(
858  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
859  }
860  int ScatterV(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType* sendLengths,
861  vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
862  {
863  return this->Communicator->ScatterV(
864  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
865  }
866  int ScatterV(const long* sendBuffer, long* recvBuffer, vtkIdType* sendLengths, vtkIdType* offsets,
867  vtkIdType recvLength, int srcProcessId)
868  {
869  return this->Communicator->ScatterV(
870  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
871  }
872  int ScatterV(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType* sendLengths,
873  vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
874  {
875  return this->Communicator->ScatterV(
876  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
877  }
878  int ScatterV(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType* sendLengths,
879  vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
880  {
881  return this->Communicator->ScatterV(
882  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
883  }
884  int ScatterV(const char* sendBuffer, char* recvBuffer, vtkIdType* sendLengths, vtkIdType* offsets,
885  vtkIdType recvLength, int srcProcessId)
886  {
887  return this->Communicator->ScatterV(
888  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
889  }
890  int ScatterV(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType* sendLengths,
891  vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
892  {
893  return this->Communicator->ScatterV(
894  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
895  }
896  int ScatterV(const float* sendBuffer, float* recvBuffer, vtkIdType* sendLengths,
897  vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
898  {
899  return this->Communicator->ScatterV(
900  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
901  }
902  int ScatterV(const double* sendBuffer, double* recvBuffer, vtkIdType* sendLengths,
903  vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
904  {
905  return this->Communicator->ScatterV(
906  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
907  }
908  int ScatterV(const long long* sendBuffer, long long* recvBuffer, vtkIdType* sendLengths,
909  vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
910  {
911  return this->Communicator->ScatterV(
912  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
913  }
914  int ScatterV(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
915  vtkIdType* sendLengths, vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
916  {
917  return this->Communicator->ScatterV(
918  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
919  }
921 
923 
926  int AllGather(const int* sendBuffer, int* recvBuffer, vtkIdType length)
927  {
928  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
929  }
930  int AllGather(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length)
931  {
932  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
933  }
934  int AllGather(const short* sendBuffer, short* recvBuffer, vtkIdType length)
935  {
936  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
937  }
938  int AllGather(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length)
939  {
940  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
941  }
942  int AllGather(const long* sendBuffer, long* recvBuffer, vtkIdType length)
943  {
944  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
945  }
946  int AllGather(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length)
947  {
948  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
949  }
950  int AllGather(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length)
951  {
952  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
953  }
954  int AllGather(const char* sendBuffer, char* recvBuffer, vtkIdType length)
955  {
956  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
957  }
958  int AllGather(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length)
959  {
960  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
961  }
962  int AllGather(const float* sendBuffer, float* recvBuffer, vtkIdType length)
963  {
964  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
965  }
966  int AllGather(const double* sendBuffer, double* recvBuffer, vtkIdType length)
967  {
968  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
969  }
970  int AllGather(const long long* sendBuffer, long long* recvBuffer, vtkIdType length)
971  {
972  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
973  }
975  const unsigned long long* sendBuffer, unsigned long long* recvBuffer, vtkIdType length)
976  {
977  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
978  }
979  int AllGather(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer)
980  {
981  return this->Communicator->AllGather(sendBuffer, recvBuffer);
982  }
984 
993  {
994  return this->Communicator->AllGather(sendBuffer, recvBuffer);
995  }
996 
1005  const vtkMultiProcessStream& sendBuffer, std::vector<vtkMultiProcessStream>& recvBuffer)
1006  {
1007  return this->Communicator->AllGather(sendBuffer, recvBuffer);
1008  }
1009 
1011 
1014  int AllGatherV(const int* sendBuffer, int* recvBuffer, vtkIdType sendLength,
1015  vtkIdType* recvLengths, vtkIdType* offsets)
1016  {
1017  return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1018  }
1019  int AllGatherV(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType sendLength,
1020  vtkIdType* recvLengths, vtkIdType* offsets)
1021  {
1022  return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1023  }
1024  int AllGatherV(const short* sendBuffer, short* recvBuffer, vtkIdType sendLength,
1025  vtkIdType* recvLengths, vtkIdType* offsets)
1026  {
1027  return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1028  }
1029  int AllGatherV(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType sendLength,
1030  vtkIdType* recvLengths, vtkIdType* offsets)
1031  {
1032  return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1033  }
1034  int AllGatherV(const long* sendBuffer, long* recvBuffer, vtkIdType sendLength,
1035  vtkIdType* recvLengths, vtkIdType* offsets)
1036  {
1037  return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1038  }
1039  int AllGatherV(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType sendLength,
1040  vtkIdType* recvLengths, vtkIdType* offsets)
1041  {
1042  return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1043  }
1044  int AllGatherV(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType sendLength,
1045  vtkIdType* recvLengths, vtkIdType* offsets)
1046  {
1047  return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1048  }
1049  int AllGatherV(const char* sendBuffer, char* recvBuffer, vtkIdType sendLength,
1050  vtkIdType* recvLengths, vtkIdType* offsets)
1051  {
1052  return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1053  }
1054  int AllGatherV(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType sendLength,
1055  vtkIdType* recvLengths, vtkIdType* offsets)
1056  {
1057  return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1058  }
1059  int AllGatherV(const float* sendBuffer, float* recvBuffer, vtkIdType sendLength,
1060  vtkIdType* recvLengths, vtkIdType* offsets)
1061  {
1062  return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1063  }
1064  int AllGatherV(const double* sendBuffer, double* recvBuffer, vtkIdType sendLength,
1065  vtkIdType* recvLengths, vtkIdType* offsets)
1066  {
1067  return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1068  }
1069  int AllGatherV(const long long* sendBuffer, long long* recvBuffer, vtkIdType sendLength,
1070  vtkIdType* recvLengths, vtkIdType* offsets)
1071  {
1072  return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1073  }
1074  int AllGatherV(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
1075  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets)
1076  {
1077  return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1078  }
1080  vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, vtkIdType* recvLengths, vtkIdType* offsets)
1081  {
1082  return this->Communicator->AllGatherV(sendBuffer, recvBuffer, recvLengths, offsets);
1083  }
1085 
1092  int AllGatherV(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer)
1093  {
1094  return this->Communicator->AllGatherV(sendBuffer, recvBuffer);
1095  }
1096 
1098 
1103  int Reduce(
1104  const int* sendBuffer, int* recvBuffer, vtkIdType length, int operation, int destProcessId)
1105  {
1106  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1107  }
1108  int Reduce(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length,
1109  int operation, int destProcessId)
1110  {
1111  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1112  }
1113  int Reduce(
1114  const short* sendBuffer, short* recvBuffer, vtkIdType length, int operation, int destProcessId)
1115  {
1116  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1117  }
1118  int Reduce(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
1119  int operation, int destProcessId)
1120  {
1121  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1122  }
1123  int Reduce(
1124  const long* sendBuffer, long* recvBuffer, vtkIdType length, int operation, int destProcessId)
1125  {
1126  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1127  }
1128  int Reduce(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length,
1129  int operation, int destProcessId)
1130  {
1131  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1132  }
1133  int Reduce(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length,
1134  int operation, int destProcessId)
1135  {
1136  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1137  }
1138  int Reduce(
1139  const char* sendBuffer, char* recvBuffer, vtkIdType length, int operation, int destProcessId)
1140  {
1141  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1142  }
1143  int Reduce(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length,
1144  int operation, int destProcessId)
1145  {
1146  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1147  }
1148  int Reduce(
1149  const float* sendBuffer, float* recvBuffer, vtkIdType length, int operation, int destProcessId)
1150  {
1151  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1152  }
1153  int Reduce(const double* sendBuffer, double* recvBuffer, vtkIdType length, int operation,
1154  int destProcessId)
1155  {
1156  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1157  }
1158  int Reduce(const long long* sendBuffer, long long* recvBuffer, vtkIdType length, int operation,
1159  int destProcessId)
1160  {
1161  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1162  }
1163  int Reduce(const unsigned long long* sendBuffer, unsigned long long* recvBuffer, vtkIdType length,
1164  int operation, int destProcessId)
1165  {
1166  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1167  }
1168  int Reduce(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int operation, int destProcessId)
1169  {
1170  return this->Communicator->Reduce(sendBuffer, recvBuffer, operation, destProcessId);
1171  }
1173 
1175 
1179  int Reduce(const int* sendBuffer, int* recvBuffer, vtkIdType length,
1180  vtkCommunicator::Operation* operation, int destProcessId)
1181  {
1182  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1183  }
1184  int Reduce(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length,
1185  vtkCommunicator::Operation* operation, int destProcessId)
1186  {
1187  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1188  }
1189  int Reduce(const short* sendBuffer, short* recvBuffer, vtkIdType length,
1190  vtkCommunicator::Operation* operation, int destProcessId)
1191  {
1192  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1193  }
1194  int Reduce(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
1195  vtkCommunicator::Operation* operation, int destProcessId)
1196  {
1197  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1198  }
1199  int Reduce(const long* sendBuffer, long* recvBuffer, vtkIdType length,
1200  vtkCommunicator::Operation* operation, int destProcessId)
1201  {
1202  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1203  }
1204  int Reduce(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length,
1205  vtkCommunicator::Operation* operation, int destProcessId)
1206  {
1207  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1208  }
1209  int Reduce(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length,
1210  vtkCommunicator::Operation* operation, int destProcessId)
1211  {
1212  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1213  }
1214  int Reduce(const char* sendBuffer, char* recvBuffer, vtkIdType length,
1215  vtkCommunicator::Operation* operation, int destProcessId)
1216  {
1217  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1218  }
1219  int Reduce(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length,
1220  vtkCommunicator::Operation* operation, int destProcessId)
1221  {
1222  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1223  }
1224  int Reduce(const float* sendBuffer, float* recvBuffer, vtkIdType length,
1225  vtkCommunicator::Operation* operation, int destProcessId)
1226  {
1227  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1228  }
1229  int Reduce(const double* sendBuffer, double* recvBuffer, vtkIdType length,
1230  vtkCommunicator::Operation* operation, int destProcessId)
1231  {
1232  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1233  }
1234  int Reduce(const long long* sendBuffer, long long* recvBuffer, vtkIdType length,
1235  vtkCommunicator::Operation* operation, int destProcessId)
1236  {
1237  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1238  }
1239  int Reduce(const unsigned long long* sendBuffer, unsigned long long* recvBuffer, vtkIdType length,
1240  vtkCommunicator::Operation* operation, int destProcessId)
1241  {
1242  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1243  }
1244  int Reduce(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer,
1245  vtkCommunicator::Operation* operation, int destProcessId)
1246  {
1247  return this->Communicator->Reduce(sendBuffer, recvBuffer, operation, destProcessId);
1248  }
1250 
1252 
1255  int AllReduce(const int* sendBuffer, int* recvBuffer, vtkIdType length, int operation)
1256  {
1257  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1258  }
1260  const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length, int operation)
1261  {
1262  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1263  }
1264  int AllReduce(const short* sendBuffer, short* recvBuffer, vtkIdType length, int operation)
1265  {
1266  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1267  }
1269  const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length, int operation)
1270  {
1271  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1272  }
1273  int AllReduce(const long* sendBuffer, long* recvBuffer, vtkIdType length, int operation)
1274  {
1275  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1276  }
1278  const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length, int operation)
1279  {
1280  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1281  }
1283  const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length, int operation)
1284  {
1285  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1286  }
1287  int AllReduce(const char* sendBuffer, char* recvBuffer, vtkIdType length, int operation)
1288  {
1289  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1290  }
1292  const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length, int operation)
1293  {
1294  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1295  }
1296  int AllReduce(const float* sendBuffer, float* recvBuffer, vtkIdType length, int operation)
1297  {
1298  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1299  }
1300  int AllReduce(const double* sendBuffer, double* recvBuffer, vtkIdType length, int operation)
1301  {
1302  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1303  }
1304  int AllReduce(const long long* sendBuffer, long long* recvBuffer, vtkIdType length, int operation)
1305  {
1306  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1307  }
1308  int AllReduce(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
1309  vtkIdType length, int operation)
1310  {
1311  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1312  }
1313  int AllReduce(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int operation)
1314  {
1315  return this->Communicator->AllReduce(sendBuffer, recvBuffer, operation);
1316  }
1318 
1320  const int* sendBuffer, int* recvBuffer, vtkIdType length, vtkCommunicator::Operation* operation)
1321  {
1322  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1323  }
1324  int AllReduce(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length,
1325  vtkCommunicator::Operation* operation)
1326  {
1327  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1328  }
1329  int AllReduce(const short* sendBuffer, short* recvBuffer, vtkIdType length,
1330  vtkCommunicator::Operation* operation)
1331  {
1332  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1333  }
1334  int AllReduce(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
1335  vtkCommunicator::Operation* operation)
1336  {
1337  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1338  }
1339  int AllReduce(const long* sendBuffer, long* recvBuffer, vtkIdType length,
1340  vtkCommunicator::Operation* operation)
1341  {
1342  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1343  }
1344  int AllReduce(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length,
1345  vtkCommunicator::Operation* operation)
1346  {
1347  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1348  }
1349  int AllReduce(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length,
1350  vtkCommunicator::Operation* operation)
1351  {
1352  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1353  }
1354  int AllReduce(const char* sendBuffer, char* recvBuffer, vtkIdType length,
1355  vtkCommunicator::Operation* operation)
1356  {
1357  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1358  }
1359  int AllReduce(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length,
1360  vtkCommunicator::Operation* operation)
1361  {
1362  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1363  }
1364  int AllReduce(const float* sendBuffer, float* recvBuffer, vtkIdType length,
1365  vtkCommunicator::Operation* operation)
1366  {
1367  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1368  }
1369  int AllReduce(const double* sendBuffer, double* recvBuffer, vtkIdType length,
1370  vtkCommunicator::Operation* operation)
1371  {
1372  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1373  }
1374  int AllReduce(const long long* sendBuffer, long long* recvBuffer, vtkIdType length,
1375  vtkCommunicator::Operation* operation)
1376  {
1377  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1378  }
1379  int AllReduce(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
1381  {
1382  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1383  }
1385  vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, vtkCommunicator::Operation* operation)
1386  {
1387  return this->Communicator->AllReduce(sendBuffer, recvBuffer, operation);
1388  }
1389 
1391 
1394  int Reduce(const vtkBoundingBox& sendBuffer, vtkBoundingBox& recvBuffer, int destProcessId);
1395  int AllReduce(const vtkBoundingBox& sendBuffer, vtkBoundingBox& recvBuffer);
1397 
1399 
1402  int Reduce(
1403  vtkDataArraySelection* sendBuffer, vtkDataArraySelection* recvBuffer, int destProcessId);
1406 
1410  virtual bool CanProbe() { return this->Communicator->CanProbe(); }
1411 
1422  virtual int Probe(int source, int tag, int* actualSource)
1423  {
1424  return this->Communicator->Probe(source, tag, actualSource);
1425  }
1426 
1427  // Internally implemented RMI to break the process loop.
1428 
1429 protected:
1432 
1438  virtual void TriggerRMIInternal(
1439  int remoteProcessId, void* arg, int argLength, int rmiTag, bool propagate);
1440 
1442  void* SingleData;
1443 
1445 
1446  // This is a flag that can be used by the ports to break
1447  // their update loop. (same as ProcessRMIs)
1449 
1450  void ProcessRMI(int remoteProcessId, void* arg, int argLength, int rmiTag);
1451 
1452  // This method implements "GetGlobalController".
1453  // It needs to be virtual and static.
1455 
1456  // This flag can force deep copies during send.
1458 
1459  // This flag can be used to indicate that an MPI Broadcast will be used
1460  // when calling TriggerRMIOnAllChildren(), instead of the binary tree
1461  // propagation of the data to the satellite ranks from rank 0.
1463 
1465 
1466  // Note that since the communicators can be created differently
1467  // depending on the type of controller, the subclasses are
1468  // responsible of deleting them.
1470 
1471  // Communicator which is a copy of the current user
1472  // level communicator except the context; i.e. even if the tags
1473  // are the same, the RMI messages will not interfere with user
1474  // level messages.
1475  // Note that since the communicators can be created differently
1476  // depending on the type of controller, the subclasses are
1477  // responsible of deleting them.
1479 
1480 private:
1482  void operator=(const vtkMultiProcessController&) = delete;
1483 
1484  unsigned long RMICount;
1485 
1486  class vtkInternal;
1487  vtkInternal* Internal;
1488 };
1489 
1490 inline int vtkMultiProcessController::Send(vtkDataObject* data, int remoteProcessId, int tag)
1491 {
1492  if (this->Communicator)
1493  {
1494  return this->Communicator->Send(data, remoteProcessId, tag);
1495  }
1496  else
1497  {
1498  return 0;
1499  }
1500 }
1501 
1502 inline int vtkMultiProcessController::Send(vtkDataArray* data, int remoteProcessId, int tag)
1503 {
1504  if (this->Communicator)
1505  {
1506  return this->Communicator->Send(data, remoteProcessId, tag);
1507  }
1508  else
1509  {
1510  return 0;
1511  }
1512 }
1513 
1515  const int* data, vtkIdType length, int remoteProcessId, int tag)
1516 {
1517  if (this->Communicator)
1518  {
1519  return this->Communicator->Send(data, length, remoteProcessId, tag);
1520  }
1521  else
1522  {
1523  return 0;
1524  }
1525 }
1526 
1528  const short* data, vtkIdType length, int remoteProcessId, int tag)
1529 {
1530  if (this->Communicator)
1531  {
1532  return this->Communicator->Send(data, length, remoteProcessId, tag);
1533  }
1534  else
1535  {
1536  return 0;
1537  }
1538 }
1539 
1541  const unsigned short* data, vtkIdType length, int remoteProcessId, int tag)
1542 {
1543  if (this->Communicator)
1544  {
1545  return this->Communicator->Send(data, length, remoteProcessId, tag);
1546  }
1547  else
1548  {
1549  return 0;
1550  }
1551 }
1552 
1554  const unsigned int* data, vtkIdType length, int remoteProcessId, int tag)
1555 {
1556  if (this->Communicator)
1557  {
1558  return this->Communicator->Send(data, length, remoteProcessId, tag);
1559  }
1560  else
1561  {
1562  return 0;
1563  }
1564 }
1565 
1567  const unsigned long* data, vtkIdType length, int remoteProcessId, int tag)
1568 {
1569  if (this->Communicator)
1570  {
1571  return this->Communicator->Send(data, length, remoteProcessId, tag);
1572  }
1573  else
1574  {
1575  return 0;
1576  }
1577 }
1578 
1580  const long* data, vtkIdType length, int remoteProcessId, int tag)
1581 {
1582  if (this->Communicator)
1583  {
1584  return this->Communicator->Send(data, length, remoteProcessId, tag);
1585  }
1586  else
1587  {
1588  return 0;
1589  }
1590 }
1591 
1593  const signed char* data, vtkIdType length, int remoteProcessId, int tag)
1594 {
1595  if (this->Communicator)
1596  {
1597  return this->Communicator->Send(data, length, remoteProcessId, tag);
1598  }
1599  else
1600  {
1601  return 0;
1602  }
1603 }
1604 
1606  const char* data, vtkIdType length, int remoteProcessId, int tag)
1607 {
1608  if (this->Communicator)
1609  {
1610  return this->Communicator->Send(data, length, remoteProcessId, tag);
1611  }
1612  else
1613  {
1614  return 0;
1615  }
1616 }
1617 
1619  const unsigned char* data, vtkIdType length, int remoteProcessId, int tag)
1620 {
1621  if (this->Communicator)
1622  {
1623  return this->Communicator->Send(data, length, remoteProcessId, tag);
1624  }
1625  else
1626  {
1627  return 0;
1628  }
1629 }
1630 
1632  const float* data, vtkIdType length, int remoteProcessId, int tag)
1633 {
1634  if (this->Communicator)
1635  {
1636  return this->Communicator->Send(data, length, remoteProcessId, tag);
1637  }
1638  else
1639  {
1640  return 0;
1641  }
1642 }
1643 
1645  const double* data, vtkIdType length, int remoteProcessId, int tag)
1646 {
1647  if (this->Communicator)
1648  {
1649  return this->Communicator->Send(data, length, remoteProcessId, tag);
1650  }
1651  else
1652  {
1653  return 0;
1654  }
1655 }
1656 
1658  const long long* data, vtkIdType length, int remoteProcessId, int tag)
1659 {
1660  if (this->Communicator)
1661  {
1662  return this->Communicator->Send(data, length, remoteProcessId, tag);
1663  }
1664  else
1665  {
1666  return 0;
1667  }
1668 }
1669 
1671  const unsigned long long* data, vtkIdType length, int remoteProcessId, int tag)
1672 {
1673  if (this->Communicator)
1674  {
1675  return this->Communicator->Send(data, length, remoteProcessId, tag);
1676  }
1677  else
1678  {
1679  return 0;
1680  }
1681 }
1682 
1684  const vtkMultiProcessStream& stream, int remoteId, int tag)
1685 {
1686  if (this->Communicator)
1687  {
1688  return this->Communicator->Send(stream, remoteId, tag);
1689  }
1690  return 0;
1691 }
1692 
1693 inline int vtkMultiProcessController::Receive(vtkDataObject* data, int remoteProcessId, int tag)
1694 {
1695  if (this->Communicator)
1696  {
1697  return this->Communicator->Receive(data, remoteProcessId, tag);
1698  }
1699  else
1700  {
1701  return 0;
1702  }
1703 }
1704 
1706 {
1707  if (this->Communicator)
1708  {
1709  return this->Communicator->ReceiveDataObject(remoteProcessId, tag);
1710  }
1711  else
1712  {
1713  return nullptr;
1714  }
1715 }
1716 
1717 inline int vtkMultiProcessController::Receive(vtkDataArray* data, int remoteProcessId, int tag)
1718 {
1719  if (this->Communicator)
1720  {
1721  return this->Communicator->Receive(data, remoteProcessId, tag);
1722  }
1723  else
1724  {
1725  return 0;
1726  }
1727 }
1728 
1730  int* data, vtkIdType length, int remoteProcessId, int tag)
1731 {
1732  if (this->Communicator)
1733  {
1734  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1735  }
1736  else
1737  {
1738  return 0;
1739  }
1740 }
1741 
1743  unsigned int* data, vtkIdType length, int remoteProcessId, int tag)
1744 {
1745  if (this->Communicator)
1746  {
1747  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1748  }
1749  else
1750  {
1751  return 0;
1752  }
1753 }
1754 
1756  short* data, vtkIdType length, int remoteProcessId, int tag)
1757 {
1758  if (this->Communicator)
1759  {
1760  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1761  }
1762  else
1763  {
1764  return 0;
1765  }
1766 }
1767 
1769  unsigned short* data, vtkIdType length, int remoteProcessId, int tag)
1770 {
1771  if (this->Communicator)
1772  {
1773  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1774  }
1775  else
1776  {
1777  return 0;
1778  }
1779 }
1780 
1782  long* data, vtkIdType length, int remoteProcessId, int tag)
1783 {
1784  if (this->Communicator)
1785  {
1786  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1787  }
1788  else
1789  {
1790  return 0;
1791  }
1792 }
1793 
1795  unsigned long* data, vtkIdType length, int remoteProcessId, int tag)
1796 {
1797  if (this->Communicator)
1798  {
1799  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1800  }
1801  else
1802  {
1803  return 0;
1804  }
1805 }
1806 
1808  char* data, vtkIdType length, int remoteProcessId, int tag)
1809 {
1810  if (this->Communicator)
1811  {
1812  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1813  }
1814  else
1815  {
1816  return 0;
1817  }
1818 }
1819 
1821  unsigned char* data, vtkIdType length, int remoteProcessId, int tag)
1822 {
1823  if (this->Communicator)
1824  {
1825  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1826  }
1827  else
1828  {
1829  return 0;
1830  }
1831 }
1832 
1834  signed char* data, vtkIdType length, int remoteProcessId, int tag)
1835 {
1836  if (this->Communicator)
1837  {
1838  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1839  }
1840  else
1841  {
1842  return 0;
1843  }
1844 }
1845 
1847  float* data, vtkIdType length, int remoteProcessId, int tag)
1848 {
1849  if (this->Communicator)
1850  {
1851  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1852  }
1853  else
1854  {
1855  return 0;
1856  }
1857 }
1858 
1860  double* data, vtkIdType length, int remoteProcessId, int tag)
1861 {
1862  if (this->Communicator)
1863  {
1864  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1865  }
1866  else
1867  {
1868  return 0;
1869  }
1870 }
1871 
1873  long long* data, vtkIdType length, int remoteProcessId, int tag)
1874 {
1875  if (this->Communicator)
1876  {
1877  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1878  }
1879  else
1880  {
1881  return 0;
1882  }
1883 }
1884 
1886  unsigned long long* data, vtkIdType length, int remoteProcessId, int tag)
1887 {
1888  if (this->Communicator)
1889  {
1890  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1891  }
1892  else
1893  {
1894  return 0;
1895  }
1896 }
1897 
1898 inline int vtkMultiProcessController::Receive(vtkMultiProcessStream& stream, int remoteId, int tag)
1899 {
1900  if (this->Communicator)
1901  {
1902  return this->Communicator->Receive(stream, remoteId, tag);
1903  }
1904  return 0;
1905 }
1906 
1908 {
1909  if (this->Communicator)
1910  {
1911  this->Communicator->Barrier();
1912  }
1913 }
1914 
1916 {
1917  if (this->Communicator)
1918  {
1919  return this->Communicator->GetCount();
1920  }
1921  return 0;
1922 }
1923 
1924 VTK_ABI_NAMESPACE_END
1925 #endif
Fast, simple class for representing and operating on 3D bounds.
create and manipulate ordered lists of objects
Definition: vtkCollection.h:46
A custom operation to use in a reduce command.
Used to send/receive messages in a multiprocess environment.
virtual void Barrier()
Will block the processes until all other processes reach the Barrier function.
int Send(vtkDataObject *data, int remoteHandle, int tag)
This method sends a data object to a destination.
int Receive(vtkDataObject *data, int remoteHandle, int tag)
This method receives a data object from a corresponding send.
virtual vtkIdType GetCount()
Returns the number of words received by the most recent Receive().
vtkDataObject * ReceiveDataObject(int remoteHandle, int tag)
The caller does not have to know the data type before this call is made.
Store on/off settings for data arrays, etc.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:155
general representation of visualization data
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
dynamic, self-adjusting array of vtkIdType
topologically and geometrically regular array of data
Definition: vtkImageData.h:156
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)
int AllGather(vtkDataObject *sendBuffer, std::vector< vtkSmartPointer< vtkDataObject >> &recvBuffer)
Gathers vtkDataObject (sendBuffer) from all ranks to all raks.
vtkIdType GetCount()
Returns the number of words received by the most recent Receive().
virtual vtkMultiProcessController * PartitionController(int localColor, int localKey)
Partitions this controller based on a coloring.
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)
virtual vtkMultiProcessController * GetLocalController()
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.
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)
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.
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().
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)
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 ...
static vtkMultiProcessController * GetGlobalController()
This convenience method returns the controller associated with the local process.
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.
virtual void Initialize(int *vtkNotUsed(argc), char ***vtkNotUsed(argv))=0
This method is for setting up the processes.
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.
virtual void Initialize(int *vtkNotUsed(argc), char ***vtkNotUsed(argv), int initializedExternally)=0
This method is for setting up the processes.
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.
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 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 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 Gather(vtkDataObject *sendBuffer, std::vector< vtkSmartPointer< vtkDataObject >> &recvBuffer, int destProcessId)
Gathers vtkDataObject (sendBuffer) from all ranks to the destProcessId.
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.
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.
abstract base class for most VTK objects
Definition: vtkObject.h:162
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
@ vector
Definition: vtkX3D.h:237
@ length
Definition: vtkX3D.h:393
@ index
Definition: vtkX3D.h:246
@ data
Definition: vtkX3D.h:315
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
void(* vtkProcessFunctionType)(vtkMultiProcessController *controller, void *userData)
void(* vtkRMIFunctionType)(void *localArg, void *remoteArg, int remoteArgLength, int remoteProcessId)
int vtkIdType
Definition: vtkType.h:315