Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Norris__Peter
Beginner
71 Views

possible documentation error for initialization of Philox4x32-10 BRNG in MKL VSL

Jump to solution

There seems to be a discrepancy between the method of initialization of the Philox-4x32-10 random number generator in the following two web-pages when more than a single 32-bit integer is used for initialization:

(1) https://software.intel.com/en-us/mkl-vsnotes-philox4x32-10
Stream Initialization by Function vslNewStreamEx

and the following article:

(2) https://software.intel.com/en-us/articles/new-counter-based-random-number-generators-in-intel-math-k...

The case in (1) seems a bit odd to me, since k is meant to be a 64-bit (2x32-bit) key, while the counter c is a128-bit (4x32-bit). Yet, the method described for n>2 is trying to initialize k with more than 64-bits. Perhaps the text is wrong for (1) and that for n>2 the params[3,4,5,6] should instead be setting c?

Has anyone used this BRNG with multiple-word initialization?

Thanks.  P.

0 Kudos
1 Solution
Pavel_D_Intel1
Employee
71 Views

Hi Peter,
Thanks for bringing us this observation!

Yes, the description of the vslNewStreamEx function for Philox 4x32-10 in VS Notes contains a bug.
The right description is expected to be like this:

Philox4x32-10 generates the stream and initializes it specifying the array params[] of n 32-bit integers:

  1. If n = 0, assume c = k0 = k1 = 0.
  2. If n = 1, assume k = params[0], c = 0.
  3. If n = 2, assume k = params[0] + params[1]*232c = 0.
  4. If n = 3, assume k = params[0] + params[1]*232c = params[2].
  5. If n = 4, assume k = params[0] + params[1]*232c = params[2] + params[3]*232.
  6. If n = 5, assume k = params[0] + params[1]*232c = params[2] + params[3]*232+ params[4]*264.
  7. If n >= 6, assume k = params[0] + params[1]*232c = params[2] + params[3]*232+ params[4]*264 + params[5]*296.

We will update the documentation in one of the future releases of the library.

Regards,
Pavel

View solution in original post

3 Replies
Pavel_D_Intel1
Employee
72 Views

Hi Peter,
Thanks for bringing us this observation!

Yes, the description of the vslNewStreamEx function for Philox 4x32-10 in VS Notes contains a bug.
The right description is expected to be like this:

Philox4x32-10 generates the stream and initializes it specifying the array params[] of n 32-bit integers:

  1. If n = 0, assume c = k0 = k1 = 0.
  2. If n = 1, assume k = params[0], c = 0.
  3. If n = 2, assume k = params[0] + params[1]*232c = 0.
  4. If n = 3, assume k = params[0] + params[1]*232c = params[2].
  5. If n = 4, assume k = params[0] + params[1]*232c = params[2] + params[3]*232.
  6. If n = 5, assume k = params[0] + params[1]*232c = params[2] + params[3]*232+ params[4]*264.
  7. If n >= 6, assume k = params[0] + params[1]*232c = params[2] + params[3]*232+ params[4]*264 + params[5]*296.

We will update the documentation in one of the future releases of the library.

Regards,
Pavel

View solution in original post

Norris__Peter
Beginner
71 Views

OK, Thanks Pavel!

Gennady_F_Intel
Moderator
71 Views

The problem is escalated and this thread will be updated when the fix will be released.

Reply