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

Function random_fixed_byte_array

cpp/src/parquet/test_util.cc:108–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108void random_fixed_byte_array(int n, uint32_t seed, uint8_t* buf, int len, FLBA* out) {
109 std::default_random_engine gen(seed);
110 std::uniform_int_distribution<int> d(0, 255);
111 for (int i = 0; i < n; ++i) {
112 out[i].ptr = buf;
113 for (int j = 0; j < len; ++j) {
114 buf[j] = static_cast<uint8_t>(d(gen));
115 }
116 buf += len;
117 }
118}
119
120void random_byte_array(int n, uint32_t seed, uint8_t* buf, ByteArray* out, int min_size,
121 int max_size) {

Callers 2

InitValues<FLBA>Function · 0.85
GenerateData<FLBA>Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected