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

[Review] Correct unused parameter warnings in dictonary algorithms #8239

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
12 changes: 3 additions & 9 deletions cpp/src/dictionary/detail/concatenate.cu
Original file line number Diff line number Diff line change
Expand Up @@ -169,18 +169,12 @@ struct dispatch_compute_indices {
return result;
}

template <typename Element>
template <typename Element, typename... Args>
typename std::enable_if_t<!cudf::is_relationally_comparable<Element, Element>(),
std::unique_ptr<column>>
operator()(column_view const&,
column_view const&,
column_view const&,
offsets_pair const*,
size_type const*,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource*)
operator()(Args&&...)
{
CUDF_FAIL("list_view as keys for dictionary not supported");
CUDF_FAIL("dictionary concatenate not supported for this column type");
}
};

Expand Down
45 changes: 15 additions & 30 deletions cpp/src/dictionary/search.cu
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ struct dispatch_scalar_index {
template <typename IndexType,
typename... Args,
std::enable_if_t<not is_index_type<IndexType>()>* = nullptr>
std::unique_ptr<scalar> operator()(Args&&... args)
std::unique_ptr<scalar> operator()(Args&&...)
{
CUDF_FAIL("indices must be an integral type");
}
Expand Down Expand Up @@ -89,33 +89,18 @@ struct find_index_fn {
stream,
mr);
}
template <typename Element,
std::enable_if_t<std::is_same<Element, dictionary32>::value>* = nullptr>
std::unique_ptr<scalar> operator()(dictionary_column_view const& input,
scalar const& key,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr) const
{
CUDF_FAIL("dictionary column cannot be the keys column of another dictionary");
}

template <typename Element, std::enable_if_t<std::is_same<Element, list_view>::value>* = nullptr>
std::unique_ptr<scalar> operator()(dictionary_column_view const& input,
scalar const& key,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr) const
{
CUDF_FAIL("list_view column cannot be the keys column of a dictionary");
}

template <typename Element,
std::enable_if_t<std::is_same<Element, struct_view>::value>* = nullptr>
std::unique_ptr<scalar> operator()(dictionary_column_view const& input,
scalar const& key,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr) const
std::enable_if_t<std::is_same<Element, dictionary32>::value or
std::is_same<Element, list_view>::value or
std::is_same<Element, struct_view>::value>* = nullptr>
std::unique_ptr<scalar> operator()(dictionary_column_view const&,
scalar const&,
rmm::cuda_stream_view,
rmm::mr::device_memory_resource*) const
{
CUDF_FAIL("struct_view column cannot be the keys column of a dictionary");
CUDF_FAIL(
"dictionary, list_view, and struct_view columns cannot be the keys column of a dictionary");
}
};

Expand Down Expand Up @@ -151,12 +136,12 @@ struct find_insert_index_fn {
std::enable_if_t<std::is_same<Element, dictionary32>::value or
std::is_same<Element, list_view>::value or
std::is_same<Element, struct_view>::value>* = nullptr>
std::unique_ptr<scalar> operator()(dictionary_column_view const& input,
scalar const& key,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr) const
std::unique_ptr<scalar> operator()(dictionary_column_view const&,
scalar const&,
rmm::cuda_stream_view,
rmm::mr::device_memory_resource*) const
{
CUDF_FAIL("column cannot be the keys for dictionary");
CUDF_FAIL("dictionary, list_view, and struct_view columns cannot be the keys for a dictionary");
}
};

Expand Down
9 changes: 3 additions & 6 deletions cpp/src/dictionary/set_keys.cu
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,12 @@ struct dispatch_compute_indices {
return result;
}

template <typename Element>
template <typename Element, typename... Args>
typename std::enable_if_t<!cudf::is_relationally_comparable<Element, Element>(),
std::unique_ptr<column>>
operator()(dictionary_column_view const& input,
column_view const& new_keys,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr)
operator()(Args&&...)
{
CUDF_FAIL("list_view dictionary set_keys not supported yet");
CUDF_FAIL("dictionary set_keys not supported for this column type");
}
};

Expand Down