.. _oneapi-mkl-rng-uniform_bits:

oneapi::mkl::rng::uniform_bits
==============================


Generates uniformly distributed bits in 32/64-bit chunks.


.. contents::
    :local:
    :depth: 1

Description
***********

The ``oneapi::mkl::rng::uniform_bits`` class object is used to generate uniformly distributed bits in 32/64-bit chunks. It is designed to ensure each bit in the 32/64-bit chunk is uniformly distributed. It is not supported not for all engines.


``IUntType`` denotes the chunk size and can be ``std::uint32_t``, ``std::uint64_t``. See :ref:`VS Notes<bibliography>` for details.


API
***


Syntax
------

.. code-block:: cpp

   template<typename UIntType = std::uint32_t>
      class uniform_bits {
      using result_type = UIntType
      }

Devices supported: Host, CPU, and GPU.


Include Files
-------------

- ``oneapi/mkl/rng.hpp``


Template Parameters
-------------------

.. list-table::

   * - ``typename UIntType = std::uint32_t``
     - Type of the produced values. The specific values are as follows:

       ``std::uint32_t``

       ``std::uint64_t``