Forum Discussion
Björne2
New Contributor
2 years agoScatter-updates to global memory and false sharing
I have an array of unique indexes. Let's call it I. So e.g I = {3, 9, 15, 22, 23, 24, ...}. I want to update all elements of a global float buffer G matching those indexes. Like this: for (int i = 0...
Björne2
New Contributor
2 years agoJust to clarify what I mean by false sharing. If I have the loop iterations G[3] += 123.4; and G[4] += 123.4; they "should" be independent. But perhaps if the indexes 3 and 4 refer to the same page these updates could nevertheless interfere with each other.