sobol#

説明#

任意の次元で動作する Sobol 準乱数生成器 [Sobol76][Bratley88]

API#

構文#

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(); 
  }; 
}

サポートされるデバイス: CPU と GPU。

インクルード・ファイル#

  • oneapi/mkl/rng.hpp

入力パラメーター#

名前

タイプ

説明

queue

sycl::queue

有効な sycl::queueoneapi::mkl::rng::generate() ルーチンの呼び出しにより、カーネルがこのキューに送信されます。

dimensions

std::uint32_t

次元数。

direction_numbers

std::vector<std::uint32_t>

ユーザー定義の方向番号。

sobol は準乱数生成器であるため、誤って使用すると、結果の統計は疑似乱数生成器より悪くなる可能性があります。BRNG から 1 つ以上の乱数を必要とする分布 (box_muller および box-muller2 メソッドを使用した gaussian 分布など) の適切な統計を得るには、dimension パラメーターを 2 以上に設定する必要があります。

この詳細については VS ノートを参照してください。