Skip to content

Commit

Permalink
Correct function that wasn't returning a value (#2045)
Browse files Browse the repository at this point in the history
Found when using a newer version of gcc

Authors:
  - Robert Maynard (https://github.com/robertmaynard)

Approvers:
  - Ben Frederickson (https://github.com/benfred)

URL: #2045
  • Loading branch information
robertmaynard authored Dec 7, 2023
1 parent 9ce20bf commit bc35f2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp/include/raft/random/device/sample.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace raft::random::device {
* @return only the thread0 will contain valid reduced result
*/
template <typename T, typename rng_t, typename i_t = int>
DI T warp_random_sample(rng_t& rng, T& weight, i_t& idx)
DI void warp_random_sample(rng_t& rng, T& weight, i_t& idx)
{
// Todo(#1491): benchmark whether a scan and then selecting within the ranges is more efficient.
static_assert(std::is_integral<T>::value, "The type T must be an integral type.");
Expand Down Expand Up @@ -101,4 +101,4 @@ DI i_t block_random_sample(rng_t rng, T* shbuf, T weight = 1, i_t idx = threadId
return idx;
}

} // namespace raft::random::device
} // namespace raft::random::device

0 comments on commit bc35f2b

Please sign in to comment.