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

Method SetBlockSize

IO/XML/vtkXMLWriterBase.cxx:150–174  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

148
149//------------------------------------------------------------------------------
150void vtkXMLWriterBase::SetBlockSize(size_t blockSize)
151{
152 // Enforce constraints on block size.
153 size_t nbs = blockSize;
154#if VTK_SIZEOF_DOUBLE > VTK_SIZEOF_ID_TYPE
155 typedef double LargestScalarType;
156#else
157 typedef vtkIdType LargestScalarType;
158#endif
159 size_t remainder = nbs % sizeof(LargestScalarType);
160 if (remainder)
161 {
162 nbs -= remainder;
163 nbs = std::max(nbs, sizeof(LargestScalarType));
164 vtkWarningMacro("BlockSize must be a multiple of "
165 << int(sizeof(LargestScalarType)) << ". Using " << nbs << " instead of " << blockSize
166 << ".");
167 }
168 vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting BlockSize to " << nbs);
169 if (this->BlockSize != nbs)
170 {
171 this->BlockSize = nbs;
172 this->Modified();
173 }
174}
175//------------------------------------------------------------------------------
176int vtkXMLWriterBase::Write()
177{

Callers 8

WriteInternalMethod · 0.45
CreateWritersMethod · 0.45
WritePieceMethod · 0.45
WriteInternalMethod · 0.45
WritePieceMethod · 0.45
WritePieceMethod · 0.45
GetWriterMethod · 0.45
OpenFileMethod · 0.45

Calls 3

maxFunction · 0.50
GetClassNameMethod · 0.45
ModifiedMethod · 0.45

Tested by

no test coverage detected