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
//! Sample-range and work-item scheduling for indicatrix render lanes.
//!
//! This crate is the scheduler a render coordinator runs: several backends ("lanes":
//! a joined remote worker, the coordinator's own CPU/GPU, anything implementing
//! [`WorkerLane`]) contribute disjoint absolute sample ranges to ONE image, and their
//! per-chunk radiance sums are merged into one buffer with an exact sample count.
//!
//! It holds no networking, no GUI and no GPU code. It depends only on the protocol
//! crate (for [`indicatrix_net::SceneState`]) and `glam`, so it can be linked into the
//! worker binary as well as the desktop app.
//!
//! # Why merging by plain addition is sound
//!
//! A path sample is identified by `(global_pixel_index, absolute_sample_index)` and
//! nothing else, on every backend. Any set of backends tracing **disjoint** sample
//! ranges of the **same scene at the same resolution** therefore merges by per-pixel
//! addition, divided by the total count. Disjointness is the whole correctness
//! guarantee, and [`SampleCursor`] provides it by construction.
//!
//! # Contents
//!
//! - [`SampleCursor`]: the atomic claim point handing out disjoint sample ranges.
//! - [`WorkerLane`], [`ChunkResult`], [`SampleRange`]: what a lane is and returns.
//! - [`RateModel`], [`ChunkPolicy`]: per-lane throughput calibration and chunk sizing.
//! - [`LanePool`]: N lanes against one cursor for one image epoch, with failure
//! reclaim, backoff, retirement, cancellation and events.
//! - [`Merger`]: the deterministic, chunk-start-ordered merge of chunk sums.
//! - [`ItemQueue`]: whole-item distribution (batches) over N lanes.
//! - [`CancelToken`]: a cloneable cancellation flag.
pub use CancelToken;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use SampleCursor;