From 8f7fc4f9517a4c1fbc0474bcbb434d289c510ec1 Mon Sep 17 00:00:00 2001 From: Alenka Frim Date: Fri, 22 Mar 2024 14:51:50 +0100 Subject: [PATCH] Update cpp/src/arrow/tensor_benchmark.cc Co-authored-by: Joris Van den Bossche --- cpp/src/arrow/tensor_benchmark.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/src/arrow/tensor_benchmark.cc b/cpp/src/arrow/tensor_benchmark.cc index 67bd1a8c89901..8cace41d6004f 100644 --- a/cpp/src/arrow/tensor_benchmark.cc +++ b/cpp/src/arrow/tensor_benchmark.cc @@ -30,7 +30,8 @@ static void BatchToTensorSimple(benchmark::State& state) { using CType = typename ValueType::c_type; std::shared_ptr ty = TypeTraits::type_singleton(); - const int64_t kNumRows = state.range(0) / sizeof(CType); + const int64_t num_cols = state.range(1); + const int64_t num_rows = state.range(0) / num_cols / sizeof(CType); arrow::random::RandomArrayGenerator gen_{42}; std::vector> fields = {};