| 416 | } |
| 417 | |
| 418 | void 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 | |
| 434 | int 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, |
no test coverage detected