MCPcopy Create free account
hub / github.com/Kitware/VTK / SetupUpdateExtent

Method SetupUpdateExtent

IO/XML/vtkXMLUnstructuredDataReader.cxx:187–212  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

185
186//------------------------------------------------------------------------------
187void vtkXMLUnstructuredDataReader::SetupUpdateExtent(int piece, int numberOfPieces, int ghostLevel)
188{
189 this->UpdatePieceId = piece;
190 this->UpdateNumberOfPieces = numberOfPieces;
191 this->UpdateGhostLevel = ghostLevel;
192
193 // If more pieces are requested than available, just return empty
194 // pieces for the extra ones.
195 this->UpdateNumberOfPieces = std::min(this->UpdateNumberOfPieces, this->NumberOfPieces);
196
197 // Find the range of pieces to read.
198 if (this->UpdatePieceId < this->UpdateNumberOfPieces)
199 {
200 this->StartPiece = ((this->UpdatePieceId * this->NumberOfPieces) / this->UpdateNumberOfPieces);
201 this->EndPiece =
202 (((this->UpdatePieceId + 1) * this->NumberOfPieces) / this->UpdateNumberOfPieces);
203 }
204 else
205 {
206 this->StartPiece = 0;
207 this->EndPiece = 0;
208 }
209
210 // Find the total size of the output.
211 this->SetupOutputTotals();
212}
213
214//------------------------------------------------------------------------------
215void vtkXMLUnstructuredDataReader::ReadXMLData()

Callers 1

ReadXMLDataMethod · 0.95

Calls 2

SetupOutputTotalsMethod · 0.95
minFunction · 0.50

Tested by

no test coverage detected