Skip to content

Commit

Permalink
Add const qualifier to MurmurHash3_32::hash_combine (#10311)
Browse files Browse the repository at this point in the history
Fixes declaration of the internal `MurmurHash3_32::hash_combine()` to add the `const` qualifier.

Found this while working on #10270 and trying to call `hash_combine` from a `const` instance.

Authors:
  - David Wendt (https://github.com/davidwendt)

Approvers:
  - Karthikeyan (https://github.com/karthikeyann)
  - Bradley Dice (https://github.com/bdice)
  - Conor Hoekstra (https://github.com/codereport)

URL: #10311
  • Loading branch information
davidwendt authored Feb 17, 2022
1 parent 28813d7 commit fdad597
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp/include/cudf/detail/utilities/hash_functions.cuh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2021, NVIDIA CORPORATION.
* Copyright (c) 2017-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.
Expand Down Expand Up @@ -130,7 +130,7 @@ struct MurmurHash3_32 {
*
* @returns A hash value that intelligently combines the lhs and rhs hash values
*/
[[nodiscard]] __device__ inline result_type hash_combine(result_type lhs, result_type rhs)
constexpr result_type hash_combine(result_type lhs, result_type rhs) const
{
result_type combined{lhs};

Expand Down

0 comments on commit fdad597

Please sign in to comment.