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

Function BinaryMathOpMultiply256

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

Source from the content-addressed store, hash-verified

210}
211
212static void BinaryMathOpMultiply256(
213 benchmark::State& state) { // NOLINT non-const reference
214 std::vector<BasicDecimal256> v1, v2;
215 for (uint64_t x = 0; x < kValueSize; x++) {
216 v1.push_back(BasicDecimal256({100 + x, 100 + x, 100 + x, 100 + x}));
217 v2.push_back(BasicDecimal256({200 + x, 200 + x, 200 + x, 200 + x}));
218 }
219
220 for (auto _ : state) {
221 for (int x = 0; x < kValueSize; ++x) {
222 auto multiply = v1[x] * v2[x];
223 benchmark::DoNotOptimize(multiply);
224 }
225 }
226 state.SetItemsProcessed(state.iterations() * kValueSize);
227}
228
229static void BinaryMathOpDivide256(
230 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