I am passing a large float array to the device, where the array is defined in global memory on the device. I would like to randomly += certain values in the array such as follows in parralel
d_values[random_index_not_to_exceed_size] += value;
Where value is any value. My ouput is not the sum of all values but rather one value and sometimes two. Am I kidding myself thinking the device will know that it needs to add all values going to some random index, or must it explicitly be done one after another. If there is already discussion of this issue in another thread or in the manual a reference or an example would be appreciated.