Function sobol_burley::sample_4d[][src]

pub fn sample_4d(sample_index: u32, dimension_set: u32, seed: u32) -> [f32; 4]
Expand description

Compute four dimensions of a single sample in the Sobol sequence.

This is identical to sample(), but computes four dimensions at once. On x86-64 architectures it utilizes SIMD for a roughly 4x speed-up. On other architectures it still computes correct results, but doesn’t utilize SIMD.

dimension_set specifies which four dimensions to compute. 0 yields the first four dimensions, 1 the second four dimensions, and so on.

Panics

  • Panics if dimension_set is greater than or equal to NUM_DIMENSION_SETS_4D.
  • In debug, panics if sample_index is greater than or equal to 2^16. In release, returns unspecified floats in the interval [0, 1).