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

Function BinaryMathOpAdd128

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

Source from the content-addressed store, hash-verified

144}
145
146static void BinaryMathOpAdd128(benchmark::State& state) { // NOLINT non-const reference
147 std::vector<BasicDecimal128> v1, v2;
148 for (int x = 0; x < kValueSize; x++) {
149 v1.emplace_back(100 + x, 100 + x);
150 v2.emplace_back(200 + x, 200 + x);
151 }
152
153 for (auto _ : state) {
154 for (int x = 0; x < kValueSize; ++x) {
155 auto add = v1[x] + v2[x];
156 benchmark::DoNotOptimize(add);
157 }
158 }
159 state.SetItemsProcessed(state.iterations() * kValueSize);
160}
161
162static void BinaryMathOpMultiply128(
163 benchmark::State& state) { // NOLINT non-const reference

Callers

nothing calls this directly

Calls 1

emplace_backMethod · 0.80

Tested by

no test coverage detected