embedded3 R6-2: the device classification default ON (RTX_E3_MASK_DEVICE=0 restores the host rebuild; needs the device geometry and a CUDA build)
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
d9847cd818
commit
6ae5312b6f
@@ -1,4 +1,4 @@
|
||||
//! R6-2 (`RTX_E3_MASK_DEVICE=1`): the host mirror of a moving mask whose
|
||||
//! R6-2 (default ON; `RTX_E3_MASK_DEVICE=0` off): the host mirror of a moving mask whose
|
||||
//! classification ran on the device. The device computes, on the changed set
|
||||
//! of the step (the cells touched by either build, dilated by one) and the
|
||||
//! faces of those cells, exactly the values the host rebuild computes over
|
||||
@@ -16,11 +16,14 @@ use super::wall::{FaceKind, Mask};
|
||||
use super::Grid;
|
||||
use rayon::prelude::*;
|
||||
|
||||
/// `RTX_E3_MASK_DEVICE=1`, with the device geometry it requires (default
|
||||
/// ON since R6-1's gate; `RTX_E3_GEOM_DEVICE=0` turns both off).
|
||||
/// The device classification: default ON (R6-2's two-period 3D ny 62 gate
|
||||
/// held 2026-09-25); `RTX_E3_MASK_DEVICE=0` restores the host rebuild. It
|
||||
/// needs the device geometry (default ON; `RTX_E3_GEOM_DEVICE=0` turns both
|
||||
/// off) and a CUDA build (a host-only build never keeps the arrays it needs).
|
||||
#[must_use]
|
||||
pub fn mask_device_enabled() -> bool {
|
||||
std::env::var("RTX_E3_MASK_DEVICE").is_ok_and(|v| v == "1")
|
||||
cfg!(feature = "cuda")
|
||||
&& !std::env::var("RTX_E3_MASK_DEVICE").is_ok_and(|v| v == "0")
|
||||
&& !std::env::var("RTX_E3_GEOM_DEVICE").is_ok_and(|v| v == "0")
|
||||
}
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ pub struct DeviceStep {
|
||||
steps_since_hierarchy: usize,
|
||||
/// R6-1: the persistent device cut geometry (default ON; `RTX_E3_GEOM_DEVICE=0` off).
|
||||
geom: Option<geom::DeviceGeom>,
|
||||
/// R6-2: the device classification (`RTX_E3_MASK_DEVICE=1`).
|
||||
/// R6-2: the device classification (default ON, `RTX_E3_MASK_DEVICE=0` off).
|
||||
dmask: Option<mask::DeviceMask>,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//! R6-2: the moving mask's classification on the device (`e3_mask.cu`),
|
||||
//! behind `RTX_E3_MASK_DEVICE=1` (which needs `RTX_E3_GEOM_DEVICE=1`). After
|
||||
//! default ON (`RTX_E3_MASK_DEVICE=0` off; needs the device geometry). After
|
||||
//! the device geometry of the step (R6-1), the changed set, the faces of the
|
||||
//! changed cells, the kinds, the step apertures and open flags, the space-time
|
||||
//! activity, the merging masters, the centroid shifts, the GCL wall-flux
|
||||
@@ -102,7 +102,7 @@ struct Apertures {
|
||||
unsafe impl DeviceRepr for Apertures {}
|
||||
unsafe impl ValidAsZeroBits for Apertures {}
|
||||
|
||||
/// `RTX_E3_MASK_DEVICE=1` with `RTX_E3_GEOM_DEVICE=1`.
|
||||
/// Default ON (`RTX_E3_MASK_DEVICE=0` off); needs the device geometry.
|
||||
pub(super) fn enabled() -> bool {
|
||||
crate::solvers::incompressible::embedded3::maskupdate::mask_device_enabled()
|
||||
}
|
||||
|
||||
@@ -305,7 +305,7 @@ pub struct Solver {
|
||||
pub(super) geom_pool: super::cut::GeomPool,
|
||||
pub(super) apertures_old_gen: u64,
|
||||
/// R6-2: the next moving rebuild's classification, computed on the
|
||||
/// device (`RTX_E3_MASK_DEVICE=1`); `rebuild_moving_mask` assembles the
|
||||
/// device (default ON, `RTX_E3_MASK_DEVICE=0` off); `rebuild_moving_mask` assembles the
|
||||
/// mask from it instead of classifying the whole grid.
|
||||
pub(super) pending_mask: Option<super::maskupdate::MaskUpdate>,
|
||||
/// R6-2: the instantaneous arrays of the mask retired at the previous
|
||||
|
||||
Reference in New Issue
Block a user