/usr/lib/python3/dist-packages/pyopencl/cl/pyopencl-random123/philox.cl is in python3-pyopencl 2017.2.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 | /*
Copyright 2010-2011, D. E. Shaw Research.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions, and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions, and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of D. E. Shaw Research nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _philox_dot_h_
#define _philox_dot_h_
/** \cond HIDDEN_FROM_DOXYGEN */
#include "openclfeatures.h"
#include "array.h"
/*
// Macros _Foo_tpl are code generation 'templates' They define
// inline functions with names obtained by mangling Foo and the
// macro arguments. E.g.,
// _mulhilo_tpl(32, uint32_t, uint64_t)
// expands to a definition of:
// mulhilo32(uint32_t, uint32_t, uint32_t *, uint32_t *)
// We then 'instantiate the template' to define
// several different functions, e.g.,
// mulhilo32
// mulhilo64
// These functions will be visible to user code, and may
// also be used later in subsequent templates and definitions.
// A template for mulhilo using a temporary of twice the word-width.
// Gcc figures out that this can be reduced to a single 'mul' instruction,
// despite the apparent use of double-wide variables, shifts, etc. It's
// obviously not guaranteed that all compilers will be that smart, so
// other implementations might be preferable, e.g., using an intrinsic
// or an asm block. On the other hand, for 32-bit multiplies,
// this *is* perfectly standard C99 - any C99 compiler should
// understand it and produce correct code. For 64-bit multiplies,
// it's only usable if the compiler recognizes that it can do
// arithmetic on a 128-bit type. That happens to be true for gcc on
// x86-64, and powerpc64 but not much else.
*/
#define _mulhilo_dword_tpl(W, Word, Dword) \
R123_CUDA_DEVICE R123_STATIC_INLINE Word mulhilo##W(Word a, Word b, Word* hip){ \
Dword product = ((Dword)a)*((Dword)b); \
*hip = product>>W; \
return (Word)product; \
}
/*
// A template for mulhilo using gnu-style asm syntax.
// INSN can be "mulw", "mull" or "mulq".
// FIXME - porting to other architectures, we'll need still-more conditional
// branching here. Note that intrinsics are usually preferable.
*/
#ifdef __powerpc__
#define _mulhilo_asm_tpl(W, Word, INSN) \
R123_STATIC_INLINE Word mulhilo##W(Word ax, Word b, Word *hip){ \
Word dx = 0; \
__asm__("\n\t" \
INSN " %0,%1,%2\n\t" \
: "=r"(dx) \
: "r"(b), "r"(ax) \
); \
*hip = dx; \
return ax*b; \
}
#else
#define _mulhilo_asm_tpl(W, Word, INSN) \
R123_STATIC_INLINE Word mulhilo##W(Word ax, Word b, Word *hip){ \
Word dx; \
__asm__("\n\t" \
INSN " %2\n\t" \
: "=a"(ax), "=d"(dx) \
: "r"(b), "0"(ax) \
); \
*hip = dx; \
return ax; \
}
#endif /* __powerpc__ */
/*
// A template for mulhilo using MSVC-style intrinsics
// For example,_umul128 is an msvc intrinsic, c.f.
// http://msdn.microsoft.com/en-us/library/3dayytw9.aspx
*/
#define _mulhilo_msvc_intrin_tpl(W, Word, INTRIN) \
R123_STATIC_INLINE Word mulhilo##W(Word a, Word b, Word* hip){ \
return INTRIN(a, b, hip); \
}
/* N.B. This really should be called _mulhilo_mulhi_intrin. It just
happens that CUDA was the first time we used the idiom. */
#define _mulhilo_cuda_intrin_tpl(W, Word, INTRIN) \
R123_CUDA_DEVICE R123_STATIC_INLINE Word mulhilo##W(Word a, Word b, Word* hip){ \
*hip = INTRIN(a, b); \
return a*b; \
}
/*
// A template for mulhilo using only word-size operations and
// C99 operators (no adc, no mulhi). It
// requires four multiplies and a dozen or so shifts, adds
// and tests. It's not clear what this is good for, other than
// completeness. On 32-bit platforms, it could be used to
// implement philoxNx64, but on such platforms both the philoxNx32
// and the threefryNx64 cbrngs are going to have much better
// performance. It is enabled below by R123_USE_MULHILO64_C99,
// but that is currently (Sep 2011) not set by any of the
// features/XXfeatures.h headers. It can, of course, be
// set with a compile-time -D option.
*/
#define _mulhilo_c99_tpl(W, Word) \
R123_STATIC_INLINE Word mulhilo##W(Word a, Word b, Word *hip){ \
const unsigned WHALF = W/2; \
const Word LOMASK = ((((Word)1)<<WHALF)-1); \
Word lo = a*b; /* full low multiply */ \
Word ahi = a>>WHALF; \
Word alo = a& LOMASK; \
Word bhi = b>>WHALF; \
Word blo = b& LOMASK; \
\
Word ahbl = ahi*blo; \
Word albh = alo*bhi; \
\
Word ahbl_albh = ((ahbl&LOMASK) + (albh&LOMASK)); \
Word hi = ahi*bhi + (ahbl>>WHALF) + (albh>>WHALF); \
hi += ahbl_albh >> WHALF; /* carry from the sum of lo(ahbl) + lo(albh) ) */ \
/* carry from the sum with alo*blo */ \
hi += ((lo >> WHALF) < (ahbl_albh&LOMASK)); \
*hip = hi; \
return lo; \
}
/*
// A template for mulhilo on a platform that can't do it
// We could put a C version here, but is it better to run *VERY*
// slowly or to just stop and force the user to find another CBRNG?
*/
#define _mulhilo_fail_tpl(W, Word) \
R123_STATIC_INLINE Word mulhilo##W(Word a, Word b, Word *hip){ \
R123_STATIC_ASSERT(0, "mulhilo" #W " is not implemented on this machine\n"); \
}
/*
// N.B. There's an MSVC intrinsic called _emul,
// which *might* compile into better code than
// _mulhilo_dword_tpl
*/
#if R123_USE_MULHILO32_ASM
#ifdef __powerpc__
_mulhilo_asm_tpl(32, uint32_t, "mulhwu")
#else
_mulhilo_asm_tpl(32, uint32_t, "mull")
#endif /* __powerpc__ */
#else
_mulhilo_dword_tpl(32, uint32_t, uint64_t)
#endif
#if R123_USE_PHILOX_64BIT
#if R123_USE_MULHILO64_ASM
#ifdef __powerpc64__
_mulhilo_asm_tpl(64, uint64_t, "mulhdu")
#else
_mulhilo_asm_tpl(64, uint64_t, "mulq")
#endif /* __powerpc64__ */
#elif R123_USE_MULHILO64_MSVC_INTRIN
_mulhilo_msvc_intrin_tpl(64, uint64_t, _umul128)
#elif R123_USE_MULHILO64_CUDA_INTRIN
_mulhilo_cuda_intrin_tpl(64, uint64_t, __umul64hi)
#elif R123_USE_MULHILO64_OPENCL_INTRIN
_mulhilo_cuda_intrin_tpl(64, uint64_t, mul_hi)
#elif R123_USE_MULHILO64_MULHI_INTRIN
_mulhilo_cuda_intrin_tpl(64, uint64_t, R123_MULHILO64_MULHI_INTRIN)
#elif R123_USE_GNU_UINT128
_mulhilo_dword_tpl(64, uint64_t, __uint128_t)
#elif R123_USE_MULHILO64_C99
_mulhilo_c99_tpl(64, uint64_t)
#else
_mulhilo_fail_tpl(64, uint64_t)
#endif
#endif
/*
// The multipliers and Weyl constants are "hard coded".
// To change them, you can #define them with different
// values before #include-ing this file.
// This isn't terribly elegant, but it works for C as
// well as C++. A nice C++-only solution would be to
// use template parameters in the style of <random>
*/
#ifndef PHILOX_M2x64_0
#define PHILOX_M2x64_0 R123_64BIT(0xD2B74407B1CE6E93)
#endif
#ifndef PHILOX_M4x64_0
#define PHILOX_M4x64_0 R123_64BIT(0xD2E7470EE14C6C93)
#endif
#ifndef PHILOX_M4x64_1
#define PHILOX_M4x64_1 R123_64BIT(0xCA5A826395121157)
#endif
#ifndef PHILOX_M2x32_0
#define PHILOX_M2x32_0 ((uint32_t)0xd256d193)
#endif
#ifndef PHILOX_M4x32_0
#define PHILOX_M4x32_0 ((uint32_t)0xD2511F53)
#endif
#ifndef PHILOX_M4x32_1
#define PHILOX_M4x32_1 ((uint32_t)0xCD9E8D57)
#endif
#ifndef PHILOX_W64_0
#define PHILOX_W64_0 R123_64BIT(0x9E3779B97F4A7C15) /* golden ratio */
#endif
#ifndef PHILOX_W64_1
#define PHILOX_W64_1 R123_64BIT(0xBB67AE8584CAA73B) /* sqrt(3)-1 */
#endif
#ifndef PHILOX_W32_0
#define PHILOX_W32_0 ((uint32_t)0x9E3779B9)
#endif
#ifndef PHILOX_W32_1
#define PHILOX_W32_1 ((uint32_t)0xBB67AE85)
#endif
#ifndef PHILOX2x32_DEFAULT_ROUNDS
#define PHILOX2x32_DEFAULT_ROUNDS 10
#endif
#ifndef PHILOX2x64_DEFAULT_ROUNDS
#define PHILOX2x64_DEFAULT_ROUNDS 10
#endif
#ifndef PHILOX4x32_DEFAULT_ROUNDS
#define PHILOX4x32_DEFAULT_ROUNDS 10
#endif
#ifndef PHILOX4x64_DEFAULT_ROUNDS
#define PHILOX4x64_DEFAULT_ROUNDS 10
#endif
/* The ignored fourth argument allows us to instantiate the
same macro regardless of N. */
#define _philox2xWround_tpl(W, T) \
R123_CUDA_DEVICE R123_STATIC_INLINE R123_FORCE_INLINE(struct r123array2x##W _philox2x##W##round(struct r123array2x##W ctr, struct r123array1x##W key)); \
R123_CUDA_DEVICE R123_STATIC_INLINE struct r123array2x##W _philox2x##W##round(struct r123array2x##W ctr, struct r123array1x##W key){ \
T hi; \
T lo = mulhilo##W(PHILOX_M2x##W##_0, ctr.v[0], &hi); \
struct r123array2x##W out = {{hi^key.v[0]^ctr.v[1], lo}}; \
return out; \
}
#define _philox2xWbumpkey_tpl(W) \
R123_CUDA_DEVICE R123_STATIC_INLINE struct r123array1x##W _philox2x##W##bumpkey( struct r123array1x##W key) { \
key.v[0] += PHILOX_W##W##_0; \
return key; \
}
#define _philox4xWround_tpl(W, T) \
R123_CUDA_DEVICE R123_STATIC_INLINE R123_FORCE_INLINE(struct r123array4x##W _philox4x##W##round(struct r123array4x##W ctr, struct r123array2x##W key)); \
R123_CUDA_DEVICE R123_STATIC_INLINE struct r123array4x##W _philox4x##W##round(struct r123array4x##W ctr, struct r123array2x##W key){ \
T hi0; \
T hi1; \
T lo0 = mulhilo##W(PHILOX_M4x##W##_0, ctr.v[0], &hi0); \
T lo1 = mulhilo##W(PHILOX_M4x##W##_1, ctr.v[2], &hi1); \
struct r123array4x##W out = {{hi1^ctr.v[1]^key.v[0], lo1, \
hi0^ctr.v[3]^key.v[1], lo0}}; \
return out; \
}
#define _philox4xWbumpkey_tpl(W) \
R123_CUDA_DEVICE R123_STATIC_INLINE struct r123array2x##W _philox4x##W##bumpkey( struct r123array2x##W key) { \
key.v[0] += PHILOX_W##W##_0; \
key.v[1] += PHILOX_W##W##_1; \
return key; \
}
#define _philoxNxW_tpl(N, Nhalf, W, T) \
/** @ingroup PhiloxNxW */ \
enum r123_enum_philox##N##x##W { philox##N##x##W##_rounds = PHILOX##N##x##W##_DEFAULT_ROUNDS }; \
typedef struct r123array##N##x##W philox##N##x##W##_ctr_t; \
typedef struct r123array##Nhalf##x##W philox##N##x##W##_key_t; \
typedef struct r123array##Nhalf##x##W philox##N##x##W##_ukey_t; \
R123_CUDA_DEVICE R123_STATIC_INLINE philox##N##x##W##_key_t philox##N##x##W##keyinit(philox##N##x##W##_ukey_t uk) { return uk; } \
R123_CUDA_DEVICE R123_STATIC_INLINE R123_FORCE_INLINE(philox##N##x##W##_ctr_t philox##N##x##W##_R(unsigned int R, philox##N##x##W##_ctr_t ctr, philox##N##x##W##_key_t key)); \
R123_CUDA_DEVICE R123_STATIC_INLINE philox##N##x##W##_ctr_t philox##N##x##W##_R(unsigned int R, philox##N##x##W##_ctr_t ctr, philox##N##x##W##_key_t key) { \
R123_ASSERT(R<=16); \
if(R>0){ ctr = _philox##N##x##W##round(ctr, key); } \
if(R>1){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \
if(R>2){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \
if(R>3){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \
if(R>4){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \
if(R>5){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \
if(R>6){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \
if(R>7){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \
if(R>8){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \
if(R>9){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \
if(R>10){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \
if(R>11){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \
if(R>12){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \
if(R>13){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \
if(R>14){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \
if(R>15){ key = _philox##N##x##W##bumpkey(key); ctr = _philox##N##x##W##round(ctr, key); } \
return ctr; \
}
_philox2xWbumpkey_tpl(32)
_philox4xWbumpkey_tpl(32)
_philox2xWround_tpl(32, uint32_t) /* philo2x32round */
_philox4xWround_tpl(32, uint32_t) /* philo4x32round */
/** \endcond */
_philoxNxW_tpl(2, 1, 32, uint32_t) /* philox2x32bijection */
_philoxNxW_tpl(4, 2, 32, uint32_t) /* philox4x32bijection */
#if R123_USE_PHILOX_64BIT
/** \cond HIDDEN_FROM_DOXYGEN */
_philox2xWbumpkey_tpl(64)
_philox4xWbumpkey_tpl(64)
_philox2xWround_tpl(64, uint64_t) /* philo2x64round */
_philox4xWround_tpl(64, uint64_t) /* philo4x64round */
/** \endcond */
_philoxNxW_tpl(2, 1, 64, uint64_t) /* philox2x64bijection */
_philoxNxW_tpl(4, 2, 64, uint64_t) /* philox4x64bijection */
#endif /* R123_USE_PHILOX_64BIT */
#define philox2x32(c,k) philox2x32_R(philox2x32_rounds, c, k)
#define philox4x32(c,k) philox4x32_R(philox4x32_rounds, c, k)
#if R123_USE_PHILOX_64BIT
#define philox2x64(c,k) philox2x64_R(philox2x64_rounds, c, k)
#define philox4x64(c,k) philox4x64_R(philox4x64_rounds, c, k)
#endif /* R123_USE_PHILOX_64BIT */
#ifdef __cplusplus
#include <stdexcept>
/** \cond HIDDEN_FROM_DOXYGEN */
#define _PhiloxNxW_base_tpl(CType, KType, N, W) \
namespace r123{ \
template<unsigned int ROUNDS> \
struct Philox##N##x##W##_R{ \
typedef CType ctr_type; \
typedef KType key_type; \
typedef KType ukey_type; \
static const unsigned int rounds=ROUNDS; \
inline R123_CUDA_DEVICE R123_FORCE_INLINE(ctr_type operator()(ctr_type ctr, key_type key) const){ \
R123_STATIC_ASSERT(ROUNDS<=16, "philox is only unrolled up to 16 rounds\n"); \
return philox##N##x##W##_R(ROUNDS, ctr, key); \
} \
}; \
typedef Philox##N##x##W##_R<philox##N##x##W##_rounds> Philox##N##x##W; \
} // namespace r123
/** \endcond */
_PhiloxNxW_base_tpl(r123array2x32, r123array1x32, 2, 32) // Philox2x32_R<R>
_PhiloxNxW_base_tpl(r123array4x32, r123array2x32, 4, 32) // Philox4x32_R<R>
#if R123_USE_PHILOX_64BIT
_PhiloxNxW_base_tpl(r123array2x64, r123array1x64, 2, 64) // Philox2x64_R<R>
_PhiloxNxW_base_tpl(r123array4x64, r123array2x64, 4, 64) // Philox4x64_R<R>
#endif
/* The _tpl macros don't quite work to do string-pasting inside comments.
so we just write out the boilerplate documentation four times... */
/**
@defgroup PhiloxNxW Philox Classes and Typedefs
The PhiloxNxW classes export the member functions, typedefs and
operator overloads required by a @ref CBRNG "CBRNG" class.
As described in
<a href="http://dl.acm.org/citation.cfm?doid=2063405"><i>Parallel Random Numbers: As Easy as 1, 2, 3</i> </a>.
The Philox family of counter-based RNGs use integer multiplication, xor and permutation of W-bit words
to scramble its N-word input key. Philox is a mnemonic for Product HI LO Xor).
@class r123::Philox2x32_R
@ingroup PhiloxNxW
exports the member functions, typedefs and operator overloads required by a @ref CBRNG "CBRNG" class.
The template argument, ROUNDS, is the number of times the Philox round
function will be applied.
As of November 2011, the authors know of no statistical flaws with
ROUNDS=6 or more for Philox2x32.
@typedef r123::Philox2x32
@ingroup PhiloxNxW
Philox2x32 is equivalent to Philox2x32_R<10>. With 10 rounds,
Philox2x32 has a considerable safety margin over the minimum number
of rounds with no known statistical flaws, but still has excellent
performance.
@class r123::Philox2x64_R
@ingroup PhiloxNxW
exports the member functions, typedefs and operator overloads required by a @ref CBRNG "CBRNG" class.
The template argument, ROUNDS, is the number of times the Philox round
function will be applied.
As of September 2011, the authors know of no statistical flaws with
ROUNDS=6 or more for Philox2x64.
@typedef r123::Philox2x64
@ingroup PhiloxNxW
Philox2x64 is equivalent to Philox2x64_R<10>. With 10 rounds,
Philox2x64 has a considerable safety margin over the minimum number
of rounds with no known statistical flaws, but still has excellent
performance.
@class r123::Philox4x32_R
@ingroup PhiloxNxW
exports the member functions, typedefs and operator overloads required by a @ref CBRNG "CBRNG" class.
The template argument, ROUNDS, is the number of times the Philox round
function will be applied.
In November 2011, the authors recorded some suspicious p-values (approximately 1.e-7) from
some very long (longer than the default BigCrush length) SimpPoker tests. Despite
the fact that even longer tests reverted to "passing" p-values, a cloud remains over
Philox4x32 with 7 rounds. The authors know of no statistical flaws with
ROUNDS=8 or more for Philox4x32.
@typedef r123::Philox4x32
@ingroup PhiloxNxW
Philox4x32 is equivalent to Philox4x32_R<10>. With 10 rounds,
Philox4x32 has a considerable safety margin over the minimum number
of rounds with no known statistical flaws, but still has excellent
performance.
@class r123::Philox4x64_R
@ingroup PhiloxNxW
exports the member functions, typedefs and operator overloads required by a @ref CBRNG "CBRNG" class.
The template argument, ROUNDS, is the number of times the Philox round
function will be applied.
As of September 2011, the authors know of no statistical flaws with
ROUNDS=7 or more for Philox4x64.
@typedef r123::Philox4x64
@ingroup PhiloxNxW
Philox4x64 is equivalent to Philox4x64_R<10>. With 10 rounds,
Philox4x64 has a considerable safety margin over the minimum number
of rounds with no known statistical flaws, but still has excellent
performance.
*/
#endif /* __cplusplus */
#endif /* _philox_dot_h_ */
|