pub struct McProgram { /* private fields */ }Implementations§
Source§impl McProgram
impl McProgram
pub fn compile_evidence_forcing(&self) -> Result<EvidenceForcing>
Source§impl McProgram
impl McProgram
Sourcepub fn evaluate_resident_with_provider(
&self,
cfg: McEvalConfig,
provider: Arc<CudaKernelProvider>,
) -> Result<McResidentResult>
pub fn evaluate_resident_with_provider( &self, cfg: McEvalConfig, provider: Arc<CudaKernelProvider>, ) -> Result<McResidentResult>
Evaluate this program with the GPU-resident engine. Returns device-resident
counts plus no-host instrumentation for the measured region. Fails closed
(typed ResidentRejection wrapped into XlogError) for programs
outside the supported fragment.
Sourcepub fn evaluate_resident(&self, cfg: McEvalConfig) -> Result<McResidentResult>
pub fn evaluate_resident(&self, cfg: McEvalConfig) -> Result<McResidentResult>
Convenience: evaluate with a fresh provider.
Source§impl McProgram
impl McProgram
pub fn compile_source(source: &str) -> Result<Self>
pub fn compile_source_with_gpu(source: &str, config: GpuConfig) -> Result<Self>
pub fn num_vars(&self) -> usize
Sourcepub fn evaluate_gpu_device(&self, cfg: McEvalConfig) -> Result<McDeviceResult>
pub fn evaluate_gpu_device(&self, cfg: McEvalConfig) -> Result<McDeviceResult>
GPU-native device-resident MC evaluation via the resident megakernel
engine ([resident]). Returns McDeviceResult with counts left on the
device (no host download). The engine evaluates all worlds in a single
launch with no host interaction in the measured region (no host
sample loop, no per-sample/per-operator host launches or allocations, no
tracked transfers, and no untracked metadata reads); see
McResidentResult::no_host / McNoHostStats::is_no_host for the full
measured contract.
Sourcepub fn evaluate_gpu_device_with_provider(
&self,
cfg: McEvalConfig,
provider: Arc<CudaKernelProvider>,
) -> Result<McDeviceResult>
pub fn evaluate_gpu_device_with_provider( &self, cfg: McEvalConfig, provider: Arc<CudaKernelProvider>, ) -> Result<McDeviceResult>
GPU-native device-resident MC evaluation using a caller-supplied provider
(enables provider/buffer reuse across calls). Static setup (arena
allocation, plan upload, sampling) happens before the measured region;
the measured region is a single resident-engine launch with zero host
interaction — no host loop over samples or fixpoint iterations, no
per-sample/per-operator host launches or device allocations, no tracked
HtoD/DtoH transfers, and no untracked metadata reads. The full contract is
measured by McNoHostStats (McResidentResult::no_host) and gated by
tests/mc_resident.rs. Counts remain device-resident; the caller decides
whether/when to download them.