Lines Matching refs:__m
28 unsigned long long __m, unsigned long long _Mp,
29 bool _MightOverflow = (__a != 0 && __m != 0 && __m-1 > (_Mp-__c)/__a),
30 bool _OverflowOK = ((__m | (__m-1)) > __m), // m = 2^n
31 bool _SchrageOK = (__a != 0 && __m != 0 && __m % __a <= __m / __a)> // r <= q
34 static_assert(__a != 0 || __m != 0 || !_MightOverflow || _OverflowOK || _SchrageOK,
44 unsigned long long __m, unsigned long long _Mp,
45 bool _UseSchrage = __lce_alg_picker<__a, __c, __m, _Mp>::__use_schrage>
50 template <unsigned long long __a, unsigned long long __c, unsigned long long __m>
51 struct __lce_ta<__a, __c, __m, (unsigned long long)(~0), true>
58 const result_type __q = __m / __a;
59 const result_type __r = __m % __a;
62 __x = __t0 + (__t0 < __t1) * __m - __t1;
63 __x += __c - (__x >= __m - __c) * __m;
68 template <unsigned long long __a, unsigned long long __m>
69 struct __lce_ta<__a, 0, __m, (unsigned long long)(~0), true>
76 const result_type __q = __m / __a;
77 const result_type __r = __m % __a;
80 __x = __t0 + (__t0 < __t1) * __m - __t1;
85 template <unsigned long long __a, unsigned long long __c, unsigned long long __m>
86 struct __lce_ta<__a, __c, __m, (unsigned long long)(~0), false>
92 return (__a * __x + __c) % __m;
118 const result_type __m = static_cast<result_type>(_Mp);
120 const result_type __q = __m / __a;
121 const result_type __r = __m % __a;
124 __x = __t0 + (__t0 < __t1) * __m - __t1;
125 __x += __c - (__x >= __m - __c) * __m;
138 const result_type __m = static_cast<result_type>(_Mp);
140 const result_type __q = __m / __a;
141 const result_type __r = __m % __a;
144 __x = __t0 + (__t0 < __t1) * __m - __t1;
158 const result_type __m = static_cast<result_type>(_Mp);
159 return (__a * __x + __c) % __m;
178 template <unsigned long long __a, unsigned long long __c, unsigned long long __m, bool __b>
179 struct __lce_ta<__a, __c, __m, (unsigned short)(~0), __b>
185 return static_cast<result_type>(__lce_ta<__a, __c, __m, unsigned(~0)>::next(__x));
189 template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
205 template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
217 static_assert(__m == 0 || __a < __m, "linear_congruential_engine invalid parameters");
218 static_assert(__m == 0 || __c < __m, "linear_congruential_engine invalid parameters");
222 static _LIBCPP_CONSTEXPR const result_type _Max = __m - _UIntType(1u);
228 static _LIBCPP_CONSTEXPR const result_type modulus = __m;
254 {seed(integral_constant<bool, __m == 0>(),
265 1 + (__m == 0 ? (sizeof(result_type) * __CHAR_BIT__ - 1)/32
266 : (__m > 0x100000000ull))>());}
271 {return __x_ = static_cast<result_type>(__lce_ta<__a, __c, __m, _Mp>::next(__x_));}
291 void seed(false_type, true_type, result_type __s) {__x_ = __s % __m == 0 ?
292 1 : __s % __m;}
294 void seed(false_type, false_type, result_type __s) {__x_ = __s % __m;}
316 template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
317 … _LIBCPP_CONSTEXPR const typename linear_congruential_engine<_UIntType, __a, __c, __m>::result_type
318 linear_congruential_engine<_UIntType, __a, __c, __m>::multiplier;
320 template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
321 … _LIBCPP_CONSTEXPR const typename linear_congruential_engine<_UIntType, __a, __c, __m>::result_type
322 linear_congruential_engine<_UIntType, __a, __c, __m>::increment;
324 template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
325 … _LIBCPP_CONSTEXPR const typename linear_congruential_engine<_UIntType, __a, __c, __m>::result_type
326 linear_congruential_engine<_UIntType, __a, __c, __m>::modulus;
328 template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
329 … _LIBCPP_CONSTEXPR const typename linear_congruential_engine<_UIntType, __a, __c, __m>::result_type
330 linear_congruential_engine<_UIntType, __a, __c, __m>::default_seed;
332 template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
335 linear_congruential_engine<_UIntType, __a, __c, __m>::__seed(_Sseq& __q,
341 result_type __s = static_cast<result_type>(__ar[3] % __m);
345 template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
348 linear_congruential_engine<_UIntType, __a, __c, __m>::__seed(_Sseq& __q,
355 ((uint64_t)__ar[4] << 32)) % __m);
360 class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
364 const linear_congruential_engine<_UIntType, __a, __c, __m>& __x)
374 class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
377 linear_congruential_engine<_UIntType, __a, __c, __m>& __x)