I have made a serial version for a code to calculate a histogram and I know the algorithm works. The problem is that when I do it in CUDA, the only thing I get back as a results are all 0. I can copy the input array dev_x into the output variable h, and I am able to see the input values of x.
The input data is a list of x and y positions with a corresponding color (int from 1 to 5)
The arguments are the input file name, output file name, cellWidth and cellHeight, where cellWidth and cellHeight is the number of regions the input is divided in. A 1000000 X 1000000 array is divided into 1000 X 1000 regions. I need to calculate the number of occurrences of each color in each region.