diff --git a/cpp/benchmarks/type_dispatcher/type_dispatcher.cu b/cpp/benchmarks/type_dispatcher/type_dispatcher.cu index 90097889a86..ca19e3046ad 100644 --- a/cpp/benchmarks/type_dispatcher/type_dispatcher.cu +++ b/cpp/benchmarks/type_dispatcher/type_dispatcher.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2021, NVIDIA CORPORATION. + * Copyright (c) 2019-2022, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,15 +14,16 @@ * limitations under the License. */ -#include "../fixture/benchmark_fixture.hpp" -#include "../synchronization/synchronization.hpp" +#include +#include #include #include #include -#include #include +#include +#include #include #include @@ -170,21 +171,18 @@ void launch_kernel(cudf::mutable_table_view input, T** d_ptr, int work_per_threa template void type_dispatcher_benchmark(::benchmark::State& state) { - const auto source_size = static_cast(state.range(1)); - - const auto n_cols = static_cast(state.range(0)); - + const auto n_cols = static_cast(state.range(0)); + const auto source_size = static_cast(state.range(1)); const auto work_per_thread = static_cast(state.range(2)); - auto data = cudf::detail::make_counting_transform_iterator(0, [](auto i) { return i; }); + auto init = cudf::make_fixed_width_scalar(static_cast(0)); - std::vector> source_column_wrappers; + std::vector> source_column_wrappers; std::vector source_columns; for (int i = 0; i < n_cols; ++i) { - source_column_wrappers.push_back( - cudf::test::fixed_width_column_wrapper(data, data + source_size)); - source_columns.push_back(source_column_wrappers[i]); + source_column_wrappers.push_back(cudf::sequence(source_size, *init)); + source_columns.push_back(*source_column_wrappers[i]); } cudf::mutable_table_view source_table{source_columns};