Skip to content

Commit

Permalink
Update cpp/src/arrow/tensor_benchmark.cc
Browse files Browse the repository at this point in the history
Co-authored-by: Joris Van den Bossche <[email protected]>
  • Loading branch information
AlenkaF and jorisvandenbossche authored Mar 22, 2024
1 parent 2e1e958 commit 8f7fc4f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cpp/src/arrow/tensor_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ static void BatchToTensorSimple(benchmark::State& state) {
using CType = typename ValueType::c_type;
std::shared_ptr<DataType> ty = TypeTraits<ValueType>::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<std::shared_ptr<Field>> fields = {};
Expand Down

0 comments on commit 8f7fc4f

Please sign in to comment.