Skip to content

Remove remaining dead code: orphan units, dead members, and all #if 0 blocks - #69

Merged
duburcqa merged 2 commits into
Genesis-Embodied-AI:mainfrom
duburcqa:cleanup-orphans-round2
Jul 23, 2026
Merged

Remove remaining dead code: orphan units, dead members, and all #if 0 blocks#69
duburcqa merged 2 commits into
Genesis-Embodied-AI:mainfrom
duburcqa:cleanup-orphans-round2

Conversation

@duburcqa

Copy link
Copy Markdown
Contributor

Final pass of the reachability sweep. Two commits.

1. Orphan units / dead members

  • Delete the unused ECS System unit: src/core/system.cpp (in no build target) + include/madrona/system.{hpp,inl} + device system.{hpp,inl} (System/SystemBase referenced nowhere; the header was included only by system.cpp).
  • Delete src/render/vk/engine_interop.hpp — a stale duplicate of the EngineInterop struct that lives in render_common.hpp (zero includers).
  • Remove dead BatchRenderer methods left from the removed viewer: importCudaData (decl only), getComponentBuffer, getLatestWaitSemaphore (zero callers).
  • Remove the write-only RenderContext::gpu_input_ member.

2. Dead #if 0 blocks

  • Remove all 31 always-false #if 0 / #if 0 && ... blocks across host and nvrtc-device sources (bvh / bvh_raycast / sort_archetype / ecs_system / render / vk / common / bridge and several ECS .inl headers). None had a live #else branch (verified); pure deletions, no behavior change.

Kept deliberately: the zero-caller public MGR_EXPORT API (Manager::numWorlds/numCams/getRenderManager/…, RenderManager::configureLighting/renderContext) — that's an interface decision, not dead code.

Validation

Cluster (RTX): fresh build + full 38 batch-render tests — 38 passed, twice (once per commit).

duburcqa added 2 commits July 23, 2026 17:36
… members

- Delete the unused ECS 'System' unit: src/core/system.cpp (listed in no build
  target) plus include/madrona/system.{hpp,inl} and the device
  system.{hpp,inl} headers (System/SystemBase referenced nowhere; system.hpp
  was included only by system.cpp).
- Delete src/render/vk/engine_interop.hpp -- a stale duplicate of the
  EngineInterop struct that actually lives in render_common.hpp (zero includers).
- Drop dead BatchRenderer methods left over from the removed viewer:
  importCudaData (decl only), getComponentBuffer, getLatestWaitSemaphore
  (all zero callers).
- Drop the write-only RenderContext::gpu_input_ member.
Delete the 31 always-false '#if 0' (and '#if 0 && ...') blocks left across the
host and nvrtc-device sources -- disabled/reference code, debug prints, and
alternate implementations. None had a live '#else' branch (verified), so each is
removed whole; pure deletions, no behavior change. Touches render, vk, mw device
(bvh/bvh_raycast/sort_archetype), common, bridge, and several ECS headers.
@duburcqa
duburcqa merged commit d99c354 into Genesis-Embodied-AI:main Jul 23, 2026
1 check passed
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