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

Method InitData

cpp/src/parquet/encoding_test.cc:234–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232 void TearDown() {}
233
234 virtual void InitData(int nvalues, int repeats) {
235 num_values_ = nvalues * repeats;
236 input_bytes_.resize(num_values_ * sizeof(c_type));
237 output_bytes_.resize(num_values_ * sizeof(c_type));
238 draws_ = reinterpret_cast<c_type*>(input_bytes_.data());
239 decode_buf_ = reinterpret_cast<c_type*>(output_bytes_.data());
240 GenerateData<c_type>(nvalues, draws_, &data_buffer_);
241
242 // add some repeated values
243 for (int j = 1; j < repeats; ++j) {
244 for (int i = 0; i < nvalues; ++i) {
245 draws_[nvalues * j + i] = draws_[i];
246 }
247 }
248
249 InitUnencodedByteArrayDataBytes();
250 }
251
252 virtual void CheckRoundtrip() = 0;
253

Callers

nothing calls this directly

Calls 2

resizeMethod · 0.80
dataMethod · 0.45

Tested by

no test coverage detected