Visible to Intel only — GUID: GUID-2B31D50D-D1B7-45E5-B3E4-C940C2BA3B02
Visible to Intel only — GUID: GUID-2B31D50D-D1B7-45E5-B3E4-C940C2BA3B02
bits
Generates bits of underlying engine (BRNG) integer reccurence.
Description
The bits class object is used to generate integer random values. Each integer can be treated as a vector of several bits. In a truly random generator, these bits are random, while in pseudorandom generators this randomness can be violated.
For example, a drawback of linear congruential generators is that lower bits are less random than higher bits (for example, see [Knuth81]). For this reason, exercise care when using this function. Typically, in a 32-bit LCG only 24 higher bits of an integer value can be considered random. See VS Notes for details.
API
Syntax
namespace oneapi::mkl::rng {
template<typename UIntType = std::uint32_t>
class bits {
using result_type = UIntType
};
}
Devices supported: CPU and GPU.
Include Files
oneapi/mkl/rng.hpp
Template Parameters
Name |
Description |
---|---|
typename UIntType = std::uint32_t |
Type of the produced values. The specific values are as follows: std::uint32_t |