Skip to content

perf(geometry): width-relaxed int32 vtkOriginalCellIds (PassCellIds)#80

Merged
akaszynski merged 1 commit into
mainfrom
feat/int32-passcellids
Jun 20, 2026
Merged

perf(geometry): width-relaxed int32 vtkOriginalCellIds (PassCellIds)#80
akaszynski merged 1 commit into
mainfrom
feat/int32-passcellids

Conversation

@akaszynski

Copy link
Copy Markdown
Member

Extends the width-relaxed int32 id-array work (#79 did vtkOriginalPointIds) to the cell side: vtkGeometryFilter's PassCellIds now emits vtkOriginalCellIds as vtkTypeInt32Array when the input cell count fits in int32, falling back to vtkIdTypeArray on overflow.

What

  • CompositeCellIds struct templated on typename TOutId = vtkIdType; OrigIds field + static_cast<TOutId>(...) write.
  • PassCellIds branches on sizeof(TInputIdType) <= sizeof(vtkTypeInt32) → int32 array, else int64.
  • Tests: op_geometry* in tests/bitexact/ops.py now call PassThroughCellIdsOn() alongside PassThroughPointIdsOn(), so the int32 cell-id path is covered by both bitexact (width-normalized compare) and the renderexact selection gate.

Why it's safe

Validation

  • bitexact (abi3, py3.13): 272 passed locally in-container.
  • CI bitexact + renderexact + selection gates to confirm on this PR.

🤖 Generated with Claude Code

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>
@akaszynski akaszynski merged commit 69c948a into main Jun 20, 2026
9 checks passed
@akaszynski akaszynski deleted the feat/int32-passcellids branch June 20, 2026 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant