v1.03 prerelease - Full Linux port of crnlib/crunch, in progress - still more testing to do, and some cmd line options (such as -timestamp) don't work under linux yet, but the core stuff (compression/decompression/transcoding) should work fine and performance under Linux is comparable to Windows. The 3 examples haven't been ported yet.
This commit is contained in:
@@ -174,6 +174,13 @@ namespace crnlib
|
||||
return m_kiss99.next() ^ (m_ranctx.next() + m_well512.next());
|
||||
}
|
||||
|
||||
uint64 random::urand64()
|
||||
{
|
||||
uint64 result = urand32();
|
||||
result <<= 32ULL;
|
||||
result |= urand32();
|
||||
return result;
|
||||
}
|
||||
uint32 random::fast_urand32()
|
||||
{
|
||||
return m_well512.next();
|
||||
@@ -317,6 +324,13 @@ namespace crnlib
|
||||
return SHR3 ^ CONG;
|
||||
}
|
||||
|
||||
uint64 fast_random::urand64()
|
||||
{
|
||||
uint64 result = urand32();
|
||||
result <<= 32ULL;
|
||||
result |= urand32();
|
||||
return result;
|
||||
}
|
||||
int fast_random::irand(int l, int h)
|
||||
{
|
||||
CRNLIB_ASSERT(l < h);
|
||||
|
||||
Reference in New Issue
Block a user