aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/tr1/random.tcc
diff options
context:
space:
mode:
authorPaolo Carlini <paolo@gcc.gnu.org>2009-09-30 00:50:24 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2009-09-30 00:50:24 +0000
commit300ea2831b894fc143539fe0319f39062b6e4daf (patch)
tree92998be8e05be8e8b4891da6586bae2e8596cf7f /libstdc++-v3/include/tr1/random.tcc
parent0b70519f0101c104871d90f285ba0ab20306a84e (diff)
downloadgcc-300ea2831b894fc143539fe0319f39062b6e4daf.zip
gcc-300ea2831b894fc143539fe0319f39062b6e4daf.tar.gz
gcc-300ea2831b894fc143539fe0319f39062b6e4daf.tar.bz2
random.tcc: Define static const data members.
2009-09-29 Paolo Carlini <paolo.carlini@oracle.com> * include/bits/random.tcc: Define static const data members. * include/tr1/random.tcc: Likewise. * testsuite/26_numerics/random/subtract_with_carry_engine/ requirements/constants.cc: New. * testsuite/26_numerics/random/mersenne_twister_engine/ requirements/constants.cc: Likewise. * testsuite/26_numerics/random/linear_congruential_engine/ requirements/constants.cc: Likewise. * testsuite/26_numerics/random/shuffle_order_engine/requirements/ constants.cc: Likewise. * testsuite/tr1/5_numerical_facilities/random/subtract_with_carry/ requirements/constants.cc: Likewise. * testsuite/tr1/5_numerical_facilities/random/ subtract_with_carry_01/requirements/constants.cc: Likewise. * testsuite/tr1/5_numerical_facilities/random/discard_block/ requirements/constants.cc: Likewise. * testsuite/tr1/5_numerical_facilities/random/linear_congruential/ requirements/constants.cc: Likewise. * testsuite/tr1/5_numerical_facilities/random/mersenne_twister/ requirements/constants.cc: Likewise. * testsuite/tr1/5_numerical_facilities/random/xor_combine/ requirements/constants.cc: Likewise. From-SVN: r152317
Diffstat (limited to 'libstdc++-v3/include/tr1/random.tcc')
-rw-r--r--libstdc++-v3/include/tr1/random.tcc133
1 files changed, 133 insertions, 0 deletions
diff --git a/libstdc++-v3/include/tr1/random.tcc b/libstdc++-v3/include/tr1/random.tcc
index 855f48c..818777d 100644
--- a/libstdc++-v3/include/tr1/random.tcc
+++ b/libstdc++-v3/include/tr1/random.tcc
@@ -89,6 +89,19 @@ namespace tr1
};
} // namespace __detail
+
+ template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+ const _UIntType
+ linear_congruential<_UIntType, __a, __c, __m>::multiplier;
+
+ template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+ const _UIntType
+ linear_congruential<_UIntType, __a, __c, __m>::increment;
+
+ template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+ const _UIntType
+ linear_congruential<_UIntType, __a, __c, __m>::modulus;
+
/**
* Seeds the LCR with integral value @p __x0, adjusted so that the
* ring identity is never a member of the convergence set.
@@ -177,6 +190,83 @@ namespace tr1
template<class _UIntType, int __w, int __n, int __m, int __r,
_UIntType __a, int __u, int __s,
_UIntType __b, int __t, _UIntType __c, int __l>
+ const int
+ mersenne_twister<_UIntType, __w, __n, __m, __r, __a, __u, __s,
+ __b, __t, __c, __l>::word_size;
+
+ template<class _UIntType, int __w, int __n, int __m, int __r,
+ _UIntType __a, int __u, int __s,
+ _UIntType __b, int __t, _UIntType __c, int __l>
+ const int
+ mersenne_twister<_UIntType, __w, __n, __m, __r, __a, __u, __s,
+ __b, __t, __c, __l>::state_size;
+
+ template<class _UIntType, int __w, int __n, int __m, int __r,
+ _UIntType __a, int __u, int __s,
+ _UIntType __b, int __t, _UIntType __c, int __l>
+ const int
+ mersenne_twister<_UIntType, __w, __n, __m, __r, __a, __u, __s,
+ __b, __t, __c, __l>::shift_size;
+
+ template<class _UIntType, int __w, int __n, int __m, int __r,
+ _UIntType __a, int __u, int __s,
+ _UIntType __b, int __t, _UIntType __c, int __l>
+ const int
+ mersenne_twister<_UIntType, __w, __n, __m, __r, __a, __u, __s,
+ __b, __t, __c, __l>::mask_bits;
+
+ template<class _UIntType, int __w, int __n, int __m, int __r,
+ _UIntType __a, int __u, int __s,
+ _UIntType __b, int __t, _UIntType __c, int __l>
+ const _UIntType
+ mersenne_twister<_UIntType, __w, __n, __m, __r, __a, __u, __s,
+ __b, __t, __c, __l>::parameter_a;
+
+ template<class _UIntType, int __w, int __n, int __m, int __r,
+ _UIntType __a, int __u, int __s,
+ _UIntType __b, int __t, _UIntType __c, int __l>
+ const int
+ mersenne_twister<_UIntType, __w, __n, __m, __r, __a, __u, __s,
+ __b, __t, __c, __l>::output_u;
+
+ template<class _UIntType, int __w, int __n, int __m, int __r,
+ _UIntType __a, int __u, int __s,
+ _UIntType __b, int __t, _UIntType __c, int __l>
+ const int
+ mersenne_twister<_UIntType, __w, __n, __m, __r, __a, __u, __s,
+ __b, __t, __c, __l>::output_s;
+
+ template<class _UIntType, int __w, int __n, int __m, int __r,
+ _UIntType __a, int __u, int __s,
+ _UIntType __b, int __t, _UIntType __c, int __l>
+ const _UIntType
+ mersenne_twister<_UIntType, __w, __n, __m, __r, __a, __u, __s,
+ __b, __t, __c, __l>::output_b;
+
+ template<class _UIntType, int __w, int __n, int __m, int __r,
+ _UIntType __a, int __u, int __s,
+ _UIntType __b, int __t, _UIntType __c, int __l>
+ const int
+ mersenne_twister<_UIntType, __w, __n, __m, __r, __a, __u, __s,
+ __b, __t, __c, __l>::output_t;
+
+ template<class _UIntType, int __w, int __n, int __m, int __r,
+ _UIntType __a, int __u, int __s,
+ _UIntType __b, int __t, _UIntType __c, int __l>
+ const _UIntType
+ mersenne_twister<_UIntType, __w, __n, __m, __r, __a, __u, __s,
+ __b, __t, __c, __l>::output_c;
+
+ template<class _UIntType, int __w, int __n, int __m, int __r,
+ _UIntType __a, int __u, int __s,
+ _UIntType __b, int __t, _UIntType __c, int __l>
+ const int
+ mersenne_twister<_UIntType, __w, __n, __m, __r, __a, __u, __s,
+ __b, __t, __c, __l>::output_l;
+
+ template<class _UIntType, int __w, int __n, int __m, int __r,
+ _UIntType __a, int __u, int __s,
+ _UIntType __b, int __t, _UIntType __c, int __l>
void
mersenne_twister<_UIntType, __w, __n, __m, __r, __a, __u, __s,
__b, __t, __c, __l>::
@@ -312,6 +402,18 @@ namespace tr1
template<typename _IntType, _IntType __m, int __s, int __r>
+ const _IntType
+ subtract_with_carry<_IntType, __m, __s, __r>::modulus;
+
+ template<typename _IntType, _IntType __m, int __s, int __r>
+ const int
+ subtract_with_carry<_IntType, __m, __s, __r>::long_lag;
+
+ template<typename _IntType, _IntType __m, int __s, int __r>
+ const int
+ subtract_with_carry<_IntType, __m, __s, __r>::short_lag;
+
+ template<typename _IntType, _IntType __m, int __s, int __r>
void
subtract_with_carry<_IntType, __m, __s, __r>::
seed(unsigned long __value)
@@ -432,6 +534,18 @@ namespace tr1
template<typename _RealType, int __w, int __s, int __r>
+ const int
+ subtract_with_carry_01<_RealType, __w, __s, __r>::word_size;
+
+ template<typename _RealType, int __w, int __s, int __r>
+ const int
+ subtract_with_carry_01<_RealType, __w, __s, __r>::long_lag;
+
+ template<typename _RealType, int __w, int __s, int __r>
+ const int
+ subtract_with_carry_01<_RealType, __w, __s, __r>::short_lag;
+
+ template<typename _RealType, int __w, int __s, int __r>
void
subtract_with_carry_01<_RealType, __w, __s, __r>::
_M_initialize_npows()
@@ -576,6 +690,13 @@ namespace tr1
return __is;
}
+ template<class _UniformRandomNumberGenerator, int __p, int __r>
+ const int
+ discard_block<_UniformRandomNumberGenerator, __p, __r>::block_size;
+
+ template<class _UniformRandomNumberGenerator, int __p, int __r>
+ const int
+ discard_block<_UniformRandomNumberGenerator, __p, __r>::used_block;
template<class _UniformRandomNumberGenerator, int __p, int __r>
typename discard_block<_UniformRandomNumberGenerator,
@@ -641,6 +762,18 @@ namespace tr1
template<class _UniformRandomNumberGenerator1, int __s1,
class _UniformRandomNumberGenerator2, int __s2>
+ const int
+ xor_combine<_UniformRandomNumberGenerator1, __s1,
+ _UniformRandomNumberGenerator2, __s2>::shift1;
+
+ template<class _UniformRandomNumberGenerator1, int __s1,
+ class _UniformRandomNumberGenerator2, int __s2>
+ const int
+ xor_combine<_UniformRandomNumberGenerator1, __s1,
+ _UniformRandomNumberGenerator2, __s2>::shift2;
+
+ template<class _UniformRandomNumberGenerator1, int __s1,
+ class _UniformRandomNumberGenerator2, int __s2>
void
xor_combine<_UniformRandomNumberGenerator1, __s1,
_UniformRandomNumberGenerator2, __s2>::