You can clone with
HTTPS or Subversion.
Is this correct? If so, it seems kind of non-idiomatic ;-). Can it be refactored?
for ( ix += gridSize; ix < shapeSize; ix += gridSize )
This is correct, although I guess a bit strange...
In the line above we need to initialise the local accumulator y = arr[ix] and then inside the loop we're reading in new values into x = arr[ix] before combining into y, so clearly ix needs to be incremented first. I guess the difficulty is that in the first pass we read array elements into y (to ensure it is initialised) but subsequently read into x. It's a one character change so perhaps comments would help to draw attention to what's going on.
y = arr[ix]
x = arr[ix]