Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEA] New probing scheme concept #205

Open
2 of 4 tasks
sleeepyjack opened this issue Aug 9, 2022 · 4 comments
Open
2 of 4 tasks

[FEA] New probing scheme concept #205

sleeepyjack opened this issue Aug 9, 2022 · 4 comments
Labels
type: feature request New feature request

Comments

@sleeepyjack
Copy link
Collaborator

sleeepyjack commented Aug 9, 2022

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

  • Implement classes cuco::probing_schemes::linear_probing and cuco::probing_schemes::double_hashing
  • Provide an option for windowed, i.e., vectorized probing via customization point object
  • Enable cooperative probing

Backlog

  • Use C++20-style ranges with sentinels

References

@sleeepyjack sleeepyjack added the type: feature request New feature request label Aug 9, 2022
@sleeepyjack sleeepyjack changed the title [FEA] [REFACTOR] New probing scheme concept [FEA] New probing scheme concept Aug 9, 2022
@PointKernel
Copy link
Member

PointKernel commented Aug 11, 2022

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
  • CG custom range
   for(auto&& slot : cooperative_slot_range(g, k){ // slot is unique on each thread
       if(g.any( equals(slot, k) )){ return true; }

       // The evaluation against `end()` will involve another ballot to see if any thread in the group
       // hit an "EMPTY" slot that indicates the whole group should exit 
   } 
   return false;

@PointKernel
Copy link
Member

Distincting probing scheme and storage:

  • Probing scheme provides int-type indices
  • Storage provides a pointer to the storage
  • Probing scheme should be a callable object

https://godbolt.org/z/n8rrxer47

@jrhemstad
Copy link
Collaborator

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
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request New feature request
Projects
None yet
Development

No branches or pull requests

3 participants