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 =========================================================================*/
54 #ifndef vtkMultiProcessController_h
55 #define vtkMultiProcessController_h
56 
57 #include "vtkParallelCoreModule.h" // For export macro
58 #include "vtkObject.h"
59 
60 #include "vtkCommunicator.h" // Needed for direct access to communicator
61 
62 class vtkCollection;
63 class vtkDataObject;
64 class vtkDataSet;
65 class vtkImageData;
68 class vtkOutputWindow;
69 class vtkProcessGroup;
70 class vtkProcess;
71 
72 //BTX
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 //ETX
82 
83 
85 {
86 public:
88  void PrintSelf(ostream& os, vtkIndent indent);
89 
93  virtual void Initialize(int* vtkNotUsed(argc), char*** vtkNotUsed(argv))=0;
94 
96 
99  virtual void Initialize(int* vtkNotUsed(argc), char*** vtkNotUsed(argv),
100  int initializedExternally)=0;
102 
105  virtual void Finalize()=0;
106 
110  virtual void Finalize(int finalizedExternally)=0;
111 
113 
116  void SetNumberOfProcesses(int num);
117  int GetNumberOfProcesses();
119 
120  //BTX
124  void SetSingleMethod(vtkProcessFunctionType, void *data);
125 
127 
130  void SetSingleProcessObject(vtkProcess *p);
131  //ETX
133 
137  virtual void SingleMethodExecute() = 0;
138 
139  //BTX
141 
145  void SetMultipleMethod(int index, vtkProcessFunctionType, void *data);
146  //ETX
148 
152  virtual void MultipleMethodExecute() = 0;
153 
155  int GetLocalProcessId();
156 
161  static vtkMultiProcessController *GetGlobalController();
162 
165  virtual void CreateOutputWindow() = 0;
166 
168 
177  virtual vtkMultiProcessController *CreateSubController(
180 
182 
191  virtual vtkMultiProcessController *PartitionController(int localColor,
192  int localKey);
194 
195  //------------------ RMIs --------------------
196  //BTX
207  virtual unsigned long AddRMI(vtkRMIFunctionType, void *localArg, int tag);
208 
210  virtual int RemoveFirstRMI(int tag);
211 
214  virtual int RemoveRMI(unsigned long id);
215 
217 
218  virtual void RemoveRMI(vtkRMIFunctionType f, void *arg, int tag)
219  {(void)f; (void)arg; (void)tag; vtkErrorMacro("RemoveRMI Not Implemented Yet");};
221 
226  virtual unsigned long AddRMICallback(vtkRMIFunctionType, void* localArg, int tag);
227 
231  virtual void RemoveAllRMICallbacks(int tag);
232 
234  virtual bool RemoveRMICallback(unsigned long id);
235 
236  //ETX
237 
239  void TriggerRMI(int remoteProcessId, void *arg, int argLength, int tag);
240 
243  void TriggerBreakRMIs();
244 
246 
247  void TriggerRMI(int remoteProcessId, const char *arg, int tag)
248  { this->TriggerRMI(remoteProcessId, (void*)arg,
249  static_cast<int>(strlen(arg))+1, tag); }
251 
253 
254  void TriggerRMI(int remoteProcessId, int tag)
255  { this->TriggerRMI(remoteProcessId, NULL, 0, tag); }
257 
259 
265  void TriggerRMIOnAllChildren(void *arg, int argLength, int tag);
266  void TriggerRMIOnAllChildren(const char *arg, int tag)
267  {
268  this->TriggerRMIOnAllChildren(
269  (void*)arg, static_cast<int>(strlen(arg))+1, tag);
270  }
272  {
273  this->TriggerRMIOnAllChildren(NULL, 0, tag);
274  }
275  void BroadcastTriggerRMIOnAllChildren(void* arg, int argLength, int tag);
277 
279 
286  int ProcessRMIs(int reportErrors, int dont_loop = 0);
287  int ProcessRMIs();
288  int BroadcastProcessRMIs(int reportErrors, int dont_loop=0);
290 
292 
295  vtkSetMacro(BreakFlag, int);
296  vtkGetMacro(BreakFlag, int);
298 
300 
303  vtkSetMacro(BroadcastTriggerRMI,bool);
304  vtkGetMacro(BroadcastTriggerRMI,bool);
305  vtkBooleanMacro(BroadcastTriggerRMI,bool);
307 
309 
311  vtkGetObjectMacro(Communicator, vtkCommunicator);
313 
315 
316  static int GetBreakRMITag() { return BREAK_RMI_TAG; }
317  static int GetRMITag() { return RMI_TAG; }
318  static int GetRMIArgTag() { return RMI_ARG_TAG; }
320 
321 //BTX
322 
323  enum Errors
324  {
327  RMI_ARG_ERROR
328  };
329 
330  enum Consts
331  {
332  ANY_SOURCE = -1,
333  INVALID_SOURCE = -2
334  };
335 
336  enum Tags
337  {
338  RMI_TAG = 1,
339  RMI_ARG_TAG = 2,
340  BREAK_RMI_TAG = 3,
341  XML_WRITER_DATA_INFO = 4
342  };
343 
344 //ETX
345 
347  void Barrier();
348 
349  static void SetGlobalController(vtkMultiProcessController *controller);
350 
351  //------------------ Communication --------------------
352 
354 
359  int Send(const int* data, vtkIdType length, int remoteProcessId, int tag);
360  int Send(const unsigned int* data, vtkIdType length, int remoteProcessId, int tag);
361  int Send(const unsigned long* data, vtkIdType length, int remoteProcessId,
362  int tag);
363  int Send(const char* data, vtkIdType length, int remoteProcessId, int tag);
364  int Send(const unsigned char* data, vtkIdType length, int remoteProcessId, int tag);
365  int Send(const float* data, vtkIdType length, int remoteProcessId, int tag);
366  int Send(const double* data, vtkIdType length, int remoteProcessId, int tag);
367 #ifdef VTK_USE_64BIT_IDS
368  int Send(const vtkIdType* data, vtkIdType length, int remoteProcessId, int tag);
369 #endif
370  int Send(vtkDataObject *data, int remoteId, int tag);
371  int Send(vtkDataArray *data, int remoteId, int tag);
373 
374 //BTX
376 
381  int Send(const vtkMultiProcessStream& stream, int remoteId, int tag);
382 //ETX
384 
386 
394  int Receive(int* data, vtkIdType maxlength, int remoteProcessId, int tag);
395  int Receive(unsigned int* data, vtkIdType maxlength, int remoteProcessId, int tag);
396  int Receive(unsigned long* data, vtkIdType maxlength, int remoteProcessId,
397  int tag);
398  int Receive(char* data, vtkIdType maxlength, int remoteProcessId, int tag);
399  int Receive(unsigned char* data, vtkIdType maxlength, int remoteProcessId, int tag);
400  int Receive(float* data, vtkIdType maxlength, int remoteProcessId, int tag);
401  int Receive(double* data, vtkIdType maxlength, int remoteProcessId, int tag);
402 #ifdef VTK_USE_64BIT_IDS
403  int Receive(vtkIdType* data, vtkIdType maxlength, int remoteProcessId, int tag);
404 #endif
405  int Receive(vtkDataObject* data, int remoteId, int tag);
406  int Receive(vtkDataArray* data, int remoteId, int tag);
407 //BTX
409 
410 
411  int Receive(vtkMultiProcessStream& stream, int remoteId, int tag);
412 //ETX
413  vtkDataObject *ReceiveDataObject(int remoteId, int tag);
415 
423  vtkIdType GetCount();
424 
425 
426  //---------------------- Collective Operations ----------------------
427 
429 
432  int Broadcast(int *data, vtkIdType length, int srcProcessId) {
433  return this->Communicator->Broadcast(data, length, srcProcessId);
434  }
435  int Broadcast(unsigned int *data, vtkIdType length, int srcProcessId) {
436  return this->Communicator->Broadcast(data, length, srcProcessId);
437  }
438  int Broadcast(unsigned long *data, vtkIdType length, int srcProcessId) {
439  return this->Communicator->Broadcast(data, length, srcProcessId);
440  }
441  int Broadcast(unsigned char *data, vtkIdType length, int srcProcessId) {
442  return this->Communicator->Broadcast(data, length, srcProcessId);
443  }
444  int Broadcast(char *data, vtkIdType length, int srcProcessId) {
445  return this->Communicator->Broadcast(data, length, srcProcessId);
446  }
447  int Broadcast(float *data, vtkIdType length, int srcProcessId) {
448  return this->Communicator->Broadcast(data, length, srcProcessId);
449  }
450  int Broadcast(double *data, vtkIdType length, int srcProcessId) {
451  return this->Communicator->Broadcast(data, length, srcProcessId);
452  }
453 #ifdef VTK_USE_64BIT_IDS
454  int Broadcast(vtkIdType *data, vtkIdType length, int srcProcessId) {
455  return this->Communicator->Broadcast(data, length, srcProcessId);
456  }
457 #endif
458  int Broadcast(vtkDataObject *data, int srcProcessId) {
459  return this->Communicator->Broadcast(data, srcProcessId);
460  }
461  int Broadcast(vtkDataArray *data, int srcProcessId) {
462  return this->Communicator->Broadcast(data, srcProcessId);
463  }
464 //BTX
465  int Broadcast(vtkMultiProcessStream& stream, int srcProcessId) {
466  return this->Communicator->Broadcast(stream, srcProcessId);
467  }
468 //ETX
470 
472 
480  int Gather(const int *sendBuffer, int *recvBuffer,
481  vtkIdType length, int destProcessId) {
482  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
483  destProcessId);
484  }
485  int Gather(const unsigned long *sendBuffer, unsigned long *recvBuffer,
486  vtkIdType length, int destProcessId) {
487  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
488  destProcessId);
489  }
490  int Gather(const unsigned char *sendBuffer, unsigned char *recvBuffer,
491  vtkIdType length, int destProcessId) {
492  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
493  destProcessId);
494  }
495  int Gather(const char *sendBuffer, char *recvBuffer,
496  vtkIdType length, int destProcessId) {
497  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
498  destProcessId);
499  }
500  int Gather(const float *sendBuffer, float *recvBuffer,
501  vtkIdType length, int destProcessId) {
502  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
503  destProcessId);
504  }
505  int Gather(const double *sendBuffer, double *recvBuffer,
506  vtkIdType length, int destProcessId) {
507  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
508  destProcessId);
509  }
510 #ifdef VTK_USE_64BIT_IDS
511  int Gather(const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
512  vtkIdType length, int destProcessId) {
513  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
514  destProcessId);
515  }
516 #endif
517  int Gather(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
518  int destProcessId) {
519  return this->Communicator->Gather(sendBuffer, recvBuffer, destProcessId);
520  }
522 
524 
534  int GatherV(const int* sendBuffer, int* recvBuffer,
535  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
536  int destProcessId) {
537  return this->Communicator->GatherV(sendBuffer, recvBuffer,
538  sendLength, recvLengths,
539  offsets, destProcessId);
540  }
541  int GatherV(const unsigned long* sendBuffer, unsigned long* recvBuffer,
542  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
543  int destProcessId) {
544  return this->Communicator->GatherV(sendBuffer, recvBuffer,
545  sendLength, recvLengths,
546  offsets, destProcessId);
547  }
548  int GatherV(const unsigned char* sendBuffer, unsigned char* recvBuffer,
549  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
550  int destProcessId) {
551  return this->Communicator->GatherV(sendBuffer, recvBuffer,
552  sendLength, recvLengths,
553  offsets, destProcessId);
554  }
555  int GatherV(const char* sendBuffer, char* recvBuffer,
556  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
557  int destProcessId) {
558  return this->Communicator->GatherV(sendBuffer, recvBuffer,
559  sendLength, recvLengths,
560  offsets, destProcessId);
561  }
562  int GatherV(const float* sendBuffer, float* recvBuffer,
563  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
564  int destProcessId) {
565  return this->Communicator->GatherV(sendBuffer, recvBuffer,
566  sendLength, recvLengths,
567  offsets, destProcessId);
568  }
569  int GatherV(const double* sendBuffer, double* recvBuffer,
570  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
571  int destProcessId) {
572  return this->Communicator->GatherV(sendBuffer, recvBuffer,
573  sendLength, recvLengths,
574  offsets, destProcessId);
575  }
576 #ifdef VTK_USE_64BIT_IDS
577  int GatherV(const vtkIdType* sendBuffer, vtkIdType* recvBuffer,
578  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
579  int destProcessId) {
580  return this->Communicator->GatherV(sendBuffer, recvBuffer,
581  sendLength, recvLengths,
582  offsets, destProcessId);
583  }
584 #endif
585  int GatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
586  vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId) {
587  return this->Communicator->GatherV(sendBuffer, recvBuffer,
588  recvLengths, offsets,
589  destProcessId);
590  }
592 
594 
599  int GatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
600  int destProcessId) {
601  return this->Communicator->GatherV(sendBuffer, recvBuffer, destProcessId);
602  }
604 
606 
611  int Scatter(const int *sendBuffer, int *recvBuffer,
612  vtkIdType length, int srcProcessId) {
613  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
614  srcProcessId);
615  }
616  int Scatter(const unsigned long *sendBuffer, unsigned long *recvBuffer,
617  vtkIdType length, int srcProcessId) {
618  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
619  srcProcessId);
620  }
621  int Scatter(const unsigned char *sendBuffer, unsigned char *recvBuffer,
622  vtkIdType length, int srcProcessId) {
623  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
624  srcProcessId);
625  }
626  int Scatter(const char *sendBuffer, char *recvBuffer,
627  vtkIdType length, int srcProcessId) {
628  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
629  srcProcessId);
630  }
631  int Scatter(const float *sendBuffer, float *recvBuffer,
632  vtkIdType length, int srcProcessId) {
633  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
634  srcProcessId);
635  }
636  int Scatter(const double *sendBuffer, double *recvBuffer,
637  vtkIdType length, int srcProcessId) {
638  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
639  srcProcessId);
640  }
641 #ifdef VTK_USE_64BIT_IDS
642  int Scatter(const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
643  vtkIdType length, int srcProcessId) {
644  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
645  srcProcessId);
646  }
647 #endif
648  int Scatter(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
649  int srcProcessId) {
650  return this->Communicator->Scatter(sendBuffer, recvBuffer, srcProcessId);
651  }
653 
655 
661  int ScatterV(const int *sendBuffer, int *recvBuffer,
662  vtkIdType *sendLengths, vtkIdType *offsets,
663  vtkIdType recvLength, int srcProcessId) {
664  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
665  sendLengths, offsets, recvLength,
666  srcProcessId);
667  }
668  int ScatterV(const unsigned long *sendBuffer, unsigned long *recvBuffer,
669  vtkIdType *sendLengths, vtkIdType *offsets,
670  vtkIdType recvLength, int srcProcessId) {
671  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
672  sendLengths, offsets, recvLength,
673  srcProcessId);
674  }
675  int ScatterV(const unsigned char *sendBuffer, unsigned char *recvBuffer,
676  vtkIdType *sendLengths, vtkIdType *offsets,
677  vtkIdType recvLength, int srcProcessId) {
678  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
679  sendLengths, offsets, recvLength,
680  srcProcessId);
681  }
682  int ScatterV(const char *sendBuffer, char *recvBuffer,
683  vtkIdType *sendLengths, vtkIdType *offsets,
684  vtkIdType recvLength, int srcProcessId) {
685  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
686  sendLengths, offsets, recvLength,
687  srcProcessId);
688  }
689  int ScatterV(const float *sendBuffer, float *recvBuffer,
690  vtkIdType *sendLengths, vtkIdType *offsets,
691  vtkIdType recvLength, int srcProcessId) {
692  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
693  sendLengths, offsets, recvLength,
694  srcProcessId);
695  }
696  int ScatterV(const double *sendBuffer, double *recvBuffer,
697  vtkIdType *sendLengths, vtkIdType *offsets,
698  vtkIdType recvLength, int srcProcessId) {
699  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
700  sendLengths, offsets, recvLength,
701  srcProcessId);
702  }
703 #ifdef VTK_USE_64BIT_IDS
704  int ScatterV(const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
705  vtkIdType *sendLengths, vtkIdType *offsets,
706  vtkIdType recvLength, int srcProcessId) {
707  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
708  sendLengths, offsets, recvLength,
709  srcProcessId);
710  }
711 #endif
712 
713 
715 
716  int AllGather(const int *sendBuffer, int *recvBuffer, vtkIdType length) {
717  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
718  }
719  int AllGather(const unsigned long *sendBuffer,
720  unsigned long *recvBuffer, vtkIdType length) {
721  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
722  }
723  int AllGather(const unsigned char *sendBuffer,
724  unsigned char *recvBuffer, vtkIdType length) {
725  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
726  }
727  int AllGather(const char *sendBuffer, char *recvBuffer, vtkIdType length) {
728  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
729  }
730  int AllGather(const float *sendBuffer, float *recvBuffer, vtkIdType length) {
731  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
732  }
733  int AllGather(const double *sendBuffer,
734  double *recvBuffer, vtkIdType length) {
735  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
736  }
737 #ifdef VTK_USE_64BIT_IDS
738  int AllGather(const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
739  vtkIdType length) {
740  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
741  }
742 #endif
743  int AllGather(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer) {
744  return this->Communicator->AllGather(sendBuffer, recvBuffer);
745  }
747 
749 
750  int AllGatherV(const int* sendBuffer, int* recvBuffer,
751  vtkIdType sendLength, vtkIdType* recvLengths,
752  vtkIdType* offsets) {
753  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
754  sendLength, recvLengths,
755  offsets);
756  }
757  int AllGatherV(const unsigned long* sendBuffer, unsigned long* recvBuffer,
758  vtkIdType sendLength, vtkIdType* recvLengths,
759  vtkIdType* offsets) {
760  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
761  sendLength, recvLengths,
762  offsets);
763  }
764  int AllGatherV(const unsigned char* sendBuffer, unsigned char* recvBuffer,
765  vtkIdType sendLength, vtkIdType* recvLengths,
766  vtkIdType* offsets) {
767  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
768  sendLength, recvLengths,
769  offsets);
770  }
771  int AllGatherV(const char* sendBuffer, char* recvBuffer,
772  vtkIdType sendLength, vtkIdType* recvLengths,
773  vtkIdType* offsets) {
774  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
775  sendLength, recvLengths,
776  offsets);
777  }
778  int AllGatherV(const float* sendBuffer, float* recvBuffer,
779  vtkIdType sendLength, vtkIdType* recvLengths,
780  vtkIdType* offsets) {
781  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
782  sendLength, recvLengths,
783  offsets);
784  }
785  int AllGatherV(const double* sendBuffer, double* recvBuffer,
786  vtkIdType sendLength, vtkIdType* recvLengths,
787  vtkIdType* offsets) {
788  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
789  sendLength, recvLengths,
790  offsets);
791  }
792 #ifdef VTK_USE_64BIT_IDS
793  int AllGatherV(const vtkIdType* sendBuffer, vtkIdType* recvBuffer,
794  vtkIdType sendLength, vtkIdType* recvLengths,
795  vtkIdType* offsets) {
796  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
797  sendLength, recvLengths,
798  offsets);
799  }
800 #endif
801  int AllGatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
802  vtkIdType *recvLengths, vtkIdType *offsets) {
803  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
804  recvLengths, offsets);
805  }
807 
809 
814  int AllGatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer) {
815  return this->Communicator->AllGatherV(sendBuffer, recvBuffer);
816  }
818 
820 
823  int Reduce(const int *sendBuffer, int *recvBuffer,
824  vtkIdType length, int operation, int destProcessId) {
825  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
826  operation, destProcessId);
827  }
828  int Reduce(const unsigned int *sendBuffer, unsigned int *recvBuffer,
829  vtkIdType length, int operation, int destProcessId) {
830  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
831  operation, destProcessId);
832  }
833  int Reduce(const unsigned long *sendBuffer, unsigned long *recvBuffer,
834  vtkIdType length, int operation, int destProcessId) {
835  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
836  operation, destProcessId);
837  }
838  int Reduce(const unsigned char *sendBuffer, unsigned char *recvBuffer,
839  vtkIdType length, int operation, int destProcessId) {
840  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
841  operation, destProcessId);
842  }
843  int Reduce(const char *sendBuffer, char *recvBuffer,
844  vtkIdType length, int operation, int destProcessId) {
845  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
846  operation, destProcessId);
847  }
848  int Reduce(const float *sendBuffer, float *recvBuffer,
849  vtkIdType length, int operation, int destProcessId) {
850  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
851  operation, destProcessId);
852  }
853  int Reduce(const double *sendBuffer, double *recvBuffer,
854  vtkIdType length, int operation, int destProcessId) {
855  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
856  operation, destProcessId);
857  }
858 #ifdef VTK_USE_64BIT_IDS
859  int Reduce(const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
860  vtkIdType length, int operation, int destProcessId) {
861  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
862  operation, destProcessId);
863  }
864 #endif
865  int Reduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
866  int operation, int destProcessId) {
867  return this->Communicator->Reduce(sendBuffer, recvBuffer,
868  operation, destProcessId);
869  }
871 
872 //BTX
874 
877  int Reduce(const int *sendBuffer, int *recvBuffer,
878  vtkIdType length, vtkCommunicator::Operation *operation,
879  int destProcessId) {
880  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
881  operation, destProcessId);
882  }
883  int Reduce(const unsigned long *sendBuffer, unsigned long *recvBuffer,
884  vtkIdType length, vtkCommunicator::Operation *operation,
885  int destProcessId) {
886  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
887  operation, destProcessId);
888  }
889  int Reduce(const unsigned char *sendBuffer, unsigned char *recvBuffer,
890  vtkIdType length, vtkCommunicator::Operation *operation,
891  int destProcessId) {
892  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
893  operation, destProcessId);
894  }
895  int Reduce(const char *sendBuffer, char *recvBuffer,
896  vtkIdType length, vtkCommunicator::Operation *operation,
897  int destProcessId) {
898  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
899  operation, destProcessId);
900  }
901  int Reduce(const float *sendBuffer, float *recvBuffer,
902  vtkIdType length, vtkCommunicator::Operation *operation,
903  int destProcessId) {
904  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
905  operation, destProcessId);
906  }
907  int Reduce(const double *sendBuffer, double *recvBuffer,
908  vtkIdType length, vtkCommunicator::Operation *operation,
909  int destProcessId) {
910  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
911  operation, destProcessId);
912  }
913 #ifdef VTK_USE_64BIT_IDS
914  int Reduce(const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
915  vtkIdType length, vtkCommunicator::Operation *operation,
916  int destProcessId) {
917  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
918  operation, destProcessId);
919  }
920 #endif
921  int Reduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
922  vtkCommunicator::Operation *operation, int destProcessId) {
923  return this->Communicator->Reduce(sendBuffer, recvBuffer,
924  operation, destProcessId);
925  }
926 //ETX
928 
930 
932  int AllReduce(const int *sendBuffer, int *recvBuffer,
933  vtkIdType length, int operation) {
934  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
935  operation);
936  }
937  int AllReduce(const unsigned long *sendBuffer, unsigned long *recvBuffer,
938  vtkIdType length, int operation) {
939  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
940  operation);
941  }
942  int AllReduce(const unsigned char *sendBuffer, unsigned char *recvBuffer,
943  vtkIdType length, int operation) {
944  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
945  operation);
946  }
947  int AllReduce(const char *sendBuffer, char *recvBuffer,
948  vtkIdType length, int operation) {
949  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
950  operation);
951  }
952  int AllReduce(const float *sendBuffer, float *recvBuffer,
953  vtkIdType length, int operation) {
954  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
955  operation);
956  }
957  int AllReduce(const double *sendBuffer, double *recvBuffer,
958  vtkIdType length, int operation) {
959  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
960  operation);
961  }
962 #ifdef VTK_USE_64BIT_IDS
963  int AllReduce(const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
964  vtkIdType length, int operation) {
965  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
966  operation);
967  }
968 #endif
969  int AllReduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
970  int operation) {
971  return this->Communicator->AllReduce(sendBuffer, recvBuffer, operation);
972  }
973 //BTX
974  int AllReduce(const int *sendBuffer, int *recvBuffer,
975  vtkIdType length, vtkCommunicator::Operation *operation) {
976  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
977  operation);
978  }
979  int AllReduce(const unsigned long *sendBuffer, unsigned long *recvBuffer,
980  vtkIdType length, vtkCommunicator::Operation *operation) {
981  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
982  operation);
983  }
984  int AllReduce(const unsigned char *sendBuffer, unsigned char *recvBuffer,
985  vtkIdType length, vtkCommunicator::Operation *operation) {
986  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
987  operation);
988  }
989  int AllReduce(const char *sendBuffer, char *recvBuffer,
990  vtkIdType length, vtkCommunicator::Operation *operation) {
991  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
992  operation);
993  }
994  int AllReduce(const float *sendBuffer, float *recvBuffer,
995  vtkIdType length, vtkCommunicator::Operation *operation) {
996  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
997  operation);
998  }
999  int AllReduce(const double *sendBuffer, double *recvBuffer,
1000  vtkIdType length, vtkCommunicator::Operation *operation) {
1001  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
1002  operation);
1003  }
1004 #ifdef VTK_USE_64BIT_IDS
1005  int AllReduce(const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
1006  vtkIdType length, vtkCommunicator::Operation *operation) {
1007  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
1008  operation);
1009  }
1010 #endif
1011  int AllReduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
1012  vtkCommunicator::Operation *operation) {
1013  return this->Communicator->AllReduce(sendBuffer, recvBuffer, operation);
1014  }
1015 //ETX
1017 
1018 // Internally implemented RMI to break the process loop.
1019 
1020 protected:
1023 
1025 
1028  virtual void TriggerRMIInternal(int remoteProcessId,
1029  void* arg, int argLength, int rmiTag, bool propagate);
1031 
1033  void *SingleData;
1034 
1035  void GetMultipleMethod(int index, vtkProcessFunctionType &func, void *&data);
1036 
1037  // This is a flag that can be used by the ports to break
1038  // their update loop. (same as ProcessRMIs)
1040 
1041  void ProcessRMI(int remoteProcessId, void *arg, int argLength, int rmiTag);
1042 
1043  // This method implements "GetGlobalController".
1044  // It needs to be virtual and static.
1045  virtual vtkMultiProcessController *GetLocalController();
1046 
1047 
1048  // This flag can force deep copies during send.
1050 
1051  // This flag can be used to indicate that an MPI Broadcast will be used
1052  // when calling TriggerRMIOnAllChildren(), instead of the binary tree
1053  // propagation of the data to the sattelite ranks from rank 0.
1055 
1057 
1058  // Note that since the communicators can be created differently
1059  // depending on the type of controller, the subclasses are
1060  // responsible of deleting them.
1062 
1063  // Communicator which is a copy of the current user
1064  // level communicator except the context; i.e. even if the tags
1065  // are the same, the RMI messages will not interfere with user
1066  // level messages.
1067  // Note that since the communicators can be created differently
1068  // depending on the type of controller, the subclasses are
1069  // responsible of deleting them.
1071 
1072 private:
1073  vtkMultiProcessController(const vtkMultiProcessController&); // Not implemented.
1074  void operator=(const vtkMultiProcessController&); // Not implemented.
1075 
1076  unsigned long RMICount;
1077 
1078 //BTX
1079  class vtkInternal;
1080  vtkInternal *Internal;
1081 //ETX
1082 };
1083 
1084 
1086  int remoteProcessId, int tag)
1087 {
1088  if (this->Communicator)
1089  {
1090  return this->Communicator->Send(data, remoteProcessId, tag);
1091  }
1092  else
1093  {
1094  return 0;
1095  }
1096 }
1097 
1099  int remoteProcessId, int tag)
1100 {
1101  if (this->Communicator)
1102  {
1103  return this->Communicator->Send(data, remoteProcessId, tag);
1104  }
1105  else
1106  {
1107  return 0;
1108  }
1109 }
1110 
1112  int remoteProcessId, int tag)
1113 {
1114  if (this->Communicator)
1115  {
1116  return this->Communicator->Send(data, length, remoteProcessId, tag);
1117  }
1118  else
1119  {
1120  return 0;
1121  }
1122 }
1123 
1124 inline int vtkMultiProcessController::Send(const unsigned int* data, vtkIdType length,
1125  int remoteProcessId, int tag)
1126 {
1127  if (this->Communicator)
1128  {
1129  return this->Communicator->Send(data, length, remoteProcessId, tag);
1130  }
1131  else
1132  {
1133  return 0;
1134  }
1135 }
1136 
1137 inline int vtkMultiProcessController::Send(const unsigned long* data,
1138  vtkIdType length,
1139  int remoteProcessId,
1140  int tag)
1141 {
1142  if (this->Communicator)
1143  {
1144  return this->Communicator->Send(data, length, remoteProcessId, tag);
1145  }
1146  else
1147  {
1148  return 0;
1149  }
1150 }
1151 
1153  int remoteProcessId, int tag)
1154 {
1155  if (this->Communicator)
1156  {
1157  return this->Communicator->Send(data, length, remoteProcessId, tag);
1158  }
1159  else
1160  {
1161  return 0;
1162  }
1163 }
1164 
1165 inline int vtkMultiProcessController::Send(const unsigned char* data,
1166  vtkIdType length,
1167  int remoteProcessId, int tag)
1168 {
1169  if (this->Communicator)
1170  {
1171  return this->Communicator->Send(data, length, remoteProcessId, tag);
1172  }
1173  else
1174  {
1175  return 0;
1176  }
1177 }
1178 
1180  int remoteProcessId, int tag)
1181 {
1182  if (this->Communicator)
1183  {
1184  return this->Communicator->Send(data, length, remoteProcessId, tag);
1185  }
1186  else
1187  {
1188  return 0;
1189  }
1190 }
1191 
1193  int remoteProcessId, int tag)
1194 {
1195  if (this->Communicator)
1196  {
1197  return this->Communicator->Send(data, length, remoteProcessId, tag);
1198  }
1199  else
1200  {
1201  return 0;
1202  }
1203 }
1204 
1205 #ifdef VTK_USE_64BIT_IDS
1207  vtkIdType length,
1208  int remoteProcessId, int tag)
1209 {
1210  if (this->Communicator)
1211  {
1212  return this->Communicator->Send(data, length, remoteProcessId, tag);
1213  }
1214  else
1215  {
1216  return 0;
1217  }
1218 }
1219 #endif
1220 
1222  int remoteId, int tag)
1223 {
1224  if (this->Communicator)
1225  {
1226  return this->Communicator->Send(stream, remoteId, tag);
1227  }
1228  return 0;
1229 }
1230 
1232  int remoteProcessId, int tag)
1233 {
1234  if (this->Communicator)
1235  {
1236  return this->Communicator->Receive(data, remoteProcessId, tag);
1237  }
1238  else
1239  {
1240  return 0;
1241  }
1242 }
1243 
1245  int remoteProcessId, int tag)
1246 {
1247  if (this->Communicator)
1248  {
1249  return this->Communicator->ReceiveDataObject(remoteProcessId, tag);
1250  }
1251  else
1252  {
1253  return 0;
1254  }
1255 }
1256 
1258  int remoteProcessId, int tag)
1259 {
1260  if (this->Communicator)
1261  {
1262  return this->Communicator->Receive(data, remoteProcessId, tag);
1263  }
1264  else
1265  {
1266  return 0;
1267  }
1268 }
1269 
1270 inline int vtkMultiProcessController::Receive(int* data, vtkIdType length,
1271  int remoteProcessId, int tag)
1272 {
1273  if (this->Communicator)
1274  {
1275  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1276  }
1277  else
1278  {
1279  return 0;
1280  }
1281 }
1282 
1283 inline int vtkMultiProcessController::Receive(unsigned int* data, vtkIdType length,
1284  int remoteProcessId, int tag)
1285 {
1286  if (this->Communicator)
1287  {
1288  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1289  }
1290  else
1291  {
1292  return 0;
1293  }
1294 }
1295 
1296 inline int vtkMultiProcessController::Receive(unsigned long* data,
1297  vtkIdType length,
1298  int remoteProcessId,
1299  int tag)
1300 {
1301  if (this->Communicator)
1302  {
1303  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1304  }
1305  else
1306  {
1307  return 0;
1308  }
1309 }
1310 
1311 inline int vtkMultiProcessController::Receive(char* data, vtkIdType length,
1312  int remoteProcessId, int tag)
1313 {
1314  if (this->Communicator)
1315  {
1316  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1317  }
1318  else
1319  {
1320  return 0;
1321  }
1322 }
1323 
1324 inline int vtkMultiProcessController::Receive(unsigned char* data,
1325  vtkIdType length,
1326  int remoteProcessId, int tag)
1327 {
1328  if (this->Communicator)
1329  {
1330  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1331  }
1332  else
1333  {
1334  return 0;
1335  }
1336 }
1337 
1338 inline int vtkMultiProcessController::Receive(float* data, vtkIdType length,
1339  int remoteProcessId, int tag)
1340 {
1341  if (this->Communicator)
1342  {
1343  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1344  }
1345  else
1346  {
1347  return 0;
1348  }
1349 }
1350 
1351 inline int vtkMultiProcessController::Receive(double* data, vtkIdType length,
1352  int remoteProcessId, int tag)
1353 {
1354  if (this->Communicator)
1355  {
1356  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1357  }
1358  else
1359  {
1360  return 0;
1361  }
1362 }
1363 
1364 #ifdef VTK_USE_64BIT_IDS
1366  vtkIdType length,
1367  int remoteProcessId, int tag)
1368 {
1369  if (this->Communicator)
1370  {
1371  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1372  }
1373  else
1374  {
1375  return 0;
1376  }
1377 }
1378 #endif
1379 
1380 
1382  int remoteId, int tag)
1383 {
1384  if (this->Communicator)
1385  {
1386  return this->Communicator->Receive(stream, remoteId, tag);
1387  }
1388  return 0;
1389 }
1390 
1392 {
1393  if (this->Communicator)
1394  {
1395  this->Communicator->Barrier();
1396  }
1397 }
1398 
1400 {
1401  if (this->Communicator)
1402  {
1403  return this->Communicator->GetCount();
1404  }
1405  return 0;
1406 }
1407 
1408 #endif
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: vtkgl.h:11339
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)
GLboolean GLuint group
Definition: vtkgl.h:18647
int Reduce(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int operation, int destProcessId)
#define vtkNotUsed(x)
Definition: vtkSetGet.h:547
GLclampf f
Definition: vtkgl.h:14181
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:61
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)
GLuint index
Definition: vtkgl.h:11983
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)
#define VTKPARALLELCORE_EXPORT
int Scatter(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int srcProcessId)
abstract class to specify dataset behavior
Definition: vtkDataSet.h:59
int AllReduce(const float *sendBuffer, float *recvBuffer, vtkIdType length, int operation)
int AllGatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer)
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:83
int AllReduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkCommunicator::Operation *operation)
a process that can be launched by a vtkMultiProcessController
Definition: vtkProcess.h:48
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)
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
GLuint GLsizei GLsizei * length
Definition: vtkgl.h:11992
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:281
int ScatterV(const char *sendBuffer, char *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
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)
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:632
int AllGatherV(const int *sendBuffer, int *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
GLuint GLuint num
Definition: vtkgl.h:16907
int Broadcast(char *data, vtkIdType length, int srcProcessId)
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:38
int AllReduce(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int operation)
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
virtual void RemoveRMI(vtkRMIFunctionType f, void *arg, int tag)
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)
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:222
GLuint GLuint stream
Definition: vtkgl.h:14154
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)
GLenum func
Definition: vtkgl.h:11980
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)
#define vtkErrorMacro(x)
Definition: vtkSetGet.h:468
int Reduce(const double *sendBuffer, double *recvBuffer, vtkIdType length, int operation, int destProcessId)
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:52
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)
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)
#define vtkBooleanMacro(name, type)
Definition: vtkSetGet.h:234
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:64
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)
GLfloat GLfloat p
Definition: vtkgl.h:15717
#define vtkSetMacro(name, type)
Definition: vtkSetGet.h:69
Multiprocessing communication superclass.