From ce680bfbd1402b17bfeb05f4b885bc88b64dd7ae Mon Sep 17 00:00:00 2001 From: Felix Kallenborn Date: Wed, 2 Dec 2020 12:07:31 +0100 Subject: [PATCH] Avoid warning with #pragma unroll in hostdevice code --- include/multi_bucket_hash_table.cuh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/multi_bucket_hash_table.cuh b/include/multi_bucket_hash_table.cuh index 72c043b..f3d26cd 100644 --- a/include/multi_bucket_hash_table.cuh +++ b/include/multi_bucket_hash_table.cuh @@ -20,7 +20,9 @@ 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; } @@ -28,7 +30,9 @@ struct ArrayBucket { 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]; } @@ -36,7 +40,9 @@ struct ArrayBucket { 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;