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

Function BinaryMathOpAdd256

cpp/src/arrow/util/decimal_benchmark.cc:196–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194}
195
196static void BinaryMathOpAdd256(benchmark::State& state) { // NOLINT non-const reference
197 std::vector<BasicDecimal256> v1, v2;
198 for (uint64_t x = 0; x < kValueSize; x++) {
199 v1.push_back(BasicDecimal256({100 + x, 100 + x, 100 + x, 100 + x}));
200 v2.push_back(BasicDecimal256({200 + x, 200 + x, 200 + x, 200 + x}));
201 }
202
203 for (auto _ : state) {
204 for (int x = 0; x < kValueSize; ++x) {
205 auto add = v1[x] + v2[x];
206 benchmark::DoNotOptimize(add);
207 }
208 }
209 state.SetItemsProcessed(state.iterations() * kValueSize);
210}
211
212static void BinaryMathOpMultiply256(
213 benchmark::State& state) { // NOLINT non-const reference

Callers

nothing calls this directly

Calls 2

BasicDecimal256Function · 0.85
push_backMethod · 0.80

Tested by

no test coverage detected