perf(core): opt-in fast coincident-point merge (vendored OpenMP clean kernel)#83
Closed
akaszynski wants to merge 0 commit into
Closed
perf(core): opt-in fast coincident-point merge (vendored OpenMP clean kernel)#83akaszynski wants to merge 0 commit into
akaszynski wants to merge 0 commit into
Conversation
a266856 to
64fbfc1
Compare
Member
Author
|
Merged to |
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.
Summary
Adds an opt-in fast path to
vtkStaticCleanUnstructuredGridfor the exact-merge default regime, by vendoring pyvista-algorithms'cleankernel (MIT) and wiring a thin adapter intoRequestData.What it does
Filters/Core/pvaClean.h(+pvaHash96.h/pvaLinearProbeTable.h/pvaParallelRadixSort.h) — vendored MIT kernel (namespace pvu::clean), self-contained, excluded from the unity build.Filters/Core/fvtkFastClean.{h,cxx}— adapter: validates the exact-merge default regime (effective tolerance 0, no point-data averaging, no merge-by-data-array, concrete float/double grid, <2³¹ points, no polyhedra) and callsrun_clean(remove_degenerate_cells=false)so cells stay 1:1 in input order.vtkStaticCleanUnstructuredGrid::RequestData, gated onfvtk::FastModeEnabled(). Default off → byte-exact.Faithful-to-stock details
PassData).source_map); tolerance-0 merge means coincident points share exact coordinates, so output coordinates are bit-identical to stock.vtkConstantArraytypes (so the output'sGetCellTypesArray()stays null, exactly like stock), a heterogeneous grid keeps its explicit per-cell array.Robust cell-type acquisition
GetCellTypesArray()returns null for homogeneous grids (implicit constant types). The adapter handles this: zero-copy AOS pointer when present, else a per-cellGetCellType(i)copy. (Same fix applied to the surface adapter in #82.)Validation
vtkFiltersCore.abi3.solinkslibgomp(OpenMP real, not stub).EnableFast()the output point order is reordered vs the standard path, same point set) — not a silent fallback.staticclean_fastcases match stock under the points-relaxed gate; standard cases stay byte-exact.🤖 Generated with Claude Code