embedded3 PERF-3 P1-5 (j): the step apertures, open flags and step activity patched on the changed cells' faces with the old mask's arrays moved over (a face of no changed cell keeps its trapezoid: its corners are untouched in both builds); the touched-cell map stored per build — slab CSV byte-identical, band check passed, device moving/cg green, host suite 21/21; ny 124 rebuild block 1,578 → 1,348 ms per step (refill + apertures + merging 196 → 64)
CI / Build (macos-latest) (push) Waiting to run
CI / Test (macos-latest) (push) Blocked by required conditions
CI / Test (ubuntu-latest) (push) Blocked by required conditions
CI / Python Bindings (maturin) (macos-latest) (push) Blocked by required conditions
CI / Python Bindings (maturin) (ubuntu-latest) (push) Blocked by required conditions
CI / WASM Build + Size Check (push) Blocked by required conditions
CI / Distributed Training Tests (push) Blocked by required conditions
CI / CI Success (push) Blocked by required conditions
CI / Format Check (push) Failing after 4s
CI / Build (ubuntu-latest) (push) Failing after 3s
CI / Clippy Check (push) Failing after 5s
Performance Benchmarks / Run Benchmarks (push) Failing after 5s
Documentation / Build User Guide (push) Successful in 6s
Documentation / Build API Documentation (push) Failing after 28s
CI / Build CPU-Only (Explicit) (push) Failing after 1m29s
CI / Build (macos-latest) (push) Waiting to run
CI / Test (macos-latest) (push) Blocked by required conditions
CI / Test (ubuntu-latest) (push) Blocked by required conditions
CI / Python Bindings (maturin) (macos-latest) (push) Blocked by required conditions
CI / Python Bindings (maturin) (ubuntu-latest) (push) Blocked by required conditions
CI / WASM Build + Size Check (push) Blocked by required conditions
CI / Distributed Training Tests (push) Blocked by required conditions
CI / CI Success (push) Blocked by required conditions
CI / Format Check (push) Failing after 4s
CI / Build (ubuntu-latest) (push) Failing after 3s
CI / Clippy Check (push) Failing after 5s
Performance Benchmarks / Run Benchmarks (push) Failing after 5s
Documentation / Build User Guide (push) Successful in 6s
Documentation / Build API Documentation (push) Failing after 28s
CI / Build CPU-Only (Explicit) (push) Failing after 1m29s
Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
0efb8be745
commit
03a9c9686e
@@ -37,6 +37,8 @@ pub struct CutGeometry {
|
||||
/// narrow band) — a cell whose corners are all untouched has unchanged
|
||||
/// apertures, volume and activity.
|
||||
pub touched: Vec<bool>,
|
||||
/// Per cell: any of its eight corners touched (computed once per build).
|
||||
pub touched_cell: Vec<bool>,
|
||||
}
|
||||
|
||||
impl CutGeometry {
|
||||
@@ -191,6 +193,21 @@ impl CutGeometry {
|
||||
let sz = (a_w[g.wface(k + 1, j, i)] - a_w[g.wface(k, j, i)]) * az;
|
||||
*w = [-sx, -sy, -sz];
|
||||
});
|
||||
let touched_cell: Vec<bool> = (0..g.cells())
|
||||
.into_par_iter()
|
||||
.map(|idx| {
|
||||
let (k, j, i) = (idx / (ny * nx), (idx / nx) % ny, idx % nx);
|
||||
let mut t = false;
|
||||
for dk in 0..2 {
|
||||
for dj in 0..2 {
|
||||
for di in 0..2 {
|
||||
t |= touched[Self::node(g, k + dk, j + dj, i + di)];
|
||||
}
|
||||
}
|
||||
}
|
||||
t
|
||||
})
|
||||
.collect();
|
||||
Self {
|
||||
grid,
|
||||
phi,
|
||||
@@ -204,12 +221,16 @@ impl CutGeometry {
|
||||
d_w,
|
||||
bound,
|
||||
touched,
|
||||
touched_cell,
|
||||
}
|
||||
}
|
||||
|
||||
/// The cells with a touched corner (P1-4).
|
||||
/// The cells with a touched corner (P1-4; the stored map).
|
||||
#[must_use]
|
||||
pub fn touched_cells(&self) -> Vec<bool> {
|
||||
if !self.touched_cell.is_empty() {
|
||||
return self.touched_cell.clone();
|
||||
}
|
||||
use rayon::prelude::*;
|
||||
let g = self.grid;
|
||||
let (nx, ny) = (g.nx, g.ny);
|
||||
|
||||
Reference in New Issue
Block a user