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

Method GetContiguousStartSize

IO/NetCDF/vtkXArrayAccessor.cxx:418–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

416}
417
418void vtkXArrayAccessor::GetContiguousStartSize(
419 int varid, const size_t* startp, const size_t* countp, char*& arrayStart, vtkIdType& arraySize)
420{
421 // the last dim is the most rapidly varying
422 arraySize = 1;
423 auto dimIncrement = this->GetDimIncrement(varid);
424 size_t increment = 0;
425 for (size_t i = 0; i < dimIncrement.size(); ++i)
426 {
427 arraySize *= countp[i];
428 increment += startp[i] * dimIncrement[i];
429 }
430 int vtkType = NetCDFTypeToVTKType(this->VarType[varid]);
431 arrayStart = this->VarValue[varid] + increment * VTKSizeof(vtkType);
432}
433
434int vtkXArrayAccessor::get_vars(int vtkNotUsed(ncid), int varid, const size_t* startp,
435 const size_t* countp, const ptrdiff_t* vtkNotUsed(stridep), int vt, vtkIdType numberOfComponents,

Callers 2

get_varsMethod · 0.95
get_vars_doubleMethod · 0.95

Calls 4

GetDimIncrementMethod · 0.95
VTKSizeofFunction · 0.85
NetCDFTypeToVTKTypeFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected