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

Method InitBoundData

cpp/src/parquet/encoding_test.cc:1757–1771  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1755 const std::vector<int> kReadBatchSizes = {1, 11};
1756
1757 void InitBoundData(int nvalues, int repeats, c_type half_range) {
1758 num_values_ = nvalues * repeats;
1759 input_bytes_.resize(num_values_ * sizeof(c_type));
1760 output_bytes_.resize(num_values_ * sizeof(c_type));
1761 draws_ = reinterpret_cast<c_type*>(input_bytes_.data());
1762 decode_buf_ = reinterpret_cast<c_type*>(output_bytes_.data());
1763 GenerateBoundData<c_type>(nvalues, draws_, -half_range, half_range, &data_buffer_);
1764
1765 // add some repeated values
1766 for (int j = 1; j < repeats; ++j) {
1767 for (int i = 0; i < nvalues; ++i) {
1768 draws_[nvalues * j + i] = draws_[i];
1769 }
1770 }
1771 }
1772
1773 void ExecuteBound(int nvalues, int repeats, c_type half_range) {
1774 InitBoundData(nvalues, repeats, half_range);

Callers 1

TYPED_TESTFunction · 0.80

Calls 2

resizeMethod · 0.80
dataMethod · 0.45

Tested by

no test coverage detected