討論串C++ OpenMP 多CPU同時處理可能的問題
共 7 篇文章
內容預覽:
counter[array[i]%64M] ++;. 就是根據 array[i] 對 64M 的餘數當索引, 對counter[索引]加一計數;. 各別算時餘數的索引可能會都相同, 就有同時 update 同一個 counter[索引]. 的問題.. 如同有人建議的. 假如先把 array[3G]
(還有197個字)
內容預覽:
Let's go back the idea of bucket sort!!!!. This sorting algorithm needs to know "how many" for each number.. When using single CPU, race condition wil
(還有450個字)
內容預覽:
I just test the method to let every CPU go through the whole array. but in charge of different part of coutners. It is actully even slower. than use o
(還有10個字)
內容預覽:
開始擔心會不會是我問題沒看清楚. 我這樣解讀你看是不是合乎你運算式的意思. counter[array[i] % 64M] ++;. 所以counter中的i可以表示成 x + n*64M, 0 <= x < 64M x,n 為正整數(包括零). 然後會被 mod 掉只剩下 x. 因為每個 x 都不
(還有58個字)