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