Skip to content

Commit 3c9adcc

Browse files
[pre-commit.ci] auto code formatting
1 parent 9feed37 commit 3c9adcc

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

include/cuco/detail/open_addressing/open_addressing_ref_impl.cuh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -379,15 +379,16 @@ class open_addressing_ref_impl {
379379
auto const val = this->heterogeneous_value(value);
380380
auto const key = this->extract_key(val);
381381

382-
auto probing_iter = probing_scheme_.template make_iterator<bucket_size>(key, storage_ref_.extent());
382+
auto probing_iter =
383+
probing_scheme_.template make_iterator<bucket_size>(key, storage_ref_.extent());
383384
auto const init_idx = *probing_iter;
384385

385386
while (true) {
386387
auto const bucket_slots = storage_ref_[*probing_iter];
387388

388389
for (auto& slot_content : bucket_slots) {
389-
auto const eq_res =
390-
this->predicate_.template operator()<is_insert::YES>(key, this->extract_key(slot_content));
390+
auto const eq_res = this->predicate_.template operator()<is_insert::YES>(
391+
key, this->extract_key(slot_content));
391392

392393
if constexpr (not allows_duplicates) {
393394
// If the key is already in the container, return false
@@ -439,8 +440,8 @@ class open_addressing_ref_impl {
439440

440441
auto const [state, intra_bucket_index] = [&]() {
441442
for (auto i = 0; i < bucket_size; ++i) {
442-
switch (
443-
this->predicate_.template operator()<is_insert::YES>(key, this->extract_key(bucket_slots[i]))) {
443+
switch (this->predicate_.template operator()<is_insert::YES>(
444+
key, this->extract_key(bucket_slots[i]))) {
444445
case detail::equal_result::AVAILABLE:
445446
return bucket_probing_results{detail::equal_result::AVAILABLE, i};
446447
case detail::equal_result::EQUAL: {
@@ -789,16 +790,17 @@ class open_addressing_ref_impl {
789790
[[nodiscard]] __device__ bool contains(ProbeKey const& key) const noexcept
790791
{
791792
static_assert(cg_size == 1, "Non-CG operation is incompatible with the current probing scheme");
792-
auto probing_iter = probing_scheme_.template make_iterator<bucket_size>(key, storage_ref_.extent());
793+
auto probing_iter =
794+
probing_scheme_.template make_iterator<bucket_size>(key, storage_ref_.extent());
793795
auto const init_idx = *probing_iter;
794796

795797
while (true) {
796798
// TODO atomic_ref::load if insert operator is present
797799
auto const bucket_slots = storage_ref_[*probing_iter];
798800

799801
for (auto i = 0; i < bucket_size; ++i) {
800-
switch (
801-
this->predicate_.template operator()<is_insert::NO>(key, this->extract_key(bucket_slots[i]))) {
802+
switch (this->predicate_.template operator()<is_insert::NO>(
803+
key, this->extract_key(bucket_slots[i]))) {
802804
case detail::equal_result::UNEQUAL: continue;
803805
case detail::equal_result::EMPTY: return false;
804806
case detail::equal_result::EQUAL: return true;

0 commit comments

Comments
 (0)