title: How to search the value from a std::map when I use cuda?
body: <p>I have something stored in std::map, which maps string to vector. Its keys and values looks like</p>
  
  <pre><code> key      value
   "a"-----[1,2,3]
   "b"-----[8,100]
  "cde"----[7,10]
  </code></pre>
  
  <p>For each thread, it needs to process one query. The query looks like</p>
  
  <pre><code>["a", "b"]
  </code></pre>
  
  <p>or</p>
  
  <pre><code>["cde", "a"]
  </code></pre>
  
  <p>So I need to get the value from the map and then do some other jobs like combine them. So as for the first query, the result will be</p>
  
  <pre><code>[1,2,3,8,100]
  </code></pre>
  
  <p>The problem is, <strong>how can threads access the map and find the value by a key?</strong> </p>
  
  <p>At first, I tried to store it in global memory. However, It looks like it can only pass arrays from host to device.</p>
  
  <p>Then I tried to use thrust, but I can only use it to store vector.</p>
  
  <p>Is there any other way I can use? Or maybe I ignored some methods in thrust? Thanks!</p>
  
  <p>**Ps: I do not need to modify the map, I just need to read data from it.</p>