Commit 3c78901
committed
docs(splat-native): sync module skeleton with §4.2/§4.3 (codex P2 on #213)
Follow-up to codex review on PR #213. The per-primitive specs at §4.2
(`batched_mahalanobis`) and §4.3 (`batched_opacity_blend`) were
correctly updated in #213, but the module skeleton at the top of the
same file (the `pub fn` declarations in the `src/simd_splat.rs` sketch
around line 50) still advertised the OLD no-scratch / no-ray-offsets
signatures.
Since this document is the implementation handoff for
`src/simd_splat.rs`, an implementer scanning the skeleton first would
recreate the exact APIs #213 was meant to eliminate, leaving the
zero-allocation contract (Mahalanobis) and per-ray segmentation
contract (opacity blend) unenforceable.
## Fix
Updates the two skeleton signatures to match §4.2 and §4.3 exactly,
with cross-references to the per-primitive sections:
- `batched_mahalanobis` — adds `cholesky_scratch: &mut [f32]` (length
N × 6); inline comment cites §4.2 sizing guidance and the
"function MUST NOT allocate" contract.
- `batched_opacity_blend` — adds `ray_offsets: &[u32]` (length
n_rays + 1, CSR-style); `sorted_amplitudes` re-described as flat
concatenation; `out_alpha` length now `n_rays` (not "per pixel");
inline comment cites §4.3 segmentation contract.
The two implementations of the §4.2 / §4.3 detailed specs are
unchanged in this PR — this commit only syncs the up-front skeleton
so the two views of the API agree.
## Test plan
- [x] Skeleton + §4.2 + §4.3 now show identical parameter lists.
- [x] Comments on the new parameters cite the section that owns the
detailed contract (so an implementer who reads the skeleton
first gets pointed to the contract section).
- [ ] Codex re-review on this PR.1 parent 0c1fb05 commit 3c78901
1 file changed
Lines changed: 9 additions & 7 deletions
Lines changed: 9 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
58 | | - | |
59 | | - | |
60 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
61 | 63 | | |
62 | 64 | | |
63 | 65 | | |
| |||
0 commit comments