Skip to content

refactor(core): cpp23 Wave 9 — picture_pool, gpu_picture_pool, gpu_dispatch_env (ADR-0768) - #124

Closed
lusoris wants to merge 1 commit into
masterfrom
feat/cpp23-wave9-bundle-20260529
Closed

lusoris wants to merge 1 commit into
masterfrom
feat/cpp23-wave9-bundle-20260529

Conversation

@lusoris

@lusoris lusoris commented May 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Convert picture_pool.c, gpu_picture_pool.c, and gpu_dispatch_env.c to C++23, each in an isolated static_library with override_options: ['cpp_std=c++23'] (ADR-0708 pattern).
  • Add extern "C" guards to picture.h, mem.h, ref.h, and picture_pool.h so new C++ TUs resolve unmangled C symbols at link time.
  • Remove orphan test_ansnr_simd meson entry (source file deleted by PR feat(core): drop legacy ansnr feature (pre-VMAF, never Netflix-adopted) #38 / ADR-0720, entry never cleaned up).
  • Update all 25 '../src/gpu_picture_pool.c' references in core/test/meson.build to .cpp.

Changes

File Action
core/src/gpu_dispatch_env.c to .cpp constexpr table cap, nullptr, std::strcmp / std::getenv
core/src/gpu_picture_pool.c to .cpp struct (no typedef), nullptr, std::malloc / std::free
core/src/picture_pool.c to .cpp struct, nullptr, reinterpret_cast for C-style first-member inheritance, std::malloc / std::free
core/src/picture.h extern "C" guards added around function declarations
core/src/mem.h extern "C" guards added
core/src/ref.h extern "C" guards added
core/src/picture_pool.h extern "C" guards added
core/src/meson.build Three .c sources replaced by three isolated cpp_std=c++23 static libs
core/test/meson.build 25 occurrences of .c updated to .cpp for gpu_picture_pool; orphan test_ansnr_simd removed

Smoke-test command

meson setup /tmp/wave9-test core -Denable_cuda=false -Denable_sycl=false --wipe
ninja -C /tmp/wave9-test
meson test -C /tmp/wave9-test --suite=fast
# Result: 50/50 pass (verified locally)

Deliverables checklist (ADR-0108)

  • Research digest: no digest needed: trivial rename + conservative C++ idioms, no algorithmic change
  • Decision matrix: ADR-0768 ## Alternatives considered table
  • AGENTS.md invariant note: no rebase-sensitive invariants beyond the extern "C" guard addition documented in docs/rebase-notes.md
  • Reproducer / smoke-test: command above
  • Changelog fragment: changelog.d/changed/cpp23-wave9-pool-env.md
  • Rebase-notes entry: docs/rebase-notes.md

🤖 Generated with Claude Code

@lusoris
lusoris marked this pull request as ready for review May 29, 2026 10:05
@lusoris
lusoris enabled auto-merge (squash) May 29, 2026 10:05
@lusoris
lusoris disabled auto-merge May 29, 2026 11:50
@lusoris
lusoris marked this pull request as draft May 29, 2026 11:50
…spatch_env (ADR-0768)

Convert three small core/src/*.c files to C++23, continuing the ADR-0708
migration playbook (isolated static_library per TU, cpp_std=c++23 scoped):

- picture_pool.cpp: typedef struct → struct, nullptr, static_cast /
  reinterpret_cast for the C-style first-member inheritance pattern
  (PooledPicturePriv ↔ VmafPicturePrivate).
- gpu_picture_pool.cpp: typedef struct → struct, nullptr, std::malloc /
  std::memset, std::free.
- gpu_dispatch_env.cpp: constexpr table cap, nullptr, std::strcmp /
  std::getenv.

Collateral: extern "C" guards added to picture.h, mem.h, ref.h, and
picture_pool.h so the new C++ TUs resolve unmangled C symbols at link time.
Orphan test_ansnr_simd meson entry (deleted source, ADR-0720 fallout) removed.
All 25 gpu_picture_pool.c references in test/meson.build updated to .cpp.

Build: 724 targets. Fast tests: 50/50 pass.

No user-discoverable surface change (internal build wiring only).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lusoris
lusoris force-pushed the feat/cpp23-wave9-bundle-20260529 branch from 14c9791 to 46e7193 Compare May 29, 2026 12:08
@lusoris
lusoris marked this pull request as ready for review May 31, 2026 13:49
@lusoris

lusoris commented May 31, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by master merge marathon 2026-05-31.

@lusoris lusoris closed this May 31, 2026
@lusoris
lusoris deleted the feat/cpp23-wave9-bundle-20260529 branch May 31, 2026 13:52
@lusoris
lusoris restored the feat/cpp23-wave9-bundle-20260529 branch May 31, 2026 18:47
@lusoris lusoris reopened this May 31, 2026
@lusoris
lusoris marked this pull request as draft May 31, 2026 18:50
@lusoris

lusoris commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favor of rebased PR from branch rebase/cpp23-wave9-pr124. The gpu_dispatch_env conversion was already merged in PR #531 (ADR-0858); this rebase carries only the picture_pool and gpu_picture_pool conversions.

@lusoris lusoris closed this Jun 3, 2026
@lusoris
lusoris deleted the feat/cpp23-wave9-bundle-20260529 branch June 4, 2026 10:25
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