Skip to content

refactor: decouple 3 cacao compute files from CLIcore.h#68

Merged
oguyon merged 1 commit into
framework-devfrom
refactor/cacao-decoupling
May 13, 2026
Merged

refactor: decouple 3 cacao compute files from CLIcore.h#68
oguyon merged 1 commit into
framework-devfrom
refactor/cacao-decoupling

Conversation

@oguyon

@oguyon oguyon commented May 13, 2026

Copy link
Copy Markdown
Member

Summary

Adds #ifdef MILK_NO_CLI dual-mode include guards to 3 pure compute files and replaces all data.core.image[] / data.core.NB_MAX_IMAGE accesses with the portable dcimg[] / dcnimg macros. This enables these files to compile cleanly in standalone (MILK_NO_CLI) builds without pulling in CLIcore.

Changes

Files Modified (3)

  • computeCalib/modes_spatial_extrapolate.c — 6 data. refs → dcimg/dcnimg; fixed brace style on resolveIMGID error checks
  • AOloopControl_PredictiveControl/AOloopControl_PredictiveControl_mapPredictiveFilter.c — 6 data. refs → dcimg/dcnimg
  • AOloopControl_PredictiveControl/AOloopControl_PredictiveControl_setPFsimpleAve.c — 5 data. refs → dcimg/dcnimg

Include Pattern

Since cacao files use COREMOD functions (create_2Dimage_ID, delete_image, image_ID), the #else (library) path retains CLIcore.h. The decoupling benefit is in the #ifdef MILK_NO_CLI standalone path:

#ifdef MILK_NO_CLI
#include "CLIcore_standalone.h"
#else
#include "CLIcore.h"
#endif

Not Changed (Deferred)

4 files with deep data. coupling (18–89 refs including signal handlers and processinfo) are deferred to a future refactoring phase.

Verification

  • Build passes (make -j)
  • Tests pass (ctest 38/38)

Prompt Summary

The user requested Phase 3.2 of the dependency decoupling roadmap: applying the _compute library pattern to cacao AO loop control modules.

AI Authorship

  • Model: Antigravity
  • User edits: None

@oguyon oguyon merged commit ee9bc00 into framework-dev May 13, 2026
1 check passed
@oguyon oguyon deleted the refactor/cacao-decoupling branch May 13, 2026 05:18
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