Why is diff[(index+1)%3] not in the lock statement?
I think it is because there isn't any data race if every thread is writing the value 0.0f to diff[(index+1)%3]
Why is diff[(index+1)%3] not in the lock statement?
I think it is because there isn't any data race if every thread is writing the value 0.0f to diff[(index+1)%3]