Import upstream version 1.14.0+git20210221.1.1f9bd25
Debian Janitor
2 years ago
12 | 12 | |
13 | 13 | script: |
14 | 14 | - make check |
15 | - make prefix=/tmp install-html | |
15 | - make html | |
16 | 16 | |
17 | 17 | deploy: |
18 | 18 | edge: true # opt into deployment v2 |
19 | 19 | provider: pages:git |
20 | local_dir: /tmp/share/doc/Random123/html | |
20 | local_dir: docs/html | |
21 | 21 | token: |
22 | 22 | secure: "p16xEv9Aeny8UkXVLjhL1mIT32PqikuJtidHEUIUE7fHqw7HVfBOLi++o1/FYupQD7E//c4oGTpyswycIjd8z7yGKcyiOgKtkgxc3Gigp+I8sUwFRVp6t21tGMjbrWQKWPQyOsCZv5fl+EwZNNGzzRT8SEQ70ylxotjD9ZOFT3lX3c0btuk7kxA00c4GtX3JWlR9o7kB0KV7Tm1VzdjUJ78tp9GENj1Y9qffLCJb5h+DbR1ESM3hhJMVU9ImzCfX8xohm0hhpbUqXaE6OUy5PPutYoEq97RjsdHy/efKY+jDqZwKNDQpDqwuQZ/+G/cSh+Kypqy7qMVnp4zmapI2VbYjdCHUtvjVr8j2LHL1lD9a66+dunEi9SZjTa7lqLY+3aLFGQSnrCtmd6UMaow++EXOKVTa0CnMU693AD1E+rOetB4JEWNsOsJYaz4yrHhUJMnT/1JYtGfFxOyojgn/eIYwdVCTmZwWf4PMuZ4IaYV/4wniRLmTlHa4E+P2ab3V0AgAdI+l9wEkO/MZBYmjUkHQ3tyO7INJXGBLocatjrvRZOc4qLLpNslCb8/36ZvODERSmlboRB0lGeA3Nn7sW604x9NgN39Gy9sXe8xGYX8UB50AHd7XiPfp6+2AW9uEa8YBQxWB8gwlzwLyWQt8gKPZfzdJOHvY0/feCHGxdrA=" |
23 | 23 | on: |
24 | 24 | branch: main |
25 | condition: $CC = gcc |
30 | 30 | # directive, and the @ref directives are *not* commented out. |
31 | 31 | docs/main.md : README.md |
32 | 32 | echo @mainpage Random123: a Library of Counter-Based Random Number Generators > docs/main.md |
33 | echo '<!--- DO NOT EDIT THIS FILE. IT IS GENERATED by ../GNUmakefile -->' >> docs/main.md | |
33 | 34 | sed -e 's/<!-- \([^-]*\)-->/\1/g' README.md >> docs/main.md |
34 | 35 | |
35 | 36 | # the html target removes and then recreates docs/html. |
0 | 0 | # Random123: a Library of Counter-Based Random Number Generators |
1 | 1 | |
2 | 2 | <!-- Note that this file is both README.md and the doxygen mainpage. |
3 | It should be minimally processed to uncomment the @ref directives | |
3 | It is minimally processed to uncomment the @ref directives | |
4 | 4 | before doxygen is run on it. --> |
5 | 5 | |
6 | 6 | The Random123 library is a collection of counter-based random |
35 | 35 | |
36 | 36 | The Random123 library was written by John Salmon and Mark Moraes. |
37 | 37 | It is available at <a href="https://github.com/DEShawResearch/random123"> |
38 | https://github.com/DEShawResearch/random123</a>. | |
38 | https://github.com/DEShawResearch/random123</a> with documentation at | |
39 | <a href="https://deshawresearch.github.io/random123"> | |
40 | https://deshawresearch.github.io/random123</a>. | |
39 | 41 | Archived releases are also |
40 | 42 | available from |
41 | 43 | <a href="http://deshawresearch.com/resources_random123.html"> |
77 | 79 | `threefry`, `philox`, `ars`, `aesni`. The RNG functions themselves have names like |
78 | 80 | `philox4x32`. C++ class names are capitalized, e.g., `Threefry4x32`. |
79 | 81 | |
80 | ## <!-- \anchor families--> The different families of Random123 generators | |
82 | <!-- @anchor families--> | |
83 | ## The different families of Random123 generators | |
81 | 84 | |
82 | 85 | Several families of CBRNGs are available in this version of the library: |
83 | 86 | <ul> |
88 | 91 | See <!-- @ref--> r123::Philox2x32, <!-- @ref--> r123::Philox4x32, <!-- @ref--> r123::Philox2x64, <!-- @ref--> r123::Philox4x64. |
89 | 92 | The Nx64 forms are only available on hardware |
90 | 93 | that supports 64-bit multiplication producing a 128-bit result. |
91 | <li> <!@ref AESNI--> "AESNI" uses the Advanced Encryption Standard (AES) New Instruction, | |
94 | <li> <!-- @ref AESNI--> "AESNI" uses the Advanced Encryption Standard (AES) New Instruction, | |
92 | 95 | available on certain modern x86 processors (some models of Intel Westmere and Sandy Bridge, |
93 | 96 | and AMD Interlagos, as of 2011). AESNI CBRNGs can operate on four 32bit words (internally converting |
94 | 97 | them to the 128bit SSE type needed by the AES-NI instructions, or on a single m128i "word", |
249 | 252 | to the <a href="http://www.gnu.org/s/gsl/">GNU Scientific Library (GSL).</a> |
250 | 253 | |
251 | 254 | <ul> |
252 | <li>The <!--\ref--> GSL_MICRORNG macro allows the application to | |
255 | <li>The <!-- @ref--> GSL_MICRORNG macro allows the application to | |
253 | 256 | define a GSL random number generator. It |
254 | 257 | can be used with GSL random distributions but still provides the |
255 | 258 | application with complete control over the RNG state (it is |
256 | 259 | analogous to the MicroURNG class, in that it uses shorter |
257 | 260 | periods, and is intended to be instantiated in large numbers for |
258 | 261 | a few calls to the random distribution). |
259 | <li>The <!--\ref--> GSL_CBRNG macro allows the application to create a GSL | |
262 | <li>The <!-- @ref--> GSL_CBRNG macro allows the application to create a GSL | |
260 | 263 | RNG with a completely conventional interface, sacrificing |
261 | 264 | application control over the internal RNG state. |
262 | 265 | </ul> |
0 | 0 | /** |
1 | 1 | @page "Release Notes" |
2 | 2 | <dl> |
3 | <dt>1.14.0 - Jan 19, 2021 </dt> | |
3 | <dt>1.14.0 - Jan 29, 2021 </dt> | |
4 | 4 | <dd><ul> |
5 | 5 | <li> Correctly identify newer versions (16+) of IBM's XL compiler |
6 | 6 | <li> Better support for MS Visual Studio 2015 (and hopefully later) |
207 | 207 | #include "iccfeatures.h" |
208 | 208 | #elif defined(__xlC__) || defined(__ibmxl__) |
209 | 209 | #include "xlcfeatures.h" |
210 | #elif defined(__PGI) | |
211 | #include "pgccfeatures.h" | |
210 | 212 | #elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) |
211 | 213 | #include "sunprofeatures.h" |
212 | 214 | #elif defined(__OPEN64__) |
213 | 215 | #include "open64features.h" |
214 | #elif defined(__clang__) | |
216 | #elif defined(__clang__) || defined(__bgclang__) | |
215 | 217 | #include "clangfeatures.h" |
218 | #elif defined(__FCC_VERSION) || defined(__FUJITSU) | |
219 | #include "fujitsufeatures.h" | |
216 | 220 | #elif defined(__GNUC__) |
217 | 221 | #include "gccfeatures.h" |
218 | #elif defined(__PGI) | |
219 | #include "pgccfeatures.h" | |
220 | 222 | #elif defined(_MSC_FULL_VER) |
221 | 223 | #include "msvcfeatures.h" |
222 | 224 | #else |
0 | /* | |
1 | Note: Minimum/Initial version derived from openclfeatures.h to work | |
2 | with fujitsu compiler (_FCC). | |
3 | */ | |
4 | ||
5 | #ifndef __fujitsufeatures_dot_hpp | |
6 | #define __fujitsufeatures_dot_hpp | |
7 | ||
8 | #ifndef R123_STATIC_INLINE | |
9 | #define R123_STATIC_INLINE static __inline | |
10 | #endif | |
11 | ||
12 | #ifndef R123_FORCE_INLINE | |
13 | #define R123_FORCE_INLINE(decl) decl | |
14 | #endif | |
15 | ||
16 | #ifndef R123_CUDA_DEVICE | |
17 | #define R123_CUDA_DEVICE | |
18 | #endif | |
19 | ||
20 | #ifndef R123_ASSERT | |
21 | #include <assert.h> | |
22 | #define R123_ASSERT(x) assert(x) | |
23 | #endif | |
24 | ||
25 | #ifndef R123_BUILTIN_EXPECT | |
26 | #define R123_BUILTIN_EXPECT(expr,likely) expr | |
27 | #endif | |
28 | ||
29 | #ifndef R123_USE_WMMINTRIN_H | |
30 | #define R123_USE_WMMINTRIN_H 0 | |
31 | #endif | |
32 | ||
33 | #ifndef R123_USE_INTRIN_H | |
34 | #define R123_USE_INTRIN_H 0 | |
35 | #endif | |
36 | ||
37 | #ifndef R123_USE_MULHILO32_ASM | |
38 | #define R123_USE_MULHILO32_ASM 0 | |
39 | #endif | |
40 | ||
41 | #ifndef R123_USE_MULHILO64_ASM | |
42 | #define R123_USE_MULHILO64_ASM 0 | |
43 | #endif | |
44 | ||
45 | #ifndef R123_USE_MULHILO64_MSVC_INTRIN | |
46 | #define R123_USE_MULHILO64_MSVC_INTRIN 0 | |
47 | #endif | |
48 | ||
49 | #ifndef R123_USE_MULHILO64_CUDA_INTRIN | |
50 | #define R123_USE_MULHILO64_CUDA_INTRIN 0 | |
51 | #endif | |
52 | ||
53 | #ifndef R123_USE_MULHILO64_OPENCL_INTRIN | |
54 | #define R123_USE_MULHILO64_OPENCL_INTRIN 0 | |
55 | #endif | |
56 | ||
57 | #ifndef R123_USE_MULHILO64_MULHI_INTRIN | |
58 | #if (defined(__powerpc64__)) | |
59 | #define R123_USE_MULHILO64_MULHI_INTRIN 1 | |
60 | #else | |
61 | #define R123_USE_MULHILO64_MULHI_INTRIN 0 | |
62 | #endif | |
63 | #endif | |
64 | ||
65 | #ifndef R123_MULHILO64_MULHI_INTRIN | |
66 | #define R123_MULHILO64_MULHI_INTRIN __mulhdu | |
67 | #endif | |
68 | ||
69 | #ifndef R123_USE_MULHILO32_MULHI_INTRIN | |
70 | #define R123_USE_MULHILO32_MULHI_INTRIN 0 | |
71 | #endif | |
72 | ||
73 | #ifndef R123_MULHILO32_MULHI_INTRIN | |
74 | #define R123_MULHILO32_MULHI_INTRIN __mulhwu | |
75 | #endif | |
76 | ||
77 | #ifndef __STDC_CONSTANT_MACROS | |
78 | #define __STDC_CONSTANT_MACROS | |
79 | #endif | |
80 | #include <stdint.h> | |
81 | #ifndef UINT64_C | |
82 | #error UINT64_C not defined. You must define __STDC_CONSTANT_MACROS before you #include <stdint.h> | |
83 | #endif | |
84 | ||
85 | #endif |