Skip to content

Commit

Permalink
Avoid warning with #pragma unroll in hostdevice code
Browse files Browse the repository at this point in the history
  • Loading branch information
fkallen committed Dec 2, 2020
1 parent 0d96dec commit ce680bf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/multi_bucket_hash_table.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,29 @@ struct ArrayBucket {
HOSTDEVICEQUALIFIER INLINEQUALIFIER
explicit ArrayBucket(value_type value) noexcept
{
#ifdef __CUDA_ARCH__
#pragma unroll
#endif
for(index_type i = 0; i < bucket_size(); ++i)
values_[i] = value;
}

HOSTDEVICEQUALIFIER INLINEQUALIFIER
ArrayBucket(const ArrayBucket& other) noexcept
{
#ifdef __CUDA_ARCH__
#pragma unroll
#endif
for(index_type i = 0; i < bucket_size(); ++i)
values_[i] = other.values_[i];
}

HOSTDEVICEQUALIFIER INLINEQUALIFIER
ArrayBucket& operator =(const ArrayBucket& other) noexcept
{
#ifdef __CUDA_ARCH__
#pragma unroll
#endif
for(index_type i = 0; i < bucket_size(); ++i)
values_[i] = other.values_[i];
return *this;
Expand Down

0 comments on commit ce680bf

Please sign in to comment.