Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct unused parameter warnings in groupby #8467

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions cpp/src/groupby/hash/groupby.cu
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class groupby_simple_aggregations_collector final
using cudf::detail::simple_aggregations_collector::visit;

std::vector<std::unique_ptr<aggregation>> visit(data_type col_type,
cudf::detail::min_aggregation const& agg) override
cudf::detail::min_aggregation const&) override
{
std::vector<std::unique_ptr<aggregation>> aggs;
aggs.push_back(col_type.id() == type_id::STRING ? make_argmin_aggregation()
Expand All @@ -115,17 +115,18 @@ class groupby_simple_aggregations_collector final
}

std::vector<std::unique_ptr<aggregation>> visit(data_type col_type,
cudf::detail::max_aggregation const& agg) override
cudf::detail::max_aggregation const&) override
{
std::vector<std::unique_ptr<aggregation>> aggs;
aggs.push_back(col_type.id() == type_id::STRING ? make_argmax_aggregation()
: make_max_aggregation());
return aggs;
}

std::vector<std::unique_ptr<aggregation>> visit(
data_type col_type, cudf::detail::mean_aggregation const& agg) override
std::vector<std::unique_ptr<aggregation>> visit(data_type col_type,
cudf::detail::mean_aggregation const&) override
{
(void)col_type;
CUDF_EXPECTS(is_fixed_width(col_type), "MEAN aggregation expects fixed width type");
std::vector<std::unique_ptr<aggregation>> aggs;
aggs.push_back(make_sum_aggregation());
Expand All @@ -135,8 +136,8 @@ class groupby_simple_aggregations_collector final
return aggs;
}

std::vector<std::unique_ptr<aggregation>> visit(data_type col_type,
cudf::detail::var_aggregation const& agg) override
std::vector<std::unique_ptr<aggregation>> visit(data_type,
cudf::detail::var_aggregation const&) override
{
std::vector<std::unique_ptr<aggregation>> aggs;
aggs.push_back(make_sum_aggregation());
Expand All @@ -146,8 +147,8 @@ class groupby_simple_aggregations_collector final
return aggs;
}

std::vector<std::unique_ptr<aggregation>> visit(data_type col_type,
cudf::detail::std_aggregation const& agg) override
std::vector<std::unique_ptr<aggregation>> visit(data_type,
cudf::detail::std_aggregation const&) override
{
std::vector<std::unique_ptr<aggregation>> aggs;
aggs.push_back(make_sum_aggregation());
Expand Down Expand Up @@ -203,7 +204,7 @@ class hash_compound_agg_finalizer final : public cudf::detail::aggregation_final
auto to_dense_agg_result(cudf::aggregation const& agg)
{
auto s = sparse_results->get_result(col_idx, agg);
auto dense_result_table = cudf::detail::gather(table_view({s}),
auto dense_result_table = cudf::detail::gather(table_view({std::move(s)}),
gather_map.begin(),
gather_map.begin() + map_size,
out_of_bounds_policy::DONT_CHECK,
Expand Down
10 changes: 2 additions & 8 deletions cpp/src/groupby/sort/group_nunique.cu
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,9 @@ struct nunique_functor {
return result;
}

template <typename T>
template <typename T, typename... Args>
typename std::enable_if_t<!cudf::is_equality_comparable<T, T>(), std::unique_ptr<column>>
operator()(column_view const& values,
cudf::device_span<size_type const> group_labels,
size_type const num_groups,
cudf::device_span<size_type const> group_offsets,
null_policy null_handling,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr)
operator()(Args&&...)
{
CUDF_FAIL("list_view group_nunique not supported yet");
}
Expand Down
3 changes: 1 addition & 2 deletions cpp/src/groupby/sort/group_quantiles.cu
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ struct quantiles_functor {
}

template <typename T, typename... Args>
std::enable_if_t<!std::is_arithmetic<T>::value, std::unique_ptr<column>> operator()(
Args&&... args)
std::enable_if_t<!std::is_arithmetic<T>::value, std::unique_ptr<column>> operator()(Args&&...)
{
CUDF_FAIL("Only arithmetic types are supported in quantiles");
}
Expand Down
10 changes: 4 additions & 6 deletions cpp/src/groupby/sort/group_std.cu
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,9 @@ struct var_functor {
auto values_view = column_device_view::create(values, stream);
auto d_values = *values_view;

auto d_group_labels = group_labels.data();
auto d_means = group_means.data<ResultType>();
auto d_group_sizes = group_sizes.data<size_type>();
auto d_result = result->mutable_view().data<ResultType>();
auto d_means = group_means.data<ResultType>();
auto d_group_sizes = group_sizes.data<size_type>();
auto d_result = result->mutable_view().data<ResultType>();

if (!cudf::is_dictionary(values.type())) {
auto values_iter = d_values.begin<T>();
Expand Down Expand Up @@ -145,8 +144,7 @@ struct var_functor {
}

template <typename T, typename... Args>
std::enable_if_t<!std::is_arithmetic<T>::value, std::unique_ptr<column>> operator()(
Args&&... args)
std::enable_if_t<!std::is_arithmetic<T>::value, std::unique_ptr<column>> operator()(Args&&...)
{
CUDF_FAIL("Only numeric types are supported in std/variance");
}
Expand Down