VTK  9.2.20220926
vtkMultiProcessController.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkMultiProcessController.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
55 #ifndef vtkMultiProcessController_h
56 #define vtkMultiProcessController_h
57 
58 #include "vtkObject.h"
59 #include "vtkParallelCoreModule.h" // For export macro
60 
61 #include "vtkCommunicator.h" // Needed for direct access to communicator
62 
63 VTK_ABI_NAMESPACE_BEGIN
64 class vtkBoundingBox;
65 class vtkCollection;
66 class vtkDataObject;
67 class vtkDataSet;
68 class vtkImageData;
71 class vtkOutputWindow;
72 class vtkProcessGroup;
73 class vtkProcess;
75 
76 // The type of function that gets called when new processes are initiated.
77 typedef void (*vtkProcessFunctionType)(vtkMultiProcessController* controller, void* userData);
78 
79 // The type of function that gets called when an RMI is triggered.
80 typedef void (*vtkRMIFunctionType)(
81  void* localArg, void* remoteArg, int remoteArgLength, int remoteProcessId);
82 
83 class VTKPARALLELCORE_EXPORT vtkMultiProcessController : public vtkObject
84 {
85 public:
87  void PrintSelf(ostream& os, vtkIndent indent) override;
88 
94  virtual void Initialize(int* vtkNotUsed(argc), char*** vtkNotUsed(argv)) = 0;
95 
101  virtual void Initialize(
102  int* vtkNotUsed(argc), char*** vtkNotUsed(argv), int initializedExternally) = 0;
103 
109  virtual void Finalize() = 0;
110 
116  virtual void Finalize(int finalizedExternally) = 0;
117 
119 
124  void SetNumberOfProcesses(int num);
127 
135 
142 
148  virtual void SingleMethodExecute() = 0;
149 
157 
163  virtual void MultipleMethodExecute() = 0;
164 
169 
177 
183  virtual void CreateOutputWindow() = 0;
184 
197 
208  virtual vtkMultiProcessController* PartitionController(int localColor, int localKey);
209 
210  //------------------ RMIs --------------------
211 
224  virtual unsigned long AddRMI(vtkRMIFunctionType, void* localArg, int tag);
225 
229  virtual int RemoveFirstRMI(int tag);
230 
235  virtual int RemoveRMI(unsigned long id);
236 
240  virtual void RemoveRMI(vtkRMIFunctionType f, void* arg, int tag)
241  {
242  (void)f;
243  (void)arg;
244  (void)tag;
245  vtkErrorMacro("RemoveRMI Not Implemented Yet");
246  }
247 
253  virtual unsigned long AddRMICallback(vtkRMIFunctionType, void* localArg, int tag);
254 
260  virtual void RemoveAllRMICallbacks(int tag);
261 
265  virtual bool RemoveRMICallback(unsigned long id);
266 
270  void TriggerRMI(int remoteProcessId, void* arg, int argLength, int tag);
271 
277 
281  void TriggerRMI(int remoteProcessId, const char* arg, int tag)
282  {
283  this->TriggerRMI(remoteProcessId, (void*)arg, static_cast<int>(strlen(arg)) + 1, tag);
284  }
285 
289  void TriggerRMI(int remoteProcessId, int tag)
290  {
291  this->TriggerRMI(remoteProcessId, nullptr, 0, tag);
292  }
293 
295 
303  void TriggerRMIOnAllChildren(void* arg, int argLength, int tag);
304  void TriggerRMIOnAllChildren(const char* arg, int tag)
305  {
306  this->TriggerRMIOnAllChildren((void*)arg, static_cast<int>(strlen(arg)) + 1, tag);
307  }
308  void TriggerRMIOnAllChildren(int tag) { this->TriggerRMIOnAllChildren(nullptr, 0, tag); }
309  void BroadcastTriggerRMIOnAllChildren(void* arg, int argLength, int tag);
311 
313 
324  int ProcessRMIs(int reportErrors, int dont_loop = 0);
325  int ProcessRMIs();
326  int BroadcastProcessRMIs(int reportErrors, int dont_loop = 0);
328 
330 
335  vtkSetMacro(BreakFlag, int);
336  vtkGetMacro(BreakFlag, int);
338 
340 
345  vtkSetMacro(BroadcastTriggerRMI, bool);
346  vtkGetMacro(BroadcastTriggerRMI, bool);
347  vtkBooleanMacro(BroadcastTriggerRMI, bool);
349 
351 
355  vtkGetObjectMacro(Communicator, vtkCommunicator);
357 
361  static int GetBreakRMITag() { return BREAK_RMI_TAG; }
362  static int GetRMITag() { return RMI_TAG; }
363  static int GetRMIArgTag() { return RMI_ARG_TAG; }
364 
365  enum Errors
366  {
369  RMI_ARG_ERROR
370  };
371 
372  enum Consts
373  {
374  ANY_SOURCE = -1,
375  INVALID_SOURCE = -2
376  };
377 
378  enum Tags
379  {
380  RMI_TAG = 1,
381  RMI_ARG_TAG = 2,
382  BREAK_RMI_TAG = 3,
383  XML_WRITER_DATA_INFO = 4
384  };
385 
389  void Barrier();
390 
392 
393  //------------------ Communication --------------------
394 
396 
403  int Send(const int* data, vtkIdType length, int remoteProcessId, int tag);
404  int Send(const short* data, vtkIdType length, int remoteProcessId, int tag);
405  int Send(const unsigned short* data, vtkIdType length, int remoteProcessId, int tag);
406  int Send(const unsigned int* data, vtkIdType length, int remoteProcessId, int tag);
407  int Send(const unsigned long* data, vtkIdType length, int remoteProcessId, int tag);
408  int Send(const long* data, vtkIdType length, int remoteProcessId, int tag);
409  int Send(const signed char* data, vtkIdType length, int remoteProcessId, int tag);
410  int Send(const char* data, vtkIdType length, int remoteProcessId, int tag);
411  int Send(const unsigned char* data, vtkIdType length, int remoteProcessId, int tag);
412  int Send(const float* data, vtkIdType length, int remoteProcessId, int tag);
413  int Send(const double* data, vtkIdType length, int remoteProcessId, int tag);
414  int Send(const long long* data, vtkIdType length, int remoteProcessId, int tag);
415  int Send(const unsigned long long* data, vtkIdType length, int remoteProcessId, int tag);
416  int Send(vtkDataObject* data, int remoteId, int tag);
417  int Send(vtkDataArray* data, int remoteId, int tag);
419 
427  int Send(const vtkMultiProcessStream& stream, int remoteId, int tag);
428 
430 
439  int Receive(int* data, vtkIdType maxlength, int remoteProcessId, int tag);
440  int Receive(unsigned int* data, vtkIdType maxlength, int remoteProcessId, int tag);
441  int Receive(short* data, vtkIdType maxlength, int remoteProcessId, int tag);
442  int Receive(unsigned short* data, vtkIdType maxlength, int remoteProcessId, int tag);
443  int Receive(long* data, vtkIdType maxlength, int remoteProcessId, int tag);
444  int Receive(unsigned long* data, vtkIdType maxlength, int remoteProcessId, int tag);
445  int Receive(char* data, vtkIdType maxlength, int remoteProcessId, int tag);
446  int Receive(unsigned char* data, vtkIdType maxlength, int remoteProcessId, int tag);
447  int Receive(signed char* data, vtkIdType maxlength, int remoteProcessId, int tag);
448  int Receive(float* data, vtkIdType maxlength, int remoteProcessId, int tag);
449  int Receive(double* data, vtkIdType maxlength, int remoteProcessId, int tag);
450  int Receive(long long* data, vtkIdType maxLength, int remoteProcessId, int tag);
451  int Receive(unsigned long long* data, vtkIdType maxLength, int remoteProcessId, int tag);
452  int Receive(vtkDataObject* data, int remoteId, int tag);
453  int Receive(vtkDataArray* data, int remoteId, int tag);
455 
459  int Receive(vtkMultiProcessStream& stream, int remoteId, int tag);
460 
461  vtkDataObject* ReceiveDataObject(int remoteId, int tag);
462 
471  vtkIdType GetCount();
472 
473  //---------------------- Collective Operations ----------------------
474 
476 
481  int Broadcast(int* data, vtkIdType length, int srcProcessId)
482  {
483  return this->Communicator->Broadcast(data, length, srcProcessId);
484  }
485  int Broadcast(unsigned int* data, vtkIdType length, int srcProcessId)
486  {
487  return this->Communicator->Broadcast(data, length, srcProcessId);
488  }
489  int Broadcast(short* data, vtkIdType length, int srcProcessId)
490  {
491  return this->Communicator->Broadcast(data, length, srcProcessId);
492  }
493  int Broadcast(unsigned short* data, vtkIdType length, int srcProcessId)
494  {
495  return this->Communicator->Broadcast(data, length, srcProcessId);
496  }
497  int Broadcast(long* data, vtkIdType length, int srcProcessId)
498  {
499  return this->Communicator->Broadcast(data, length, srcProcessId);
500  }
501  int Broadcast(unsigned long* data, vtkIdType length, int srcProcessId)
502  {
503  return this->Communicator->Broadcast(data, length, srcProcessId);
504  }
505  int Broadcast(unsigned char* data, vtkIdType length, int srcProcessId)
506  {
507  return this->Communicator->Broadcast(data, length, srcProcessId);
508  }
509  int Broadcast(char* data, vtkIdType length, int srcProcessId)
510  {
511  return this->Communicator->Broadcast(data, length, srcProcessId);
512  }
513  int Broadcast(signed char* data, vtkIdType length, int srcProcessId)
514  {
515  return this->Communicator->Broadcast(data, length, srcProcessId);
516  }
517  int Broadcast(float* data, vtkIdType length, int srcProcessId)
518  {
519  return this->Communicator->Broadcast(data, length, srcProcessId);
520  }
521  int Broadcast(double* data, vtkIdType length, int srcProcessId)
522  {
523  return this->Communicator->Broadcast(data, length, srcProcessId);
524  }
525  int Broadcast(long long* data, vtkIdType length, int srcProcessId)
526  {
527  return this->Communicator->Broadcast(data, length, srcProcessId);
528  }
529  int Broadcast(unsigned long long* data, vtkIdType length, int srcProcessId)
530  {
531  return this->Communicator->Broadcast(data, length, srcProcessId);
532  }
533  int Broadcast(vtkDataObject* data, int srcProcessId)
534  {
535  return this->Communicator->Broadcast(data, srcProcessId);
536  }
537  int Broadcast(vtkDataArray* data, int srcProcessId)
538  {
539  return this->Communicator->Broadcast(data, srcProcessId);
540  }
542 
543  int Broadcast(vtkMultiProcessStream& stream, int srcProcessId)
544  {
545  return this->Communicator->Broadcast(stream, srcProcessId);
546  }
547 
549 
558  int Gather(const int* sendBuffer, int* recvBuffer, vtkIdType length, int destProcessId)
559  {
560  return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
561  }
562  int Gather(
563  const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length, int destProcessId)
564  {
565  return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
566  }
567  int Gather(const short* sendBuffer, short* recvBuffer, vtkIdType length, int destProcessId)
568  {
569  return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
570  }
571  int Gather(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
572  int destProcessId)
573  {
574  return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
575  }
576  int Gather(const long* sendBuffer, long* recvBuffer, vtkIdType length, int destProcessId)
577  {
578  return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
579  }
580  int Gather(
581  const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length, int destProcessId)
582  {
583  return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
584  }
585  int Gather(
586  const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length, int destProcessId)
587  {
588  return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
589  }
590  int Gather(const char* sendBuffer, char* recvBuffer, vtkIdType length, int destProcessId)
591  {
592  return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
593  }
594  int Gather(
595  const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length, int destProcessId)
596  {
597  return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
598  }
599  int Gather(const float* sendBuffer, float* recvBuffer, vtkIdType length, int destProcessId)
600  {
601  return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
602  }
603  int Gather(const double* sendBuffer, double* recvBuffer, vtkIdType length, int destProcessId)
604  {
605  return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
606  }
607  int Gather(
608  const long long* sendBuffer, long long* recvBuffer, vtkIdType length, int destProcessId)
609  {
610  return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
611  }
612  int Gather(const unsigned long long* sendBuffer, unsigned long long* recvBuffer, vtkIdType length,
613  int destProcessId)
614  {
615  return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId);
616  }
617  int Gather(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int destProcessId)
618  {
619  return this->Communicator->Gather(sendBuffer, recvBuffer, destProcessId);
620  }
622 
633  int destProcessId)
634  {
635  return this->Communicator->Gather(sendBuffer, recvBuffer, destProcessId);
636  }
637 
647  int Gather(const vtkMultiProcessStream& sendBuffer,
648  std::vector<vtkMultiProcessStream>& recvBuffer, int destProcessId)
649  {
650  return this->Communicator->Gather(sendBuffer, recvBuffer, destProcessId);
651  }
652 
654 
665  int GatherV(const int* sendBuffer, int* recvBuffer, vtkIdType sendLength, vtkIdType* recvLengths,
666  vtkIdType* offsets, int destProcessId)
667  {
668  return this->Communicator->GatherV(
669  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
670  }
671  int GatherV(const unsigned int* sendBuffer, unsigned int* 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 short* sendBuffer, short* 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 short* sendBuffer, unsigned short* 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 long* sendBuffer, long* 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 unsigned long* sendBuffer, unsigned long* 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 unsigned char* sendBuffer, unsigned 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 char* sendBuffer, char* 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 signed char* sendBuffer, signed char* 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 float* sendBuffer, float* 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 double* sendBuffer, double* recvBuffer, vtkIdType sendLength,
726  vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
727  {
728  return this->Communicator->GatherV(
729  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
730  }
731  int GatherV(const long long* sendBuffer, long long* recvBuffer, vtkIdType sendLength,
732  vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
733  {
734  return this->Communicator->GatherV(
735  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
736  }
737  int GatherV(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
738  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId)
739  {
740  return this->Communicator->GatherV(
741  sendBuffer, recvBuffer, sendLength, recvLengths, offsets, destProcessId);
742  }
744 
745  int GatherV(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, vtkIdType* recvLengths,
746  vtkIdType* offsets, int destProcessId)
747  {
748  return this->Communicator->GatherV(sendBuffer, recvBuffer, recvLengths, offsets, destProcessId);
749  }
750  int GatherV(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, vtkIdTypeArray* recvLengths,
751  vtkIdTypeArray* offsets, int destProcessId)
752  {
753  return this->Communicator->GatherV(sendBuffer, recvBuffer, recvLengths, offsets, destProcessId);
754  }
755 
757 
763  int GatherV(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int destProcessId)
764  {
765  return this->Communicator->GatherV(sendBuffer, recvBuffer, destProcessId);
766  }
767  int GatherV(vtkDataObject* sendData, vtkSmartPointer<vtkDataObject>* recvData, int destProcessId)
768  {
769  return this->Communicator->GatherV(sendData, recvData, destProcessId);
770  }
772 
774 
781  int Scatter(const int* sendBuffer, int* recvBuffer, vtkIdType length, int srcProcessId)
782  {
783  return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
784  }
785  int Scatter(
786  const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length, int srcProcessId)
787  {
788  return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
789  }
790  int Scatter(const short* sendBuffer, short* recvBuffer, vtkIdType length, int srcProcessId)
791  {
792  return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
793  }
794  int Scatter(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
795  int srcProcessId)
796  {
797  return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
798  }
799  int Scatter(const long* sendBuffer, long* recvBuffer, vtkIdType length, int srcProcessId)
800  {
801  return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
802  }
803  int Scatter(
804  const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length, int srcProcessId)
805  {
806  return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
807  }
808  int Scatter(
809  const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length, int srcProcessId)
810  {
811  return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
812  }
813  int Scatter(const char* sendBuffer, char* recvBuffer, vtkIdType length, int srcProcessId)
814  {
815  return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
816  }
817  int Scatter(
818  const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length, int srcProcessId)
819  {
820  return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
821  }
822  int Scatter(const float* sendBuffer, float* recvBuffer, vtkIdType length, int srcProcessId)
823  {
824  return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
825  }
826  int Scatter(const double* sendBuffer, double* recvBuffer, vtkIdType length, int srcProcessId)
827  {
828  return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
829  }
830  int Scatter(
831  const long long* sendBuffer, long long* recvBuffer, vtkIdType length, int srcProcessId)
832  {
833  return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
834  }
835  int Scatter(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
836  vtkIdType length, int srcProcessId)
837  {
838  return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId);
839  }
840  int Scatter(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int srcProcessId)
841  {
842  return this->Communicator->Scatter(sendBuffer, recvBuffer, srcProcessId);
843  }
845 
847 
854  int ScatterV(const int* sendBuffer, int* recvBuffer, vtkIdType* sendLengths, vtkIdType* offsets,
855  vtkIdType recvLength, int srcProcessId)
856  {
857  return this->Communicator->ScatterV(
858  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
859  }
860  int ScatterV(const unsigned int* sendBuffer, unsigned int* 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 short* sendBuffer, short* recvBuffer, vtkIdType* sendLengths,
867  vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
868  {
869  return this->Communicator->ScatterV(
870  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
871  }
872  int ScatterV(const unsigned short* sendBuffer, unsigned short* 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 long* sendBuffer, long* recvBuffer, vtkIdType* sendLengths, vtkIdType* offsets,
879  vtkIdType recvLength, int srcProcessId)
880  {
881  return this->Communicator->ScatterV(
882  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
883  }
884  int ScatterV(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType* sendLengths,
885  vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
886  {
887  return this->Communicator->ScatterV(
888  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
889  }
890  int ScatterV(const unsigned char* sendBuffer, unsigned 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 char* sendBuffer, char* recvBuffer, vtkIdType* sendLengths, vtkIdType* offsets,
897  vtkIdType recvLength, int srcProcessId)
898  {
899  return this->Communicator->ScatterV(
900  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
901  }
902  int ScatterV(const signed char* sendBuffer, signed char* 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 float* sendBuffer, float* 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 double* sendBuffer, double* recvBuffer, vtkIdType* sendLengths,
915  vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
916  {
917  return this->Communicator->ScatterV(
918  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
919  }
920  int ScatterV(const long long* sendBuffer, long long* recvBuffer, vtkIdType* sendLengths,
921  vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
922  {
923  return this->Communicator->ScatterV(
924  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
925  }
926  int ScatterV(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
927  vtkIdType* sendLengths, vtkIdType* offsets, vtkIdType recvLength, int srcProcessId)
928  {
929  return this->Communicator->ScatterV(
930  sendBuffer, recvBuffer, sendLengths, offsets, recvLength, srcProcessId);
931  }
933 
935 
938  int AllGather(const int* sendBuffer, int* recvBuffer, vtkIdType length)
939  {
940  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
941  }
942  int AllGather(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length)
943  {
944  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
945  }
946  int AllGather(const short* sendBuffer, short* recvBuffer, vtkIdType length)
947  {
948  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
949  }
950  int AllGather(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length)
951  {
952  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
953  }
954  int AllGather(const long* sendBuffer, long* recvBuffer, vtkIdType length)
955  {
956  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
957  }
958  int AllGather(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length)
959  {
960  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
961  }
962  int AllGather(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length)
963  {
964  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
965  }
966  int AllGather(const char* sendBuffer, char* recvBuffer, vtkIdType length)
967  {
968  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
969  }
970  int AllGather(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length)
971  {
972  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
973  }
974  int AllGather(const float* sendBuffer, float* recvBuffer, vtkIdType length)
975  {
976  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
977  }
978  int AllGather(const double* sendBuffer, double* recvBuffer, vtkIdType length)
979  {
980  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
981  }
982  int AllGather(const long long* sendBuffer, long long* recvBuffer, vtkIdType length)
983  {
984  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
985  }
987  const unsigned long long* sendBuffer, unsigned long long* recvBuffer, vtkIdType length)
988  {
989  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
990  }
991  int AllGather(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer)
992  {
993  return this->Communicator->AllGather(sendBuffer, recvBuffer);
994  }
996 
1005  {
1006  return this->Communicator->AllGather(sendBuffer, recvBuffer);
1007  }
1008 
1017  const vtkMultiProcessStream& sendBuffer, std::vector<vtkMultiProcessStream>& recvBuffer)
1018  {
1019  return this->Communicator->AllGather(sendBuffer, recvBuffer);
1020  }
1021 
1023 
1026  int AllGatherV(const int* sendBuffer, int* recvBuffer, vtkIdType sendLength,
1027  vtkIdType* recvLengths, vtkIdType* offsets)
1028  {
1029  return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1030  }
1031  int AllGatherV(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType sendLength,
1032  vtkIdType* recvLengths, vtkIdType* offsets)
1033  {
1034  return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1035  }
1036  int AllGatherV(const short* sendBuffer, short* recvBuffer, vtkIdType sendLength,
1037  vtkIdType* recvLengths, vtkIdType* offsets)
1038  {
1039  return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1040  }
1041  int AllGatherV(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType sendLength,
1042  vtkIdType* recvLengths, vtkIdType* offsets)
1043  {
1044  return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1045  }
1046  int AllGatherV(const long* sendBuffer, long* recvBuffer, vtkIdType sendLength,
1047  vtkIdType* recvLengths, vtkIdType* offsets)
1048  {
1049  return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1050  }
1051  int AllGatherV(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType sendLength,
1052  vtkIdType* recvLengths, vtkIdType* offsets)
1053  {
1054  return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1055  }
1056  int AllGatherV(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType sendLength,
1057  vtkIdType* recvLengths, vtkIdType* offsets)
1058  {
1059  return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1060  }
1061  int AllGatherV(const char* sendBuffer, char* recvBuffer, vtkIdType sendLength,
1062  vtkIdType* recvLengths, vtkIdType* offsets)
1063  {
1064  return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1065  }
1066  int AllGatherV(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType sendLength,
1067  vtkIdType* recvLengths, vtkIdType* offsets)
1068  {
1069  return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1070  }
1071  int AllGatherV(const float* sendBuffer, float* recvBuffer, vtkIdType sendLength,
1072  vtkIdType* recvLengths, vtkIdType* offsets)
1073  {
1074  return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1075  }
1076  int AllGatherV(const double* sendBuffer, double* recvBuffer, vtkIdType sendLength,
1077  vtkIdType* recvLengths, vtkIdType* offsets)
1078  {
1079  return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1080  }
1081  int AllGatherV(const long long* sendBuffer, long long* recvBuffer, vtkIdType sendLength,
1082  vtkIdType* recvLengths, vtkIdType* offsets)
1083  {
1084  return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1085  }
1086  int AllGatherV(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
1087  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets)
1088  {
1089  return this->Communicator->AllGatherV(sendBuffer, recvBuffer, sendLength, recvLengths, offsets);
1090  }
1092  vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, vtkIdType* recvLengths, vtkIdType* offsets)
1093  {
1094  return this->Communicator->AllGatherV(sendBuffer, recvBuffer, recvLengths, offsets);
1095  }
1097 
1104  int AllGatherV(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer)
1105  {
1106  return this->Communicator->AllGatherV(sendBuffer, recvBuffer);
1107  }
1108 
1110 
1115  int Reduce(
1116  const int* sendBuffer, int* recvBuffer, vtkIdType length, int operation, int destProcessId)
1117  {
1118  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1119  }
1120  int Reduce(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length,
1121  int operation, int destProcessId)
1122  {
1123  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1124  }
1125  int Reduce(
1126  const short* sendBuffer, short* recvBuffer, vtkIdType length, int operation, int destProcessId)
1127  {
1128  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1129  }
1130  int Reduce(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
1131  int operation, int destProcessId)
1132  {
1133  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1134  }
1135  int Reduce(
1136  const long* sendBuffer, long* recvBuffer, vtkIdType length, int operation, int destProcessId)
1137  {
1138  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1139  }
1140  int Reduce(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length,
1141  int operation, int destProcessId)
1142  {
1143  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1144  }
1145  int Reduce(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length,
1146  int operation, int destProcessId)
1147  {
1148  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1149  }
1150  int Reduce(
1151  const char* sendBuffer, char* recvBuffer, vtkIdType length, int operation, int destProcessId)
1152  {
1153  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1154  }
1155  int Reduce(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length,
1156  int operation, int destProcessId)
1157  {
1158  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1159  }
1160  int Reduce(
1161  const float* sendBuffer, float* recvBuffer, vtkIdType length, int operation, int destProcessId)
1162  {
1163  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1164  }
1165  int Reduce(const double* sendBuffer, double* recvBuffer, vtkIdType length, int operation,
1166  int destProcessId)
1167  {
1168  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1169  }
1170  int Reduce(const long long* sendBuffer, long long* recvBuffer, vtkIdType length, int operation,
1171  int destProcessId)
1172  {
1173  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1174  }
1175  int Reduce(const unsigned long long* sendBuffer, unsigned long long* recvBuffer, vtkIdType length,
1176  int operation, int destProcessId)
1177  {
1178  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1179  }
1180  int Reduce(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int operation, int destProcessId)
1181  {
1182  return this->Communicator->Reduce(sendBuffer, recvBuffer, operation, destProcessId);
1183  }
1185 
1187 
1191  int Reduce(const int* sendBuffer, int* recvBuffer, vtkIdType length,
1192  vtkCommunicator::Operation* operation, int destProcessId)
1193  {
1194  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1195  }
1196  int Reduce(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length,
1197  vtkCommunicator::Operation* operation, int destProcessId)
1198  {
1199  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1200  }
1201  int Reduce(const short* sendBuffer, short* recvBuffer, vtkIdType length,
1202  vtkCommunicator::Operation* operation, int destProcessId)
1203  {
1204  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1205  }
1206  int Reduce(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
1207  vtkCommunicator::Operation* operation, int destProcessId)
1208  {
1209  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1210  }
1211  int Reduce(const long* sendBuffer, long* recvBuffer, vtkIdType length,
1212  vtkCommunicator::Operation* operation, int destProcessId)
1213  {
1214  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1215  }
1216  int Reduce(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length,
1217  vtkCommunicator::Operation* operation, int destProcessId)
1218  {
1219  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1220  }
1221  int Reduce(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length,
1222  vtkCommunicator::Operation* operation, int destProcessId)
1223  {
1224  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1225  }
1226  int Reduce(const char* sendBuffer, char* recvBuffer, vtkIdType length,
1227  vtkCommunicator::Operation* operation, int destProcessId)
1228  {
1229  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1230  }
1231  int Reduce(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length,
1232  vtkCommunicator::Operation* operation, int destProcessId)
1233  {
1234  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1235  }
1236  int Reduce(const float* sendBuffer, float* recvBuffer, vtkIdType length,
1237  vtkCommunicator::Operation* operation, int destProcessId)
1238  {
1239  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1240  }
1241  int Reduce(const double* sendBuffer, double* recvBuffer, vtkIdType length,
1242  vtkCommunicator::Operation* operation, int destProcessId)
1243  {
1244  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1245  }
1246  int Reduce(const long long* sendBuffer, long long* recvBuffer, vtkIdType length,
1247  vtkCommunicator::Operation* operation, int destProcessId)
1248  {
1249  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1250  }
1251  int Reduce(const unsigned long long* sendBuffer, unsigned long long* recvBuffer, vtkIdType length,
1252  vtkCommunicator::Operation* operation, int destProcessId)
1253  {
1254  return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId);
1255  }
1256  int Reduce(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer,
1257  vtkCommunicator::Operation* operation, int destProcessId)
1258  {
1259  return this->Communicator->Reduce(sendBuffer, recvBuffer, operation, destProcessId);
1260  }
1262 
1264 
1267  int AllReduce(const int* sendBuffer, int* recvBuffer, vtkIdType length, int operation)
1268  {
1269  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1270  }
1272  const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length, int operation)
1273  {
1274  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1275  }
1276  int AllReduce(const short* sendBuffer, short* recvBuffer, vtkIdType length, int operation)
1277  {
1278  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1279  }
1281  const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length, int operation)
1282  {
1283  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1284  }
1285  int AllReduce(const long* sendBuffer, long* recvBuffer, vtkIdType length, int operation)
1286  {
1287  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1288  }
1290  const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length, int operation)
1291  {
1292  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1293  }
1295  const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length, int operation)
1296  {
1297  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1298  }
1299  int AllReduce(const char* sendBuffer, char* recvBuffer, vtkIdType length, int operation)
1300  {
1301  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1302  }
1304  const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length, int operation)
1305  {
1306  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1307  }
1308  int AllReduce(const float* sendBuffer, float* recvBuffer, vtkIdType length, int operation)
1309  {
1310  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1311  }
1312  int AllReduce(const double* sendBuffer, double* recvBuffer, vtkIdType length, int operation)
1313  {
1314  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1315  }
1316  int AllReduce(const long long* sendBuffer, long long* recvBuffer, vtkIdType length, int operation)
1317  {
1318  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1319  }
1320  int AllReduce(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
1321  vtkIdType length, int operation)
1322  {
1323  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1324  }
1325  int AllReduce(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int operation)
1326  {
1327  return this->Communicator->AllReduce(sendBuffer, recvBuffer, operation);
1328  }
1330 
1332  const int* sendBuffer, int* recvBuffer, vtkIdType length, vtkCommunicator::Operation* operation)
1333  {
1334  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1335  }
1336  int AllReduce(const unsigned int* sendBuffer, unsigned int* recvBuffer, vtkIdType length,
1337  vtkCommunicator::Operation* operation)
1338  {
1339  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1340  }
1341  int AllReduce(const short* sendBuffer, short* recvBuffer, vtkIdType length,
1342  vtkCommunicator::Operation* operation)
1343  {
1344  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1345  }
1346  int AllReduce(const unsigned short* sendBuffer, unsigned short* recvBuffer, vtkIdType length,
1347  vtkCommunicator::Operation* operation)
1348  {
1349  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1350  }
1351  int AllReduce(const long* sendBuffer, long* recvBuffer, vtkIdType length,
1352  vtkCommunicator::Operation* operation)
1353  {
1354  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1355  }
1356  int AllReduce(const unsigned long* sendBuffer, unsigned long* recvBuffer, vtkIdType length,
1357  vtkCommunicator::Operation* operation)
1358  {
1359  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1360  }
1361  int AllReduce(const unsigned char* sendBuffer, unsigned char* recvBuffer, vtkIdType length,
1362  vtkCommunicator::Operation* operation)
1363  {
1364  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1365  }
1366  int AllReduce(const char* sendBuffer, char* recvBuffer, vtkIdType length,
1367  vtkCommunicator::Operation* operation)
1368  {
1369  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1370  }
1371  int AllReduce(const signed char* sendBuffer, signed char* recvBuffer, vtkIdType length,
1372  vtkCommunicator::Operation* operation)
1373  {
1374  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1375  }
1376  int AllReduce(const float* sendBuffer, float* recvBuffer, vtkIdType length,
1377  vtkCommunicator::Operation* operation)
1378  {
1379  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1380  }
1381  int AllReduce(const double* sendBuffer, double* recvBuffer, vtkIdType length,
1382  vtkCommunicator::Operation* operation)
1383  {
1384  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1385  }
1386  int AllReduce(const long long* sendBuffer, long long* recvBuffer, vtkIdType length,
1387  vtkCommunicator::Operation* operation)
1388  {
1389  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1390  }
1391  int AllReduce(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
1393  {
1394  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation);
1395  }
1397  vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, vtkCommunicator::Operation* operation)
1398  {
1399  return this->Communicator->AllReduce(sendBuffer, recvBuffer, operation);
1400  }
1401 
1403 
1406  int Reduce(const vtkBoundingBox& sendBuffer, vtkBoundingBox& recvBuffer, int destProcessId);
1407  int AllReduce(const vtkBoundingBox& sendBuffer, vtkBoundingBox& recvBuffer);
1409 
1411 
1414  int Reduce(
1415  vtkDataArraySelection* sendBuffer, vtkDataArraySelection* recvBuffer, int destProcessId);
1418 
1419  // Internally implemented RMI to break the process loop.
1420 
1421 protected:
1424 
1430  virtual void TriggerRMIInternal(
1431  int remoteProcessId, void* arg, int argLength, int rmiTag, bool propagate);
1432 
1434  void* SingleData;
1435 
1437 
1438  // This is a flag that can be used by the ports to break
1439  // their update loop. (same as ProcessRMIs)
1441 
1442  void ProcessRMI(int remoteProcessId, void* arg, int argLength, int rmiTag);
1443 
1444  // This method implements "GetGlobalController".
1445  // It needs to be virtual and static.
1447 
1448  // This flag can force deep copies during send.
1450 
1451  // This flag can be used to indicate that an MPI Broadcast will be used
1452  // when calling TriggerRMIOnAllChildren(), instead of the binary tree
1453  // propagation of the data to the satellite ranks from rank 0.
1455 
1457 
1458  // Note that since the communicators can be created differently
1459  // depending on the type of controller, the subclasses are
1460  // responsible of deleting them.
1462 
1463  // Communicator which is a copy of the current user
1464  // level communicator except the context; i.e. even if the tags
1465  // are the same, the RMI messages will not interfere with user
1466  // level messages.
1467  // Note that since the communicators can be created differently
1468  // depending on the type of controller, the subclasses are
1469  // responsible of deleting them.
1471 
1472 private:
1474  void operator=(const vtkMultiProcessController&) = delete;
1475 
1476  unsigned long RMICount;
1477 
1478  class vtkInternal;
1479  vtkInternal* Internal;
1480 };
1481 
1482 inline int vtkMultiProcessController::Send(vtkDataObject* data, int remoteProcessId, int tag)
1483 {
1484  if (this->Communicator)
1485  {
1486  return this->Communicator->Send(data, remoteProcessId, tag);
1487  }
1488  else
1489  {
1490  return 0;
1491  }
1492 }
1493 
1494 inline int vtkMultiProcessController::Send(vtkDataArray* data, int remoteProcessId, int tag)
1495 {
1496  if (this->Communicator)
1497  {
1498  return this->Communicator->Send(data, remoteProcessId, tag);
1499  }
1500  else
1501  {
1502  return 0;
1503  }
1504 }
1505 
1507  const int* data, vtkIdType length, int remoteProcessId, int tag)
1508 {
1509  if (this->Communicator)
1510  {
1511  return this->Communicator->Send(data, length, remoteProcessId, tag);
1512  }
1513  else
1514  {
1515  return 0;
1516  }
1517 }
1518 
1520  const short* data, vtkIdType length, int remoteProcessId, int tag)
1521 {
1522  if (this->Communicator)
1523  {
1524  return this->Communicator->Send(data, length, remoteProcessId, tag);
1525  }
1526  else
1527  {
1528  return 0;
1529  }
1530 }
1531 
1533  const unsigned short* data, vtkIdType length, int remoteProcessId, int tag)
1534 {
1535  if (this->Communicator)
1536  {
1537  return this->Communicator->Send(data, length, remoteProcessId, tag);
1538  }
1539  else
1540  {
1541  return 0;
1542  }
1543 }
1544 
1546  const unsigned int* data, vtkIdType length, int remoteProcessId, int tag)
1547 {
1548  if (this->Communicator)
1549  {
1550  return this->Communicator->Send(data, length, remoteProcessId, tag);
1551  }
1552  else
1553  {
1554  return 0;
1555  }
1556 }
1557 
1559  const unsigned long* data, vtkIdType length, int remoteProcessId, int tag)
1560 {
1561  if (this->Communicator)
1562  {
1563  return this->Communicator->Send(data, length, remoteProcessId, tag);
1564  }
1565  else
1566  {
1567  return 0;
1568  }
1569 }
1570 
1572  const long* data, vtkIdType length, int remoteProcessId, int tag)
1573 {
1574  if (this->Communicator)
1575  {
1576  return this->Communicator->Send(data, length, remoteProcessId, tag);
1577  }
1578  else
1579  {
1580  return 0;
1581  }
1582 }
1583 
1585  const signed char* data, vtkIdType length, int remoteProcessId, int tag)
1586 {
1587  if (this->Communicator)
1588  {
1589  return this->Communicator->Send(data, length, remoteProcessId, tag);
1590  }
1591  else
1592  {
1593  return 0;
1594  }
1595 }
1596 
1598  const char* data, vtkIdType length, int remoteProcessId, int tag)
1599 {
1600  if (this->Communicator)
1601  {
1602  return this->Communicator->Send(data, length, remoteProcessId, tag);
1603  }
1604  else
1605  {
1606  return 0;
1607  }
1608 }
1609 
1611  const unsigned char* data, vtkIdType length, int remoteProcessId, int tag)
1612 {
1613  if (this->Communicator)
1614  {
1615  return this->Communicator->Send(data, length, remoteProcessId, tag);
1616  }
1617  else
1618  {
1619  return 0;
1620  }
1621 }
1622 
1624  const float* data, vtkIdType length, int remoteProcessId, int tag)
1625 {
1626  if (this->Communicator)
1627  {
1628  return this->Communicator->Send(data, length, remoteProcessId, tag);
1629  }
1630  else
1631  {
1632  return 0;
1633  }
1634 }
1635 
1637  const double* data, vtkIdType length, int remoteProcessId, int tag)
1638 {
1639  if (this->Communicator)
1640  {
1641  return this->Communicator->Send(data, length, remoteProcessId, tag);
1642  }
1643  else
1644  {
1645  return 0;
1646  }
1647 }
1648 
1650  const long long* data, vtkIdType length, int remoteProcessId, int tag)
1651 {
1652  if (this->Communicator)
1653  {
1654  return this->Communicator->Send(data, length, remoteProcessId, tag);
1655  }
1656  else
1657  {
1658  return 0;
1659  }
1660 }
1661 
1663  const unsigned long long* data, vtkIdType length, int remoteProcessId, int tag)
1664 {
1665  if (this->Communicator)
1666  {
1667  return this->Communicator->Send(data, length, remoteProcessId, tag);
1668  }
1669  else
1670  {
1671  return 0;
1672  }
1673 }
1674 
1676  const vtkMultiProcessStream& stream, int remoteId, int tag)
1677 {
1678  if (this->Communicator)
1679  {
1680  return this->Communicator->Send(stream, remoteId, tag);
1681  }
1682  return 0;
1683 }
1684 
1685 inline int vtkMultiProcessController::Receive(vtkDataObject* data, int remoteProcessId, int tag)
1686 {
1687  if (this->Communicator)
1688  {
1689  return this->Communicator->Receive(data, remoteProcessId, tag);
1690  }
1691  else
1692  {
1693  return 0;
1694  }
1695 }
1696 
1698 {
1699  if (this->Communicator)
1700  {
1701  return this->Communicator->ReceiveDataObject(remoteProcessId, tag);
1702  }
1703  else
1704  {
1705  return nullptr;
1706  }
1707 }
1708 
1709 inline int vtkMultiProcessController::Receive(vtkDataArray* data, int remoteProcessId, int tag)
1710 {
1711  if (this->Communicator)
1712  {
1713  return this->Communicator->Receive(data, remoteProcessId, tag);
1714  }
1715  else
1716  {
1717  return 0;
1718  }
1719 }
1720 
1722  int* data, vtkIdType length, int remoteProcessId, int tag)
1723 {
1724  if (this->Communicator)
1725  {
1726  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1727  }
1728  else
1729  {
1730  return 0;
1731  }
1732 }
1733 
1735  unsigned int* data, vtkIdType length, int remoteProcessId, int tag)
1736 {
1737  if (this->Communicator)
1738  {
1739  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1740  }
1741  else
1742  {
1743  return 0;
1744  }
1745 }
1746 
1748  short* data, vtkIdType length, int remoteProcessId, int tag)
1749 {
1750  if (this->Communicator)
1751  {
1752  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1753  }
1754  else
1755  {
1756  return 0;
1757  }
1758 }
1759 
1761  unsigned short* data, vtkIdType length, int remoteProcessId, int tag)
1762 {
1763  if (this->Communicator)
1764  {
1765  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1766  }
1767  else
1768  {
1769  return 0;
1770  }
1771 }
1772 
1774  long* data, vtkIdType length, int remoteProcessId, int tag)
1775 {
1776  if (this->Communicator)
1777  {
1778  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1779  }
1780  else
1781  {
1782  return 0;
1783  }
1784 }
1785 
1787  unsigned long* data, vtkIdType length, int remoteProcessId, int tag)
1788 {
1789  if (this->Communicator)
1790  {
1791  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1792  }
1793  else
1794  {
1795  return 0;
1796  }
1797 }
1798 
1800  char* data, vtkIdType length, int remoteProcessId, int tag)
1801 {
1802  if (this->Communicator)
1803  {
1804  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1805  }
1806  else
1807  {
1808  return 0;
1809  }
1810 }
1811 
1813  unsigned char* data, vtkIdType length, int remoteProcessId, int tag)
1814 {
1815  if (this->Communicator)
1816  {
1817  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1818  }
1819  else
1820  {
1821  return 0;
1822  }
1823 }
1824 
1826  signed char* data, vtkIdType length, int remoteProcessId, int tag)
1827 {
1828  if (this->Communicator)
1829  {
1830  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1831  }
1832  else
1833  {
1834  return 0;
1835  }
1836 }
1837 
1839  float* data, vtkIdType length, int remoteProcessId, int tag)
1840 {
1841  if (this->Communicator)
1842  {
1843  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1844  }
1845  else
1846  {
1847  return 0;
1848  }
1849 }
1850 
1852  double* data, vtkIdType length, int remoteProcessId, int tag)
1853 {
1854  if (this->Communicator)
1855  {
1856  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1857  }
1858  else
1859  {
1860  return 0;
1861  }
1862 }
1863 
1865  long long* data, vtkIdType length, int remoteProcessId, int tag)
1866 {
1867  if (this->Communicator)
1868  {
1869  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1870  }
1871  else
1872  {
1873  return 0;
1874  }
1875 }
1876 
1878  unsigned long long* data, vtkIdType length, int remoteProcessId, int tag)
1879 {
1880  if (this->Communicator)
1881  {
1882  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1883  }
1884  else
1885  {
1886  return 0;
1887  }
1888 }
1889 
1890 inline int vtkMultiProcessController::Receive(vtkMultiProcessStream& stream, int remoteId, int tag)
1891 {
1892  if (this->Communicator)
1893  {
1894  return this->Communicator->Receive(stream, remoteId, tag);
1895  }
1896  return 0;
1897 }
1898 
1900 {
1901  if (this->Communicator)
1902  {
1903  this->Communicator->Barrier();
1904  }
1905 }
1906 
1908 {
1909  if (this->Communicator)
1910  {
1911  return this->Communicator->GetCount();
1912  }
1913  return 0;
1914 }
1915 
1917 #endif
Fast, simple class for representing and operating on 3D bounds.
create and manipulate ordered lists of objects
Definition: vtkCollection.h:57
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:166
general representation of visualization data
abstract class to specify dataset behavior
Definition: vtkDataSet.h:174
dynamic, self-adjusting array of vtkIdType
topologically and geometrically regular array of data
Definition: vtkImageData.h:164
a simple class to control print indentation
Definition: vtkIndent.h:120
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.
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.
stream used to pass data across processes using vtkMultiProcessController.
abstract base class for most VTK objects
Definition: vtkObject.h:83
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:51
@ vector
Definition: vtkX3D.h:249
@ length
Definition: vtkX3D.h:405
@ index
Definition: vtkX3D.h:258
@ data
Definition: vtkX3D.h:327
void(* vtkProcessFunctionType)(vtkMultiProcessController *controller, void *userData)
void(* vtkRMIFunctionType)(void *localArg, void *remoteArg, int remoteArgLength, int remoteProcessId)
int vtkIdType
Definition: vtkType.h:326