perf(geometry): width-relaxed int32 vtkOriginalCellIds (PassCellIds)#80
Merged
Conversation
Mirror the shipped int32 PassPointIds change for the cell-id passthrough array. CompositeCellIds is templated on the output value type (TOutId); PassCellIds stores vtkOriginalCellIds in a vtkTypeInt32Array when the dispatch selected an int32 input id type (which happens only when input point AND cell counts fit in VTK_TYPE_INT32_MAX, so every stored input cell id provably fits int32), else int64. Values are sacred; only the container width narrows. Validated by op_geometry / op_geometry_ugrid / op_geometry_ugrid_mixed, now with PassThroughCellIdsOn so the int32 vtkOriginalCellIds array is compared against stock's int64 (width-normalized). The render hardware-selection path already reads cell-id passthrough arrays width-agnostically (shipped in #79). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extends the width-relaxed int32 id-array work (#79 did
vtkOriginalPointIds) to the cell side:vtkGeometryFilter'sPassCellIdsnow emitsvtkOriginalCellIdsasvtkTypeInt32Arraywhen the input cell count fits in int32, falling back tovtkIdTypeArrayon overflow.What
CompositeCellIdsstruct templated ontypename TOutId = vtkIdType;OrigIdsfield +static_cast<TOutId>(...)write.PassCellIdsbranches onsizeof(TInputIdType) <= sizeof(vtkTypeInt32)→ int32 array, else int64.op_geometry*intests/bitexact/ops.pynow callPassThroughCellIdsOn()alongsidePassThroughPointIdsOn(), so the int32 cell-id path is covered by both bitexact (width-normalized compare) and the renderexact selection gate.Why it's safe
compare.pywidth-normalizes integer arrays to int64.vtkDataArray::SafeDownCast+GetComponent), so int32 original-id arrays don't break picking.Validation
🤖 Generated with Claude Code