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

Function random_bytes

cpp/src/parquet/test_util.cc:69–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69void random_bytes(int n, uint32_t seed, std::vector<uint8_t>* out) {
70 std::default_random_engine gen(seed);
71 std::uniform_int_distribution<int> d(0, 255);
72
73 out->resize(n);
74 for (int i = 0; i < n; ++i) {
75 (*out)[i] = static_cast<uint8_t>(d(gen));
76 }
77}
78
79void random_bools(int n, double p, uint32_t seed, bool* out) {
80 std::default_random_engine gen(seed);

Callers 4

TestPageSerdeCrcMethod · 0.70
NullableArrayFunction · 0.50
FillBitMapMethod · 0.50

Calls 1

resizeMethod · 0.80

Tested by

no test coverage detected