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 "vtkParallelCoreModule.h" // For export macro
44 #include "vtkObject.h"
45 
46 #include "vtkCommunicator.h" // Needed for direct access to communicator
47 
48 class vtkCollection;
49 class vtkDataObject;
50 class vtkDataSet;
51 class vtkImageData;
54 class vtkOutputWindow;
55 class vtkProcessGroup;
56 class vtkProcess;
57 
58 //BTX
59 // The type of function that gets called when new processes are initiated.
61  void *userData);
62 
63 // The type of function that gets called when an RMI is triggered.
64 typedef void (*vtkRMIFunctionType)(void *localArg,
65  void *remoteArg, int remoteArgLength,
66  int remoteProcessId);
67 //ETX
68 
69 
71 {
72 public:
74  void PrintSelf(ostream& os, vtkIndent indent);
75 
79  virtual void Initialize(int* vtkNotUsed(argc), char*** vtkNotUsed(argv))=0;
80 
82 
85  virtual void Initialize(int* vtkNotUsed(argc), char*** vtkNotUsed(argv),
86  int initializedExternally)=0;
88 
91  virtual void Finalize()=0;
92 
96  virtual void Finalize(int finalizedExternally)=0;
97 
99 
102  void SetNumberOfProcesses(int num);
103  int GetNumberOfProcesses();
105 
106  //BTX
110  void SetSingleMethod(vtkProcessFunctionType, void *data);
111 
113 
116  void SetSingleProcessObject(vtkProcess *p);
117  //ETX
119 
123  virtual void SingleMethodExecute() = 0;
124 
125  //BTX
127 
131  void SetMultipleMethod(int index, vtkProcessFunctionType, void *data);
132  //ETX
134 
138  virtual void MultipleMethodExecute() = 0;
139 
141  int GetLocalProcessId();
142 
147  static vtkMultiProcessController *GetGlobalController();
148 
151  virtual void CreateOutputWindow() = 0;
152 
154 
163  virtual vtkMultiProcessController *CreateSubController(
166 
168 
177  virtual vtkMultiProcessController *PartitionController(int localColor,
178  int localKey);
180 
181  //------------------ RMIs --------------------
182  //BTX
193  virtual unsigned long AddRMI(vtkRMIFunctionType, void *localArg, int tag);
194 
196  virtual int RemoveFirstRMI(int tag);
197 
200  virtual int RemoveRMI(unsigned long id);
201 
203 
204  virtual void RemoveRMI(vtkRMIFunctionType f, void *arg, int tag)
205  {(void)f; (void)arg; (void)tag; vtkErrorMacro("RemoveRMI Not Implemented Yet");};
207 
212  virtual unsigned long AddRMICallback(vtkRMIFunctionType, void* localArg, int tag);
213 
217  virtual void RemoveAllRMICallbacks(int tag);
218 
220  virtual 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
384 
385 
386  int Receive(vtkMultiProcessStream& stream, int remoteId, int tag);
387 //ETX
388  vtkDataObject *ReceiveDataObject(int remoteId, int tag);
390 
398  vtkIdType GetCount();
399 
400 
401  //---------------------- Collective Operations ----------------------
402 
404 
407  int Broadcast(int *data, vtkIdType length, int srcProcessId) {
408  return this->Communicator->Broadcast(data, length, srcProcessId);
409  }
410  int Broadcast(unsigned int *data, vtkIdType length, int srcProcessId) {
411  return this->Communicator->Broadcast(data, length, srcProcessId);
412  }
413  int Broadcast(unsigned long *data, vtkIdType length, int srcProcessId) {
414  return this->Communicator->Broadcast(data, length, srcProcessId);
415  }
416  int Broadcast(unsigned char *data, vtkIdType length, int srcProcessId) {
417  return this->Communicator->Broadcast(data, length, srcProcessId);
418  }
419  int Broadcast(char *data, vtkIdType length, int srcProcessId) {
420  return this->Communicator->Broadcast(data, length, srcProcessId);
421  }
422  int Broadcast(float *data, vtkIdType length, int srcProcessId) {
423  return this->Communicator->Broadcast(data, length, srcProcessId);
424  }
425  int Broadcast(double *data, vtkIdType length, int srcProcessId) {
426  return this->Communicator->Broadcast(data, length, srcProcessId);
427  }
428 #ifdef VTK_USE_64BIT_IDS
429  int Broadcast(vtkIdType *data, vtkIdType length, int srcProcessId) {
430  return this->Communicator->Broadcast(data, length, srcProcessId);
431  }
432 #endif
433  int Broadcast(vtkDataObject *data, int srcProcessId) {
434  return this->Communicator->Broadcast(data, srcProcessId);
435  }
436  int Broadcast(vtkDataArray *data, int srcProcessId) {
437  return this->Communicator->Broadcast(data, srcProcessId);
438  }
439 //BTX
440  int Broadcast(vtkMultiProcessStream& stream, int srcProcessId) {
441  return this->Communicator->Broadcast(stream, srcProcessId);
442  }
443 //ETX
445 
447 
455  int Gather(const int *sendBuffer, int *recvBuffer,
456  vtkIdType length, int destProcessId) {
457  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
458  destProcessId);
459  }
460  int Gather(const unsigned long *sendBuffer, unsigned long *recvBuffer,
461  vtkIdType length, int destProcessId) {
462  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
463  destProcessId);
464  }
465  int Gather(const unsigned char *sendBuffer, unsigned char *recvBuffer,
466  vtkIdType length, int destProcessId) {
467  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
468  destProcessId);
469  }
470  int Gather(const char *sendBuffer, char *recvBuffer,
471  vtkIdType length, int destProcessId) {
472  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
473  destProcessId);
474  }
475  int Gather(const float *sendBuffer, float *recvBuffer,
476  vtkIdType length, int destProcessId) {
477  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
478  destProcessId);
479  }
480  int Gather(const double *sendBuffer, double *recvBuffer,
481  vtkIdType length, int destProcessId) {
482  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
483  destProcessId);
484  }
485 #ifdef VTK_USE_64BIT_IDS
486  int Gather(const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
487  vtkIdType length, int destProcessId) {
488  return this->Communicator->Gather(sendBuffer, recvBuffer, length,
489  destProcessId);
490  }
491 #endif
492  int Gather(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
493  int destProcessId) {
494  return this->Communicator->Gather(sendBuffer, recvBuffer, destProcessId);
495  }
497 
499 
509  int GatherV(const int* sendBuffer, int* recvBuffer,
510  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
511  int destProcessId) {
512  return this->Communicator->GatherV(sendBuffer, recvBuffer,
513  sendLength, recvLengths,
514  offsets, destProcessId);
515  }
516  int GatherV(const unsigned long* sendBuffer, unsigned long* recvBuffer,
517  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
518  int destProcessId) {
519  return this->Communicator->GatherV(sendBuffer, recvBuffer,
520  sendLength, recvLengths,
521  offsets, destProcessId);
522  }
523  int GatherV(const unsigned char* sendBuffer, unsigned char* recvBuffer,
524  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
525  int destProcessId) {
526  return this->Communicator->GatherV(sendBuffer, recvBuffer,
527  sendLength, recvLengths,
528  offsets, destProcessId);
529  }
530  int GatherV(const char* sendBuffer, char* recvBuffer,
531  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
532  int destProcessId) {
533  return this->Communicator->GatherV(sendBuffer, recvBuffer,
534  sendLength, recvLengths,
535  offsets, destProcessId);
536  }
537  int GatherV(const float* sendBuffer, float* recvBuffer,
538  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
539  int destProcessId) {
540  return this->Communicator->GatherV(sendBuffer, recvBuffer,
541  sendLength, recvLengths,
542  offsets, destProcessId);
543  }
544  int GatherV(const double* sendBuffer, double* recvBuffer,
545  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
546  int destProcessId) {
547  return this->Communicator->GatherV(sendBuffer, recvBuffer,
548  sendLength, recvLengths,
549  offsets, destProcessId);
550  }
551 #ifdef VTK_USE_64BIT_IDS
552  int GatherV(const vtkIdType* sendBuffer, vtkIdType* recvBuffer,
553  vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
554  int destProcessId) {
555  return this->Communicator->GatherV(sendBuffer, recvBuffer,
556  sendLength, recvLengths,
557  offsets, destProcessId);
558  }
559 #endif
560  int GatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
561  vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId) {
562  return this->Communicator->GatherV(sendBuffer, recvBuffer,
563  recvLengths, offsets,
564  destProcessId);
565  }
567 
569 
574  int GatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
575  int destProcessId) {
576  return this->Communicator->GatherV(sendBuffer, recvBuffer, destProcessId);
577  }
579 
581 
586  int Scatter(const int *sendBuffer, int *recvBuffer,
587  vtkIdType length, int srcProcessId) {
588  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
589  srcProcessId);
590  }
591  int Scatter(const unsigned long *sendBuffer, unsigned long *recvBuffer,
592  vtkIdType length, int srcProcessId) {
593  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
594  srcProcessId);
595  }
596  int Scatter(const unsigned char *sendBuffer, unsigned char *recvBuffer,
597  vtkIdType length, int srcProcessId) {
598  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
599  srcProcessId);
600  }
601  int Scatter(const char *sendBuffer, char *recvBuffer,
602  vtkIdType length, int srcProcessId) {
603  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
604  srcProcessId);
605  }
606  int Scatter(const float *sendBuffer, float *recvBuffer,
607  vtkIdType length, int srcProcessId) {
608  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
609  srcProcessId);
610  }
611  int Scatter(const double *sendBuffer, double *recvBuffer,
612  vtkIdType length, int srcProcessId) {
613  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
614  srcProcessId);
615  }
616 #ifdef VTK_USE_64BIT_IDS
617  int Scatter(const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
618  vtkIdType length, int srcProcessId) {
619  return this->Communicator->Scatter(sendBuffer, recvBuffer, length,
620  srcProcessId);
621  }
622 #endif
623  int Scatter(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
624  int srcProcessId) {
625  return this->Communicator->Scatter(sendBuffer, recvBuffer, srcProcessId);
626  }
628 
630 
636  int ScatterV(const int *sendBuffer, int *recvBuffer,
637  vtkIdType *sendLengths, vtkIdType *offsets,
638  vtkIdType recvLength, int srcProcessId) {
639  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
640  sendLengths, offsets, recvLength,
641  srcProcessId);
642  }
643  int ScatterV(const unsigned long *sendBuffer, unsigned long *recvBuffer,
644  vtkIdType *sendLengths, vtkIdType *offsets,
645  vtkIdType recvLength, int srcProcessId) {
646  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
647  sendLengths, offsets, recvLength,
648  srcProcessId);
649  }
650  int ScatterV(const unsigned char *sendBuffer, unsigned char *recvBuffer,
651  vtkIdType *sendLengths, vtkIdType *offsets,
652  vtkIdType recvLength, int srcProcessId) {
653  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
654  sendLengths, offsets, recvLength,
655  srcProcessId);
656  }
657  int ScatterV(const char *sendBuffer, char *recvBuffer,
658  vtkIdType *sendLengths, vtkIdType *offsets,
659  vtkIdType recvLength, int srcProcessId) {
660  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
661  sendLengths, offsets, recvLength,
662  srcProcessId);
663  }
664  int ScatterV(const float *sendBuffer, float *recvBuffer,
665  vtkIdType *sendLengths, vtkIdType *offsets,
666  vtkIdType recvLength, int srcProcessId) {
667  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
668  sendLengths, offsets, recvLength,
669  srcProcessId);
670  }
671  int ScatterV(const double *sendBuffer, double *recvBuffer,
672  vtkIdType *sendLengths, vtkIdType *offsets,
673  vtkIdType recvLength, int srcProcessId) {
674  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
675  sendLengths, offsets, recvLength,
676  srcProcessId);
677  }
678 #ifdef VTK_USE_64BIT_IDS
679  int ScatterV(const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
680  vtkIdType *sendLengths, vtkIdType *offsets,
681  vtkIdType recvLength, int srcProcessId) {
682  return this->Communicator->ScatterV(sendBuffer, recvBuffer,
683  sendLengths, offsets, recvLength,
684  srcProcessId);
685  }
686 #endif
687 
688 
690 
691  int AllGather(const int *sendBuffer, int *recvBuffer, vtkIdType length) {
692  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
693  }
694  int AllGather(const unsigned long *sendBuffer,
695  unsigned long *recvBuffer, vtkIdType length) {
696  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
697  }
698  int AllGather(const unsigned char *sendBuffer,
699  unsigned char *recvBuffer, vtkIdType length) {
700  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
701  }
702  int AllGather(const char *sendBuffer, char *recvBuffer, vtkIdType length) {
703  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
704  }
705  int AllGather(const float *sendBuffer, float *recvBuffer, vtkIdType length) {
706  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
707  }
708  int AllGather(const double *sendBuffer,
709  double *recvBuffer, vtkIdType length) {
710  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
711  }
712 #ifdef VTK_USE_64BIT_IDS
713  int AllGather(const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
714  vtkIdType length) {
715  return this->Communicator->AllGather(sendBuffer, recvBuffer, length);
716  }
717 #endif
718  int AllGather(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer) {
719  return this->Communicator->AllGather(sendBuffer, recvBuffer);
720  }
722 
724 
725  int AllGatherV(const int* sendBuffer, int* recvBuffer,
726  vtkIdType sendLength, vtkIdType* recvLengths,
727  vtkIdType* offsets) {
728  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
729  sendLength, recvLengths,
730  offsets);
731  }
732  int AllGatherV(const unsigned long* sendBuffer, unsigned long* recvBuffer,
733  vtkIdType sendLength, vtkIdType* recvLengths,
734  vtkIdType* offsets) {
735  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
736  sendLength, recvLengths,
737  offsets);
738  }
739  int AllGatherV(const unsigned char* sendBuffer, unsigned char* recvBuffer,
740  vtkIdType sendLength, vtkIdType* recvLengths,
741  vtkIdType* offsets) {
742  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
743  sendLength, recvLengths,
744  offsets);
745  }
746  int AllGatherV(const char* sendBuffer, char* recvBuffer,
747  vtkIdType sendLength, vtkIdType* recvLengths,
748  vtkIdType* offsets) {
749  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
750  sendLength, recvLengths,
751  offsets);
752  }
753  int AllGatherV(const float* sendBuffer, float* recvBuffer,
754  vtkIdType sendLength, vtkIdType* recvLengths,
755  vtkIdType* offsets) {
756  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
757  sendLength, recvLengths,
758  offsets);
759  }
760  int AllGatherV(const double* sendBuffer, double* recvBuffer,
761  vtkIdType sendLength, vtkIdType* recvLengths,
762  vtkIdType* offsets) {
763  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
764  sendLength, recvLengths,
765  offsets);
766  }
767 #ifdef VTK_USE_64BIT_IDS
768  int AllGatherV(const vtkIdType* sendBuffer, vtkIdType* recvBuffer,
769  vtkIdType sendLength, vtkIdType* recvLengths,
770  vtkIdType* offsets) {
771  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
772  sendLength, recvLengths,
773  offsets);
774  }
775 #endif
776  int AllGatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
777  vtkIdType *recvLengths, vtkIdType *offsets) {
778  return this->Communicator->AllGatherV(sendBuffer, recvBuffer,
779  recvLengths, offsets);
780  }
782 
784 
789  int AllGatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer) {
790  return this->Communicator->AllGatherV(sendBuffer, recvBuffer);
791  }
793 
795 
798  int Reduce(const int *sendBuffer, int *recvBuffer,
799  vtkIdType length, int operation, int destProcessId) {
800  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
801  operation, destProcessId);
802  }
803  int Reduce(const unsigned int *sendBuffer, unsigned int *recvBuffer,
804  vtkIdType length, int operation, int destProcessId) {
805  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
806  operation, destProcessId);
807  }
808  int Reduce(const unsigned long *sendBuffer, unsigned long *recvBuffer,
809  vtkIdType length, int operation, int destProcessId) {
810  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
811  operation, destProcessId);
812  }
813  int Reduce(const unsigned char *sendBuffer, unsigned char *recvBuffer,
814  vtkIdType length, int operation, int destProcessId) {
815  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
816  operation, destProcessId);
817  }
818  int Reduce(const char *sendBuffer, char *recvBuffer,
819  vtkIdType length, int operation, int destProcessId) {
820  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
821  operation, destProcessId);
822  }
823  int Reduce(const float *sendBuffer, float *recvBuffer,
824  vtkIdType length, int operation, int destProcessId) {
825  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
826  operation, destProcessId);
827  }
828  int Reduce(const double *sendBuffer, double *recvBuffer,
829  vtkIdType length, int operation, int destProcessId) {
830  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
831  operation, destProcessId);
832  }
833 #ifdef VTK_USE_64BIT_IDS
834  int Reduce(const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
835  vtkIdType length, int operation, int destProcessId) {
836  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
837  operation, destProcessId);
838  }
839 #endif
840  int Reduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
841  int operation, int destProcessId) {
842  return this->Communicator->Reduce(sendBuffer, recvBuffer,
843  operation, destProcessId);
844  }
846 
847 //BTX
849 
852  int Reduce(const int *sendBuffer, int *recvBuffer,
853  vtkIdType length, vtkCommunicator::Operation *operation,
854  int destProcessId) {
855  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
856  operation, destProcessId);
857  }
858  int Reduce(const unsigned long *sendBuffer, unsigned long *recvBuffer,
859  vtkIdType length, vtkCommunicator::Operation *operation,
860  int destProcessId) {
861  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
862  operation, destProcessId);
863  }
864  int Reduce(const unsigned char *sendBuffer, unsigned char *recvBuffer,
865  vtkIdType length, vtkCommunicator::Operation *operation,
866  int destProcessId) {
867  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
868  operation, destProcessId);
869  }
870  int Reduce(const char *sendBuffer, char *recvBuffer,
871  vtkIdType length, vtkCommunicator::Operation *operation,
872  int destProcessId) {
873  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
874  operation, destProcessId);
875  }
876  int Reduce(const float *sendBuffer, float *recvBuffer,
877  vtkIdType length, vtkCommunicator::Operation *operation,
878  int destProcessId) {
879  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
880  operation, destProcessId);
881  }
882  int Reduce(const double *sendBuffer, double *recvBuffer,
883  vtkIdType length, vtkCommunicator::Operation *operation,
884  int destProcessId) {
885  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
886  operation, destProcessId);
887  }
888 #ifdef VTK_USE_64BIT_IDS
889  int Reduce(const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
890  vtkIdType length, vtkCommunicator::Operation *operation,
891  int destProcessId) {
892  return this->Communicator->Reduce(sendBuffer, recvBuffer, length,
893  operation, destProcessId);
894  }
895 #endif
896  int Reduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
897  vtkCommunicator::Operation *operation, int destProcessId) {
898  return this->Communicator->Reduce(sendBuffer, recvBuffer,
899  operation, destProcessId);
900  }
901 //ETX
903 
905 
907  int AllReduce(const int *sendBuffer, int *recvBuffer,
908  vtkIdType length, int operation) {
909  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
910  operation);
911  }
912  int AllReduce(const unsigned long *sendBuffer, unsigned long *recvBuffer,
913  vtkIdType length, int operation) {
914  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
915  operation);
916  }
917  int AllReduce(const unsigned char *sendBuffer, unsigned char *recvBuffer,
918  vtkIdType length, int operation) {
919  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
920  operation);
921  }
922  int AllReduce(const char *sendBuffer, char *recvBuffer,
923  vtkIdType length, int operation) {
924  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
925  operation);
926  }
927  int AllReduce(const float *sendBuffer, float *recvBuffer,
928  vtkIdType length, int operation) {
929  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
930  operation);
931  }
932  int AllReduce(const double *sendBuffer, double *recvBuffer,
933  vtkIdType length, int operation) {
934  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
935  operation);
936  }
937 #ifdef VTK_USE_64BIT_IDS
938  int AllReduce(const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
939  vtkIdType length, int operation) {
940  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
941  operation);
942  }
943 #endif
944  int AllReduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
945  int operation) {
946  return this->Communicator->AllReduce(sendBuffer, recvBuffer, operation);
947  }
948 //BTX
949  int AllReduce(const int *sendBuffer, int *recvBuffer,
950  vtkIdType length, vtkCommunicator::Operation *operation) {
951  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
952  operation);
953  }
954  int AllReduce(const unsigned long *sendBuffer, unsigned long *recvBuffer,
955  vtkIdType length, vtkCommunicator::Operation *operation) {
956  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
957  operation);
958  }
959  int AllReduce(const unsigned char *sendBuffer, unsigned char *recvBuffer,
960  vtkIdType length, vtkCommunicator::Operation *operation) {
961  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
962  operation);
963  }
964  int AllReduce(const char *sendBuffer, char *recvBuffer,
965  vtkIdType length, vtkCommunicator::Operation *operation) {
966  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
967  operation);
968  }
969  int AllReduce(const float *sendBuffer, float *recvBuffer,
970  vtkIdType length, vtkCommunicator::Operation *operation) {
971  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
972  operation);
973  }
974  int AllReduce(const double *sendBuffer, double *recvBuffer,
975  vtkIdType length, vtkCommunicator::Operation *operation) {
976  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
977  operation);
978  }
979 #ifdef VTK_USE_64BIT_IDS
980  int AllReduce(const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
981  vtkIdType length, vtkCommunicator::Operation *operation) {
982  return this->Communicator->AllReduce(sendBuffer, recvBuffer, length,
983  operation);
984  }
985 #endif
986  int AllReduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
987  vtkCommunicator::Operation *operation) {
988  return this->Communicator->AllReduce(sendBuffer, recvBuffer, operation);
989  }
990 //ETX
992 
993 // Internally implemented RMI to break the process loop.
994 
995 protected:
998 
1000 
1003  virtual void TriggerRMIInternal(int remoteProcessId,
1004  void* arg, int argLength, int rmiTag, bool propagate);
1006 
1008  void *SingleData;
1009 
1010  void GetMultipleMethod(int index, vtkProcessFunctionType &func, void *&data);
1011 
1012  // This is a flag that can be used by the ports to break
1013  // their update loop. (same as ProcessRMIs)
1015 
1016  void ProcessRMI(int remoteProcessId, void *arg, int argLength, int rmiTag);
1017 
1018  // This method implements "GetGlobalController".
1019  // It needs to be virtual and static.
1020  virtual vtkMultiProcessController *GetLocalController();
1021 
1022 
1023  // This flag can force deep copies during send.
1025 
1027 
1028  // Note that since the communicators can be created differently
1029  // depending on the type of controller, the subclasses are
1030  // responsible of deleting them.
1032 
1033  // Communicator which is a copy of the current user
1034  // level communicator except the context; i.e. even if the tags
1035  // are the same, the RMI messages will not interfere with user
1036  // level messages.
1037  // Note that since the communicators can be created differently
1038  // depending on the type of controller, the subclasses are
1039  // responsible of deleting them.
1041 
1042 private:
1043  vtkMultiProcessController(const vtkMultiProcessController&); // Not implemented.
1044  void operator=(const vtkMultiProcessController&); // Not implemented.
1045 
1046  unsigned long RMICount;
1047 
1048 //BTX
1049  class vtkInternal;
1050  vtkInternal *Internal;
1051 //ETX
1052 };
1053 
1054 
1056  int remoteProcessId, int tag)
1057 {
1058  if (this->Communicator)
1059  {
1060  return this->Communicator->Send(data, remoteProcessId, tag);
1061  }
1062  else
1063  {
1064  return 0;
1065  }
1066 }
1067 
1069  int remoteProcessId, int tag)
1070 {
1071  if (this->Communicator)
1072  {
1073  return this->Communicator->Send(data, remoteProcessId, tag);
1074  }
1075  else
1076  {
1077  return 0;
1078  }
1079 }
1080 
1081 inline int vtkMultiProcessController::Send(const int* data, vtkIdType length,
1082  int remoteProcessId, int tag)
1083 {
1084  if (this->Communicator)
1085  {
1086  return this->Communicator->Send(data, length, remoteProcessId, tag);
1087  }
1088  else
1089  {
1090  return 0;
1091  }
1092 }
1093 
1094 inline int vtkMultiProcessController::Send(const unsigned int* data, vtkIdType length,
1095  int remoteProcessId, int tag)
1096 {
1097  if (this->Communicator)
1098  {
1099  return this->Communicator->Send(data, length, remoteProcessId, tag);
1100  }
1101  else
1102  {
1103  return 0;
1104  }
1105 }
1106 
1107 inline int vtkMultiProcessController::Send(const unsigned long* data,
1108  vtkIdType length,
1109  int remoteProcessId,
1110  int tag)
1111 {
1112  if (this->Communicator)
1113  {
1114  return this->Communicator->Send(data, length, remoteProcessId, tag);
1115  }
1116  else
1117  {
1118  return 0;
1119  }
1120 }
1121 
1122 inline int vtkMultiProcessController::Send(const char* data, vtkIdType length,
1123  int remoteProcessId, int tag)
1124 {
1125  if (this->Communicator)
1126  {
1127  return this->Communicator->Send(data, length, remoteProcessId, tag);
1128  }
1129  else
1130  {
1131  return 0;
1132  }
1133 }
1134 
1135 inline int vtkMultiProcessController::Send(const unsigned char* data,
1136  vtkIdType length,
1137  int remoteProcessId, int tag)
1138 {
1139  if (this->Communicator)
1140  {
1141  return this->Communicator->Send(data, length, remoteProcessId, tag);
1142  }
1143  else
1144  {
1145  return 0;
1146  }
1147 }
1148 
1149 inline int vtkMultiProcessController::Send(const float* data, vtkIdType length,
1150  int remoteProcessId, int tag)
1151 {
1152  if (this->Communicator)
1153  {
1154  return this->Communicator->Send(data, length, remoteProcessId, tag);
1155  }
1156  else
1157  {
1158  return 0;
1159  }
1160 }
1161 
1162 inline int vtkMultiProcessController::Send(const double* data, vtkIdType length,
1163  int remoteProcessId, int tag)
1164 {
1165  if (this->Communicator)
1166  {
1167  return this->Communicator->Send(data, length, remoteProcessId, tag);
1168  }
1169  else
1170  {
1171  return 0;
1172  }
1173 }
1174 
1175 #ifdef VTK_USE_64BIT_IDS
1176 inline int vtkMultiProcessController::Send(const vtkIdType* data,
1177  vtkIdType length,
1178  int remoteProcessId, int tag)
1179 {
1180  if (this->Communicator)
1181  {
1182  return this->Communicator->Send(data, length, remoteProcessId, tag);
1183  }
1184  else
1185  {
1186  return 0;
1187  }
1188 }
1189 #endif
1190 
1192  int remoteId, int tag)
1193 {
1194  if (this->Communicator)
1195  {
1196  return this->Communicator->Send(stream, remoteId, tag);
1197  }
1198  return 0;
1199 }
1200 
1202  int remoteProcessId, int tag)
1203 {
1204  if (this->Communicator)
1205  {
1206  return this->Communicator->Receive(data, remoteProcessId, tag);
1207  }
1208  else
1209  {
1210  return 0;
1211  }
1212 }
1213 
1215  int remoteProcessId, int tag)
1216 {
1217  if (this->Communicator)
1218  {
1219  return this->Communicator->ReceiveDataObject(remoteProcessId, tag);
1220  }
1221  else
1222  {
1223  return 0;
1224  }
1225 }
1226 
1228  int remoteProcessId, int tag)
1229 {
1230  if (this->Communicator)
1231  {
1232  return this->Communicator->Receive(data, remoteProcessId, tag);
1233  }
1234  else
1235  {
1236  return 0;
1237  }
1238 }
1239 
1240 inline int vtkMultiProcessController::Receive(int* data, vtkIdType length,
1241  int remoteProcessId, int tag)
1242 {
1243  if (this->Communicator)
1244  {
1245  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1246  }
1247  else
1248  {
1249  return 0;
1250  }
1251 }
1252 
1253 inline int vtkMultiProcessController::Receive(unsigned int* data, vtkIdType length,
1254  int remoteProcessId, int tag)
1255 {
1256  if (this->Communicator)
1257  {
1258  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1259  }
1260  else
1261  {
1262  return 0;
1263  }
1264 }
1265 
1266 inline int vtkMultiProcessController::Receive(unsigned long* data,
1267  vtkIdType length,
1268  int remoteProcessId,
1269  int tag)
1270 {
1271  if (this->Communicator)
1272  {
1273  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1274  }
1275  else
1276  {
1277  return 0;
1278  }
1279 }
1280 
1281 inline int vtkMultiProcessController::Receive(char* data, vtkIdType length,
1282  int remoteProcessId, int tag)
1283 {
1284  if (this->Communicator)
1285  {
1286  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1287  }
1288  else
1289  {
1290  return 0;
1291  }
1292 }
1293 
1294 inline int vtkMultiProcessController::Receive(unsigned char* data,
1295  vtkIdType length,
1296  int remoteProcessId, int tag)
1297 {
1298  if (this->Communicator)
1299  {
1300  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1301  }
1302  else
1303  {
1304  return 0;
1305  }
1306 }
1307 
1308 inline int vtkMultiProcessController::Receive(float* data, vtkIdType length,
1309  int remoteProcessId, int tag)
1310 {
1311  if (this->Communicator)
1312  {
1313  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1314  }
1315  else
1316  {
1317  return 0;
1318  }
1319 }
1320 
1321 inline int vtkMultiProcessController::Receive(double* data, vtkIdType length,
1322  int remoteProcessId, int tag)
1323 {
1324  if (this->Communicator)
1325  {
1326  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1327  }
1328  else
1329  {
1330  return 0;
1331  }
1332 }
1333 
1334 #ifdef VTK_USE_64BIT_IDS
1336  vtkIdType length,
1337  int remoteProcessId, int tag)
1338 {
1339  if (this->Communicator)
1340  {
1341  return this->Communicator->Receive(data, length, remoteProcessId, tag);
1342  }
1343  else
1344  {
1345  return 0;
1346  }
1347 }
1348 #endif
1349 
1350 
1352  int remoteId, int tag)
1353 {
1354  if (this->Communicator)
1355  {
1356  return this->Communicator->Receive(stream, remoteId, tag);
1357  }
1358  return 0;
1359 }
1360 
1362 {
1363  if (this->Communicator)
1364  {
1365  this->Communicator->Barrier();
1366  }
1367 }
1368 
1370 {
1371  if (this->Communicator)
1372  {
1373  return this->Communicator->GetCount();
1374  }
1375  return 0;
1376 }
1377 
1378 #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 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: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:60
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:268
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)
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:619
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)
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: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)
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)
#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)
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: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)
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.