Skip to content

Commit

Permalink
Correct function that wasn't returning a value
Browse files Browse the repository at this point in the history
  • Loading branch information
robertmaynard committed Dec 6, 2023
1 parent ecd292b commit 500fe80
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 500fe80

Please sign in to comment.