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

Method SetupUpdateExtent

IO/XML/vtkXMLTableReader.cxx:92–115  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

90
91//------------------------------------------------------------------------------
92void vtkXMLTableReader::SetupUpdateExtent(int piece, int numberOfPieces)
93{
94 this->UpdatedPiece = piece;
95 this->UpdateNumberOfPieces = numberOfPieces;
96
97 // If more pieces are requested than available, just return empty
98 // pieces for the extra ones.
99 this->UpdateNumberOfPieces = std::min(this->UpdateNumberOfPieces, this->NumberOfPieces);
100
101 // Find the range of pieces to read.
102 if (this->UpdatedPiece < this->UpdateNumberOfPieces)
103 {
104 this->StartPiece = (this->UpdatedPiece * this->NumberOfPieces) / this->UpdateNumberOfPieces;
105 this->EndPiece = ((this->UpdatedPiece + 1) * this->NumberOfPieces) / this->UpdateNumberOfPieces;
106 }
107 else
108 {
109 this->StartPiece = 0;
110 this->EndPiece = 0;
111 }
112
113 // Find the total size of the output.
114 this->SetupOutputTotals();
115}
116
117//------------------------------------------------------------------------------
118void vtkXMLTableReader::ReadXMLData()

Callers 1

ReadXMLDataMethod · 0.95

Calls 2

SetupOutputTotalsMethod · 0.95
minFunction · 0.50

Tested by

no test coverage detected