Accessing Data from a 1D array in a particular pattern

Viewed 22

I am stuck with a very difficult problem of accessing data from a 1D array in a particular sequence as shown below. enter image description here

Putting this in a 2D array with two loops this problem was less complicated because there is some triangular pattern. In 1D array(2D is not working in openCL), the problem got very complicated. It would be great is someone suggest some way to resolve this issue.

Edit In 1D, they used to like below: enter image description here

Number written by hand are indexes.

0 Answers
Related