Go to the documentation of this file.
15 #ifndef ABSL_RANDOM_INTERNAL_RANDEN_ENGINE_H_
16 #define ABSL_RANDOM_INTERNAL_RANDEN_ENGINE_H_
24 #include <type_traits>
26 #include "absl/base/internal/endian.h"
27 #include "absl/meta/type_traits.h"
28 #include "absl/random/internal/iostream_state_saver.h"
29 #include "absl/random/internal/randen.h"
33 namespace random_internal {
50 "randen_engine template argument must be a built-in unsigned "
64 template <
class SeedSequence,
94 template <
class SeedSequence>
115 template <
class SeedSequence>
118 static_assert(
sizeof(sequence_result_type) == 4,
119 "SeedSequence::result_type must be 32-bit");
129 const size_t entropy_size = seq.size();
132 const size_t requested_entropy = (entropy_size == 0) ? 8
u : entropy_size;
135 #ifdef ABSL_IS_BIG_ENDIAN
138 for (sequence_result_type&
e :
buffer) {
152 size_t src =
dst >> 1;
177 step = std::min<uint64_t>(kRateT,
count);
190 return !(*
this == other);
193 template <
class CharT,
class Traits>
195 std::basic_ostream<CharT, Traits>& os,
212 template <
class CharT,
class Traits>
214 std::basic_istream<CharT, Traits>& is,
264 #endif // ABSL_RANDOM_INTERNAL_RANDEN_ENGINE_H_
const result_type * state() const
static constexpr size_t kCapacityT
static const int kBufferSize
randen_engine(SeedSequence &&seq)
OPENSSL_EXPORT pem_password_cb void * u
randen_engine & operator=(const randen_engine &other)
typename std::enable_if< B, T >::type enable_if_t
void Generate(void *state) const
bool operator!=(const randen_engine &other) const
static constexpr result_type() max()
#define ABSL_NAMESPACE_END
randen_engine(result_type seed_value)
friend std::basic_ostream< CharT, Traits > & operator<<(std::basic_ostream< CharT, Traits > &os, const randen_engine< T > &engine)
#define T(upbtypeconst, upbtype, ctype, default_value)
static constexpr result_type() min()
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
#define ABSL_NAMESPACE_BEGIN
randen_engine(const randen_engine &other)
void reseed(SeedSequence &seq)
static constexpr size_t kStateSizeT
const typedef int * result_type
unsigned __int64 uint64_t
static constexpr size_t kCapacityBytes
uint8_t FromHost(uint8_t x)
static constexpr size_t kStateBytes
void swap(Json::Value &a, Json::Value &b)
Specialize std::swap() for Json::Value.
_W64 unsigned int uintptr_t
static constexpr size_t kSeedBytes
void discard(uint64_t count)
bool operator==(const randen_engine &other) const
friend std::basic_istream< CharT, Traits > & operator>>(std::basic_istream< CharT, Traits > &is, randen_engine< T > &engine)
uint8_t ToHost(uint8_t x)
AllocList * next[kMaxLevel]
char raw_state_[Randen::kStateBytes+8]
void seed(result_type seed_value=0)
void Absorb(const void *seed, void *state) const
absl::enable_if_t< !std::is_convertible< SeedSequence, result_type >::value > seed(SeedSequence &&seq)
ostream_state_saver< std::basic_ostream< CharT, Traits > > make_ostream_state_saver(std::basic_ostream< CharT, Traits > &os, std::ios_base::fmtflags flags=std::ios_base::dec|std::ios_base::left|std::ios_base::scientific)
grpc
Author(s):
autogenerated on Fri May 16 2025 02:59:50