r250

The 32-bit generalized feedback shift register pseudorandom number generator GFSR(250,103) [Kirkpatrick81].

Description

Feedback shift register generators possess ample theoretical foundation and were initially intended for cryptographic and communication applications. The stream state is the array of 250 32-bit integers.

Generation algorithm

\(x_n=x_{n-103} \oplus x_{n-250}\)

\(u_n=x_n / 2 ^ {32}\)

class r250

Syntax

namespace oneapi::mkl::rng {
class r250 {
public:
    static constexpr std::uint32_t default_seed = 1;

    r250(sycl::queue queue, std::uint32_t seed = default_seed);

    r250(sycl::queue queue, std::vector<std::uint32_t> seed);

    r250(const r250& other);

    r250(r250&& other);

    r250& operator=(const r250& other);

    r250& operator=(r250&& other);

    ~r250();
};
}

Class Members

Routine

Description

r250(sycl::queue queue, std::uint32_t seed = default_seed)

Constructor for common seed initialization of the engine

r250(sycl::queue queue, std::vector<std::uint32_t> seed)

Constructor for extended seed initialization of the engine

r250(const r250& other)

Copy constructor

r250(r250&& other)

Move constructor

r250& operator=(const r250& other)

Copy assignment operator

r250& operator=(r250&& other)

Move assignment operator

Constructors

r250::r250(sycl::queue queue, std::uint32_t seed = default_seed)

Input Parameters

queue

Valid sycl::queue object, calls of the oneapi::mkl::rng::generate() routine submits kernels in this queue to obtain random numbers from a given engine.

seed

The initial conditions of the generator state, assume \(x_{-250} = seed\). If \(seed = 0\), assume \(seed = 1\). Other values in state are initialized according to recurrent correlation \(x_{n+1} = 69069x_{n}(mod \ 2 ^ {32})\). Then the values \(x_{7k-247}, k = 0, 1, ..., 31\) are interpreted as a binary matrix of size 32 x 32 and diagonal bits are set to 0, the under-diagonal bits to 0.

r250::r250(sycl::queue queue, std::vector<std::uint32_t> seed)

Input Parameters

queue

Valid sycl::queue object, calls of the oneapi::mkl::rng::generate() routine submits kernels in this queue to obtain random numbers from a given engine.

seed

The initial conditions of the generator state if \(n \geqslant 0: x_{k-250} = seed[k], k = 0, 1, ..., 249\)

r250::r250(const r250& other)

Input Parameters

other

Valid r250 object. The queue and state of the other engine is copied and applied to the current engine.

r250::r250(r250&& other)

Input Parameters

other

Valid r250 object. The queue and state of the other engine is moved to the current engine.

r250::r250& operator=(const r250& other)

Input Parameters

other

Valid r250 object. The queue and state of the other engine is copied and applied to the current engine.

r250::r250& operator=(r250&& other)

Input Parameters

other

Valid r250 r-value object. The queue and state of the other engine is moved to the current engine.

Parent topic: Engines (Basic Random Number Generators)