So, in my problem, I need to read a kind of rowOffset and colOffset. The formula is:
rowOffset
colOffset
index = rowOffset * size + colOffset