Commit 2777267
Add static_map heterogeneous lookup example (#762)
## Summary
- add a static_map example that demonstrates hashing and comparing
compatible key types
- show how the map can answer `contains` and `find` queries using probe
keys with extra fields
- register the example with the examples CMake target so it builds
alongside existing samples
## Rationale
- addresses #714 by giving users a reference for
heterogeneous lookups without overloading the existing mapping-table
example
## Changes
- new `static_map/heterogeneous_lookup_example.cu` with custom
hash/equality for tuple probes
- build system entry so the sample is produced with the rest of the
examples
- Tests not run (examples)
Fixes #714
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Yunsong Wang <[email protected]>1 parent 64f57e4 commit 2777267
File tree
4 files changed
+158
-1
lines changed- ci/pre-commit
- examples
- static_map
4 files changed
+158
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| 227 | + | |
227 | 228 | | |
228 | 229 | | |
229 | 230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
94 | 101 | | |
95 | 102 | | |
96 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
0 commit comments