------------------------------------------------------------------------------
| 200 | |
| 201 | //------------------------------------------------------------------------------ |
| 202 | void vtkXMLPDataObjectWriter::PrepareSummaryFile() |
| 203 | { |
| 204 | if (this->Controller && this->Controller->GetNumberOfProcesses() > 1) |
| 205 | { |
| 206 | assert(this->PieceWrittenFlags != nullptr); |
| 207 | // Reduce information about which pieces were written out to rank 0. |
| 208 | int myId = this->Controller->GetLocalProcessId(); |
| 209 | unsigned char* recvBuffer = (myId == 0) ? new unsigned char[this->NumberOfPieces] : nullptr; |
| 210 | this->Controller->Reduce( |
| 211 | this->PieceWrittenFlags, recvBuffer, this->NumberOfPieces, vtkCommunicator::MAX_OP, 0); |
| 212 | if (myId == 0) |
| 213 | { |
| 214 | std::swap(this->PieceWrittenFlags, recvBuffer); |
| 215 | } |
| 216 | delete[] recvBuffer; |
| 217 | } |
| 218 | } |
| 219 | |
| 220 | //------------------------------------------------------------------------------ |
| 221 | int vtkXMLPDataObjectWriter::WriteData() |
no test coverage detected