MCPcopy Create free account
hub / github.com/apache/arrow / random_bytes

Function random_bytes

cpp/src/arrow/testing/util.cc:76–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76void random_bytes(int64_t n, uint32_t seed, uint8_t* out) {
77 pcg32_fast gen(seed);
78 std::uniform_int_distribution<uint32_t> d(0, std::numeric_limits<uint8_t>::max());
79 std::generate(out, out + n, [&d, &gen] { return static_cast<uint8_t>(d(gen)); });
80}
81
82std::string random_string(int64_t n, uint32_t seed) {
83 std::string s;

Callers 15

random_stringFunction · 0.70
MakeRandomByteBufferFunction · 0.70
TEST_FFunction · 0.50
MakeRandomDataFunction · 0.50
MemoryBandwidthFunction · 0.50
ParallelMemoryCopyFunction · 0.50
RandomDataFunction · 0.50
TESTFunction · 0.50
TestStressChunkedMethod · 0.50
TEST_FFunction · 0.50
TEST_FFunction · 0.50
TEST_FFunction · 0.50

Calls

no outgoing calls

Tested by 15

TEST_FFunction · 0.40
MakeRandomDataFunction · 0.40
RandomDataFunction · 0.40
TESTFunction · 0.40
TestStressChunkedMethod · 0.40
TEST_FFunction · 0.40
TEST_FFunction · 0.40
TEST_FFunction · 0.40
TESTFunction · 0.40
MakeRandomDataFunction · 0.40
TEST_FFunction · 0.40
CheckBinaryBitBlockOpFunction · 0.40