Skip to content

Commit

Permalink
Remove unused code section
Browse files Browse the repository at this point in the history
  • Loading branch information
sleeepyjack committed Aug 27, 2024
1 parent 26ab9f4 commit 1af54b3
Showing 1 changed file with 9 additions and 25 deletions.
34 changes: 9 additions & 25 deletions include/cuco/detail/bloom_filter/bloom_filter_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -114,35 +114,19 @@ class bloom_filter_impl {
}
}

// template <class ProbeKey>
// __device__ void add(cooperative_groups::thread_block_tile<block_words> const& tile,
// ProbeKey const& key)
// {
// auto const hash_value = hash_(key);
// auto const idx = this->block_idx(hash_value);
// auto const rank = tile.thread_rank();

// auto const word = this->pattern_word(hash_value, rank);
// if (word != 0) {
// auto atom_word =
// cuda::atomic_ref<word_type, thread_scope>{*(words_ + (idx * block_words + rank))};
// atom_word.fetch_or(word, cuda::memory_order_relaxed);
// }
// }

template <class CG, class ProbeKey>
__device__ void add(CG const& group, ProbeKey const& key)
template <class ProbeKey>
__device__ void add(cooperative_groups::thread_block_tile<block_words> const& tile,
ProbeKey const& key)
{
auto const hash_value = hash_(key);
auto const idx = this->block_idx(hash_value);
auto const rank = tile.thread_rank();

for (int32_t i = group.thread_rank(); i < block_words; i += group.size()) {
auto const word = this->pattern_word(hash_value, i);
if (word != 0) {
auto atom_word =
cuda::atomic_ref<word_type, thread_scope>{*(words_ + (idx * block_words + i))};
atom_word.fetch_or(word, cuda::memory_order_relaxed);
}
auto const word = this->pattern_word(hash_value, rank);
if (word != 0) {
auto atom_word =
cuda::atomic_ref<word_type, thread_scope>{*(words_ + (idx * block_words + rank))};
atom_word.fetch_or(word, cuda::memory_order_relaxed);
}
}

Expand Down

0 comments on commit 1af54b3

Please sign in to comment.