CUDA with map <value> key> and atomic operations

As far as I know, I can use C ++ templates in CUDA device code. So, if I use a map to create a dictionary, will the operation of adding new values ​​be atomic?

I want to count the number of occurrences of certain values, i.e. create a codebook with code probabilities.

thank

Macs

+3
source share
2 answers

You cannot use STL in device code. You can check thrust for similar functionality (in particular, check out the experimental namespace).

, CUDA C ++, , , ( Fermi).

, atomicAdd() , CUDA .

+2

, STL cuda? , . . .

+1

Source: https://habr.com/ru/post/1734783/


All Articles