Skip to main content

MAX_GRID_POINTS

Constant MAX_GRID_POINTS 

pub const MAX_GRID_POINTS: u64 = _; // 1_048_576u64
Expand description

The largest grid Distribution::grid_values will materialize.

2^20 points — roughly 16 MiB of ParamValue — is far more than a Grid sampler could plausibly exhaust, and bounding it is what keeps grid_values a total function: a distribution such as Distribution::int(0, i64::MAX) reports its true cardinality but declines to enumerate it, instead of aborting the process on a capacity overflow.