@ahojnnes : I am sorry I did not get what you meant by `and then again`. I am just storing the flipped version once to calculate the sums along the diagonal direction.