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

Method IsContiguous

IO/NetCDF/vtkXArrayAccessor.cxx:323–340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321}
322
323bool vtkXArrayAccessor::IsContiguous(int varid, const size_t* startp, const size_t* countp)
324{
325 // the last dim is the most rapidly varying
326 int ndims = static_cast<int>(this->VarDims[varid].size());
327 int contiguousDims = 0;
328 for (int i = ndims - 1; i >= 0; --i)
329 {
330 if (startp[i] == 0 && countp[i] == this->DimLen[this->VarDims[varid][i]])
331 {
332 ++contiguousDims;
333 }
334 else
335 {
336 break;
337 }
338 }
339 return (contiguousDims >= ndims - 1);
340}
341
342std::vector<size_t> vtkXArrayAccessor::GetDimIncrement(int varid)
343{

Callers 2

get_varsMethod · 0.95
get_vars_doubleMethod · 0.95

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected