CUDA вычисляет гистограмму с общей памятьюC++

Программы на C++. Форум разработчиков
Ответить
Anonymous
 CUDA вычисляет гистограмму с общей памятью

Сообщение Anonymous »


I'm following a udacity problem set lesson to compute a histogram of numBins element out of a long series of numElems values. In this simple case each element's value is also his own bin in the histogram, so generating with CPU code the histogram is as simple as

for (i = 0; i < numElems; ++i) histo[val]++; I don't get the video explanation for a "fast histogram computation" according to which I should sort the values by a 'coarse bin id' and then compute the final histogram.

The question is:
  • why should I sort the values by 'coarse bin indices'?


Источник: https://stackoverflow.com/questions/365 ... red-memory
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «C++»