34 #ifndef __vtkCommunicator_h
35 #define __vtkCommunicator_h
37 #include "vtkParallelCoreModule.h"
38 #include "vtkObject.h"
46 class vtkMultiBlockDataSet;
55 void PrintSelf(ostream& os, vtkIndent indent);
61 virtual void SetNumberOfProcesses(
int num);
62 vtkGetMacro(NumberOfProcesses,
int);
67 vtkGetMacro(LocalProcessId,
int);
114 virtual void Function(
const void *A,
void *B, vtkIdType length,
120 virtual int Commutative() = 0;
129 int Send(vtkDataObject* data,
int remoteHandle,
int tag);
133 int Send(vtkDataArray* data,
int remoteHandle,
int tag);
140 virtual int SendVoidArray(
const void *data, vtkIdType length,
int type,
141 int remoteHandle,
int tag) = 0;
146 int Send(
const int* data, vtkIdType length,
int remoteHandle,
int tag) {
147 return this->SendVoidArray(data, length, VTK_INT, remoteHandle, tag);
149 int Send(
const unsigned int* data, vtkIdType length,
int remoteHandle,
int tag) {
150 return this->SendVoidArray(data, length, VTK_INT, remoteHandle, tag);
152 int Send(
const unsigned long* data, vtkIdType length,
153 int remoteHandle,
int tag) {
154 return this->SendVoidArray(data, length,VTK_UNSIGNED_LONG,remoteHandle,tag);
156 int Send(
const unsigned char* data, vtkIdType length,
157 int remoteHandle,
int tag) {
158 return this->SendVoidArray(data, length,VTK_UNSIGNED_CHAR,remoteHandle,tag);
160 int Send(
const char* data, vtkIdType length,
int remoteHandle,
int tag) {
161 return this->SendVoidArray(data, length, VTK_CHAR, remoteHandle, tag);
163 int Send(
const float* data, vtkIdType length,
int remoteHandle,
int tag) {
164 return this->SendVoidArray(data, length, VTK_FLOAT, remoteHandle, tag);
166 int Send(
const double* data, vtkIdType length,
int remoteHandle,
int tag) {
167 return this->SendVoidArray(data, length, VTK_DOUBLE, remoteHandle, tag);
169 #ifdef VTK_USE_64BIT_IDS
170 int Send(
const vtkIdType* data, vtkIdType length,
int remoteHandle,
int tag) {
171 return this->SendVoidArray(data, length, VTK_ID_TYPE, remoteHandle, tag);
182 int Receive(vtkDataObject* data,
int remoteHandle,
int tag);
186 vtkDataObject *ReceiveDataObject(
int remoteHandle,
int tag);
190 int Receive(vtkDataArray* data,
int remoteHandle,
int tag);
201 virtual int ReceiveVoidArray(
void *data, vtkIdType maxlength,
int type,
202 int remoteHandle,
int tag) = 0;
207 int Receive(
int* data, vtkIdType maxlength,
int remoteHandle,
int tag) {
208 return this->ReceiveVoidArray(data, maxlength, VTK_INT, remoteHandle, tag);
210 int Receive(
unsigned int* data, vtkIdType maxlength,
int remoteHandle,
int tag) {
211 return this->ReceiveVoidArray(data, maxlength, VTK_INT, remoteHandle, tag);
213 int Receive(
unsigned long* data, vtkIdType maxlength,
int remoteHandle,
int tag){
214 return this->ReceiveVoidArray(data, maxlength, VTK_UNSIGNED_LONG, remoteHandle,
217 int Receive(
unsigned char* data, vtkIdType maxlength,
int remoteHandle,
int tag){
218 return this->ReceiveVoidArray(data, maxlength, VTK_UNSIGNED_CHAR, remoteHandle,
221 int Receive(
char* data, vtkIdType maxlength,
int remoteHandle,
int tag) {
222 return this->ReceiveVoidArray(data, maxlength, VTK_CHAR, remoteHandle, tag);
224 int Receive(
float* data, vtkIdType maxlength,
int remoteHandle,
int tag) {
225 return this->ReceiveVoidArray(data, maxlength, VTK_FLOAT, remoteHandle, tag);
227 int Receive(
double* data, vtkIdType maxlength,
int remoteHandle,
int tag) {
228 return this->ReceiveVoidArray(data, maxlength, VTK_DOUBLE, remoteHandle, tag);
230 #ifdef VTK_USE_64BIT_IDS
231 int Receive(vtkIdType* data, vtkIdType maxlength,
int remoteHandle,
int tag) {
232 return this->ReceiveVoidArray(data, maxlength, VTK_ID_TYPE, remoteHandle, tag);
248 vtkGetMacro(Count, vtkIdType);
255 virtual void Barrier();
261 int Broadcast(
int *data, vtkIdType length,
int srcProcessId) {
262 return this->BroadcastVoidArray(data, length, VTK_INT, srcProcessId);
264 int Broadcast(
unsigned int *data, vtkIdType length,
int srcProcessId) {
265 return this->BroadcastVoidArray(data, length, VTK_UNSIGNED_INT, srcProcessId);
267 int Broadcast(
unsigned long *data, vtkIdType length,
int srcProcessId) {
268 return this->BroadcastVoidArray(data,length,VTK_UNSIGNED_LONG,srcProcessId);
270 int Broadcast(
unsigned char *data, vtkIdType length,
int srcProcessId) {
271 return this->BroadcastVoidArray(data,length,VTK_UNSIGNED_CHAR,srcProcessId);
273 int Broadcast(
char *data, vtkIdType length,
int srcProcessId) {
274 return this->BroadcastVoidArray(data, length, VTK_CHAR, srcProcessId);
276 int Broadcast(
float *data, vtkIdType length,
int srcProcessId) {
277 return this->BroadcastVoidArray(data, length, VTK_FLOAT, srcProcessId);
279 int Broadcast(
double *data, vtkIdType length,
int srcProcessId) {
280 return this->BroadcastVoidArray(data, length, VTK_DOUBLE, srcProcessId);
282 #ifdef VTK_USE_64BIT_IDS
283 int Broadcast(vtkIdType *data, vtkIdType length,
int srcProcessId) {
284 return this->BroadcastVoidArray(data, length, VTK_ID_TYPE, srcProcessId);
287 int Broadcast(vtkDataObject *data,
int srcProcessId);
288 int Broadcast(vtkDataArray *data,
int srcProcessId);
303 int Gather(
const int *sendBuffer,
int *recvBuffer,
304 vtkIdType length,
int destProcessId) {
305 return this->GatherVoidArray(sendBuffer, recvBuffer, length,
306 VTK_INT, destProcessId);
308 int Gather(
const unsigned long *sendBuffer,
unsigned long *recvBuffer,
309 vtkIdType length,
int destProcessId) {
310 return this->GatherVoidArray(sendBuffer, recvBuffer, length,
311 VTK_UNSIGNED_LONG, destProcessId);
313 int Gather(
const unsigned char *sendBuffer,
unsigned char *recvBuffer,
314 vtkIdType length,
int destProcessId) {
315 return this->GatherVoidArray(sendBuffer, recvBuffer, length,
316 VTK_UNSIGNED_CHAR, destProcessId);
318 int Gather(
const char *sendBuffer,
char *recvBuffer,
319 vtkIdType length,
int destProcessId) {
320 return this->GatherVoidArray(sendBuffer, recvBuffer, length,
321 VTK_CHAR, destProcessId);
323 int Gather(
const float *sendBuffer,
float *recvBuffer,
324 vtkIdType length,
int destProcessId) {
325 return this->GatherVoidArray(sendBuffer, recvBuffer, length,
326 VTK_FLOAT, destProcessId);
328 int Gather(
const double *sendBuffer,
double *recvBuffer,
329 vtkIdType length,
int destProcessId) {
330 return this->GatherVoidArray(sendBuffer, recvBuffer, length,
331 VTK_DOUBLE, destProcessId);
333 #ifdef VTK_USE_64BIT_IDS
334 int Gather(
const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
335 vtkIdType length,
int destProcessId) {
336 return this->GatherVoidArray(sendBuffer, recvBuffer, length,
337 VTK_ID_TYPE, destProcessId);
340 int Gather(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
355 int GatherV(
const int* sendBuffer,
int* recvBuffer,
356 vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
358 return this->GatherVVoidArray(sendBuffer, recvBuffer,
359 sendLength, recvLengths,
360 offsets, VTK_INT, destProcessId);
362 int GatherV(
const unsigned long* sendBuffer,
unsigned long* recvBuffer,
363 vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
365 return this->GatherVVoidArray(sendBuffer, recvBuffer,
366 sendLength, recvLengths,
367 offsets, VTK_UNSIGNED_LONG, destProcessId);
369 int GatherV(
const unsigned char* sendBuffer,
unsigned char* recvBuffer,
370 vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
372 return this->GatherVVoidArray(sendBuffer, recvBuffer,
373 sendLength, recvLengths,
374 offsets, VTK_UNSIGNED_CHAR, destProcessId);
376 int GatherV(
const char* sendBuffer,
char* recvBuffer,
377 vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
379 return this->GatherVVoidArray(sendBuffer, recvBuffer,
380 sendLength, recvLengths,
381 offsets, VTK_CHAR, destProcessId);
383 int GatherV(
const float* sendBuffer,
float* recvBuffer,
384 vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
386 return this->GatherVVoidArray(sendBuffer, recvBuffer,
387 sendLength, recvLengths,
388 offsets, VTK_FLOAT, destProcessId);
390 int GatherV(
const double* sendBuffer,
double* recvBuffer,
391 vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
393 return this->GatherVVoidArray(sendBuffer, recvBuffer,
394 sendLength, recvLengths,
395 offsets, VTK_DOUBLE, destProcessId);
397 #ifdef VTK_USE_64BIT_IDS
398 int GatherV(
const vtkIdType* sendBuffer, vtkIdType* recvBuffer,
399 vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets,
401 return this->GatherVVoidArray(sendBuffer, recvBuffer,
402 sendLength, recvLengths,
403 offsets, VTK_ID_TYPE, destProcessId);
406 int GatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
407 vtkIdType *recvLengths, vtkIdType *offsets,
int destProcessId);
408 int GatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
418 int Scatter(
const int *sendBuffer,
int *recvBuffer,
419 vtkIdType length,
int srcProcessId) {
420 return this->ScatterVoidArray(sendBuffer, recvBuffer, length,
421 VTK_INT, srcProcessId);
423 int Scatter(
const unsigned long *sendBuffer,
unsigned long *recvBuffer,
424 vtkIdType length,
int srcProcessId) {
425 return this->ScatterVoidArray(sendBuffer, recvBuffer, length,
426 VTK_UNSIGNED_LONG, srcProcessId);
428 int Scatter(
const unsigned char *sendBuffer,
unsigned char *recvBuffer,
429 vtkIdType length,
int srcProcessId) {
430 return this->ScatterVoidArray(sendBuffer, recvBuffer, length,
431 VTK_UNSIGNED_CHAR, srcProcessId);
433 int Scatter(
const char *sendBuffer,
char *recvBuffer,
434 vtkIdType length,
int srcProcessId) {
435 return this->ScatterVoidArray(sendBuffer, recvBuffer, length,
436 VTK_CHAR, srcProcessId);
438 int Scatter(
const float *sendBuffer,
float *recvBuffer,
439 vtkIdType length,
int srcProcessId) {
440 return this->ScatterVoidArray(sendBuffer, recvBuffer, length,
441 VTK_FLOAT, srcProcessId);
443 int Scatter(
const double *sendBuffer,
double *recvBuffer,
444 vtkIdType length,
int srcProcessId) {
445 return this->ScatterVoidArray(sendBuffer, recvBuffer, length,
446 VTK_DOUBLE, srcProcessId);
448 #ifdef VTK_USE_64BIT_IDS
449 int Scatter(
const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
450 vtkIdType length,
int srcProcessId) {
451 return this->ScatterVoidArray(sendBuffer, recvBuffer, length,
452 VTK_ID_TYPE, srcProcessId);
455 int Scatter(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
466 int ScatterV(
const int *sendBuffer,
int *recvBuffer,
467 vtkIdType *sendLengths, vtkIdType *offsets,
468 vtkIdType recvLength,
int srcProcessId) {
469 return this->ScatterVVoidArray(sendBuffer, recvBuffer,
470 sendLengths, offsets, recvLength,
471 VTK_INT, srcProcessId);
473 int ScatterV(
const unsigned long *sendBuffer,
unsigned long *recvBuffer,
474 vtkIdType *sendLengths, vtkIdType *offsets,
475 vtkIdType recvLength,
int srcProcessId) {
476 return this->ScatterVVoidArray(sendBuffer, recvBuffer,
477 sendLengths, offsets, recvLength,
478 VTK_UNSIGNED_LONG, srcProcessId);
480 int ScatterV(
const unsigned char *sendBuffer,
unsigned char *recvBuffer,
481 vtkIdType *sendLengths, vtkIdType *offsets,
482 vtkIdType recvLength,
int srcProcessId) {
483 return this->ScatterVVoidArray(sendBuffer, recvBuffer,
484 sendLengths, offsets, recvLength,
485 VTK_UNSIGNED_CHAR, srcProcessId);
487 int ScatterV(
const char *sendBuffer,
char *recvBuffer,
488 vtkIdType *sendLengths, vtkIdType *offsets,
489 vtkIdType recvLength,
int srcProcessId) {
490 return this->ScatterVVoidArray(sendBuffer, recvBuffer,
491 sendLengths, offsets, recvLength,
492 VTK_CHAR, srcProcessId);
494 int ScatterV(
const float *sendBuffer,
float *recvBuffer,
495 vtkIdType *sendLengths, vtkIdType *offsets,
496 vtkIdType recvLength,
int srcProcessId) {
497 return this->ScatterVVoidArray(sendBuffer, recvBuffer,
498 sendLengths, offsets, recvLength,
499 VTK_FLOAT, srcProcessId);
501 int ScatterV(
const double *sendBuffer,
double *recvBuffer,
502 vtkIdType *sendLengths, vtkIdType *offsets,
503 vtkIdType recvLength,
int srcProcessId) {
504 return this->ScatterVVoidArray(sendBuffer, recvBuffer,
505 sendLengths, offsets, recvLength,
506 VTK_DOUBLE, srcProcessId);
508 #ifdef VTK_USE_64BIT_IDS
509 int ScatterV(
const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
510 vtkIdType *sendLengths, vtkIdType *offsets,
511 vtkIdType recvLength,
int srcProcessId) {
512 return this->ScatterVVoidArray(sendBuffer, recvBuffer,
513 sendLengths, offsets, recvLength,
514 VTK_ID_TYPE, srcProcessId);
521 int AllGather(
const int *sendBuffer,
int *recvBuffer, vtkIdType length) {
522 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_INT);
525 unsigned long *recvBuffer, vtkIdType length) {
526 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length,
530 unsigned char *recvBuffer, vtkIdType length) {
531 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length,
534 int AllGather(
const char *sendBuffer,
char *recvBuffer, vtkIdType length) {
535 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_CHAR);
537 int AllGather(
const float *sendBuffer,
float *recvBuffer, vtkIdType length) {
538 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_FLOAT);
541 double *recvBuffer, vtkIdType length) {
542 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_DOUBLE);
544 #ifdef VTK_USE_64BIT_IDS
545 int AllGather(
const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
547 return this->AllGatherVoidArray(sendBuffer, recvBuffer, length,
551 int AllGather(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer);
557 vtkIdType sendLength, vtkIdType* recvLengths,
558 vtkIdType* offsets) {
559 return this->AllGatherVVoidArray(sendBuffer, recvBuffer,
560 sendLength, recvLengths,
563 int AllGatherV(
const unsigned long* sendBuffer,
unsigned long* recvBuffer,
564 vtkIdType sendLength, vtkIdType* recvLengths,
565 vtkIdType* offsets) {
566 return this->AllGatherVVoidArray(sendBuffer, recvBuffer,
567 sendLength, recvLengths,
568 offsets, VTK_UNSIGNED_LONG);
570 int AllGatherV(
const unsigned char* sendBuffer,
unsigned char* recvBuffer,
571 vtkIdType sendLength, vtkIdType* recvLengths,
572 vtkIdType* offsets) {
573 return this->AllGatherVVoidArray(sendBuffer, recvBuffer,
574 sendLength, recvLengths,
575 offsets, VTK_UNSIGNED_CHAR);
578 vtkIdType sendLength, vtkIdType* recvLengths,
579 vtkIdType* offsets) {
580 return this->AllGatherVVoidArray(sendBuffer, recvBuffer,
581 sendLength, recvLengths,
585 vtkIdType sendLength, vtkIdType* recvLengths,
586 vtkIdType* offsets) {
587 return this->AllGatherVVoidArray(sendBuffer, recvBuffer,
588 sendLength, recvLengths,
592 vtkIdType sendLength, vtkIdType* recvLengths,
593 vtkIdType* offsets) {
594 return this->AllGatherVVoidArray(sendBuffer, recvBuffer,
595 sendLength, recvLengths,
596 offsets, VTK_DOUBLE);
598 #ifdef VTK_USE_64BIT_IDS
599 int AllGatherV(
const vtkIdType* sendBuffer, vtkIdType* recvBuffer,
600 vtkIdType sendLength, vtkIdType* recvLengths,
601 vtkIdType* offsets) {
602 return this->AllGatherVVoidArray(sendBuffer, recvBuffer,
603 sendLength, recvLengths,
604 offsets, VTK_ID_TYPE);
607 int AllGatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
608 vtkIdType *recvLengths, vtkIdType *offsets);
609 int AllGatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer);
616 int Reduce(
const int *sendBuffer,
int *recvBuffer,
617 vtkIdType length,
int operation,
int destProcessId) {
618 return this->ReduceVoidArray(sendBuffer, recvBuffer, length,
619 VTK_INT, operation, destProcessId);
621 int Reduce(
const unsigned int *sendBuffer,
unsigned int *recvBuffer,
622 vtkIdType length,
int operation,
int destProcessId) {
623 return this->ReduceVoidArray(sendBuffer, recvBuffer, length,
624 VTK_UNSIGNED_INT, operation, destProcessId);
626 int Reduce(
const unsigned long *sendBuffer,
unsigned long *recvBuffer,
627 vtkIdType length,
int operation,
int destProcessId) {
628 return this->ReduceVoidArray(sendBuffer, recvBuffer, length,
629 VTK_UNSIGNED_LONG, operation, destProcessId);
631 int Reduce(
const unsigned char *sendBuffer,
unsigned char *recvBuffer,
632 vtkIdType length,
int operation,
int destProcessId) {
633 return this->ReduceVoidArray(sendBuffer, recvBuffer, length,
634 VTK_UNSIGNED_CHAR, operation, destProcessId);
636 int Reduce(
const char *sendBuffer,
char *recvBuffer,
637 vtkIdType length,
int operation,
int destProcessId) {
638 return this->ReduceVoidArray(sendBuffer, recvBuffer, length,
639 VTK_CHAR, operation, destProcessId);
641 int Reduce(
const float *sendBuffer,
float *recvBuffer,
642 vtkIdType length,
int operation,
int destProcessId) {
643 return this->ReduceVoidArray(sendBuffer, recvBuffer, length,
644 VTK_FLOAT, operation, destProcessId);
646 int Reduce(
const double *sendBuffer,
double *recvBuffer,
647 vtkIdType length,
int operation,
int destProcessId) {
648 return this->ReduceVoidArray(sendBuffer, recvBuffer, length,
649 VTK_DOUBLE, operation, destProcessId);
651 #ifdef VTK_USE_64BIT_IDS
652 int Reduce(
const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
653 vtkIdType length,
int operation,
int destProcessId) {
654 return this->ReduceVoidArray(sendBuffer, recvBuffer, length,
655 VTK_ID_TYPE, operation, destProcessId);
658 int Reduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
659 int operation,
int destProcessId);
666 int Reduce(
const int *sendBuffer,
int *recvBuffer,
667 vtkIdType length,
Operation *operation,
int destProcessId) {
668 return this->ReduceVoidArray(sendBuffer, recvBuffer, length,
669 VTK_INT, operation, destProcessId);
671 int Reduce(
const unsigned long *sendBuffer,
unsigned long *recvBuffer,
672 vtkIdType length,
Operation *operation,
int destProcessId) {
673 return this->ReduceVoidArray(sendBuffer, recvBuffer, length,
674 VTK_UNSIGNED_LONG, operation, destProcessId);
676 int Reduce(
const unsigned char *sendBuffer,
unsigned char *recvBuffer,
677 vtkIdType length,
Operation *operation,
int destProcessId) {
678 return this->ReduceVoidArray(sendBuffer, recvBuffer, length,
679 VTK_UNSIGNED_CHAR, operation, destProcessId);
681 int Reduce(
const char *sendBuffer,
char *recvBuffer,
682 vtkIdType length,
Operation *operation,
int destProcessId) {
683 return this->ReduceVoidArray(sendBuffer, recvBuffer, length,
684 VTK_CHAR, operation, destProcessId);
686 int Reduce(
const float *sendBuffer,
float *recvBuffer,
687 vtkIdType length,
Operation *operation,
int destProcessId) {
688 return this->ReduceVoidArray(sendBuffer, recvBuffer, length,
689 VTK_FLOAT, operation, destProcessId);
691 int Reduce(
const double *sendBuffer,
double *recvBuffer,
692 vtkIdType length,
Operation *operation,
int destProcessId) {
693 return this->ReduceVoidArray(sendBuffer, recvBuffer, length,
694 VTK_DOUBLE, operation, destProcessId);
696 #ifdef VTK_USE_64BIT_IDS
697 int Reduce(
const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
698 vtkIdType length, Operation *operation,
int destProcessId) {
699 return this->ReduceVoidArray(sendBuffer, recvBuffer, length,
700 VTK_ID_TYPE, operation, destProcessId);
703 int Reduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
704 Operation *operation,
int destProcessId);
711 vtkIdType length,
int operation) {
712 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length,
715 int AllReduce(
const unsigned long *sendBuffer,
unsigned long *recvBuffer,
716 vtkIdType length,
int operation) {
717 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length,
718 VTK_UNSIGNED_LONG, operation);
720 int AllReduce(
const unsigned char *sendBuffer,
unsigned char *recvBuffer,
721 vtkIdType length,
int operation) {
722 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length,
723 VTK_UNSIGNED_CHAR, operation);
726 vtkIdType length,
int operation) {
727 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length,
728 VTK_CHAR, operation);
730 int AllReduce(
const float *sendBuffer,
float *recvBuffer,
731 vtkIdType length,
int operation) {
732 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length,
733 VTK_FLOAT, operation);
735 int AllReduce(
const double *sendBuffer,
double *recvBuffer,
736 vtkIdType length,
int operation) {
737 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length,
738 VTK_DOUBLE, operation);
740 #ifdef VTK_USE_64BIT_IDS
741 int AllReduce(
const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
742 vtkIdType length,
int operation) {
743 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length,
744 VTK_ID_TYPE, operation);
747 int AllReduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
750 vtkIdType length,
Operation *operation) {
751 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length,
754 int AllReduce(
const unsigned long *sendBuffer,
unsigned long *recvBuffer,
755 vtkIdType length,
Operation *operation) {
756 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length,
757 VTK_UNSIGNED_LONG, operation);
759 int AllReduce(
const unsigned char *sendBuffer,
unsigned char *recvBuffer,
760 vtkIdType length,
Operation *operation) {
761 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length,
762 VTK_UNSIGNED_CHAR, operation);
765 vtkIdType length,
Operation *operation) {
766 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length,
767 VTK_CHAR, operation);
769 int AllReduce(
const float *sendBuffer,
float *recvBuffer,
770 vtkIdType length,
Operation *operation) {
771 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length,
772 VTK_FLOAT, operation);
774 int AllReduce(
const double *sendBuffer,
double *recvBuffer,
775 vtkIdType length,
Operation *operation) {
776 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length,
777 VTK_DOUBLE, operation);
779 #ifdef VTK_USE_64BIT_IDS
780 int AllReduce(
const vtkIdType *sendBuffer, vtkIdType *recvBuffer,
781 vtkIdType length, Operation *operation) {
782 return this->AllReduceVoidArray(sendBuffer, recvBuffer, length,
783 VTK_ID_TYPE, operation);
786 int AllReduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer,
787 Operation *operation);
793 virtual int BroadcastVoidArray(
void *data, vtkIdType length,
int type,
795 virtual int GatherVoidArray(
const void *sendBuffer,
void *recvBuffer,
796 vtkIdType length,
int type,
int destProcessId);
797 virtual int GatherVVoidArray(
const void *sendBuffer,
void *recvBuffer,
798 vtkIdType sendLength, vtkIdType *recvLengths,
799 vtkIdType *offsets,
int type,
int destProcessId);
800 virtual int ScatterVoidArray(
const void *sendBuffer,
void *recvBuffer,
801 vtkIdType length,
int type,
int srcProcessId);
802 virtual int ScatterVVoidArray(
const void *sendBuffer,
void *recvBuffer,
803 vtkIdType *sendLengths, vtkIdType *offsets,
804 vtkIdType recvLength,
int type,
806 virtual int AllGatherVoidArray(
const void *sendBuffer,
void *recvBuffer,
807 vtkIdType length,
int type);
808 virtual int AllGatherVVoidArray(
const void *sendBuffer,
void *recvBuffer,
809 vtkIdType sendLength, vtkIdType *recvLengths,
810 vtkIdType *offsets,
int type);
811 virtual int ReduceVoidArray(
const void *sendBuffer,
void *recvBuffer,
812 vtkIdType length,
int type,
813 int operation,
int destProcessId);
814 virtual int ReduceVoidArray(
const void *sendBuffer,
void *recvBuffer,
815 vtkIdType length,
int type,
816 Operation *operation,
int destProcessId);
817 virtual int AllReduceVoidArray(
const void *sendBuffer,
void *recvBuffer,
818 vtkIdType length,
int type,
820 virtual int AllReduceVoidArray(
const void *sendBuffer,
void *recvBuffer,
821 vtkIdType length,
int type,
822 Operation *operation);
825 static void SetUseCopy(
int useCopy);
837 virtual int ComputeGlobalBounds(
int processorId,
int numProcesses,
838 vtkBoundingBox *bounds,
839 int *rightHasBounds = 0,
840 int *leftHasBounds = 0,
841 int hasBoundsTag = 288402,
842 int localBoundsTag = 288403,
843 int globalBoundsTag = 288404);
851 static int GetParentProcessor(
int pid);
852 static int GetLeftChildProcessor(
int pid);
859 static int MarshalDataObject(vtkDataObject *
object, vtkCharArray *buffer);
860 static int UnMarshalDataObject(vtkCharArray *buffer, vtkDataObject *
object);
865 int WriteDataArray(vtkDataArray *
object);
866 int ReadDataArray(vtkDataArray *
object);
872 int SendElementalDataObject(vtkDataObject* data,
int remoteHandle,
int tag);
873 int SendMultiBlockDataSet(vtkMultiBlockDataSet* data,
int remoteHandle,
int tag);
874 int ReceiveDataObject(vtkDataObject* data,
875 int remoteHandle,
int tag,
int type=-1);
876 int ReceiveElementalDataObject(vtkDataObject* data,
877 int remoteHandle,
int tag);
878 int ReceiveMultiBlockDataSet(
879 vtkMultiBlockDataSet* data,
int remoteHandle,
int tag);
895 #endif // __vtkCommunicator_h
int Receive(double *data, vtkIdType maxlength, int remoteHandle, int tag)
int Receive(unsigned int *data, vtkIdType maxlength, int remoteHandle, int tag)
int AllGather(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length)
int Broadcast(float *data, vtkIdType length, int srcProcessId)
int AllReduce(const char *sendBuffer, char *recvBuffer, vtkIdType length, Operation *operation)
int Gather(const int *sendBuffer, int *recvBuffer, vtkIdType length, int destProcessId)
int GatherV(const double *sendBuffer, double *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
int AllReduce(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, int operation)
int ScatterV(const double *sendBuffer, double *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
int AllReduce(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int operation)
int Send(const int *data, vtkIdType length, int remoteHandle, int tag)
int Receive(unsigned char *data, vtkIdType maxlength, int remoteHandle, int tag)
int Scatter(const double *sendBuffer, double *recvBuffer, vtkIdType length, int srcProcessId)
stream used to pass data across processes using vtkMultiProcessController.
int GatherV(const char *sendBuffer, char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
int Gather(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, int destProcessId)
int AllReduce(const double *sendBuffer, double *recvBuffer, vtkIdType length, Operation *operation)
int AllReduce(const float *sendBuffer, float *recvBuffer, vtkIdType length, Operation *operation)
int Reduce(const float *sendBuffer, float *recvBuffer, vtkIdType length, int operation, int destProcessId)
int Reduce(const double *sendBuffer, double *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
int Reduce(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
int ScatterV(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
int Send(const float *data, vtkIdType length, int remoteHandle, int tag)
int Scatter(const char *sendBuffer, char *recvBuffer, vtkIdType length, int srcProcessId)
int Reduce(const int *sendBuffer, int *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
int AllGatherV(const int *sendBuffer, int *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
int AllReduce(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, Operation *operation)
int Broadcast(char *data, vtkIdType length, int srcProcessId)
int AllGather(const double *sendBuffer, double *recvBuffer, vtkIdType length)
int MaximumNumberOfProcesses
int Send(const double *data, vtkIdType length, int remoteHandle, int tag)
int ScatterV(const int *sendBuffer, int *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
int Reduce(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int operation, int destProcessId)
int Scatter(const float *sendBuffer, float *recvBuffer, vtkIdType length, int srcProcessId)
int AllReduce(const char *sendBuffer, char *recvBuffer, vtkIdType length, int operation)
int ScatterV(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
int Gather(const double *sendBuffer, double *recvBuffer, vtkIdType length, int destProcessId)
int Receive(char *data, vtkIdType maxlength, int remoteHandle, int tag)
int Send(const unsigned int *data, vtkIdType length, int remoteHandle, int tag)
int AllGatherV(const float *sendBuffer, float *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
int Reduce(const float *sendBuffer, float *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
int ScatterV(const char *sendBuffer, char *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
int AllGatherV(const char *sendBuffer, char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
int AllGather(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length)
int Reduce(const int *sendBuffer, int *recvBuffer, vtkIdType length, int operation, int destProcessId)
int AllReduce(const double *sendBuffer, double *recvBuffer, vtkIdType length, int operation)
int AllGather(const float *sendBuffer, float *recvBuffer, vtkIdType length)
int AllReduce(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, Operation *operation)
int Send(const unsigned long *data, vtkIdType length, int remoteHandle, int tag)
int Gather(const char *sendBuffer, char *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 Gather(const float *sendBuffer, float *recvBuffer, vtkIdType length, int destProcessId)
int AllGatherV(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
int Reduce(const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, int operation, int destProcessId)
int GatherV(const int *sendBuffer, int *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
int Broadcast(unsigned long *data, vtkIdType length, int srcProcessId)
int Reduce(const char *sendBuffer, char *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
int Scatter(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, int srcProcessId)
int AllGatherV(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
int AllGather(const int *sendBuffer, int *recvBuffer, vtkIdType length)
int Broadcast(double *data, vtkIdType length, int srcProcessId)
int AllReduce(const int *sendBuffer, int *recvBuffer, vtkIdType length, Operation *operation)
int Reduce(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
int Receive(float *data, vtkIdType maxlength, int remoteHandle, int tag)
int Send(const unsigned char *data, vtkIdType length, int remoteHandle, int tag)
int ScatterV(const float *sendBuffer, float *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
int Gather(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int destProcessId)
int Reduce(const char *sendBuffer, char *recvBuffer, vtkIdType length, int operation, int destProcessId)
int AllReduce(const float *sendBuffer, float *recvBuffer, vtkIdType length, int operation)
int Receive(int *data, vtkIdType maxlength, int remoteHandle, int tag)
int GatherV(const float *sendBuffer, float *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
int Reduce(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, int operation, int destProcessId)
int Broadcast(unsigned char *data, vtkIdType length, int srcProcessId)
int Receive(unsigned long *data, vtkIdType maxlength, int remoteHandle, int tag)
int Broadcast(int *data, vtkIdType length, int srcProcessId)
int GatherV(const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
int AllGather(const char *sendBuffer, char *recvBuffer, vtkIdType length)
Used to send/receive messages in a multiprocess environment.
int Scatter(const int *sendBuffer, int *recvBuffer, vtkIdType length, int srcProcessId)
int GatherV(const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
int Send(const char *data, vtkIdType length, int remoteHandle, int tag)
int AllReduce(const int *sendBuffer, int *recvBuffer, vtkIdType length, int operation)
int Broadcast(unsigned int *data, vtkIdType length, int srcProcessId)
int Reduce(const double *sendBuffer, double *recvBuffer, vtkIdType length, int operation, int destProcessId)