def _generate_indices(self, storage_a, storage_b):
        """ This method generates the precompute indices, see
        http://cnx.org/content/m12012/latest/image1.png """
        num_iter = self.size
        offset = 1
        step = 0
        for i in range(self.log2_size):
            num_iter = num_iter >> 1
            step = offset
            for j in range(self.size):
                goLeft = (j // step) % 2 == 1
                index_a, index_b = 0, 0
                if goLeft:
                    index_a, index_b = j - step, j
                else:
                    index_a, index_b = j, j + step

                storage_a[i][j] = index_a
                storage_b[i][j] = index_b
            offset = offset << 1
 This method generates the precompute indices, see
        http://cnx.org/content/m12012/latest/image1.png 
metadrive/render_pipeline/rpcore/water/gpu_fft.py