VTK
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 "vtkParallelCoreModule.h" // For export macro
59 #include "vtkObject.h"
60 
61 #include "vtkCommunicator.h" // Needed for direct access to communicator
62 
63 class vtkCollection;
64 class vtkDataObject;
65 class vtkDataSet;
66 class vtkImageData;
69 class vtkOutputWindow;
70 class vtkProcessGroup;
71 class vtkProcess;
72 
73 // The type of function that gets called when new processes are initiated.
75  void *userData);
76 
77 // The type of function that gets called when an RMI is triggered.
78 typedef void (*vtkRMIFunctionType)(void *localArg,
79  void *remoteArg, int remoteArgLength,
80  int remoteProcessId);
81 
82 class VTKPARALLELCORE_EXPORT vtkMultiProcessController : public vtkObject
83 {
84 public:
86  void PrintSelf(ostream& os, vtkIndent indent) override;
87 
93  virtual void Initialize(int* vtkNotUsed(argc), char*** vtkNotUsed(argv))=0;
94 
100  virtual void Initialize(int* vtkNotUsed(argc), char*** vtkNotUsed(argv),
101  int initializedExternally)=0;
102 
108  virtual void Finalize()=0;
109 
115  virtual void Finalize(int finalizedExternally)=0;
116 
118 
123  void SetNumberOfProcesses(int num);
124  int GetNumberOfProcesses();
126 
133  void SetSingleMethod(vtkProcessFunctionType, void *data);
134 
140  void SetSingleProcessObject(vtkProcess *p);
141 
147  virtual void SingleMethodExecute() = 0;
148 
155  void SetMultipleMethod(int index, vtkProcessFunctionType, void *data);
156 
162  virtual void MultipleMethodExecute() = 0;
163 
167  int GetLocalProcessId();
168 
175  static vtkMultiProcessController *GetGlobalController();
176 
182  virtual void CreateOutputWindow() = 0;
183 
195  virtual vtkMultiProcessController *CreateSubController(
196  vtkProcessGroup *group);
197 
208  virtual vtkMultiProcessController *PartitionController(int localColor,
209  int localKey);
210 
211  //------------------ RMIs --------------------
212 
225  virtual unsigned long AddRMI(vtkRMIFunctionType, void *localArg, int tag);
226 
230  virtual int RemoveFirstRMI(int tag);
231 
236  virtual int RemoveRMI(unsigned long id);
237 
241  virtual void RemoveRMI(vtkRMIFunctionType f, void *arg, int tag)
242  {(void)f; (void)arg; (void)tag; vtkErrorMacro("RemoveRMI Not Implemented Yet");};
243 
249  virtual unsigned long AddRMICallback(vtkRMIFunctionType, void* localArg, int tag);
250 
256  virtual void RemoveAllRMICallbacks(int tag);
257 
261  virtual bool RemoveRMICallback(unsigned long id);
262 
266  void TriggerRMI(int remoteProcessId, void *arg, int argLength, int tag);
267 
272  void TriggerBreakRMIs();
273 
277  void TriggerRMI(int remoteProcessId, const char *arg, int tag)
278  { this->TriggerRMI(remoteProcessId, (void*)arg,
279  static_cast<int>(strlen(arg))+1, tag); }
280 
284  void TriggerRMI(int remoteProcessId, int tag)
285  { this->TriggerRMI(remoteProcessId, nullptr, 0, tag); }
286 
288 
296  void TriggerRMIOnAllChildren(void *arg, int argLength, int tag);
297  void TriggerRMIOnAllChildren(const char *arg, int tag)
298  {
299  this->TriggerRMIOnAllChildren(
300  (void*)arg, static_cast<int>(strlen(arg))+1, tag);
301  }
303  {
304  this->TriggerRMIOnAllChildren(nullptr, 0, tag);
305  }
306  void BroadcastTriggerRMIOnAllChildren(void* arg, int argLength, int tag);
308 
310 
321  int ProcessRMIs(int reportErrors, int dont_loop = 0);
322  int ProcessRMIs();
323  int BroadcastProcessRMIs(int reportErrors, int dont_loop=0);
325 
327 
332  vtkSetMacro(BreakFlag, int);
333  vtkGetMacro(BreakFlag, int);
335 
337 
342  vtkSetMacro(BroadcastTriggerRMI,bool);
343  vtkGetMacro(BroadcastTriggerRMI,bool);
344  vtkBooleanMacro(BroadcastTriggerRMI,bool);
346 
348 
352  vtkGetObjectMacro(Communicator, vtkCommunicator);
354 
358  static int GetBreakRMITag() { return BREAK_RMI_TAG; }
359  static int GetRMITag() { return RMI_TAG; }
360  static int GetRMIArgTag() { return RMI_ARG_TAG; }
361 
362  enum Errors
363  {
366  RMI_ARG_ERROR
367  };
368 
369  enum Consts
370  {
371  ANY_SOURCE = -1,
372  INVALID_SOURCE = -2
373  };
374 
375  enum Tags
376  {
377  RMI_TAG = 1,
378  RMI_ARG_TAG = 2,
379  BREAK_RMI_TAG = 3,
380  XML_WRITER_DATA_INFO = 4
381  };
382 
386  void Barrier();
387 
388  static void SetGlobalController(vtkMultiProcessController *controller);
389 
390  //------------------ Communication --------------------
391 
393 
400  int Send(const int* data, vtkIdType length, int remoteProcessId, int tag);
401  int Send(const short* data, vtkIdType length, int remoteProcessId, int tag);
402  int Send(const unsigned short* data, vtkIdType length, int remoteProcessId, int tag);
403  int Send(const unsigned int* data, vtkIdType length, int remoteProcessId, int tag);
404  int Send(const unsigned long* data, vtkIdType length, int remoteProcessId,
405  int tag);
406  int Send(const long* data, vtkIdType length, int remoteProcessId,
407  int tag);
408  int Send(const signed char* data, vtkIdType length, int remoteProcessId, int tag);
409  int Send(const char* data, vtkIdType length, int remoteProcessId, int tag);
410  int Send(const unsigned char* data, vtkIdType length, int remoteProcessId, int tag);
411  int Send(const float* data, vtkIdType length, int remoteProcessId, int tag);
412  int Send(const double* data, vtkIdType length, int remoteProcessId, int tag);
413  int Send(const long long* data, vtkIdType length, int remoteProcessId, int tag);
414  int Send(const unsigned long long* data, vtkIdType length, int remoteProcessId, int tag);
415  int Send(vtkDataObject *data, int remoteId, int tag);
416  int Send(vtkDataArray *data, int remoteId, int tag);
418 
426  int Send(const vtkMultiProcessStream& stream, int remoteId, int tag);
427 
429 
438  int Receive(int* data, vtkIdType maxlength, int remoteProcessId, int tag);
439  int Receive(unsigned int* data, vtkIdType maxlength, int remoteProcessId, int tag);
440  int Receive(short* data, vtkIdType maxlength, int remoteProcessId, int tag);
441  int Receive(unsigned short* data, vtkIdType maxlength, int remoteProcessId, int tag);
442  int Receive(long* data, vtkIdType maxlength, int remoteProcessId, int tag);
443  int Receive(unsigned long* data, vtkIdType maxlength, int remoteProcessId,
444  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 
474  //---------------------- Collective Operations ----------------------
475 
477 
482  int Broadcast(int *data, vtkIdType length, int srcProcessId) {
483  return this->Communicator->Broadcast(data, length, srcProcessId);
484  }
485  int Broadcast(unsigned int *data, vtkIdType length, int srcProcessId) {
486  return this->Communicator->Broadcast(data, length, srcProcessId);
487  }
488  int Broadcast(short *data, vtkIdType length, int srcProcessId) {
489  return this->Communicator->Broadcast(data, length, srcProcessId);
490  }
491  int Broadcast(unsigned short *data, vtkIdType length, int srcProcessId) {
492  return this->Communicator->Broadcast(data, length, srcProcessId);
493  }
494  int Broadcast(long *data, vtkIdType length, int srcProcessId) {
495  return this->Communicator->Broadcast(data, length, srcProcessId);
496  }
497  int Broadcast(unsigned long *data, vtkIdType length, int srcProcessId) {
498  return this->Communicator->Broadcast(data, length, srcProcessId);
499  }
500  int Broadcast(unsigned char *data, vtkIdType length, int srcProcessId) {
501  return this->Communicator->Broadcast(data, length, srcProcessId);
502  }
503  int Broadcast(char *data, vtkIdType length, int srcProcessId) {
504  return this->Communicator->Broadcast(data, length, srcProcessId);
505  }
506  int Broadcast(signed char *data, vtkIdType length, int srcProcessId) {
507  return this->Communicator->Broadcast(data, length, srcProcessId);
508  }
509  int Broadcast(float *data, vtkIdType length, int srcProcessId) {
510  return this->Communicator->Broadcast(data, length, srcProcessId);
511  }
512  int Broadcast(double *data, vtkIdType length, int srcProcessId) {
513  return this->Communicator->Broadcast(data, length, srcProcessId);
514  }
515  int Broadcast(long long *data, vtkIdType length, int srcProcessId) {
516  return this->Communicator->Broadcast(data, length, srcProcessId);
517  }
518  int Broadcast(unsigned long long *data, vtkIdType length, int srcProcessId) {
519  return this->Communicator->Broadcast(data, length, srcProcessId);
520  }
521  int Broadcast(vtkDataObject *data, int srcProcessId) {
522  return this->Communicator->Broadcast(data, srcProcessId);
523  }
524  int Broadcast(vtkDataArray *data, int srcProcessId) {
525  return this->Communicator->Broadcast(data, srcProcessId);
526  }
528 
529  int Broadcast(vtkMultiProcessStream& stream, int srcProcessId) {
530  return this->Communicator->Broadcast(stream, srcProcessId);
531  }
532 
534 
543  int Gather(const int *sendBuffer, int *recvBuffer,
544  vtkIdType length, int destProcessId) {
545  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
546  destProcessId);
547  }
548  int Gather(const unsigned int *sendBuffer, unsigned int *recvBuffer,
549  vtkIdType length, int destProcessId) {
550  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
551  destProcessId);
552  }
553  int Gather(const short *sendBuffer, short *recvBuffer,
554  vtkIdType length, int destProcessId) {
555  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
556  destProcessId);
557  }
558  int Gather(const unsigned short *sendBuffer, unsigned short *recvBuffer,
559  vtkIdType length, int destProcessId) {
560  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
561  destProcessId);
562  }
563  int Gather(const long *sendBuffer, long *recvBuffer,
564  vtkIdType length, int destProcessId) {
565  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
566  destProcessId);
567  }
568  int Gather(const unsigned long *sendBuffer, unsigned long *recvBuffer,
569  vtkIdType length, int destProcessId) {
570  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
571  destProcessId);
572  }
573  int Gather(const unsigned char *sendBuffer, unsigned char *recvBuffer,
574  vtkIdType length, int destProcessId) {
575  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
576  destProcessId);
577  }
578  int Gather(const char *sendBuffer, char *recvBuffer,
579  vtkIdType length, int destProcessId) {
580  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
581  destProcessId);
582  }
583  int Gather(const signed char *sendBuffer, signed char *recvBuffer,
584  vtkIdType length, int destProcessId) {
585  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
586  destProcessId);
587  }
588  int Gather(const float *sendBuffer, float *recvBuffer,
589  vtkIdType length, int destProcessId) {
590  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
591  destProcessId);
592  }
593  int Gather(const double *sendBuffer, double *recvBuffer,
594  vtkIdType length, int destProcessId) {
595  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
596  destProcessId);
597  }
598  int Gather(const long long *sendBuffer, long long *recvBuffer,
599  vtkIdType length, int destProcessId) {
600  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
601  destProcessId);
602  }
603  int Gather(const unsigned long long *sendBuffer, unsigned long long *recvBuffer,
604  vtkIdType length, int destProcessId) {
605  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
606  destProcessId);
607  }
608  int Gather(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
609  int destProcessId) {
610  return this->Communicator->Gather(sendBuffer, recvBuffer, destProcessId);
611  }
613 
626  int Gather(vtkDataObject* sendBuffer,
628  int destProcessId)
629  {
630  return this->Communicator->Gather(sendBuffer, recvBuffer, destProcessId);
631  }
632 
634 
645  int GatherV(const int* sendBuffer, int* recvBuffer,
646  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
647  int destProcessId) {
648  return this->Communicator->GatherV(sendBuffer, recvBuffer,
649  sendLength, recvLengths,
650  offsets, destProcessId);
651  }
652  int GatherV(const unsigned int* sendBuffer, unsigned int* recvBuffer,
653  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
654  int destProcessId) {
655  return this->Communicator->GatherV(sendBuffer, recvBuffer,
656  sendLength, recvLengths,
657  offsets, destProcessId);
658  }
659  int GatherV(const short* sendBuffer, short* recvBuffer,
660  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
661  int destProcessId) {
662  return this->Communicator->GatherV(sendBuffer, recvBuffer,
663  sendLength, recvLengths,
664  offsets, destProcessId);
665  }
666  int GatherV(const unsigned short* sendBuffer, unsigned short* recvBuffer,
667  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
668  int destProcessId) {
669  return this->Communicator->GatherV(sendBuffer, recvBuffer,
670  sendLength, recvLengths,
671  offsets, destProcessId);
672  }
673  int GatherV(const long* sendBuffer, long* recvBuffer,
674  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
675  int destProcessId) {
676  return this->Communicator->GatherV(sendBuffer, recvBuffer,
677  sendLength, recvLengths,
678  offsets, destProcessId);
679  }
680  int GatherV(const unsigned long* sendBuffer, unsigned long* recvBuffer,
681  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
682  int destProcessId) {
683  return this->Communicator->GatherV(sendBuffer, recvBuffer,
684  sendLength, recvLengths,
685  offsets, destProcessId);
686  }
687  int GatherV(const unsigned char* sendBuffer, unsigned char* recvBuffer,
688  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
689  int destProcessId) {
690  return this->Communicator->GatherV(sendBuffer, recvBuffer,
691  sendLength, recvLengths,
692  offsets, destProcessId);
693  }
694  int GatherV(const char* sendBuffer, char* recvBuffer,
695  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
696  int destProcessId) {
697  return this->Communicator->GatherV(sendBuffer, recvBuffer,
698  sendLength, recvLengths,
699  offsets, destProcessId);
700  }
701  int GatherV(const signed char* sendBuffer, signed char* recvBuffer,
702  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
703  int destProcessId) {
704  return this->Communicator->GatherV(sendBuffer, recvBuffer,
705  sendLength, recvLengths,
706  offsets, destProcessId);
707  }
708  int GatherV(const float* sendBuffer, float* recvBuffer,
709  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
710  int destProcessId) {
711  return this->Communicator->GatherV(sendBuffer, recvBuffer,
712  sendLength, recvLengths,
713  offsets, destProcessId);
714  }
715  int GatherV(const double* sendBuffer, double* recvBuffer,
716  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
717  int destProcessId) {
718  return this->Communicator->GatherV(sendBuffer, recvBuffer,
719  sendLength, recvLengths,
720  offsets, destProcessId);
721  }
722  int GatherV(const long long* sendBuffer, long long* recvBuffer,
723  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
724  int destProcessId) {
725  return this->Communicator->GatherV(sendBuffer, recvBuffer,
726  sendLength, recvLengths,
727  offsets, destProcessId);
728  }
729  int GatherV(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
730  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
731  int destProcessId) {
732  return this->Communicator->GatherV(sendBuffer, recvBuffer,
733  sendLength, recvLengths,
734  offsets, destProcessId);
735  }
737 
738  int GatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
739  vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId) {
740  return this->Communicator->GatherV(sendBuffer, recvBuffer,
741  recvLengths, offsets,
742  destProcessId);
743  }
744  int GatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
745  vtkIdTypeArray* recvLengths,
746  vtkIdTypeArray* offsets,
747  int destProcessId)
748  {
749  return this->Communicator->GatherV(sendBuffer, recvBuffer,
750  recvLengths, offsets, destProcessId);
751  }
752 
753 
755 
761  int GatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
762  int destProcessId) {
763  return this->Communicator->GatherV(sendBuffer, recvBuffer, destProcessId);
764  }
766  int destProcessId)
767  {
768  return this->Communicator->GatherV(sendData, recvData, destProcessId);
769  }
771 
773 
780  int Scatter(const int *sendBuffer, int *recvBuffer,
781  vtkIdType length, int srcProcessId) {
782  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
783  srcProcessId);
784  }
785  int Scatter(const unsigned int *sendBuffer, unsigned int *recvBuffer,
786  vtkIdType length, int srcProcessId) {
787  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
788  srcProcessId);
789  }
790  int Scatter(const short *sendBuffer, short *recvBuffer,
791  vtkIdType length, int srcProcessId) {
792  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
793  srcProcessId);
794  }
795  int Scatter(const unsigned short *sendBuffer, unsigned short *recvBuffer,
796  vtkIdType length, int srcProcessId) {
797  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
798  srcProcessId);
799  }
800  int Scatter(const long *sendBuffer, long *recvBuffer,
801  vtkIdType length, int srcProcessId) {
802  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
803  srcProcessId);
804  }
805  int Scatter(const unsigned long *sendBuffer, unsigned long *recvBuffer,
806  vtkIdType length, int srcProcessId) {
807  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
808  srcProcessId);
809  }
810  int Scatter(const unsigned char *sendBuffer, unsigned char *recvBuffer,
811  vtkIdType length, int srcProcessId) {
812  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
813  srcProcessId);
814  }
815  int Scatter(const char *sendBuffer, char *recvBuffer,
816  vtkIdType length, int srcProcessId) {
817  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
818  srcProcessId);
819  }
820  int Scatter(const signed char *sendBuffer, signed char *recvBuffer,
821  vtkIdType length, int srcProcessId) {
822  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
823  srcProcessId);
824  }
825  int Scatter(const float *sendBuffer, float *recvBuffer,
826  vtkIdType length, int srcProcessId) {
827  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
828  srcProcessId);
829  }
830  int Scatter(const double *sendBuffer, double *recvBuffer,
831  vtkIdType length, int srcProcessId) {
832  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
833  srcProcessId);
834  }
835  int Scatter(const long long *sendBuffer, long long *recvBuffer,
836  vtkIdType length, int srcProcessId) {
837  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
838  srcProcessId);
839  }
840  int Scatter(const unsigned long long *sendBuffer, unsigned long long *recvBuffer,
841  vtkIdType length, int srcProcessId) {
842  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
843  srcProcessId);
844  }
845  int Scatter(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
846  int srcProcessId) {
847  return this->Communicator->Scatter(sendBuffer, recvBuffer, srcProcessId);
848  }
850 
852 
859  int ScatterV(const int *sendBuffer, int *recvBuffer,
860  vtkIdType *sendLengths, vtkIdType *offsets,
861  vtkIdType recvLength, int srcProcessId) {
862  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
863  sendLengths, offsets, recvLength,
864  srcProcessId);
865  }
866  int ScatterV(const unsigned int *sendBuffer, unsigned int *recvBuffer,
867  vtkIdType *sendLengths, vtkIdType *offsets,
868  vtkIdType recvLength, int srcProcessId) {
869  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
870  sendLengths, offsets, recvLength,
871  srcProcessId);
872  }
873  int ScatterV(const short *sendBuffer, short *recvBuffer,
874  vtkIdType *sendLengths, vtkIdType *offsets,
875  vtkIdType recvLength, int srcProcessId) {
876  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
877  sendLengths, offsets, recvLength,
878  srcProcessId);
879  }
880  int ScatterV(const unsigned short *sendBuffer, unsigned short *recvBuffer,
881  vtkIdType *sendLengths, vtkIdType *offsets,
882  vtkIdType recvLength, int srcProcessId) {
883  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
884  sendLengths, offsets, recvLength,
885  srcProcessId);
886  }
887  int ScatterV(const long *sendBuffer, long *recvBuffer,
888  vtkIdType *sendLengths, vtkIdType *offsets,
889  vtkIdType recvLength, int srcProcessId) {
890  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
891  sendLengths, offsets, recvLength,
892  srcProcessId);
893  }
894  int ScatterV(const unsigned long *sendBuffer, unsigned long *recvBuffer,
895  vtkIdType *sendLengths, vtkIdType *offsets,
896  vtkIdType recvLength, int srcProcessId) {
897  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
898  sendLengths, offsets, recvLength,
899  srcProcessId);
900  }
901  int ScatterV(const unsigned char *sendBuffer, unsigned char *recvBuffer,
902  vtkIdType *sendLengths, vtkIdType *offsets,
903  vtkIdType recvLength, int srcProcessId) {
904  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
905  sendLengths, offsets, recvLength,
906  srcProcessId);
907  }
908  int ScatterV(const char *sendBuffer, char *recvBuffer,
909  vtkIdType *sendLengths, vtkIdType *offsets,
910  vtkIdType recvLength, int srcProcessId) {
911  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
912  sendLengths, offsets, recvLength,
913  srcProcessId);
914  }
915  int ScatterV(const signed char *sendBuffer, signed char *recvBuffer,
916  vtkIdType *sendLengths, vtkIdType *offsets,
917  vtkIdType recvLength, int srcProcessId) {
918  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
919  sendLengths, offsets, recvLength,
920  srcProcessId);
921  }
922  int ScatterV(const float *sendBuffer, float *recvBuffer,
923  vtkIdType *sendLengths, vtkIdType *offsets,
924  vtkIdType recvLength, int srcProcessId) {
925  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
926  sendLengths, offsets, recvLength,
927  srcProcessId);
928  }
929  int ScatterV(const double *sendBuffer, double *recvBuffer,
930  vtkIdType *sendLengths, vtkIdType *offsets,
931  vtkIdType recvLength, int srcProcessId) {
932  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
933  sendLengths, offsets, recvLength,
934  srcProcessId);
935  }
936  int ScatterV(const long long *sendBuffer, long long *recvBuffer,
937  vtkIdType *sendLengths, vtkIdType *offsets,
938  vtkIdType recvLength, int srcProcessId) {
939  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
940  sendLengths, offsets, recvLength,
941  srcProcessId);
942  }
943  int ScatterV(const unsigned long long *sendBuffer, unsigned long long *recvBuffer,
944  vtkIdType *sendLengths, vtkIdType *offsets,
945  vtkIdType recvLength, int srcProcessId) {
946  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
947  sendLengths, offsets, recvLength,
948  srcProcessId);
949  }
951 
953 
956  int AllGather(const int *sendBuffer, int *recvBuffer, vtkIdType length) {
957  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
958  }
959  int AllGather(const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length) {
960  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
961  }
962  int AllGather(const short *sendBuffer, short *recvBuffer, vtkIdType length) {
963  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
964  }
965  int AllGather(const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length) {
966  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
967  }
968  int AllGather(const long *sendBuffer, long *recvBuffer, vtkIdType length) {
969  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
970  }
971  int AllGather(const unsigned long *sendBuffer,
972  unsigned long *recvBuffer, vtkIdType length) {
973  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
974  }
975  int AllGather(const unsigned char *sendBuffer,
976  unsigned char *recvBuffer, vtkIdType length) {
977  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
978  }
979  int AllGather(const char *sendBuffer, char *recvBuffer, vtkIdType length) {
980  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
981  }
982  int AllGather(const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length) {
983  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
984  }
985  int AllGather(const float *sendBuffer, float *recvBuffer, vtkIdType length) {
986  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
987  }
988  int AllGather(const double *sendBuffer,
989  double *recvBuffer, vtkIdType length) {
990  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
991  }
992  int AllGather(const long long *sendBuffer, long long *recvBuffer, vtkIdType length) {
993  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
994  }
995  int AllGather(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length) {
996  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
997  }
998  int AllGather(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer) {
999  return this->Communicator->AllGather(sendBuffer, recvBuffer);
1000  }
1002 
1004 
1007  int AllGatherV(const int* sendBuffer, int* recvBuffer,
1008  vtkIdType sendLength, vtkIdType* recvLengths,
1009  vtkIdType* offsets) {
1010  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
1011  sendLength, recvLengths,
1012  offsets);
1013  }
1014  int AllGatherV(const unsigned int* sendBuffer, unsigned int* recvBuffer,
1015  vtkIdType sendLength, vtkIdType* recvLengths,
1016  vtkIdType* offsets) {
1017  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
1018  sendLength, recvLengths,
1019  offsets);
1020  }
1021  int AllGatherV(const short* sendBuffer, short* recvBuffer,
1022  vtkIdType sendLength, vtkIdType* recvLengths,
1023  vtkIdType* offsets) {
1024  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
1025  sendLength, recvLengths,
1026  offsets);
1027  }
1028  int AllGatherV(const unsigned short* sendBuffer, unsigned short* recvBuffer,
1029  vtkIdType sendLength, vtkIdType* recvLengths,
1030  vtkIdType* offsets) {
1031  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
1032  sendLength, recvLengths,
1033  offsets);
1034  }
1035  int AllGatherV(const long* sendBuffer, long* recvBuffer,
1036  vtkIdType sendLength, vtkIdType* recvLengths,
1037  vtkIdType* offsets) {
1038  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
1039  sendLength, recvLengths,
1040  offsets);
1041  }
1042  int AllGatherV(const unsigned long* sendBuffer, unsigned long* recvBuffer,
1043  vtkIdType sendLength, vtkIdType* recvLengths,
1044  vtkIdType* offsets) {
1045  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
1046  sendLength, recvLengths,
1047  offsets);
1048  }
1049  int AllGatherV(const unsigned char* sendBuffer, unsigned char* recvBuffer,
1050  vtkIdType sendLength, vtkIdType* recvLengths,
1051  vtkIdType* offsets) {
1052  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
1053  sendLength, recvLengths,
1054  offsets);
1055  }
1056  int AllGatherV(const char* sendBuffer, char* recvBuffer,
1057  vtkIdType sendLength, vtkIdType* recvLengths,
1058  vtkIdType* offsets) {
1059  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
1060  sendLength, recvLengths,
1061  offsets);
1062  }
1063  int AllGatherV(const signed char* sendBuffer, signed char* recvBuffer,
1064  vtkIdType sendLength, vtkIdType* recvLengths,
1065  vtkIdType* offsets) {
1066  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
1067  sendLength, recvLengths,
1068  offsets);
1069  }
1070  int AllGatherV(const float* sendBuffer, float* recvBuffer,
1071  vtkIdType sendLength, vtkIdType* recvLengths,
1072  vtkIdType* offsets) {
1073  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
1074  sendLength, recvLengths,
1075  offsets);
1076  }
1077  int AllGatherV(const double* sendBuffer, double* recvBuffer,
1078  vtkIdType sendLength, vtkIdType* recvLengths,
1079  vtkIdType* offsets) {
1080  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
1081  sendLength, recvLengths,
1082  offsets);
1083  }
1084  int AllGatherV(const long long* sendBuffer, long long* recvBuffer,
1085  vtkIdType sendLength, vtkIdType* recvLengths,
1086  vtkIdType* offsets) {
1087  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
1088  sendLength, recvLengths,
1089  offsets);
1090  }
1091  int AllGatherV(const unsigned long long* sendBuffer, unsigned long long* recvBuffer,
1092  vtkIdType sendLength, vtkIdType* recvLengths,
1093  vtkIdType* offsets) {
1094  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
1095  sendLength, recvLengths,
1096  offsets);
1097  }
1098  int AllGatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
1099  vtkIdType *recvLengths, vtkIdType *offsets) {
1100  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
1101  recvLengths, offsets);
1102  }
1104 
1111  int AllGatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer) {
1112  return this->Communicator->AllGatherV(sendBuffer, recvBuffer);
1113  }
1114 
1116 
1121  int Reduce(const int *sendBuffer, int *recvBuffer,
1122  vtkIdType length, int operation, int destProcessId) {
1123  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
1124  operation, destProcessId);
1125  }
1126  int Reduce(const unsigned int *sendBuffer, unsigned int *recvBuffer,
1127  vtkIdType length, int operation, int destProcessId) {
1128  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
1129  operation, destProcessId);
1130  }
1131  int Reduce(const short *sendBuffer, short *recvBuffer,
1132  vtkIdType length, int operation, int destProcessId) {
1133  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
1134  operation, destProcessId);
1135  }
1136  int Reduce(const unsigned short *sendBuffer, unsigned short *recvBuffer,
1137  vtkIdType length, int operation, int destProcessId) {
1138  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
1139  operation, destProcessId);
1140  }
1141  int Reduce(const long *sendBuffer, long *recvBuffer,
1142  vtkIdType length, int operation, int destProcessId) {
1143  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
1144  operation, destProcessId);
1145  }
1146  int Reduce(const unsigned long *sendBuffer, unsigned long *recvBuffer,
1147  vtkIdType length, int operation, int destProcessId) {
1148  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
1149  operation, destProcessId);
1150  }
1151  int Reduce(const unsigned char *sendBuffer, unsigned char *recvBuffer,
1152  vtkIdType length, int operation, int destProcessId) {
1153  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
1154  operation, destProcessId);
1155  }
1156  int Reduce(const char *sendBuffer, char *recvBuffer,
1157  vtkIdType length, int operation, int destProcessId) {
1158  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
1159  operation, destProcessId);
1160  }
1161  int Reduce(const signed char *sendBuffer, signed char *recvBuffer,
1162  vtkIdType length, int operation, int destProcessId) {
1163  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
1164  operation, destProcessId);
1165  }
1166  int Reduce(const float *sendBuffer, float *recvBuffer,
1167  vtkIdType length, int operation, int destProcessId) {
1168  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
1169  operation, destProcessId);
1170  }
1171  int Reduce(const double *sendBuffer, double *recvBuffer,
1172  vtkIdType length, int operation, int destProcessId) {
1173  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
1174  operation, destProcessId);
1175  }
1176  int Reduce(const long long *sendBuffer, long long *recvBuffer,
1177  vtkIdType length, int operation, int destProcessId) {
1178  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
1179  operation, destProcessId);
1180  }
1181  int Reduce(const unsigned long long *sendBuffer, unsigned long long *recvBuffer,
1182  vtkIdType length, int operation, int destProcessId) {
1183  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
1184  operation, destProcessId);
1185  }
1186  int Reduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
1187  int operation, int destProcessId) {
1188  return this->Communicator->Reduce(sendBuffer, recvBuffer,
1189  operation, destProcessId);
1190  }
1192 
1194 
1198  int Reduce(const int *sendBuffer, int *recvBuffer,
1200  int destProcessId) {
1201  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
1202  operation, destProcessId);
1203  }
1204  int Reduce(const unsigned int *sendBuffer, unsigned int *recvBuffer,
1206  int destProcessId) {
1207  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
1208  operation, destProcessId);
1209  }
1210  int Reduce(const short *sendBuffer, short *recvBuffer,
1212  int destProcessId) {
1213  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
1214  operation, destProcessId);
1215  }
1216  int Reduce(const unsigned short *sendBuffer, unsigned short *recvBuffer,
1218  int destProcessId) {
1219  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
1220  operation, destProcessId);
1221  }
1222  int Reduce(const long *sendBuffer, long *recvBuffer,
1224  int destProcessId) {
1225  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
1226  operation, destProcessId);
1227  }
1228  int Reduce(const unsigned long *sendBuffer, unsigned long *recvBuffer,
1230  int destProcessId) {
1231  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
1232  operation, destProcessId);
1233  }
1234  int Reduce(const unsigned char *sendBuffer, unsigned char *recvBuffer,
1236  int destProcessId) {
1237  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
1238  operation, destProcessId);
1239  }
1240  int Reduce(const char *sendBuffer, char *recvBuffer,
1242  int destProcessId) {
1243  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
1244  operation, destProcessId);
1245  }
1246  int Reduce(const signed char *sendBuffer, signed char *recvBuffer,
1248  int destProcessId) {
1249  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
1250  operation, destProcessId);
1251  }
1252  int Reduce(const float *sendBuffer, float *recvBuffer,
1254  int destProcessId) {
1255  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
1256  operation, destProcessId);
1257  }
1258  int Reduce(const double *sendBuffer, double *recvBuffer,
1260  int destProcessId) {
1261  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
1262  operation, destProcessId);
1263  }
1264  int Reduce(const long long *sendBuffer, long long *recvBuffer,
1266  int destProcessId) {
1267  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
1268  operation, destProcessId);
1269  }
1270  int Reduce(const unsigned long long *sendBuffer, unsigned long long *recvBuffer,
1272  int destProcessId) {
1273  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
1274  operation, destProcessId);
1275  }
1276  int Reduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
1277  vtkCommunicator::Operation *operation, int destProcessId) {
1278  return this->Communicator->Reduce(sendBuffer, recvBuffer,
1279  operation, destProcessId);
1280  }
1282 
1284 
1287  int AllReduce(const int *sendBuffer, int *recvBuffer,
1288  vtkIdType length, int operation) {
1289  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
1290  operation);
1291  }
1292  int AllReduce(const unsigned int *sendBuffer, unsigned int *recvBuffer,
1293  vtkIdType length, int operation) {
1294  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
1295  operation);
1296  }
1297  int AllReduce(const short *sendBuffer, short *recvBuffer,
1298  vtkIdType length, int operation) {
1299  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
1300  operation);
1301  }
1302  int AllReduce(const unsigned short *sendBuffer, unsigned short *recvBuffer,
1303  vtkIdType length, int operation) {
1304  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
1305  operation);
1306  }
1307  int AllReduce(const long *sendBuffer, long *recvBuffer,
1308  vtkIdType length, int operation) {
1309  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
1310  operation);
1311  }
1312  int AllReduce(const unsigned long *sendBuffer, unsigned long *recvBuffer,
1313  vtkIdType length, int operation) {
1314  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
1315  operation);
1316  }
1317  int AllReduce(const unsigned char *sendBuffer, unsigned char *recvBuffer,
1318  vtkIdType length, int operation) {
1319  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
1320  operation);
1321  }
1322  int AllReduce(const char *sendBuffer, char *recvBuffer,
1323  vtkIdType length, int operation) {
1324  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
1325  operation);
1326  }
1327  int AllReduce(const signed char *sendBuffer, signed char *recvBuffer,
1328  vtkIdType length, int operation) {
1329  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
1330  operation);
1331  }
1332  int AllReduce(const float *sendBuffer, float *recvBuffer,
1333  vtkIdType length, int operation) {
1334  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
1335  operation);
1336  }
1337  int AllReduce(const double *sendBuffer, double *recvBuffer,
1338  vtkIdType length, int operation) {
1339  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
1340  operation);
1341  }
1342  int AllReduce(const long long *sendBuffer, long long *recvBuffer,
1343  vtkIdType length, int operation) {
1344  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
1345  operation);
1346  }
1347  int AllReduce(const unsigned long long *sendBuffer, unsigned long long *recvBuffer,
1348  vtkIdType length, int operation) {
1349  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
1350  operation);
1351  }
1352  int AllReduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
1353  int operation) {
1354  return this->Communicator->AllReduce(sendBuffer, recvBuffer, operation);
1355  }
1357 
1358  int AllReduce(const int *sendBuffer, int *recvBuffer,
1360  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
1361  operation);
1362  }
1363  int AllReduce(const unsigned int *sendBuffer, unsigned int *recvBuffer,
1365  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
1366  operation);
1367  }
1368  int AllReduce(const short *sendBuffer, short *recvBuffer,
1370  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
1371  operation);
1372  }
1373  int AllReduce(const unsigned short *sendBuffer, unsigned short *recvBuffer,
1375  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
1376  operation);
1377  }
1378  int AllReduce(const long *sendBuffer, long *recvBuffer,
1380  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
1381  operation);
1382  }
1383  int AllReduce(const unsigned long *sendBuffer, unsigned long *recvBuffer,
1385  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
1386  operation);
1387  }
1388  int AllReduce(const unsigned char *sendBuffer, unsigned char *recvBuffer,
1390  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
1391  operation);
1392  }
1393  int AllReduce(const char *sendBuffer, char *recvBuffer,
1395  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
1396  operation);
1397  }
1398  int AllReduce(const signed char *sendBuffer, signed char *recvBuffer,
1400  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
1401  operation);
1402  }
1403  int AllReduce(const float *sendBuffer, float *recvBuffer,
1405  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
1406  operation);
1407  }
1408  int AllReduce(const double *sendBuffer, double *recvBuffer,
1410  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
1411  operation);
1412  }
1413  int AllReduce(const long long *sendBuffer, long long *recvBuffer,
1415  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
1416  operation);
1417  }
1418  int AllReduce(const unsigned long long *sendBuffer, unsigned long long *recvBuffer,
1420  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
1421  operation);
1422  }
1423  int AllReduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
1424  vtkCommunicator::Operation *operation) {
1425  return this->Communicator->AllReduce(sendBuffer, recvBuffer, operation);
1426  }
1427 
1428 // Internally implemented RMI to break the process loop.
1429 
1430 protected:
1432  ~vtkMultiProcessController() override;
1433 
1439  virtual void TriggerRMIInternal(int remoteProcessId,
1440  void* arg, int argLength, int rmiTag, bool propagate);
1441 
1443  void *SingleData;
1444 
1445  void GetMultipleMethod(int index, vtkProcessFunctionType &func, void *&data);
1446 
1447  // This is a flag that can be used by the ports to break
1448  // their update loop. (same as ProcessRMIs)
1450 
1451  void ProcessRMI(int remoteProcessId, void *arg, int argLength, int rmiTag);
1452 
1453  // This method implements "GetGlobalController".
1454  // It needs to be virtual and static.
1455  virtual vtkMultiProcessController *GetLocalController();
1456 
1457 
1458  // This flag can force deep copies during send.
1460 
1461  // This flag can be used to indicate that an MPI Broadcast will be used
1462  // when calling TriggerRMIOnAllChildren(), instead of the binary tree
1463  // propagation of the data to the satellite ranks from rank 0.
1465 
1467 
1468  // Note that since the communicators can be created differently
1469  // depending on the type of controller, the subclasses are
1470  // responsible of deleting them.
1472 
1473  // Communicator which is a copy of the current user
1474  // level communicator except the context; i.e. even if the tags
1475  // are the same, the RMI messages will not interfere with user
1476  // level messages.
1477  // Note that since the communicators can be created differently
1478  // depending on the type of controller, the subclasses are
1479  // responsible of deleting them.
1481 
1482 private:
1484  void operator=(const vtkMultiProcessController&) = delete;
1485 
1486  unsigned long RMICount;
1487 
1488  class vtkInternal;
1489  vtkInternal *Internal;
1490 
1491 };
1492 
1493 
1495  int remoteProcessId, int tag)
1496 {
1497  if (this->Communicator)
1498  {
1499  return this->Communicator->Send(data, remoteProcessId, tag);
1500  }
1501  else
1502  {
1503  return 0;
1504  }
1505 }
1506 
1508  int remoteProcessId, int tag)
1509 {
1510  if (this->Communicator)
1511  {
1512  return this->Communicator->Send(data, remoteProcessId, tag);
1513  }
1514  else
1515  {
1516  return 0;
1517  }
1518 }
1519 
1521  int remoteProcessId, int tag)
1522 {
1523  if (this->Communicator)
1524  {
1525  return this->Communicator->Send(data, length, remoteProcessId, tag);
1526  }
1527  else
1528  {
1529  return 0;
1530  }
1531 }
1532 
1534  int remoteProcessId, int tag)
1535 {
1536  if (this->Communicator)
1537  {
1538  return this->Communicator->Send(data, length, remoteProcessId, tag);
1539  }
1540  else
1541  {
1542  return 0;
1543  }
1544 }
1545 
1546 inline int vtkMultiProcessController::Send(const unsigned short* data, vtkIdType length,
1547  int remoteProcessId, int tag)
1548 {
1549  if (this->Communicator)
1550  {
1551  return this->Communicator->Send(data, length, remoteProcessId, tag);
1552  }
1553  else
1554  {
1555  return 0;
1556  }
1557 }
1558 
1559 inline int vtkMultiProcessController::Send(const unsigned int* data, vtkIdType length,
1560  int remoteProcessId, int tag)
1561 {
1562  if (this->Communicator)
1563  {
1564  return this->Communicator->Send(data, length, remoteProcessId, tag);
1565  }
1566  else
1567  {
1568  return 0;
1569  }
1570 }
1571 
1572 inline int vtkMultiProcessController::Send(const unsigned long* data,
1573  vtkIdType length,
1574  int remoteProcessId,
1575  int tag)
1576 {
1577  if (this->Communicator)
1578  {
1579  return this->Communicator->Send(data, length, remoteProcessId, tag);
1580  }
1581  else
1582  {
1583  return 0;
1584  }
1585 }
1586 
1587 inline int vtkMultiProcessController::Send(const long* data,
1588  vtkIdType length,
1589  int remoteProcessId,
1590  int tag)
1591 {
1592  if (this->Communicator)
1593  {
1594  return this->Communicator->Send(data, length, remoteProcessId, tag);
1595  }
1596  else
1597  {
1598  return 0;
1599  }
1600 }
1601 
1602 inline int vtkMultiProcessController::Send(const signed char* data, vtkIdType length,
1603  int remoteProcessId, int tag)
1604 {
1605  if (this->Communicator)
1606  {
1607  return this->Communicator->Send(data, length, remoteProcessId, tag);
1608  }
1609  else
1610  {
1611  return 0;
1612  }
1613 }
1614 
1616  int remoteProcessId, int tag)
1617 {
1618  if (this->Communicator)
1619  {
1620  return this->Communicator->Send(data, length, remoteProcessId, tag);
1621  }
1622  else
1623  {
1624  return 0;
1625  }
1626 }
1627 
1628 inline int vtkMultiProcessController::Send(const unsigned char* data,
1629  vtkIdType length,
1630  int remoteProcessId, int tag)
1631 {
1632  if (this->Communicator)
1633  {
1634  return this->Communicator->Send(data, length, remoteProcessId, tag);
1635  }
1636  else
1637  {
1638  return 0;
1639  }
1640 }
1641 
1643  int remoteProcessId, int tag)
1644 {
1645  if (this->Communicator)
1646  {
1647  return this->Communicator->Send(data, length, remoteProcessId, tag);
1648  }
1649  else
1650  {
1651  return 0;
1652  }
1653 }
1654 
1656  int remoteProcessId, int tag)
1657 {
1658  if (this->Communicator)
1659  {
1660  return this->Communicator->Send(data, length, remoteProcessId, tag);
1661  }
1662  else
1663  {
1664  return 0;
1665  }
1666 }
1667 
1668 inline int vtkMultiProcessController::Send(const long long* data,
1669  vtkIdType length,
1670  int remoteProcessId, int tag)
1671 {
1672  if (this->Communicator)
1673  {
1674  return this->Communicator->Send(data, length, remoteProcessId, tag);
1675  }
1676  else
1677  {
1678  return 0;
1679  }
1680 }
1681 
1682 inline int vtkMultiProcessController::Send(const unsigned long long* data,
1683  vtkIdType length,
1684  int remoteProcessId, int tag)
1685 {
1686  if (this->Communicator)
1687  {
1688  return this->Communicator->Send(data, length, remoteProcessId, tag);
1689  }
1690  else
1691  {
1692  return 0;
1693  }
1694 }
1695 
1697  int remoteId, int tag)
1698 {
1699  if (this->Communicator)
1700  {
1701  return this->Communicator->Send(stream, remoteId, tag);
1702  }
1703  return 0;
1704 }
1705 
1707  int remoteProcessId, int tag)
1708 {
1709  if (this->Communicator)
1710  {
1711  return this->Communicator->Receive(data, remoteProcessId, tag);
1712  }
1713  else
1714  {
1715  return 0;
1716  }
1717 }
1718 
1720  int remoteProcessId, int tag)
1721 {
1722  if (this->Communicator)
1723  {
1724  return this->Communicator->ReceiveDataObject(remoteProcessId, tag);
1725  }
1726  else
1727  {
1728  return nullptr;
1729  }
1730 }
1731 
1733  int remoteProcessId, int tag)
1734 {
1735  if (this->Communicator)
1736  {
1737  return this->Communicator->Receive(data, remoteProcessId, tag);
1738  }
1739  else
1740  {
1741  return 0;
1742  }
1743 }
1744 
1746  int remoteProcessId, int tag)
1747 {
1748  if (this->Communicator)
1749  {
1750  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1751  }
1752  else
1753  {
1754  return 0;
1755  }
1756 }
1757 
1759  int remoteProcessId, int tag)
1760 {
1761  if (this->Communicator)
1762  {
1763  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1764  }
1765  else
1766  {
1767  return 0;
1768  }
1769 }
1770 
1772  int remoteProcessId, int tag)
1773 {
1774  if (this->Communicator)
1775  {
1776  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1777  }
1778  else
1779  {
1780  return 0;
1781  }
1782 }
1783 
1785  int remoteProcessId, int tag)
1786 {
1787  if (this->Communicator)
1788  {
1789  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1790  }
1791  else
1792  {
1793  return 0;
1794  }
1795 }
1796 
1798  int remoteProcessId, int tag)
1799 {
1800  if (this->Communicator)
1801  {
1802  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1803  }
1804  else
1805  {
1806  return 0;
1807  }
1808 }
1809 
1810 
1811 inline int vtkMultiProcessController::Receive(unsigned long* data,
1812  vtkIdType length,
1813  int remoteProcessId,
1814  int tag)
1815 {
1816  if (this->Communicator)
1817  {
1818  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1819  }
1820  else
1821  {
1822  return 0;
1823  }
1824 }
1825 
1827  int remoteProcessId, int tag)
1828 {
1829  if (this->Communicator)
1830  {
1831  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1832  }
1833  else
1834  {
1835  return 0;
1836  }
1837 }
1838 
1839 inline int vtkMultiProcessController::Receive(unsigned char* data,
1840  vtkIdType length,
1841  int remoteProcessId, int tag)
1842 {
1843  if (this->Communicator)
1844  {
1845  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1846  }
1847  else
1848  {
1849  return 0;
1850  }
1851 }
1852 
1854  int remoteProcessId, int tag)
1855 {
1856  if (this->Communicator)
1857  {
1858  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1859  }
1860  else
1861  {
1862  return 0;
1863  }
1864 }
1865 
1866 
1868  int remoteProcessId, int tag)
1869 {
1870  if (this->Communicator)
1871  {
1872  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1873  }
1874  else
1875  {
1876  return 0;
1877  }
1878 }
1879 
1881  int remoteProcessId, int tag)
1882 {
1883  if (this->Communicator)
1884  {
1885  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1886  }
1887  else
1888  {
1889  return 0;
1890  }
1891 }
1892 
1894  int remoteProcessId, int tag)
1895 {
1896  if (this->Communicator)
1897  {
1898  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1899  }
1900  else
1901  {
1902  return 0;
1903  }
1904 }
1905 
1907  int remoteProcessId, int tag)
1908 {
1909  if (this->Communicator)
1910  {
1911  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1912  }
1913  else
1914  {
1915  return 0;
1916  }
1917 }
1918 
1920  int remoteId, int tag)
1921 {
1922  if (this->Communicator)
1923  {
1924  return this->Communicator->Receive(stream, remoteId, tag);
1925  }
1926  return 0;
1927 }
1928 
1930 {
1931  if (this->Communicator)
1932  {
1933  this->Communicator->Barrier();
1934  }
1935 }
1936 
1938 {
1939  if (this->Communicator)
1940  {
1941  return this->Communicator->GetCount();
1942  }
1943  return 0;
1944 }
1945 
1946 #endif
int AllGather(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int AllGather(const float *sendBuffer, float *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int Scatter(const int *sendBuffer, int *recvBuffer, vtkIdType length, int srcProcessId)
Scatter takes an array in the process with id srcProcessId and distributes it.
void TriggerRMI(int remoteProcessId, int tag)
Convenience method when there is no argument.
void(* vtkProcessFunctionType)(vtkMultiProcessController *controller, void *userData)
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 Reduce(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
int Reduce(const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
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(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkIdType *recvLengths, vtkIdType *offsets)
Same as GatherV except that the result is placed in all processes.
A custom operation to use in a reduce command.
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 Reduce(const long *sendBuffer, long *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
int AllReduce(const int *sendBuffer, int *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
int Reduce(const long *sendBuffer, long *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId)
Reduce an array to the given destination process.
int Reduce(const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
abstract base class for most VTK objects
Definition: vtkObject.h:59
int Gather(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int AllGather(const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
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 AllReduce(const long long *sendBuffer, long long *recvBuffer, vtkIdType length, int operation)
Same as Reduce except that the result is placed in all of the processes.
int 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 ScatterV(const long long *sendBuffer, long long *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
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 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 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.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
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 Reduce(const int *sendBuffer, int *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
int AllGather(const long *sendBuffer, long *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int GatherV(const int *sendBuffer, int *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
stream used to pass data across processes using vtkMultiProcessController.
int Reduce(const char *sendBuffer, char *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId)
Reduce an array to the given destination process.
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 ScatterV(const double *sendBuffer, double *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
int Scatter(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int srcProcessId)
Scatter takes an array in the process with id srcProcessId and distributes it.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
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.
void TriggerRMIOnAllChildren(int tag)
This is a convenicence method to trigger an RMI call on all the "children" of the current node...
int AllReduce(const float *sendBuffer, float *recvBuffer, vtkIdType length, int operation)
Same as Reduce except that the result is placed in all of the processes.
int GatherV(vtkDataObject *sendData, vtkSmartPointer< vtkDataObject > *recvData, int destProcessId)
This special form of GatherV will automatically determine recvLengths and offsets to tightly pack the...
int AllGatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer)
This special form of AllGatherV will automatically determine recvLengths and offsets to tightly pack ...
int Gather(const long *sendBuffer, long *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int AllReduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkCommunicator::Operation *operation)
a process that can be launched by a vtkMultiProcessController
Definition: vtkProcess.h:49
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 int *sendBuffer, int *recvBuffer, vtkIdType length, int operation)
Same as Reduce except that the result is placed in all of the processes.
int Reduce(const long long *sendBuffer, long long *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId)
Reduce an array to the given destination process.
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 ScatterV(const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
int Gather(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int Gather(const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int AllGatherV(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
Same as GatherV except that the result is placed in all processes.
int Reduce(const short *sendBuffer, short *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
int Broadcast(int *data, vtkIdType length, int srcProcessId)
Broadcast sends the array in the process with id srcProcessId to all of the other processes...
int AllReduce(const char *sendBuffer, char *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
int AllGather(const short *sendBuffer, short *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int AllReduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int operation)
Same as Reduce except that the result is placed in all of the processes.
dynamic, self-adjusting array of vtkIdType
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 AllGather(const double *sendBuffer, double *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int AllGather(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int vtkIdType
Definition: vtkType.h:347
int ScatterV(const char *sendBuffer, char *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
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 Gather(const short *sendBuffer, short *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int Broadcast(unsigned long long *data, vtkIdType length, int srcProcessId)
Broadcast sends the array in the process with id srcProcessId to all of the other processes...
int 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 Reduce(const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId)
Reduce an array to the given destination process.
int AllReduce(const long *sendBuffer, long *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
static int GetBreakRMITag()
Accessor to some default tags.
int Broadcast(vtkMultiProcessStream &stream, int srcProcessId)
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 Scatter(const short *sendBuffer, short *recvBuffer, vtkIdType length, int srcProcessId)
Scatter takes an array in the process with id srcProcessId and distributes it.
int ScatterV(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
int AllGather(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int AllGather(const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int Reduce(const double *sendBuffer, double *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId)
Reduce an array to the given destination process.
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 Gather(const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
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 Broadcast(char *data, vtkIdType length, int srcProcessId)
Broadcast sends the array in the process with id srcProcessId to all of the other processes...
int AllReduce(const short *sendBuffer, short *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
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 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 Gather(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int AllReduce(const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
void(* vtkRMIFunctionType)(void *localArg, void *remoteArg, int remoteArgLength, int remoteProcessId)
int Gather(const float *sendBuffer, float *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int Reduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int operation, int destProcessId)
Reduce an array to the given destination process.
void TriggerRMI(int remoteProcessId, const char *arg, int tag)
Convenience method when the arg is a string.
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 int *sendBuffer, int *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId)
Reduce an array to the given destination process.
int AllReduce(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
int Broadcast(float *data, vtkIdType length, int srcProcessId)
Broadcast sends the array in the process with id srcProcessId to all of the other processes...
a simple class to control print indentation
Definition: vtkIndent.h:39
int GatherV(const short *sendBuffer, short *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
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 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 Gather(vtkDataObject *sendBuffer, std::vector< vtkSmartPointer< vtkDataObject > > &recvBuffer, int destProcessId)
Gathers vtkDataObject (sendBuffer) from all ranks to the destProcessId.
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
virtual void RemoveRMI(vtkRMIFunctionType f, void *arg, int tag)
Take an RMI away.
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 AllReduce(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
A subgroup of processes from a communicator.
int AllReduce(const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
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 Broadcast(vtkDataObject *data, int srcProcessId)
Broadcast sends the array in the process with id srcProcessId to all of the other processes...
int Reduce(const short *sendBuffer, short *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId)
Reduce an array to the given destination process.
int AllGatherV(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
Same as GatherV except that the result is placed in all processes.
vtkDataObject * ReceiveDataObject(int remoteId, int tag)
int GatherV(const char *sendBuffer, char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
int AllReduce(const double *sendBuffer, double *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
int AllGather(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer)
Same as gather except that the result ends up on all processes.
int AllGather(const int *sendBuffer, int *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int GatherV(const signed char *sendBuffer, signed char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
int ScatterV(const short *sendBuffer, short *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
void Barrier()
This method can be used to synchronize 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 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 GatherV(const long *sendBuffer, long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
base class for writing debug output to a console
int AllGatherV(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
Same as GatherV except that the result is placed in all processes.
int AllReduce(const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, int operation)
Same as Reduce except that the result is placed in all of the processes.
int AllReduce(const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, 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 Reduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkCommunicator::Operation *operation, int destProcessId)
Reduce an array to the given destination process.
int GatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkIdTypeArray *recvLengths, vtkIdTypeArray *offsets, int destProcessId)
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 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 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 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 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 Reduce(const double *sendBuffer, double *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
int GatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
int GatherV(const float *sendBuffer, float *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
int ScatterV(const float *sendBuffer, float *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
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 Send(const int *data, vtkIdType length, int remoteProcessId, int tag)
This method sends data to another process.
create and manipulate ordered lists of objects
Definition: vtkCollection.h:51
int AllReduce(const long long *sendBuffer, long long *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
int Scatter(const float *sendBuffer, float *recvBuffer, vtkIdType length, int srcProcessId)
Scatter takes an array in the process with id srcProcessId and distributes it.
int Gather(const double *sendBuffer, double *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
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 Reduce(const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId)
Reduce an array to the given destination process.
int Broadcast(vtkDataArray *data, int srcProcessId)
Broadcast sends the array in the process with id srcProcessId to all of the other processes...
int Receive(int *data, vtkIdType maxlength, int remoteProcessId, int tag)
This method receives data from a corresponding send.
int AllGather(const long long *sendBuffer, long long *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int Reduce(const float *sendBuffer, float *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
int Broadcast(double *data, vtkIdType length, int srcProcessId)
Broadcast sends the array in the process with id srcProcessId to all of the other processes...
int 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(const long long *sendBuffer, long long *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
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 AllGather(const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
int Broadcast(signed char *data, vtkIdType length, int srcProcessId)
Broadcast sends the array in the process with id srcProcessId to all of the other processes...
int 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 unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
int Gather(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
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 Reduce(const float *sendBuffer, float *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId)
Reduce an array to the given destination process.
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 Scatter(const char *sendBuffer, char *recvBuffer, vtkIdType length, int srcProcessId)
Scatter takes an array in the process with id srcProcessId and distributes it.
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 long *sendBuffer, long long *recvBuffer, vtkIdType length, int srcProcessId)
Scatter takes an array in the process with id srcProcessId and distributes it.
int GatherV(const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
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.
vtkIdType GetCount()
Returns the number of words received by the most recent Receive().
int Reduce(const char *sendBuffer, char *recvBuffer, vtkIdType length, int operation, int destProcessId)
Reduce an array to the given destination process.
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 ScatterV(const long *sendBuffer, long *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
Used to send/receive messages in a multiprocess environment.
general representation of visualization data
Definition: vtkDataObject.h:64
int Gather(const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int ScatterV(const signed char *sendBuffer, signed char *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
int 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 AllReduce(const float *sendBuffer, float *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
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 Gather(const int *sendBuffer, int *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id 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 GatherV(const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
GatherV is the vector variant of Gather.
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 AllReduce(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
int GatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int destProcessId)
This special form of GatherV will automatically determine recvLengths and offsets to tightly pack the...
int Gather(const long long *sendBuffer, long long *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int Scatter(const long *sendBuffer, long *recvBuffer, vtkIdType length, int srcProcessId)
Scatter takes an array in the process with id srcProcessId and distributes it.
int ScatterV(const int *sendBuffer, int *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
ScatterV is the vector variant of Scatter.
int Gather(const char *sendBuffer, char *recvBuffer, vtkIdType length, int destProcessId)
Gather collects arrays in the process with id destProcessId.
int AllGather(const char *sendBuffer, char *recvBuffer, vtkIdType length)
Same as gather except that the result ends up on all processes.
Multiprocessing communication superclass.