1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//! Internal iteration primitives for chunk-parallel ECS queries.
//!
//! Contains the precomputed chunk pointer view (`ChunkView`) and the RAII
//! iteration scope guard (`IterationScope`). Both are `pub(super)` - they
//! are implementation details shared between `data` and `ecs_reference`.
use ;
/// Per-archetype precomputed view into chunk memory.
///
/// Layout:
/// - read_ptrs[(chunk * n_reads) + i] => (ptr, bytes) for read component i in that chunk
/// - write_ptrs[(chunk * n_writes) + i] => (ptr, bytes) for write component i in that chunk
pub
// ChunkView contains raw pointers into archetype-owned component storage.
// These pointers are:
// - valid for the duration of for_each_abstraction_unchecked
// - protected by phase discipline (no structural mutation)
// - protected by BorrowGuard (no aliasing violations)
// - row-range-disjoint across parallel tasks: `plan_work_tasks` assigns each
// (chunk, row range) to exactly one task, and ranges within a chunk never
// overlap, so the mutable sub-slices materialised by `fill_range_slices` /
// `fill_row_slices` in different tasks never alias.
unsafe
unsafe
pub ;