how to print keys and values of static_map , can not find accessed function to do it ? #372
-
as the topic title |
Beta Was this translation helpful? Give feedback.
Answered by
sleeepyjack
Sep 27, 2023
Replies: 1 comment 1 reply
-
Here you go: https://godbolt.org/z/Kvn9hPcPo I just altered the I'm assuming performance/memory footprint isn't of concern, as printing out the actual key/value pairs is mostly used for debugging purposes. Thus, we can just compact all the key/value pairs stored in the map into a new vector. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
bug-code
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here you go: https://godbolt.org/z/Kvn9hPcPo
I just altered the
examples/static_map/host_bulk_example.cu
to do what you want to achieve.I'm assuming performance/memory footprint isn't of concern, as printing out the actual key/value pairs is mostly used for debugging purposes. Thus, we can just compact all the key/value pairs stored in the map into a new vector.
Also, I'm assuming you're using the
cuco::static_map
and not the newcuco::experimental::static_map
? There's only a slight API difference between the two.