------------------------------------------------------------------------------
| 1597 | |
| 1598 | //------------------------------------------------------------------------------ |
| 1599 | int vtkCommunicator::Reduce( |
| 1600 | vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int operation, int destProcessId) |
| 1601 | { |
| 1602 | int type = sendBuffer->GetDataType(); |
| 1603 | int components = sendBuffer->GetNumberOfComponents(); |
| 1604 | vtkIdType tuples = sendBuffer->GetNumberOfTuples(); |
| 1605 | |
| 1606 | if (type != recvBuffer->GetDataType()) |
| 1607 | { |
| 1608 | vtkErrorMacro(<< "Send and receive types do not match."); |
| 1609 | return 0; |
| 1610 | } |
| 1611 | recvBuffer->SetNumberOfComponents(components); |
| 1612 | recvBuffer->SetNumberOfTuples(tuples); |
| 1613 | |
| 1614 | return this->ReduceVoidArray(sendBuffer->GetVoidPointer(0), recvBuffer->GetVoidPointer(0), |
| 1615 | components * tuples, type, operation, destProcessId); |
| 1616 | } |
| 1617 | |
| 1618 | //------------------------------------------------------------------------------ |
| 1619 | int vtkCommunicator::Reduce( |