Commit Graph

9 Commits

Author SHA1 Message Date
sfc-gh-tclinkenbeard a33a0a7fff Add include to DeterministicRandom.cpp 2021-06-28 14:50:35 -07:00
FDB Formatster df90cc89de apply clang-format to *.c, *.cpp, *.h, *.hpp files 2021-03-10 10:18:07 -08:00
Lukas Joswiak 3669615e4b Refactor and clean up 2020-12-03 14:06:11 -08:00
sfc-gh-tclinkenbeard bcda617b80 Benchmark hashing algorithms in flowbench 2020-11-17 23:14:55 -08:00
Andrew Noyes 78b202f3a4 Apply A.J.'s suggestion to randomInt as well 2019-12-05 11:01:41 -08:00
Andrew Noyes cf5cdc4e93
Update flow/DeterministicRandom.cpp
Include equality now that we've adjusted the value by 1.

Co-Authored-By: A.J. Beamon <ajbeamon@users.noreply.github.com>
2019-12-05 11:01:03 -08:00
Andrew Noyes b09f0b334b Take A.J.'s suggestion, which fixes A.J.s counterexample 2019-12-05 10:27:35 -08:00
Andrew Noyes 89a093e035 Accept UBSAN's suggestion
/home/anoyes/workspace/foundationdb/flow/DeterministicRandom.cpp:72:29: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself
2019-12-04 16:45:45 -08:00
Andrew Noyes 4f943be21d Move DeterministicRandom impl to its own translation unit
This will allow me to recompile faster after making changes, and should
(slightly) speed up overall compilation.

I manually verified that the unseed matched for one test before and
after this change, so I probably didn't screw up the refactor
2019-12-04 16:45:32 -08:00