Skip to content

Commit 0ac7f9c

Browse files
authored
[oneMKL][RNG] bug fixes (#298)
1 parent 64a6383 commit 0ac7f9c

13 files changed

+32
-33
lines changed

source/elements/oneMKL/source/domains/rng/bibliography.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Bibliography
1111
.. container::
1212

1313

14-
For more information about the VS RNG functionality, refer to the
14+
For more information about the RNG functionality, refer to the
1515
following publications:
1616

1717

@@ -21,7 +21,7 @@ Bibliography
2121
.. container::
2222

2323

24-
**VS RNG**
24+
**RNG**
2525

2626
[Bratley88]
2727
Bratley P. and Fox B.L. *Implementing Sobol's Quasirandom

source/elements/oneMKL/source/domains/rng/distributions-template-parameter-mkl-rng-method-values.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Distributions Template Parameter Method
1616
* - Method
1717
- Distributions
1818
- Math Description
19-
* - ``uniform_method::standard``\ \ ``uniform_method::standard_accurate``\
19+
* - ``uniform_method::standard``\ \ ``uniform_method::accurate``\
2020
- \ ``uniform(s,d)``\ \ ``uniform(i)``\
2121
- Standard method. ``uniform_method::standard_accurate`` supported for ``uniform(s, d)`` only.
2222
* - ``gaussian_method::box_muller``

source/elements/oneMKL/source/domains/rng/distributions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Distributions
128128
* - Distribution
129129
- Method
130130
* - \ :ref:`onemkl_rng_uniform_continuous`\
131-
- `oneapi::mkl::rng::unform_method::standard_accurate`
131+
- `oneapi::mkl::rng::unform_method::accurate`
132132
* - \ :ref:`onemkl_rng_exponential`\
133133
- `oneapi::mkl::rng::exponential_method::icdf_accurate`
134134
* - \ :ref:`onemkl_rng_weibull`\

source/elements/oneMKL/source/domains/rng/mkl-rng-generate.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ generate (Buffer version)
2525
.. code-block:: cpp
2626
2727
namespace oneapi::mkl::rng {
28-
template<typename DistrType, typename EngineType> void generate (const DistrType& distr, EngineType& engine, std::int64_t n, cl::sycl::buffer<typename DistrType::result_type, 1>& r);
28+
template<typename DistrType, typename EngineType>
29+
void generate (const DistrType& distr, EngineType& engine, std::int64_t n, sycl::buffer<typename DistrType::result_type, 1>& r);
2930
}
3031
3132
.. container:: section
@@ -75,7 +76,8 @@ generate (USM version)
7576
.. code-block:: cpp
7677
7778
namespace oneapi::mkl::rng {
78-
template<typename DistrType, typename EngineType> cl::sycl::event generate (const DistrType& distr, EngineType& engine, std::int64_t n, typename DistrType::result_type* r, const cl::sycl::vector_class<cl::sycl::event> & dependencies);
79+
template<typename DistrType, typename EngineType>
80+
sycl::event generate (const DistrType& distr, EngineType& engine, std::int64_t n, typename DistrType::result_type* r, const sycl::vector_class<sycl::event> & dependencies);
7981
}
8082
8183
.. container:: section
@@ -126,4 +128,3 @@ generate (USM version)
126128

127129

128130
**Parent topic:** :ref:`onemkl_rng_generate_routine`
129-

source/elements/oneMKL/source/domains/rng/mkl-rng-leapfrog.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ leapfrog
3232
.. code-block:: cpp
3333
3434
namespace oneapi::mkl::rng {
35-
template<typename EngineType> \
36-
void oneapi::mkl::rng::leapfrog(EngineType& engine, std::uint64_t idx, std::uint64_t stride);
35+
template<typename EngineType>
36+
void oneapi::mkl::rng::leapfrog(EngineType& engine, std::uint64_t idx, std::uint64_t stride);
3737
}
3838
3939
.. container:: section
@@ -63,8 +63,8 @@ leapfrog
6363
// Creating 3 identical engines
6464
mkl::rng::mcg31m1 engine_1(queue, seed);
6565
66-
mkl::rng::mcg31m1 engine_2(queue, engine_1);
67-
mkl::rng::mcg31m1 engine_3(queue, engine_1);
66+
mkl::rng::mcg31m1 engine_2(engine_1);
67+
mkl::rng::mcg31m1 engine_3(engine_1);
6868
6969
7070
// Leapfrogging the states of engines
@@ -76,4 +76,4 @@ leapfrog
7676
7777
**Parent topic:** :ref:`onemkl_rng_service_routines`
7878
79-
.. |image0| image:: ../equations/GUID-D90F2CB0-58B4-42F5-A1F9-FD1EA859DD44-low.png
79+
.. |image0| image:: ../equations/rng-leapfrog.png

source/elements/oneMKL/source/domains/rng/mkl-rng-philox4x32x10.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ The Philox4x32x10 engine is a keyed family of generator of counter-based BRNG. T
2929

3030
:math:`L_1^{i+1} =mullo(R_1^i, 0xD2511F53)`
3131

32-
:math:`R_1^{i+1} =mulhi(R_0^i, 0xCD9E8D57) \oplus k_0 \oplus L_0`
32+
:math:`R_1^{i+1} =mulhi(R_0^i, 0xCD9E8D57) \oplus k_0^i \oplus L_0^i`
3333

3434
:math:`L_0^{i+1} =mullo(R_0^i, 0xCD9E8D57)`
3535

36-
:math:`R_0^{i+1} =mulhi(R_1^i, 0xD2511F53) \oplus k_1 \oplus L_1`
36+
:math:`R_0^{i+1} =mulhi(R_1^i, 0xD2511F53) \oplus k_1^i \oplus L_1^i`
3737

3838
:math:`k_0^{i+1} =k_0^i + 0xBB67AE85`
3939

source/elements/oneMKL/source/domains/rng/mkl-rng-skip_ahead.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ skip_ahead
3232
.. code-block:: cpp
3333
3434
namespace oneapi::mkl::rng {
35-
template<typename EngineType> \
36-
void oneapi::mkl::rng::skip_ahead(EngineType& engine, std::uint64_t num_to_skip);
35+
template<typename EngineType>
36+
void oneapi::mkl::rng::skip_ahead(EngineType& engine, std::uint64_t num_to_skip);
3737
}
3838
3939
.. container:: section
@@ -59,8 +59,8 @@ skip_ahead
5959
6060
// Creating 3 identical engines
6161
oneapi::mkl::rng::mcg31m1 engine_1(queue, seed);
62-
oneapi::mkl::rng::mcg31m1 engine_2(queue, engine_1);
63-
oneapi::mkl::rng::mcg31m1 engine_3(queue, engine_2);
62+
oneapi::mkl::rng::mcg31m1 engine_2(engine_1);
63+
oneapi::mkl::rng::mcg31m1 engine_3(engine_2);
6464
6565
// Skipping ahead by 7 elements the 2nd engine
6666
oneapi::mkl::rng::skip_ahead(engine_2, 7);
@@ -79,8 +79,8 @@ skip_ahead (Interface with a partitioned number of skipped elements)
7979
.. code-block:: cpp
8080
8181
namespace oneapi::mkl::rng {
82-
template<typename EngineType> \
83-
void oneapi::mkl::rng::skip_ahead(EngineType& engine, std::initializer_list<std::uint64_t> num_to_skip);
82+
template<typename EngineType>
83+
void oneapi::mkl::rng::skip_ahead(EngineType& engine, std::initializer_list<std::uint64_t> num_to_skip);
8484
}
8585
8686
.. container:: section
@@ -112,10 +112,10 @@ skip_ahead (Interface with a partitioned number of skipped elements)
112112
std::initializer_list<std::uint64_t> num_to_skip = {0, 1};
113113
114114
// Creating the 2nd engine based on 1st. Skipping by 2^64
115-
oneapi::mkl::rng::mrg32k3a engine_2(queue, engine_1);
115+
oneapi::mkl::rng::mrg32k3a engine_2(engine_1);
116116
oneapi::mkl::rng::skip_ahead(engine_2, num_to_skip);
117117
118118
119119
**Parent topic:** :ref:`onemkl_rng_service_routines`
120120
121-
.. |image0| image:: ../equations/GUID-061AF9F8-B166-4154-9BF1-4E2C99F1CE1F-low.png
121+
.. |image0| image:: ../equations/rng-skip-ahead.png

source/elements/oneMKL/source/domains/rng/mkl-rng-uniform-continuous.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class uniform
6969

7070
* ``oneapi::mkl::rng::uniform_method::by_default``
7171
* ``oneapi::mkl::rng::uniform_method::standard``
72-
* ``oneapi::mkl::rng::uniform_method::standard_accurate``
72+
* ``oneapi::mkl::rng::uniform_method::accurate``
7373

7474
See description of the methods in :ref:`Distributions methods template parameter<onemkl_rng_distributions_template_parameter_mkl_rng_method_values>`
7575

0 commit comments

Comments
 (0)