------------------------------------------------------------------------------
| 763 | |
| 764 | //------------------------------------------------------------------------------ |
| 765 | int vtkMultiProcessController::AllReduce( |
| 766 | const vtkBoundingBox& sendBuffer, vtkBoundingBox& recvBuffer) |
| 767 | { |
| 768 | if (this->GetNumberOfProcesses() <= 1) |
| 769 | { |
| 770 | recvBuffer = sendBuffer; |
| 771 | return 1; |
| 772 | } |
| 773 | |
| 774 | double send_min[3] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MAX, VTK_DOUBLE_MAX }; |
| 775 | double send_max[3] = { VTK_DOUBLE_MIN, VTK_DOUBLE_MIN, VTK_DOUBLE_MIN }; |
| 776 | if (sendBuffer.IsValid()) |
| 777 | { |
| 778 | sendBuffer.GetMinPoint(send_min); |
| 779 | sendBuffer.GetMaxPoint(send_max); |
| 780 | } |
| 781 | double recv_min[3], recv_max[3]; |
| 782 | if (this->AllReduce(send_min, recv_min, 3, vtkCommunicator::MIN_OP) && |
| 783 | this->AllReduce(send_max, recv_max, 3, vtkCommunicator::MAX_OP)) |
| 784 | { |
| 785 | const double bds[6] = { recv_min[0], recv_max[0], recv_min[1], recv_max[1], recv_min[2], |
| 786 | recv_max[2] }; |
| 787 | recvBuffer.SetBounds(bds); |
| 788 | return 1; |
| 789 | } |
| 790 | return 0; |
| 791 | } |
| 792 | |
| 793 | //---------------------------------------------------------------------------- |
| 794 | int vtkMultiProcessController::Reduce( |
nothing calls this directly
no test coverage detected