------------------------------------------------------------------------------
| 951 | |
| 952 | //------------------------------------------------------------------------------ |
| 953 | int vtkCommunicator::Gather(vtkDataArray* sendBuffer, vtkDataArray* recvBuffer, int destProcessId) |
| 954 | { |
| 955 | int type = sendBuffer->GetDataType(); |
| 956 | const void* sb = sendBuffer->GetVoidPointer(0); |
| 957 | void* rb = nullptr; |
| 958 | int numComponents = sendBuffer->GetNumberOfComponents(); |
| 959 | vtkIdType numTuples = sendBuffer->GetNumberOfTuples(); |
| 960 | if (this->LocalProcessId == destProcessId) |
| 961 | { |
| 962 | if (type != recvBuffer->GetDataType()) |
| 963 | { |
| 964 | vtkErrorMacro(<< "Data type mismatch."); |
| 965 | return 0; |
| 966 | } |
| 967 | recvBuffer->SetNumberOfComponents(numComponents); |
| 968 | recvBuffer->SetNumberOfTuples(numTuples * this->NumberOfProcesses); |
| 969 | rb = recvBuffer->GetVoidPointer(0); |
| 970 | } |
| 971 | return this->GatherVoidArray(sb, rb, numComponents * numTuples, type, destProcessId); |
| 972 | } |
| 973 | |
| 974 | //------------------------------------------------------------------------------ |
| 975 | int vtkCommunicator::Gather(vtkDataObject* sendBuffer, |