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

Method CalculateFileSizeForBlock

IO/Parallel/vtkMultiBlockPLOT3DReaderInternals.cxx:361–383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

359}
360
361size_t vtkMultiBlockPLOT3DReaderInternals::CalculateFileSizeForBlock(int precision, // in bytes
362 int blanking, int ndims, int hasByteCount, int* gridDims)
363{
364 size_t size = 0;
365 // x, y, (z)
366 size_t npts = 1;
367 for (int i = 0; i < ndims; i++)
368 {
369 npts *= gridDims[i];
370 }
371 size += npts * ndims * precision;
372
373 if (blanking)
374 {
375 size += npts * 4;
376 }
377
378 if (hasByteCount)
379 {
380 size += 2 * 4;
381 }
382 return size;
383}
384
385#ifdef _WIN64
386#define vtk_fseek _fseeki64

Callers 1

CalculateFileSizeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected