LLFIO v2.00
Loading...
Searching...
No Matches
llfio_v2_xxx::fast_random_file_handle::prng Struct Reference
Inheritance diagram for llfio_v2_xxx::fast_random_file_handle::prng:

Public Types

using _base = QUICKCPPLIB_NAMESPACE::algorithm::small_prng::small_prng
 

Public Member Functions

 prng (span< const byte > seed) noexcept
 
_base::value_type operator() (extent_type offset) noexcept
 

Constructor & Destructor Documentation

◆ prng()

llfio_v2_xxx::fast_random_file_handle::prng::prng ( span< const byte >  seed)
inlineexplicitnoexcept
109 {
110 a = 0xf1ea5eed;
111 b = c = d = 0xdeadbeef;
112 memcpy(&a, seed.data(), std::min(seed.size(), sizeof(*this)));
113 for(size_t i = 0; i < 20; ++i)
114 _base::operator()();
115 }

Member Function Documentation

◆ operator()()

_base::value_type llfio_v2_xxx::fast_random_file_handle::prng::operator() ( extent_type  offset)
inlinenoexcept
118 {
119 a = offset & 0xffffffff;
120 b = (offset >> 32) & 0xffffffff;
121 return _base::operator()();
122 }

The documentation for this struct was generated from the following file: