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 =========================================================================*/
40 #ifndef __vtkMultiProcessController_h
41 #define __vtkMultiProcessController_h
42 
43 #include "vtkObject.h"
44 
45 #include "vtkCommunicator.h" // Needed for direct access to communicator
46 
47 class vtkCollection;
48 class vtkDataObject;
49 class vtkDataSet;
50 class vtkImageData;
53 class vtkOutputWindow;
54 class vtkProcessGroup;
55 class vtkProcess;
56 
57 //BTX
58 // The type of function that gets called when new processes are initiated.
60  void *userData);
61 
62 // The type of function that gets called when an RMI is triggered.
63 typedef void (*vtkRMIFunctionType)(void *localArg,
64  void *remoteArg, int remoteArgLength,
65  int remoteProcessId);
66 //ETX
67 
68 
70 {
71 public:
73  void PrintSelf(ostream& os, vtkIndent indent);
74 
78  virtual void Initialize(int* vtkNotUsed(argc), char*** vtkNotUsed(argv))=0;
79 
81 
84  virtual void Initialize(int* vtkNotUsed(argc), char*** vtkNotUsed(argv),
85  int initializedExternally)=0;
87 
90  virtual void Finalize()=0;
91 
95  virtual void Finalize(int finalizedExternally)=0;
96 
98 
101  void SetNumberOfProcesses(int num);
102  int GetNumberOfProcesses();
104 
105  //BTX
109  void SetSingleMethod(vtkProcessFunctionType, void *data);
110 
112 
115  void SetSingleProcessObject(vtkProcess *p);
116  //ETX
118 
122  virtual void SingleMethodExecute() = 0;
123 
124  //BTX
126 
130  void SetMultipleMethod(int index, vtkProcessFunctionType, void *data);
131  //ETX
133 
137  virtual void MultipleMethodExecute() = 0;
138 
140  int GetLocalProcessId();
141 
146  static vtkMultiProcessController *GetGlobalController();
147 
150  virtual void CreateOutputWindow() = 0;
151 
153 
163  virtual vtkMultiProcessController *CreateSubController(
164  vtkProcessGroup *group);
166 
168 
177  virtual vtkMultiProcessController *PartitionController(int localColor,
178  int localKey);
180 
181  //------------------ RMIs --------------------
182  //BTX
193  unsigned long AddRMI(vtkRMIFunctionType, void *localArg, int tag);
194 
196  int RemoveFirstRMI(int tag);
197 
200  int RemoveRMI(unsigned long id);
201 
203 
204  void RemoveRMI(vtkRMIFunctionType f, void *arg, int tag)
205  {f = f; arg = arg; tag = tag; vtkErrorMacro("RemoveRMI Not Implemented Yet");};
207 
212  unsigned long AddRMICallback(vtkRMIFunctionType, void* localArg, int tag);
213 
217  void RemoveAllRMICallbacks(int tag);
218 
220  bool RemoveRMICallback(unsigned long id);
221 
222  //ETX
223 
225  void TriggerRMI(int remoteProcessId, void *arg, int argLength, int tag);
226 
229  void TriggerBreakRMIs();
230 
232 
233  void TriggerRMI(int remoteProcessId, const char *arg, int tag)
234  { this->TriggerRMI(remoteProcessId, (void*)arg,
235  static_cast<int>(strlen(arg))+1, tag); }
237 
239 
240  void TriggerRMI(int remoteProcessId, int tag)
241  { this->TriggerRMI(remoteProcessId, NULL, 0, tag); }
243 
245 
251  void TriggerRMIOnAllChildren(void *arg, int argLength, int tag);
252  void TriggerRMIOnAllChildren(const char *arg, int tag)
253  {
254  this->TriggerRMIOnAllChildren(
255  (void*)arg, static_cast<int>(strlen(arg))+1, tag);
256  }
258  {
259  this->TriggerRMIOnAllChildren(NULL, 0, tag);
260  }
262 
264 
271  int ProcessRMIs(int reportErrors, int dont_loop = 0);
272  int ProcessRMIs();
274 
276 
279  vtkSetMacro(BreakFlag, int);
280  vtkGetMacro(BreakFlag, int);
282 
284 
286  vtkGetObjectMacro(Communicator, vtkCommunicator);
288 
290 
291  static int GetBreakRMITag() { return BREAK_RMI_TAG; }
292  static int GetRMITag() { return RMI_TAG; }
293  static int GetRMIArgTag() { return RMI_ARG_TAG; }
295 
296 //BTX
297 
298  enum Errors
299  {
302  RMI_ARG_ERROR
303  };
304 
305  enum Consts
306  {
307  ANY_SOURCE = -1,
308  INVALID_SOURCE = -2
309  };
310 
311  enum Tags
312  {
313  RMI_TAG = 1,
314  RMI_ARG_TAG = 2,
315  BREAK_RMI_TAG = 3,
316  XML_WRITER_DATA_INFO = 4
317  };
318 
319 //ETX
320 
322  void Barrier();
323 
324  static void SetGlobalController(vtkMultiProcessController *controller);
325 
326  //------------------ Communication --------------------
327 
329 
334  int Send(const int* data, vtkIdType length, int remoteProcessId, int tag);
335  int Send(const unsigned int* data, vtkIdType length, int remoteProcessId, int tag);
336  int Send(const unsigned long* data, vtkIdType length, int remoteProcessId,
337  int tag);
338  int Send(const char* data, vtkIdType length, int remoteProcessId, int tag);
339  int Send(const unsigned char* data, vtkIdType length, int remoteProcessId, int tag);
340  int Send(const float* data, vtkIdType length, int remoteProcessId, int tag);
341  int Send(const double* data, vtkIdType length, int remoteProcessId, int tag);
342 #ifdef VTK_USE_64BIT_IDS
343  int Send(const vtkIdType* data, vtkIdType length, int remoteProcessId, int tag);
344 #endif
345  int Send(vtkDataObject *data, int remoteId, int tag);
346  int Send(vtkDataArray *data, int remoteId, int tag);
348 
349 //BTX
351 
356  int Send(const vtkMultiProcessStream& stream, int remoteId, int tag);
357 //ETX
359 
361 
369  int Receive(int* data, vtkIdType maxlength, int remoteProcessId, int tag);
370  int Receive(unsigned int* data, vtkIdType maxlength, int remoteProcessId, int tag);
371  int Receive(unsigned long* data, vtkIdType maxlength, int remoteProcessId,
372  int tag);
373  int Receive(char* data, vtkIdType maxlength, int remoteProcessId, int tag);
374  int Receive(unsigned char* data, vtkIdType maxlength, int remoteProcessId, int tag);
375  int Receive(float* data, vtkIdType maxlength, int remoteProcessId, int tag);
376  int Receive(double* data, vtkIdType maxlength, int remoteProcessId, int tag);
377 #ifdef VTK_USE_64BIT_IDS
378  int Receive(vtkIdType* data, vtkIdType maxlength, int remoteProcessId, int tag);
379 #endif
380  int Receive(vtkDataObject* data, int remoteId, int tag);
381  int Receive(vtkDataArray* data, int remoteId, int tag);
382 //BTX
383  // Description:
384  // Receive a stream from the other processes.
385  int Receive(vtkMultiProcessStream& stream, int remoteId, int tag);
386 //ETX
387  vtkDataObject *ReceiveDataObject(int remoteId, int tag);
389 
397  vtkIdType GetCount();
398 
399 
400  //---------------------- Collective Operations ----------------------
401 
403 
406  int Broadcast(int *data, vtkIdType length, int srcProcessId) {
407  return this->Communicator->Broadcast(data, length, srcProcessId);
408  }
409  int Broadcast(unsigned int *data, vtkIdType length, int srcProcessId) {
410  return this->Communicator->Broadcast(data, length, srcProcessId);
411  }
412  int Broadcast(unsigned long *data, vtkIdType length, int srcProcessId) {
413  return this->Communicator->Broadcast(data, length, srcProcessId);
414  }
415  int Broadcast(unsigned char *data, vtkIdType length, int srcProcessId) {
416  return this->Communicator->Broadcast(data, length, srcProcessId);
417  }
418  int Broadcast(char *data, vtkIdType length, int srcProcessId) {
419  return this->Communicator->Broadcast(data, length, srcProcessId);
420  }
421  int Broadcast(float *data, vtkIdType length, int srcProcessId) {
422  return this->Communicator->Broadcast(data, length, srcProcessId);
423  }
424  int Broadcast(double *data, vtkIdType length, int srcProcessId) {
425  return this->Communicator->Broadcast(data, length, srcProcessId);
426  }
427 #ifdef VTK_USE_64BIT_IDS
428  int Broadcast(vtkIdType *data, vtkIdType length, int srcProcessId) {
429  return this->Communicator->Broadcast(data, length, srcProcessId);
430  }
431 #endif
432  int Broadcast(vtkDataObject *data, int srcProcessId) {
433  return this->Communicator->Broadcast(data, srcProcessId);
434  }
435  int Broadcast(vtkDataArray *data, int srcProcessId) {
436  return this->Communicator->Broadcast(data, srcProcessId);
437  }
438 //BTX
439  int Broadcast(vtkMultiProcessStream& stream, int srcProcessId) {
440  return this->Communicator->Broadcast(stream, srcProcessId);
441  }
442 //ETX
444 
446 
454  int Gather(const int *sendBuffer, int *recvBuffer,
455  vtkIdType length, int destProcessId) {
456  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
457  destProcessId);
458  }
459  int Gather(const unsigned long *sendBuffer, unsigned long *recvBuffer,
460  vtkIdType length, int destProcessId) {
461  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
462  destProcessId);
463  }
464  int Gather(const unsigned char *sendBuffer, unsigned char *recvBuffer,
465  vtkIdType length, int destProcessId) {
466  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
467  destProcessId);
468  }
469  int Gather(const char *sendBuffer, char *recvBuffer,
470  vtkIdType length, int destProcessId) {
471  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
472  destProcessId);
473  }
474  int Gather(const float *sendBuffer, float *recvBuffer,
475  vtkIdType length, int destProcessId) {
476  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
477  destProcessId);
478  }
479  int Gather(const double *sendBuffer, double *recvBuffer,
480  vtkIdType length, int destProcessId) {
481  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
482  destProcessId);
483  }
484 #ifdef VTK_USE_64BIT_IDS
485  int Gather(const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
486  vtkIdType length, int destProcessId) {
487  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
488  destProcessId);
489  }
490 #endif
491  int Gather(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
492  int destProcessId) {
493  return this->Communicator->Gather(sendBuffer, recvBuffer, destProcessId);
494  }
496 
498 
508  int GatherV(const int* sendBuffer, int* recvBuffer,
509  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
510  int destProcessId) {
511  return this->Communicator->GatherV(sendBuffer, recvBuffer,
512  sendLength, recvLengths,
513  offsets, destProcessId);
514  }
515  int GatherV(const unsigned long* sendBuffer, unsigned long* recvBuffer,
516  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
517  int destProcessId) {
518  return this->Communicator->GatherV(sendBuffer, recvBuffer,
519  sendLength, recvLengths,
520  offsets, destProcessId);
521  }
522  int GatherV(const unsigned char* sendBuffer, unsigned char* recvBuffer,
523  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
524  int destProcessId) {
525  return this->Communicator->GatherV(sendBuffer, recvBuffer,
526  sendLength, recvLengths,
527  offsets, destProcessId);
528  }
529  int GatherV(const char* sendBuffer, char* recvBuffer,
530  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
531  int destProcessId) {
532  return this->Communicator->GatherV(sendBuffer, recvBuffer,
533  sendLength, recvLengths,
534  offsets, destProcessId);
535  }
536  int GatherV(const float* sendBuffer, float* recvBuffer,
537  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
538  int destProcessId) {
539  return this->Communicator->GatherV(sendBuffer, recvBuffer,
540  sendLength, recvLengths,
541  offsets, destProcessId);
542  }
543  int GatherV(const double* sendBuffer, double* recvBuffer,
544  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
545  int destProcessId) {
546  return this->Communicator->GatherV(sendBuffer, recvBuffer,
547  sendLength, recvLengths,
548  offsets, destProcessId);
549  }
550 #ifdef VTK_USE_64BIT_IDS
551  int GatherV(const vtkIdType* sendBuffer, vtkIdType* recvBuffer,
552  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
553  int destProcessId) {
554  return this->Communicator->GatherV(sendBuffer, recvBuffer,
555  sendLength, recvLengths,
556  offsets, destProcessId);
557  }
558 #endif
559  int GatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
560  vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId) {
561  return this->Communicator->GatherV(sendBuffer, recvBuffer,
562  recvLengths, offsets,
563  destProcessId);
564  }
566 
568 
573  int GatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
574  int destProcessId) {
575  return this->Communicator->GatherV(sendBuffer, recvBuffer, destProcessId);
576  }
578 
580 
585  int Scatter(const int *sendBuffer, int *recvBuffer,
586  vtkIdType length, int srcProcessId) {
587  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
588  srcProcessId);
589  }
590  int Scatter(const unsigned long *sendBuffer, unsigned long *recvBuffer,
591  vtkIdType length, int srcProcessId) {
592  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
593  srcProcessId);
594  }
595  int Scatter(const unsigned char *sendBuffer, unsigned char *recvBuffer,
596  vtkIdType length, int srcProcessId) {
597  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
598  srcProcessId);
599  }
600  int Scatter(const char *sendBuffer, char *recvBuffer,
601  vtkIdType length, int srcProcessId) {
602  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
603  srcProcessId);
604  }
605  int Scatter(const float *sendBuffer, float *recvBuffer,
606  vtkIdType length, int srcProcessId) {
607  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
608  srcProcessId);
609  }
610  int Scatter(const double *sendBuffer, double *recvBuffer,
611  vtkIdType length, int srcProcessId) {
612  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
613  srcProcessId);
614  }
615 #ifdef VTK_USE_64BIT_IDS
616  int Scatter(const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
617  vtkIdType length, int srcProcessId) {
618  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
619  srcProcessId);
620  }
621 #endif
622  int Scatter(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
623  int srcProcessId) {
624  return this->Communicator->Scatter(sendBuffer, recvBuffer, srcProcessId);
625  }
627 
629 
635  int ScatterV(const int *sendBuffer, int *recvBuffer,
636  vtkIdType *sendLengths, vtkIdType *offsets,
637  vtkIdType recvLength, int srcProcessId) {
638  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
639  sendLengths, offsets, recvLength,
640  srcProcessId);
641  }
642  int ScatterV(const unsigned long *sendBuffer, unsigned long *recvBuffer,
643  vtkIdType *sendLengths, vtkIdType *offsets,
644  vtkIdType recvLength, int srcProcessId) {
645  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
646  sendLengths, offsets, recvLength,
647  srcProcessId);
648  }
649  int ScatterV(const unsigned char *sendBuffer, unsigned char *recvBuffer,
650  vtkIdType *sendLengths, vtkIdType *offsets,
651  vtkIdType recvLength, int srcProcessId) {
652  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
653  sendLengths, offsets, recvLength,
654  srcProcessId);
655  }
656  int ScatterV(const char *sendBuffer, char *recvBuffer,
657  vtkIdType *sendLengths, vtkIdType *offsets,
658  vtkIdType recvLength, int srcProcessId) {
659  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
660  sendLengths, offsets, recvLength,
661  srcProcessId);
662  }
663  int ScatterV(const float *sendBuffer, float *recvBuffer,
664  vtkIdType *sendLengths, vtkIdType *offsets,
665  vtkIdType recvLength, int srcProcessId) {
666  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
667  sendLengths, offsets, recvLength,
668  srcProcessId);
669  }
670  int ScatterV(const double *sendBuffer, double *recvBuffer,
671  vtkIdType *sendLengths, vtkIdType *offsets,
672  vtkIdType recvLength, int srcProcessId) {
673  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
674  sendLengths, offsets, recvLength,
675  srcProcessId);
676  }
677 #ifdef VTK_USE_64BIT_IDS
678  int ScatterV(const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
679  vtkIdType *sendLengths, vtkIdType *offsets,
680  vtkIdType recvLength, int srcProcessId) {
681  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
682  sendLengths, offsets, recvLength,
683  srcProcessId);
684  }
685 #endif
686 
687 
689 
690  int AllGather(const int *sendBuffer, int *recvBuffer, vtkIdType length) {
691  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
692  }
693  int AllGather(const unsigned long *sendBuffer,
694  unsigned long *recvBuffer, vtkIdType length) {
695  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
696  }
697  int AllGather(const unsigned char *sendBuffer,
698  unsigned char *recvBuffer, vtkIdType length) {
699  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
700  }
701  int AllGather(const char *sendBuffer, char *recvBuffer, vtkIdType length) {
702  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
703  }
704  int AllGather(const float *sendBuffer, float *recvBuffer, vtkIdType length) {
705  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
706  }
707  int AllGather(const double *sendBuffer,
708  double *recvBuffer, vtkIdType length) {
709  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
710  }
711 #ifdef VTK_USE_64BIT_IDS
712  int AllGather(const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
713  vtkIdType length) {
714  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
715  }
716 #endif
717  int AllGather(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer) {
718  return this->Communicator->AllGather(sendBuffer, recvBuffer);
719  }
721 
723 
724  int AllGatherV(const int* sendBuffer, int* recvBuffer,
725  vtkIdType sendLength, vtkIdType* recvLengths,
726  vtkIdType* offsets) {
727  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
728  sendLength, recvLengths,
729  offsets);
730  }
731  int AllGatherV(const unsigned long* sendBuffer, unsigned long* recvBuffer,
732  vtkIdType sendLength, vtkIdType* recvLengths,
733  vtkIdType* offsets) {
734  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
735  sendLength, recvLengths,
736  offsets);
737  }
738  int AllGatherV(const unsigned char* sendBuffer, unsigned char* recvBuffer,
739  vtkIdType sendLength, vtkIdType* recvLengths,
740  vtkIdType* offsets) {
741  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
742  sendLength, recvLengths,
743  offsets);
744  }
745  int AllGatherV(const char* sendBuffer, char* recvBuffer,
746  vtkIdType sendLength, vtkIdType* recvLengths,
747  vtkIdType* offsets) {
748  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
749  sendLength, recvLengths,
750  offsets);
751  }
752  int AllGatherV(const float* sendBuffer, float* recvBuffer,
753  vtkIdType sendLength, vtkIdType* recvLengths,
754  vtkIdType* offsets) {
755  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
756  sendLength, recvLengths,
757  offsets);
758  }
759  int AllGatherV(const double* sendBuffer, double* recvBuffer,
760  vtkIdType sendLength, vtkIdType* recvLengths,
761  vtkIdType* offsets) {
762  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
763  sendLength, recvLengths,
764  offsets);
765  }
766 #ifdef VTK_USE_64BIT_IDS
767  int AllGatherV(const vtkIdType* sendBuffer, vtkIdType* recvBuffer,
768  vtkIdType sendLength, vtkIdType* recvLengths,
769  vtkIdType* offsets) {
770  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
771  sendLength, recvLengths,
772  offsets);
773  }
774 #endif
775  int AllGatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
776  vtkIdType *recvLengths, vtkIdType *offsets) {
777  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
778  recvLengths, offsets);
779  }
781 
783 
788  int AllGatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer) {
789  return this->Communicator->AllGatherV(sendBuffer, recvBuffer);
790  }
792 
794 
797  int Reduce(const int *sendBuffer, int *recvBuffer,
798  vtkIdType length, int operation, int destProcessId) {
799  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
800  operation, destProcessId);
801  }
802  int Reduce(const unsigned int *sendBuffer, unsigned int *recvBuffer,
803  vtkIdType length, int operation, int destProcessId) {
804  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
805  operation, destProcessId);
806  }
807  int Reduce(const unsigned long *sendBuffer, unsigned long *recvBuffer,
808  vtkIdType length, int operation, int destProcessId) {
809  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
810  operation, destProcessId);
811  }
812  int Reduce(const unsigned char *sendBuffer, unsigned char *recvBuffer,
813  vtkIdType length, int operation, int destProcessId) {
814  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
815  operation, destProcessId);
816  }
817  int Reduce(const char *sendBuffer, char *recvBuffer,
818  vtkIdType length, int operation, int destProcessId) {
819  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
820  operation, destProcessId);
821  }
822  int Reduce(const float *sendBuffer, float *recvBuffer,
823  vtkIdType length, int operation, int destProcessId) {
824  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
825  operation, destProcessId);
826  }
827  int Reduce(const double *sendBuffer, double *recvBuffer,
828  vtkIdType length, int operation, int destProcessId) {
829  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
830  operation, destProcessId);
831  }
832 #ifdef VTK_USE_64BIT_IDS
833  int Reduce(const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
834  vtkIdType length, int operation, int destProcessId) {
835  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
836  operation, destProcessId);
837  }
838 #endif
839  int Reduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
840  int operation, int destProcessId) {
841  return this->Communicator->Reduce(sendBuffer, recvBuffer,
842  operation, destProcessId);
843  }
845 
846 //BTX
848 
851  int Reduce(const int *sendBuffer, int *recvBuffer,
852  vtkIdType length, vtkCommunicator::Operation *operation,
853  int destProcessId) {
854  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
855  operation, destProcessId);
856  }
857  int Reduce(const unsigned long *sendBuffer, unsigned long *recvBuffer,
858  vtkIdType length, vtkCommunicator::Operation *operation,
859  int destProcessId) {
860  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
861  operation, destProcessId);
862  }
863  int Reduce(const unsigned char *sendBuffer, unsigned char *recvBuffer,
864  vtkIdType length, vtkCommunicator::Operation *operation,
865  int destProcessId) {
866  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
867  operation, destProcessId);
868  }
869  int Reduce(const char *sendBuffer, char *recvBuffer,
870  vtkIdType length, vtkCommunicator::Operation *operation,
871  int destProcessId) {
872  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
873  operation, destProcessId);
874  }
875  int Reduce(const float *sendBuffer, float *recvBuffer,
876  vtkIdType length, vtkCommunicator::Operation *operation,
877  int destProcessId) {
878  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
879  operation, destProcessId);
880  }
881  int Reduce(const double *sendBuffer, double *recvBuffer,
882  vtkIdType length, vtkCommunicator::Operation *operation,
883  int destProcessId) {
884  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
885  operation, destProcessId);
886  }
887 #ifdef VTK_USE_64BIT_IDS
888  int Reduce(const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
889  vtkIdType length, vtkCommunicator::Operation *operation,
890  int destProcessId) {
891  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
892  operation, destProcessId);
893  }
894 #endif
895  int Reduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
896  vtkCommunicator::Operation *operation, int destProcessId) {
897  return this->Communicator->Reduce(sendBuffer, recvBuffer,
898  operation, destProcessId);
899  }
900 //ETX
902 
904 
906  int AllReduce(const int *sendBuffer, int *recvBuffer,
907  vtkIdType length, int operation) {
908  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
909  operation);
910  }
911  int AllReduce(const unsigned long *sendBuffer, unsigned long *recvBuffer,
912  vtkIdType length, int operation) {
913  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
914  operation);
915  }
916  int AllReduce(const unsigned char *sendBuffer, unsigned char *recvBuffer,
917  vtkIdType length, int operation) {
918  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
919  operation);
920  }
921  int AllReduce(const char *sendBuffer, char *recvBuffer,
922  vtkIdType length, int operation) {
923  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
924  operation);
925  }
926  int AllReduce(const float *sendBuffer, float *recvBuffer,
927  vtkIdType length, int operation) {
928  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
929  operation);
930  }
931  int AllReduce(const double *sendBuffer, double *recvBuffer,
932  vtkIdType length, int operation) {
933  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
934  operation);
935  }
936 #ifdef VTK_USE_64BIT_IDS
937  int AllReduce(const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
938  vtkIdType length, int operation) {
939  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
940  operation);
941  }
942 #endif
943  int AllReduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
944  int operation) {
945  return this->Communicator->AllReduce(sendBuffer, recvBuffer, operation);
946  }
947 //BTX
948  int AllReduce(const int *sendBuffer, int *recvBuffer,
949  vtkIdType length, vtkCommunicator::Operation *operation) {
950  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
951  operation);
952  }
953  int AllReduce(const unsigned long *sendBuffer, unsigned long *recvBuffer,
954  vtkIdType length, vtkCommunicator::Operation *operation) {
955  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
956  operation);
957  }
958  int AllReduce(const unsigned char *sendBuffer, unsigned char *recvBuffer,
959  vtkIdType length, vtkCommunicator::Operation *operation) {
960  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
961  operation);
962  }
963  int AllReduce(const char *sendBuffer, char *recvBuffer,
964  vtkIdType length, vtkCommunicator::Operation *operation) {
965  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
966  operation);
967  }
968  int AllReduce(const float *sendBuffer, float *recvBuffer,
969  vtkIdType length, vtkCommunicator::Operation *operation) {
970  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
971  operation);
972  }
973  int AllReduce(const double *sendBuffer, double *recvBuffer,
974  vtkIdType length, vtkCommunicator::Operation *operation) {
975  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
976  operation);
977  }
978 #ifdef VTK_USE_64BIT_IDS
979  int AllReduce(const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
980  vtkIdType length, vtkCommunicator::Operation *operation) {
981  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
982  operation);
983  }
984 #endif
985  int AllReduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
986  vtkCommunicator::Operation *operation) {
987  return this->Communicator->AllReduce(sendBuffer, recvBuffer, operation);
988  }
989 //ETX
991 
992 // Internally implemented RMI to break the process loop.
993 
994 protected:
997 
999 
1002  virtual void TriggerRMIInternal(int remoteProcessId,
1003  void* arg, int argLength, int rmiTag, bool propagate);
1005 
1007  void *SingleData;
1008 
1009  void GetMultipleMethod(int index, vtkProcessFunctionType &func, void *&data);
1010 
1011  // This is a flag that can be used by the ports to break
1012  // their update loop. (same as ProcessRMIs)
1014 
1015  void ProcessRMI(int remoteProcessId, void *arg, int argLength, int rmiTag);
1016 
1017  // This method implements "GetGlobalController".
1018  // It needs to be virtual and static.
1019  virtual vtkMultiProcessController *GetLocalController();
1020 
1021 
1022  // This flag can force deep copies during send.
1024 
1026 
1027  // Note that since the communicators can be created differently
1028  // depending on the type of controller, the subclasses are
1029  // responsible of deleting them.
1031 
1032  // Communicator which is a copy of the current user
1033  // level communicator except the context; i.e. even if the tags
1034  // are the same, the RMI messages will not interfere with user
1035  // level messages.
1036  // Note that since the communicators can be created differently
1037  // depending on the type of controller, the subclasses are
1038  // responsible of deleting them.
1040 
1041 private:
1042  vtkMultiProcessController(const vtkMultiProcessController&); // Not implemented.
1043  void operator=(const vtkMultiProcessController&); // Not implemented.
1044 
1045  unsigned long RMICount;
1046 
1047 //BTX
1048  class vtkInternal;
1049  vtkInternal *Internal;
1050 //ETX
1051 };
1052 
1053 
1055  int remoteProcessId, int tag)
1056 {
1057  if (this->Communicator)
1058  {
1059  return this->Communicator->Send(data, remoteProcessId, tag);
1060  }
1061  else
1062  {
1063  return 0;
1064  }
1065 }
1066 
1068  int remoteProcessId, int tag)
1069 {
1070  if (this->Communicator)
1071  {
1072  return this->Communicator->Send(data, remoteProcessId, tag);
1073  }
1074  else
1075  {
1076  return 0;
1077  }
1078 }
1079 
1080 inline int vtkMultiProcessController::Send(const int* data, vtkIdType length,
1081  int remoteProcessId, int tag)
1082 {
1083  if (this->Communicator)
1084  {
1085  return this->Communicator->Send(data, length, remoteProcessId, tag);
1086  }
1087  else
1088  {
1089  return 0;
1090  }
1091 }
1092 
1093 inline int vtkMultiProcessController::Send(const unsigned int* data, vtkIdType length,
1094  int remoteProcessId, int tag)
1095 {
1096  if (this->Communicator)
1097  {
1098  return this->Communicator->Send(data, length, remoteProcessId, tag);
1099  }
1100  else
1101  {
1102  return 0;
1103  }
1104 }
1105 
1106 inline int vtkMultiProcessController::Send(const unsigned long* data,
1107  vtkIdType length,
1108  int remoteProcessId,
1109  int tag)
1110 {
1111  if (this->Communicator)
1112  {
1113  return this->Communicator->Send(data, length, remoteProcessId, tag);
1114  }
1115  else
1116  {
1117  return 0;
1118  }
1119 }
1120 
1121 inline int vtkMultiProcessController::Send(const char* data, vtkIdType length,
1122  int remoteProcessId, int tag)
1123 {
1124  if (this->Communicator)
1125  {
1126  return this->Communicator->Send(data, length, remoteProcessId, tag);
1127  }
1128  else
1129  {
1130  return 0;
1131  }
1132 }
1133 
1134 inline int vtkMultiProcessController::Send(const unsigned char* data,
1135  vtkIdType length,
1136  int remoteProcessId, int tag)
1137 {
1138  if (this->Communicator)
1139  {
1140  return this->Communicator->Send(data, length, remoteProcessId, tag);
1141  }
1142  else
1143  {
1144  return 0;
1145  }
1146 }
1147 
1148 inline int vtkMultiProcessController::Send(const float* data, vtkIdType length,
1149  int remoteProcessId, int tag)
1150 {
1151  if (this->Communicator)
1152  {
1153  return this->Communicator->Send(data, length, remoteProcessId, tag);
1154  }
1155  else
1156  {
1157  return 0;
1158  }
1159 }
1160 
1161 inline int vtkMultiProcessController::Send(const double* data, vtkIdType length,
1162  int remoteProcessId, int tag)
1163 {
1164  if (this->Communicator)
1165  {
1166  return this->Communicator->Send(data, length, remoteProcessId, tag);
1167  }
1168  else
1169  {
1170  return 0;
1171  }
1172 }
1173 
1174 #ifdef VTK_USE_64BIT_IDS
1175 inline int vtkMultiProcessController::Send(const vtkIdType* data,
1176  vtkIdType length,
1177  int remoteProcessId, int tag)
1178 {
1179  if (this->Communicator)
1180  {
1181  return this->Communicator->Send(data, length, remoteProcessId, tag);
1182  }
1183  else
1184  {
1185  return 0;
1186  }
1187 }
1188 #endif
1189 
1191  int remoteId, int tag)
1192 {
1193  if (this->Communicator)
1194  {
1195  return this->Communicator->Send(stream, remoteId, tag);
1196  }
1197  return 0;
1198 }
1199 
1201  int remoteProcessId, int tag)
1202 {
1203  if (this->Communicator)
1204  {
1205  return this->Communicator->Receive(data, remoteProcessId, tag);
1206  }
1207  else
1208  {
1209  return 0;
1210  }
1211 }
1212 
1214  int remoteProcessId, int tag)
1215 {
1216  if (this->Communicator)
1217  {
1218  return this->Communicator->ReceiveDataObject(remoteProcessId, tag);
1219  }
1220  else
1221  {
1222  return 0;
1223  }
1224 }
1225 
1227  int remoteProcessId, int tag)
1228 {
1229  if (this->Communicator)
1230  {
1231  return this->Communicator->Receive(data, remoteProcessId, tag);
1232  }
1233  else
1234  {
1235  return 0;
1236  }
1237 }
1238 
1239 inline int vtkMultiProcessController::Receive(int* data, vtkIdType length,
1240  int remoteProcessId, int tag)
1241 {
1242  if (this->Communicator)
1243  {
1244  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1245  }
1246  else
1247  {
1248  return 0;
1249  }
1250 }
1251 
1252 inline int vtkMultiProcessController::Receive(unsigned int* data, vtkIdType length,
1253  int remoteProcessId, int tag)
1254 {
1255  if (this->Communicator)
1256  {
1257  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1258  }
1259  else
1260  {
1261  return 0;
1262  }
1263 }
1264 
1265 inline int vtkMultiProcessController::Receive(unsigned long* data,
1266  vtkIdType length,
1267  int remoteProcessId,
1268  int tag)
1269 {
1270  if (this->Communicator)
1271  {
1272  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1273  }
1274  else
1275  {
1276  return 0;
1277  }
1278 }
1279 
1280 inline int vtkMultiProcessController::Receive(char* data, vtkIdType length,
1281  int remoteProcessId, int tag)
1282 {
1283  if (this->Communicator)
1284  {
1285  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1286  }
1287  else
1288  {
1289  return 0;
1290  }
1291 }
1292 
1293 inline int vtkMultiProcessController::Receive(unsigned char* data,
1294  vtkIdType length,
1295  int remoteProcessId, int tag)
1296 {
1297  if (this->Communicator)
1298  {
1299  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1300  }
1301  else
1302  {
1303  return 0;
1304  }
1305 }
1306 
1307 inline int vtkMultiProcessController::Receive(float* data, vtkIdType length,
1308  int remoteProcessId, int tag)
1309 {
1310  if (this->Communicator)
1311  {
1312  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1313  }
1314  else
1315  {
1316  return 0;
1317  }
1318 }
1319 
1320 inline int vtkMultiProcessController::Receive(double* data, vtkIdType length,
1321  int remoteProcessId, int tag)
1322 {
1323  if (this->Communicator)
1324  {
1325  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1326  }
1327  else
1328  {
1329  return 0;
1330  }
1331 }
1332 
1333 #ifdef VTK_USE_64BIT_IDS
1335  vtkIdType length,
1336  int remoteProcessId, int tag)
1337 {
1338  if (this->Communicator)
1339  {
1340  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1341  }
1342  else
1343  {
1344  return 0;
1345  }
1346 }
1347 #endif
1348 
1349 
1351  int remoteId, int tag)
1352 {
1353  if (this->Communicator)
1354  {
1355  return this->Communicator->Receive(stream, remoteId, tag);
1356  }
1357  return 0;
1358 }
1359 
1361 {
1362  if (this->Communicator)
1363  {
1364  this->Communicator->Barrier();
1365  }
1366 }
1367 
1369 {
1370  if (this->Communicator)
1371  {
1372  return this->Communicator->GetCount();
1373  }
1374  return 0;
1375 }
1376 
1377 #endif
int AllGather(const float *sendBuffer, float *recvBuffer, vtkIdType length)
int Scatter(const int *sendBuffer, int *recvBuffer, vtkIdType length, int srcProcessId)
void TriggerRMI(int remoteProcessId, int tag)
void(* vtkProcessFunctionType)(vtkMultiProcessController *controller, void *userData)
int Reduce(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int operation, int destProcessId)
int Send(vtkDataObject *data, int remoteHandle, int tag)
int Scatter(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, int srcProcessId)
int AllGatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkIdType *recvLengths, vtkIdType *offsets)
int AllReduce(const int *sendBuffer, int *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
abstract base class for most VTK objects
Definition: vtkObject.h:60
int Gather(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, int destProcessId)
int AllGatherV(const double *sendBuffer, double *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
int Scatter(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int srcProcessId)
int AllReduce(const char *sendBuffer, char *recvBuffer, vtkIdType length, int operation)
int Reduce(const int *sendBuffer, int *recvBuffer, vtkIdType length, int operation, int destProcessId)
int GatherV(const int *sendBuffer, int *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
stream used to pass data across processes using vtkMultiProcessController.
int Reduce(const char *sendBuffer, char *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId)
void TriggerRMIOnAllChildren(const char *arg, int tag)
int ScatterV(const double *sendBuffer, double *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
int Scatter(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int srcProcessId)
abstract class to specify dataset behavior
Definition: vtkDataSet.h:58
int AllReduce(const float *sendBuffer, float *recvBuffer, vtkIdType length, int operation)
int AllGatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer)
void RemoveRMI(vtkRMIFunctionType f, void *arg, int tag)
int AllReduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkCommunicator::Operation *operation)
a process that can be launched by a vtkMultiProcessController
Definition: vtkProcess.h:47
int GatherV(const double *sendBuffer, double *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
int AllReduce(const int *sendBuffer, int *recvBuffer, vtkIdType length, int operation)
int Reduce(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId)
int AllGatherV(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
int Broadcast(int *data, vtkIdType length, int srcProcessId)
int AllReduce(const char *sendBuffer, char *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
int AllReduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int operation)
int AllReduce(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, int operation)
int AllGather(const double *sendBuffer, double *recvBuffer, vtkIdType length)
int AllGather(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length)
int vtkIdType
Definition: vtkType.h:255
int ScatterV(const char *sendBuffer, char *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
int Receive(vtkDataObject *data, int remoteHandle, int tag)
int Broadcast(vtkMultiProcessStream &stream, int srcProcessId)
int Reduce(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId)
int ScatterV(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
int AllGather(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length)
int Reduce(const double *sendBuffer, double *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId)
int AllGatherV(const int *sendBuffer, int *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
int Broadcast(char *data, vtkIdType length, int srcProcessId)
vtkDataObject * ReceiveDataObject(int remoteHandle, int tag)
int Gather(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int destProcessId)
void(* vtkRMIFunctionType)(void *localArg, void *remoteArg, int remoteArgLength, int remoteProcessId)
int Gather(const float *sendBuffer, float *recvBuffer, vtkIdType length, int destProcessId)
int Reduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int operation, int destProcessId)
void TriggerRMI(int remoteProcessId, const char *arg, int tag)
virtual void PrintSelf(ostream &os, vtkIndent indent)
int Reduce(const int *sendBuffer, int *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId)
int AllReduce(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
int Broadcast(float *data, vtkIdType length, int srcProcessId)
a simple class to control print indentation
Definition: vtkIndent.h:37
int AllReduce(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int operation)
topologically and geometrically regular array of data
Definition: vtkImageData.h:43
virtual vtkIdType GetCount()
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
A subgroup of processes from a communicator.
int Broadcast(vtkDataObject *data, int srcProcessId)
vtkDataObject * ReceiveDataObject(int remoteId, int tag)
int GatherV(const char *sendBuffer, char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
int AllReduce(const double *sendBuffer, double *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
int AllGather(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer)
int AllGather(const int *sendBuffer, int *recvBuffer, vtkIdType length)
int Broadcast(unsigned int *data, vtkIdType length, int srcProcessId)
base class for writing debug output to a console
int AllGatherV(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
int Broadcast(unsigned char *data, vtkIdType length, int srcProcessId)
int Reduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkCommunicator::Operation *operation, int destProcessId)
int GatherV(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
int AllReduce(const double *sendBuffer, double *recvBuffer, vtkIdType length, int operation)
int Reduce(const double *sendBuffer, double *recvBuffer, vtkIdType length, int operation, int destProcessId)
virtual void Barrier()
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)
int ScatterV(const float *sendBuffer, float *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
int ScatterV(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
int Send(const int *data, vtkIdType length, int remoteProcessId, int tag)
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:51
int Scatter(const float *sendBuffer, float *recvBuffer, vtkIdType length, int srcProcessId)
int Gather(const double *sendBuffer, double *recvBuffer, vtkIdType length, int destProcessId)
int AllGatherV(const float *sendBuffer, float *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
int Broadcast(vtkDataArray *data, int srcProcessId)
int Receive(int *data, vtkIdType maxlength, int remoteProcessId, int tag)
#define VTK_PARALLEL_EXPORT
int Reduce(const float *sendBuffer, float *recvBuffer, vtkIdType length, int operation, int destProcessId)
int Broadcast(double *data, vtkIdType length, int srcProcessId)
int Reduce(const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, int operation, int destProcessId)
int Reduce(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, int operation, int destProcessId)
int Gather(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int destProcessId)
int Broadcast(unsigned long *data, vtkIdType length, int srcProcessId)
int Reduce(const float *sendBuffer, float *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId)
int Scatter(const char *sendBuffer, char *recvBuffer, vtkIdType length, int srcProcessId)
int AllGatherV(const char *sendBuffer, char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
int Reduce(const char *sendBuffer, char *recvBuffer, vtkIdType length, int operation, int destProcessId)
int Scatter(const double *sendBuffer, double *recvBuffer, vtkIdType length, int srcProcessId)
Used to send/receive messages in a multiprocess environment.
general representation of visualization data
Definition: vtkDataObject.h:70
int AllReduce(const float *sendBuffer, float *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
int Gather(const int *sendBuffer, int *recvBuffer, vtkIdType length, int destProcessId)
int GatherV(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
int AllReduce(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation)
int GatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int destProcessId)
int ScatterV(const int *sendBuffer, int *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
int Gather(const char *sendBuffer, char *recvBuffer, vtkIdType length, int destProcessId)
int AllGather(const char *sendBuffer, char *recvBuffer, vtkIdType length)
Multiprocessing communication superclass.