From 39cf97c642ba4f76c7e479aa7bec826cb68ab719 Mon Sep 17 00:00:00 2001 From: JayjeetAtGithub Date: Wed, 17 Jul 2024 20:01:18 -0700 Subject: [PATCH] Add ps_suppkey col --- cpp/benchmarks/common/cudf_datagen/dbgen.cu | 28 ++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/cpp/benchmarks/common/cudf_datagen/dbgen.cu b/cpp/benchmarks/common/cudf_datagen/dbgen.cu index 66c81f6cbb6..94bd171235c 100644 --- a/cpp/benchmarks/common/cudf_datagen/dbgen.cu +++ b/cpp/benchmarks/common/cudf_datagen/dbgen.cu @@ -397,32 +397,32 @@ void generate_partsupp(int64_t const& scale_factor, rmm::cuda_stream_view stream = cudf::get_default_stream(), rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource()) { - cudf::size_type num_rows_part = 200000 * scale_factor; - cudf::size_type num_rows = 800000 * scale_factor; + cudf::size_type const num_rows_part = 200000 * scale_factor; + cudf::size_type const num_rows = 800000 * scale_factor; // Generate the `ps_partkey` column - auto p_partkey = gen_primary_key_col(1, num_rows_part); - auto rep_freq_empty = cudf::make_numeric_column(cudf::data_type{cudf::type_id::INT64}, - num_rows_part, - cudf::mask_state::UNALLOCATED, - cudf::get_default_stream()); - auto rep_freq = + auto const p_partkey = gen_primary_key_col(1, num_rows_part); + auto const rep_freq_empty = cudf::make_numeric_column(cudf::data_type{cudf::type_id::INT64}, + num_rows_part, + cudf::mask_state::UNALLOCATED, + cudf::get_default_stream()); + auto const rep_freq = cudf::fill(rep_freq_empty->view(), 0, num_rows_part, cudf::numeric_scalar(4)); - auto rep_table = cudf::repeat(cudf::table_view({p_partkey->view()}), rep_freq->view()); - auto ps_partkey = rep_table->get_column(0); + auto const rep_table = cudf::repeat(cudf::table_view({p_partkey->view()}), rep_freq->view()); + auto const ps_partkey = rep_table->get_column(0); // Generate the `ps_suppkey` column - auto ps_suppkey = calc_ps_suppkey(ps_partkey.view(), scale_factor, num_rows); + auto const ps_suppkey = calc_ps_suppkey(ps_partkey.view(), scale_factor, num_rows); // Generate the `p_availqty` column - auto ps_availqty = gen_rand_num_col(1, 9999, num_rows); + auto const ps_availqty = gen_rand_num_col(1, 9999, num_rows); // Generate the `p_supplycost` column - auto ps_supplycost = gen_rand_num_col(1.00, 1000.00, num_rows); + auto const ps_supplycost = gen_rand_num_col(1.00, 1000.00, num_rows); // Generate the `p_comment` column // NOTE: This column is not compliant with clause 4.2.2.10 of the TPC-H specification - auto ps_comment = gen_rand_str_col(49, 198, num_rows); + auto const ps_comment = gen_rand_str_col(49, 198, num_rows); auto partsupp = cudf::table_view({ps_partkey.view(), ps_suppkey->view(),