vSMC  v3.0.0
Scalable Monte Carlo
rng_define_macro_mkl.hpp
Go to the documentation of this file.
1 //============================================================================
2 // vSMC/include/rng/internal/rng_define_macro_mkl.hpp
3 //----------------------------------------------------------------------------
4 // vSMC: Scalable Monte Carlo
5 //----------------------------------------------------------------------------
6 // Copyright (c) 2013-2016, Yan Zhou
7 // All rights reserved.
8 //
9 // Redistribution and use in source and binary forms, with or without
10 // modification, are permitted provided that the following conditions are met:
11 //
12 // Redistributions of source code must retain the above copyright notice,
13 // this list of conditions and the following disclaimer.
14 //
15 // Redistributions in binary form must reproduce the above copyright notice,
16 // this list of conditions and the following disclaimer in the documentation
17 // and/or other materials provided with the distribution.
18 //
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS
20 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 // POSSIBILITY OF SUCH DAMAGE.
30 //============================================================================
31 
32 #ifndef VSMC_RNG_DEFINE_MACRO_NA
33 #define VSMC_RNG_DEFINE_MACRO_NA(RNGType, Name, name)
34 #endif
35 
36 #if VSMC_HAS_MKL
37 #define VSMC_RNG_DEFINE_MACRO_MKL VSMC_RNG_DEFINE_MACRO
38 #else
39 #define VSMC_RNG_DEFINE_MACRO_MKL VSMC_RNG_DEFINE_MACRO_NA
40 #endif
41 
43 VSMC_RNG_DEFINE_MACRO_MKL(::vsmc::MKL_MCG59_64, MKL_MCG59_64, mkl_mcg69_64)
44 VSMC_RNG_DEFINE_MACRO_MKL(::vsmc::MKL_MT19937, MKL_MT19937, mkl_mt19937)
46  ::vsmc::MKL_MT19937_64, MKL_MT19937_64, mkl_mt19937_64)
47 VSMC_RNG_DEFINE_MACRO_MKL(::vsmc::MKL_MT2203, MKL_MT2203, mkl_mt2203)
48 VSMC_RNG_DEFINE_MACRO_MKL(::vsmc::MKL_MT2203_64, MKL_MT2203_64, mkl_mt2203_64)
49 VSMC_RNG_DEFINE_MACRO_MKL(::vsmc::MKL_SFMT19937, MKL_STMT19937, mkl_sftmt19937)
51  ::vsmc::MKL_SFMT19937_64, MKL_STMT19937_64, mkl_sftmt19937_64)
52 
53 #undef VSMC_RNG_DEFINE_MACRO_MKL
54 
55 #if VSMC_HAS_MKL && VSMC_HAS_RDRAND
56 #define VSMC_RNG_DEFINE_MACRO_MKL VSMC_RNG_DEFINE_MACRO
57 #else
58 #define VSMC_RNG_DEFINE_MACRO_MKL VSMC_RNG_DEFINE_MACRO_NA
59 #endif
60 
63  ::vsmc::MKL_NONDETERM_64, MKL_NONDETERM_64, mkl_nondeterm_64)
64 
65 #undef VSMC_RNG_DEFINE_MACRO_MKL
66 
67 #if VSMC_HAS_MKL && INTEL_MKL_VERSION >= 110300
68 #define VSMC_RNG_DEFINE_MACRO_MKL VSMC_RNG_DEFINE_MACRO
69 #else
70 #define VSMC_RNG_DEFINE_MACRO_MKL VSMC_RNG_DEFINE_MACRO_NA
71 #endif
72 
74  ::vsmc::MKL_PHILOX4X32X10, MKL_PHILOX4X32X10, mkl_philox4x32x10)
76  ::vsmc::MKL_PHILOX4X32X10_64, MKL_PHILOX4X32X10_64, mkl_philox4x32x10_64)
77 
78 #undef VSMC_RNG_DEFINE_MACRO_MKL
79 
80 #if VSMC_HAS_MKL && VSMC_HAS_AES_NI && INTEL_MKL_VERSION >= 110300
81 #define VSMC_RNG_DEFINE_MACRO_MKL VSMC_RNG_DEFINE_MACRO
82 #else
83 #define VSMC_RNG_DEFINE_MACRO_MKL VSMC_RNG_DEFINE_MACRO_NA
84 #endif
85 
86 VSMC_RNG_DEFINE_MACRO_MKL(::vsmc::MKL_ARS5, MKL_ARS5, mkl_ars5)
87 VSMC_RNG_DEFINE_MACRO_MKL(::vsmc::MKL_ARS5_64, MKL_ARS5_64, mkl_ars5_64)
88 
89 #undef VSMC_RNG_DEFINE_MACRO_MKL
Definition: monitor.hpp:48
MKLEngine< VSL_BRNG_NONDETERM, 32 > MKL_NONDETERM
A non-determinstic random number generator.
Definition: mkl.hpp:1106
MKL RNG C++11 engine.
MKLEngine< VSL_BRNG_MT2203, 32 > MKL_MT2203
A set of 6024 Mersenne-Twister pseudoranom number genertor.
Definition: mkl.hpp:1088
MKLEngine< VSL_BRNG_MT19937, 64 > MKL_MT19937_64
A Mersenne-Twister pseudoranom number genertor (64-bit)
Definition: mkl.hpp:1084
MKLEngine< VSL_BRNG_SFMT19937, 64 > MKL_SFMT19937_64
A SIMD-oriented fast Mersenne-Twister pseudoranom number genertor (64-bit)
Definition: mkl.hpp:1102
MKLEngine< VSL_BRNG_NONDETERM, 64 > MKL_NONDETERM_64
A non-determinstic random number generator (64-bit)
Definition: mkl.hpp:1110
MKLEngine< VSL_BRNG_MT19937, 32 > MKL_MT19937
A Mersenne-Twister pseudoranom number genertor.
Definition: mkl.hpp:1080
MKLEngine< VSL_BRNG_MCG59, 32 > MKL_MCG59
A 59-bit multiplicative congruential generator.
Definition: mkl.hpp:1072
MKLEngine< VSL_BRNG_SFMT19937, 32 > MKL_SFMT19937
A SIMD-oriented fast Mersenne-Twister pseudoranom number genertor.
Definition: mkl.hpp:1097
MKLEngine< VSL_BRNG_MT2203, 64 > MKL_MT2203_64
A set of 6024 Mersenne-Twister pseudoranom number genertor (64-bit)
Definition: mkl.hpp:1092
MKLEngine< VSL_BRNG_MCG59, 64 > MKL_MCG59_64
A 59-bit multiplicative congruential generator (64-bit)
Definition: mkl.hpp:1076
#define VSMC_RNG_DEFINE_MACRO_MKL