def is_overlapping(t):
 (memlen, itemsize, ndim, shape, strides, offset) = t
 visited = (1 << memlen)
 for ind in indices(shape):
  i = memory_index(ind, t)
  bit = (1 << i)
  if (visited & bit):
   return True
  visited |= bit
 return False

def is_overlapping ( t ) : ( memlen , itemsize , ndim , shape , strides , offset ) = t visited = ( 1 << memlen ) for ind in indices ( shape ) : i = memory_index ( ind , t ) bit = ( 1 << i ) if ( visited & bit ) : return True visited |= bit return False
the structure t is overlapping if at least one memory location is visited twice while iterating through all possible tuples of indices .