Hashtable with key and value as strings #303
-
|
Hi, I have been trying to implement a cuco hashtable with the following requirements --
I am facing a lot of challenges in implementing this. I wanted to know if it is possible to achieve the above requirements using cuco. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
String is not a fixed-size data type thus would be really inefficient to perform hash table operations like insertion or query. Just to share some ideas with you, for an array of string data, we often store array indices as hash map keys/values thus the map is more of a mapping table. This also requires some extra work, e.g., you need to pass a custom hasher and a custom key equal functor to the map to make it work.
It's possible, but I highly recommend not to do that. cuco hash table is GPU-only |
Beta Was this translation helpful? Give feedback.
String is not a fixed-size data type thus would be really inefficient to perform hash table operations like insertion or query. Just to share some ideas with you, for an array of string data, we often store array indices as hash map keys/values thus the map is more of a mapping table. This also requires some extra work, e.g., you need to pass a custom hasher and a custom key equal functor to the map to make it work.
It's possible, but I highly recommend not to do that. cuco hash table is GPU-only