GPU-accelerated Monte Carlo primitives for variance reduction.
This crate provides variance reduction techniques for Monte Carlo simulation that can be accelerated on GPU via RingKernel.
Features
- Counter-based PRNGs: Philox and other stateless generators suitable for GPU
- Variance Reduction: Antithetic variates, control variates, importance sampling
- GPU Compatibility: All types are designed for zero-copy GPU transfer
Example
use ringkernel_montecarlo::prelude::*;
// Create a Philox-based RNG
let mut rng = PhiloxRng::new(0, 42);
// Generate uniform random numbers
let u: f32 = rng.next_uniform();
// Generate normal variates
let z: f32 = rng.next_normal();
// Antithetic variates for variance reduction
let (u1, u2) = antithetic_pair(&mut rng);
// u1 and u2 are negatively correlated