xref: /freebsd/contrib/llvm-project/libcxx/include/__random/ranlux.h (revision cb14a3fe5122c879eae1fb480ed7ce82a699ddb6)
1*4824e7fdSDimitry Andric //===----------------------------------------------------------------------===//
2*4824e7fdSDimitry Andric //
3*4824e7fdSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*4824e7fdSDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5*4824e7fdSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*4824e7fdSDimitry Andric //
7*4824e7fdSDimitry Andric //===----------------------------------------------------------------------===//
8*4824e7fdSDimitry Andric 
9*4824e7fdSDimitry Andric #ifndef _LIBCPP___RANDOM_RANLUX_H
10*4824e7fdSDimitry Andric #define _LIBCPP___RANDOM_RANLUX_H
11*4824e7fdSDimitry Andric 
12*4824e7fdSDimitry Andric #include <__config>
13*4824e7fdSDimitry Andric #include <__random/discard_block_engine.h>
14*4824e7fdSDimitry Andric #include <__random/subtract_with_carry_engine.h>
15*4824e7fdSDimitry Andric #include <cstdint>
16*4824e7fdSDimitry Andric 
17*4824e7fdSDimitry Andric #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
18*4824e7fdSDimitry Andric #  pragma GCC system_header
19*4824e7fdSDimitry Andric #endif
20*4824e7fdSDimitry Andric 
21*4824e7fdSDimitry Andric _LIBCPP_BEGIN_NAMESPACE_STD
22*4824e7fdSDimitry Andric 
23*4824e7fdSDimitry Andric typedef subtract_with_carry_engine<uint_fast32_t, 24, 10, 24> ranlux24_base;
24*4824e7fdSDimitry Andric typedef subtract_with_carry_engine<uint_fast64_t, 48, 5, 12> ranlux48_base;
25*4824e7fdSDimitry Andric 
26*4824e7fdSDimitry Andric typedef discard_block_engine<ranlux24_base, 223, 23> ranlux24;
27*4824e7fdSDimitry Andric typedef discard_block_engine<ranlux48_base, 389, 11> ranlux48;
28*4824e7fdSDimitry Andric 
29*4824e7fdSDimitry Andric _LIBCPP_END_NAMESPACE_STD
30*4824e7fdSDimitry Andric 
31*4824e7fdSDimitry Andric #endif // _LIBCPP___RANDOM_RANLUX_H
32