NVIDIA / cuCollections

Apache License 2.0
485 stars 88 forks source link

[FEA] New probing scheme concept #205

Open sleeepyjack opened 2 years ago

sleeepyjack commented 2 years ago

Part of #110 (Refactor of open address data structures)

Development branch: NVIDIA/cuCollections/refactor

Synopsis

Given a key k, a probing sequence provides a sequence of N potentially non-contiguous locations (or values) [i0, i1, i2, ... iN, EMPTY_SENTINEL] where if k exists it is present in [i0, iN].

TODOs

Backlog

References

PointKernel commented 2 years ago

Notes from previous discussions:

for(auto slot_content : custom_range(Probe(key))){
   ...
   if (match(slot_content, key)) return true;
}
return false; // reach end() thus no match
PointKernel commented 2 years ago

Distincting probing scheme and storage:

https://godbolt.org/z/n8rrxer47

jrhemstad commented 2 years ago

I find it to be a really helpful exercise to write the concept for a type as a way to really force you to think about what it's bare minimum requirements are.

Here's what I came up with for a probing scheme: https://godbolt.org/z/Ka8ehn1j5

This is incomplete. We still need some way to reflect the window size / access.

PointKernel commented 2 years ago

CG, range, and probing iterators: https://godbolt.org/z/a1hqvErfv :fire: :fire: :fire: