------------------------------------------------------------------------------
| 1659 | |
| 1660 | //------------------------------------------------------------------------------ |
| 1661 | int vtkCommunicator::AllReduce(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int operation) |
| 1662 | { |
| 1663 | int type = sendBuffer->GetDataType(); |
| 1664 | int components = sendBuffer->GetNumberOfComponents(); |
| 1665 | vtkIdType tuples = sendBuffer->GetNumberOfTuples(); |
| 1666 | |
| 1667 | if (type != recvBuffer->GetDataType()) |
| 1668 | { |
| 1669 | vtkErrorMacro(<< "Send and receive types do not match."); |
| 1670 | return 0; |
| 1671 | } |
| 1672 | recvBuffer->SetNumberOfComponents(components); |
| 1673 | recvBuffer->SetNumberOfTuples(tuples); |
| 1674 | |
| 1675 | return this->AllReduceVoidArray(sendBuffer->GetVoidPointer(0), recvBuffer->GetVoidPointer(0), |
| 1676 | components * tuples, type, operation); |
| 1677 | } |
| 1678 | |
| 1679 | //------------------------------------------------------------------------------ |
| 1680 | int vtkCommunicator::AllReduce( |
no test coverage detected