Skip to content

Collision cleanups: test-only code, serialization helpers, stub aliases, tests #3826

Closed

Description

@MrNeRF

Small cleanups left from the collision reviews (#3789, #3791), none of them affecting behaviour:

  • Production code used only by tests:
    • cuda::collisionSortWorkspaceBytes (collision.cpp:12-15);
    • collision_byte_budget and the byte_budget parameters of encodeCollision/decodeCollision (project_document.cpp:2104, 2213-2217, collision_serialization.hpp:16-20, 49-50).
  • Unreachable branches: max_size() and checked_product in collisionOutputBytes, behind the 64M check.
  • collision_serialization.hpp lives in core but only project_document.cpp uses it, and it hand-rolls little-endian put/get. Moving it to io/project lets it use chapter_binary_utils.hpp (read_u32, write_u32, read_f32), about 35 lines less.
  • captureCollisionSources always returns one source (scene.cpp:4348), and the prepare kernel's offset is always 0.
  • The lf aliases of the collision functions (module.cpp:3372-3373) appear twice in the stubs.
  • Tests:
    • CaptureSuccessAndExceptionFence… can be about 25 lines instead of 77;
    • OutputLayout…/BoundsOutput… test arithmetic and CUB behaviour;
    • test_collision_io.py only checks that the functions exist and that a missing file fails, where a small round trip would test more;
    • a loop asserts that the argument library rejects unknown flags.

Activity

  1. self-assigned this
    on Oct 26, 2026
  2. added 2 commits that reference this issue on Oct 26, 2026
    e4923f1
    15d948e
  3. added a commit that references this issue on Oct 26, 2026
    5bb7b89
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions