oclHistogram sample. doc references non-existent function addData256()

Hi Folks,
as I work through the oclHistogram sample I’m encountering more issues.

The function mentioned doesn’t exist in the code; addData256().

“The heart of the 256-bin histogram implementation is addData256() function.”

In addition, the work item seems to allocate per warp sub-histogram storage. Surely it’s not correct for each work item to do this? Should the work item not just index in pre-allocated local memory?

The code then loops through global memory to allocate the histogram counters. Again that seems to go against my understanding of OpenCL. Should the code not index an appropriate global id and the increment the relevant counter?

Obviously there are many ways to do this. I’m confident that it’s my understanding that’s flawed, not the example.

Any advice much appreciated.