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

Fix constness / references in weak ordering operator() signatures. #10846

Merged
Merged
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
8 changes: 4 additions & 4 deletions cpp/include/cudf/table/experimental/row_operators.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,14 @@ class device_row_comparator {
CUDF_ENABLE_IF(not cudf::is_relationally_comparable<Element, Element>() and
not std::is_same_v<Element, cudf::struct_view>),
typename... Args>
__device__ cuda::std::pair<weak_ordering, int> operator()(Args...)
__device__ cuda::std::pair<weak_ordering, int> operator()(Args...) const noexcept
{
CUDF_UNREACHABLE("Attempted to compare elements of uncomparable types.");
}

template <typename Element, CUDF_ENABLE_IF(std::is_same_v<Element, cudf::struct_view>)>
__device__ cuda::std::pair<weak_ordering, int> operator()(size_type const lhs_element_index,
size_type const rhs_element_index)
__device__ cuda::std::pair<weak_ordering, int> operator()(
size_type const lhs_element_index, size_type const rhs_element_index) const noexcept
{
column_device_view lcol = _lhs;
column_device_view rcol = _rhs;
Expand Down Expand Up @@ -288,7 +288,7 @@ class device_row_comparator {
*/
template <typename Comparator, weak_ordering... values>
struct weak_ordering_comparator_impl {
__device__ bool operator()(size_type const& lhs, size_type const& rhs)
__device__ bool operator()(size_type const lhs, size_type const rhs) const noexcept
{
weak_ordering const result = comparator(lhs, rhs);
return ((result == values) || ...);
Expand Down