The default assumption that a user is 'wrong until proven otherwise' is not constructive and wastes time. Mocking also annoys quite a bit.
Originally Posted by jcl
The term "row major" refers not to C memory, but to a 2D matrix definition.
No, it refers to a memory addressing order for multidimensional arrays, and it is language specific.

https://en.wikipedia.org/wiki/Row-_and_column-major_order

Different programming languages handle this in different ways. In C, multidimensional arrays are stored in row-major order, and the array indexes are written row-first (i.e. A[r][c] = A[r*Cols+c])
On the other hand, in Fortran, arrays are stored in memory in column-major order ( while the array indexes are still written row-first)

Originally Posted by jcl
In C you're normally using the inner loop for going through rows and the outer loop for going through columns. That's for speed and cache reasons.
Its the other way around: accessing the first element of a row(outer loop) loads the whole next/contiguous block of memory to the cache, and so subsequent iteration over elements in columns (inner loop) happens very fast.

https://stackoverflow.com/questions/997212/fastest-way-to-loop-through-a-2d-array

Accordingly, "Data[i*Rows+j] " accesses wrong elements of an array which was stored - by convention - as Data[i*Cols+j]