Skip to content

refactor: round 2 — modularize ncorr.cpp by algorithm (plan)#19

Draft
johnaoga wants to merge 1 commit into
mainfrom
ja/refactoring/2
Draft

refactor: round 2 — modularize ncorr.cpp by algorithm (plan)#19
johnaoga wants to merge 1 commit into
mainfrom
ja/refactoring/2

Conversation

@johnaoga

@johnaoga johnaoga commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Second refactoring round, replacing the stale ja/refactoring/1 (#10) which forked before the newversion restructure (#12) and no longer applies to main.

This PR starts with the plan document (docs/refactoring_plan.md); implementation commits will follow on this branch.

Review of round 1

  • Already integrated: ImageProcessor / VideoImporter / FilterConfig → now part of Image2D.h (in-memory API, factories).
  • Superseded: NCORR_ENABLE_DIAGNOSTICS → leveled logging ncorr/log.h (feat: dependency-free leveled logging facility #18).
  • Still open (re-planned here): seed-analysis extraction, chain-composition module, serialization split.
  • Dropped: Array2D dependency split + umbrella forwarding headers (no compile/link benefit for header-only templates; revisit only if cuNCorr needs a subset).

Plan

  • Phase 1: extract seed analysis (ncorr_seed.{hpp,cpp}, ~300 ln from ncorr.cpp:4804–5083) and the exact MATLAB chain-composition path (ncorr_exact_chain.{hpp,cpp}, ~400 ln from ncorr.cpp:5409–5815), each with new unit-test seams.
  • Phase 2: unify matlab_DIC_analysis_impl / exact_matlab_DIC_analysis_impl (~65% duplicated) behind a chain-composition strategy; document the public engine API surface used by CPPxDIC's adapter.
  • Phase 3 (optional): I/O module extraction; Array2D split deferred.

Guardrails: pure-move commits, test suite green at every step, no behavior change.

Supersedes #10.

🤖 Generated with Claude Code

Review of the stale ja/refactoring/1 branch against current main:
ImageProcessor/VideoImporter and diagnostics were absorbed or superseded
by the newversion (#12) and leveled logging (#18); the surviving ideas
(seed-analysis extraction, exact-chain module, matlab_DIC_analysis
dedup) are re-planned against today's code.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant