euv_core/layout/partition/enum.rs
1/// Author- or framework-supplied placement hint attached to a `LayoutBoundary`.
2#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
3pub enum LayoutBoundaryHint {
4 /// Let `SubtreePartitionPlanner` automatically decide CPU vs GPU lane using size and style predicates.
5 #[default]
6 Auto,
7 /// Prefer CPU execution unless overridden by global hardware compute policy.
8 PreferCpu,
9 /// Prefer GPU compute layout whenever hardware is available and style predicates pass.
10 PreferGpu,
11 /// Pin this subtree strictly to CPU layout (for example, rich wrapping prose or IME inputs).
12 ForceCpu,
13}
14
15/// Assigned execution lane for a single partitioned layout subtree.
16#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
17pub enum SubtreeLane {
18 /// Subtree is solved by the CPU layout solver (serial or parallel work-stealing).
19 #[default]
20 CpuSubtree,
21 /// Subtree is offloaded to Pass 0 GPU compute layout with zero-readback indirect draw.
22 GpuSubtree,
23}
24
25/// Reason why a candidate subtree was kept on CPU instead of promoted to GPU compute layout.
26#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
27pub enum GpuSubtreeRejectReason {
28 /// Subtree node count is below the configured `min_gpu_nodes` break-even threshold.
29 BelowNodeThreshold,
30 /// Subtree contains too many wrapping text nodes (`wrapping_text_ratio > max_text_wrap_ratio`).
31 TextWrapRatioExceeded,
32 /// Subtree contains layout or node modes outside the GPU compute kernel contract.
33 UnsupportedLayoutMode,
34 /// Subtree exceeds the maximum level-synchronous GPU compute depth.
35 ExceedsMaxDepth,
36 /// Hardware GPU compute backend is unavailable on the current platform/device.
37 HardwareUnavailable,
38 /// Device is thermally throttled, requiring immediate GPU offload deferral.
39 ThermalThrottled,
40 /// Subtree carries an explicit `LayoutBoundaryHint::ForceCpu` or `PreferCpu` boundary.
41 ExplicitCpuBoundary,
42}