sobol#

Description#

Sobol quasi-random number generator [Sobol76], [Bratley88], which works in arbitrary dimension.

API#

Syntax#

namespace oneapi::mkl::rng {
  class sobol {
  public:
    static constexpr std::uint32_t default_dimensions_number = 1;

    sobol(sycl::queue queue, std::uint32_t dimensions = default_dimensions_number);
    sobol(sycl::queue queue, std::vector<std::uint32_t>& direction_numbers);
    sobol(const sobol& other);
    sobol(sobol&& other);
    sobol& operator=(const sobol& other);
    sobol& operator=(sobol&& other);
    ~sobol();
  };
}

Devices supported: CPU and GPU.

Include Files#

  • oneapi/mkl/rng.hpp

Input Parameters#

Name

Type

Description

queue

sycl::queue

Valid sycl::queue, calls of oneapi::mkl::rng::generate() routine submit kernels in this queue.

dimensions

std::uint32_t

Number of dimensions.

direction_numbers

std::vector<std::uint32_t>

User-defined direction numbers.

Note

sobol is a quasi-random number generator, so the resulting statistics might be worse than those of pseudo-random number generators in case of incorrect usage. For proper statistics for distributions that require more than 1 random number from BRNG (such as gaussian distribution with the box_muller and box-muller2 methods), the dimensions parameter should be set to 2 or more.

See VS Notes for the detailed descriptions.