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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
//! # Flynnel
//!
//! A K-aware, NUMA-aware work-stealing scheduler with extended-Flynn-
//! taxonomy dispatch. Pun-named for Michael J. Flynn (1934-), whose
//! 1966 taxonomy of computer architectures (SISD / SIMD / MISD /
//! MIMD) underlies the per-call execution-class plan this crate
//! exposes.
//!
//! ## Extended Flynn taxonomy
//!
//! | Acronym | Expansion | Flynnel axis |
//! |---------|--------------------------------------|---------------------------------------|
//! | SISD | Single Instruction, Single Data | inline execution |
//! | SIMD | Single Instruction, Multiple Data | vector lanes (in-kernel) |
//! | MISD | Multiple Instruction, Single Data | `race_variants` (first tolerable wins)|
//! | MIMD | Multiple Instruction, Multiple Data | `join`; `explore_select` (all finish, best-by-comparator) |
//! | SIMC | Single Instruction, Multiple Cores | `cooperative_join_n` (cross-core SIMD)|
//! | MIMC | Multiple Instruction, Multiple Cores | heterogeneous roles within MIMC |
//! | SIMT | Single Instruction, Multiple Threads | `DispatchBackend::dispatch_kernel` on a registered accelerator; auto-routed via `dispatch_accel` |
//! | MIMT | Multiple Instruction, Multiple Threads | `join_hybrid` / `hybrid_pipeline` (CPU + accelerator) |
//!
//! ## Quick start
//!
//! ```no_run
//! use flynnel::{JobPlan, DispatchProfile, join};
//!
//! let plan = JobPlan::set_profile(8, 1024, DispatchProfile::PortBound);
//! let (a, b) = join(
//! &plan,
//! || (0..1024).sum::<u32>(),
//! || (1024..2048).sum::<u32>(),
//! );
//! assert_eq!(a + b, (0..2048).sum::<u32>());
//! ```
//!
//! The workhorse primitives ([`join`], [`for_each_chunk`],
//! [`for_each_indexed`], [`for_each_chunk_ref`], [`cooperative_join_n`],
//! [`join_hybrid`], [`hybrid_pipeline`], [`race_variants`],
//! [`CancelToken`], [`k_join`], [`k_join_with_plan`], [`JobPlan`])
//! are re-exported at the crate root following the rayon / tokio
//! convention: short top-level path for the things you call
//! constantly. Specialized variants stay namespaced under [`sched`]
//! where they live.
//!
//! References: rayon-core 1.13 (JobRef vtable, CoreLatch, JEC
//! sleep), ARCAS arXiv:2503.11460 (chiplet-aware scheduling; see
//! [`crate::numa_topology::NumaTopology::cluster_size_log2`]),
//! Libfork arXiv:2402.18480 (continuation stealing), Olivier-Prins
//! ROSS '11 (leader-driven cross-NUMA stealing), arXiv:2401.04494
//! (last-successful-victim-first steal probing), arXiv:2009.00202
//! (prefetching stolen job state into L2 on steal).
// Module-level docs in this crate intentionally reference private
// implementation details (algorithm constants like MIN_LEAF_ITEMS,
// HEARTBEAT_CYCLES; impl-detail state like the SET / UNSET latch
// constants) when explaining the WHY of a design. Allow rustdoc to
// link to them without warning.
pub use ;
pub use ;
pub use DispatchProfile;
pub use ;
pub use ;
pub use OpClass;
// Workhorse scheduling primitives, re-exported at the crate root so
// the common idiom is `flynnel::join` / `flynnel::for_each_chunk`
// rather than the deeper `flynnel::sched::arena::join` /
// `flynnel::sched::par_iter::for_each_chunk` paths. The deeper paths
// remain valid as aliases for callers that prefer the namespacing.
pub use ;
pub use ;
pub use ;
pub use cooperative_join_n;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;